Skip to content

Commit

Permalink
Update ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
emays committed Nov 22, 2024
1 parent efb0a32 commit 36417b1
Show file tree
Hide file tree
Showing 23 changed files with 212 additions and 501 deletions.
16 changes: 15 additions & 1 deletion elk-snomed-owl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
<version>${snomed-test-data.version}</version>
<type>zip</type>
</artifactItem>
<artifactItem>
<groupId>${snomed-test-data.groupid}</groupId>
<artifactId>
snomed-test-data-intl-20221231</artifactId>
<version>${snomed-test-data.version}</version>
<type>zip</type>
</artifactItem>
<artifactItem>
<groupId>${snomed-test-data.groupid}</groupId>
<artifactId>
Expand All @@ -110,7 +117,14 @@
<artifactItem>
<groupId>${snomed-test-data.groupid}</groupId>
<artifactId>
snomed-test-data-us-20210301</artifactId>
snomed-test-data-intl-20240101</artifactId>
<version>${snomed-test-data.version}</version>
<type>zip</type>
</artifactItem>
<artifactItem>
<groupId>${snomed-test-data.groupid}</groupId>
<artifactId>
snomed-test-data-intl-20240701</artifactId>
<version>${snomed-test-data.version}</version>
<type>zip</type>
</artifactItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,16 +40,21 @@
import dev.ikm.elk.snomed.SnomedIsa;

@TestInstance(Lifecycle.PER_CLASS)
public class IncrementalClassifierCldTestIT extends SnomedTestBase {
public class IncrementalClassifierCldUs20230301TestIT extends SnomedTestBase implements SnomedVersionUs {

private static final Logger LOG = LoggerFactory.getLogger(IncrementalClassifierCldTestIT.class);
private static final Logger LOG = LoggerFactory.getLogger(IncrementalClassifierCldUs20230301TestIT.class);

protected String getVersion() {
return "20210301";
@Override
public String getVersion() {
return "20230301";
}

// 413839001 |Chronic lung disease (disorder)|
@Override
public String getInternationalVersion() {
return "20221231";
}

// 413839001 |Chronic lung disease (disorder)|
public static final long cld_id = 413839001;

private SnomedIsa equivalent_classes_isa;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -31,9 +31,19 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class IncrementalClassifierTestIT extends SnomedTestBase {
public class IncrementalClassifierUs20230301TestIT extends SnomedTestBase implements SnomedVersionUs {

private static final Logger LOG = LoggerFactory.getLogger(IncrementalClassifierTestIT.class);
private static final Logger LOG = LoggerFactory.getLogger(IncrementalClassifierUs20230301TestIT.class);

@Override
public String getVersion() {
return "20230301";
}

@Override
public String getInternationalVersion() {
return "20221231";
}

public SnomedOwlOntology classify() throws Exception {
SnomedOwlOntology ontology = SnomedOwlOntology.createOntology();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,6 @@
import dev.ikm.elk.snomed.model.Concept;
import dev.ikm.elk.snomed.model.Definition;
import dev.ikm.elk.snomed.model.RoleGroup;
import dev.ikm.elk.snomed.owl.SnomedOwlOntology;

public class NecessaryNormalFormTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/*-
* #%L
* ELK Integration with SNOMED
* ELK Integration with SNOMED using OWL API
* %%
* Copyright (C) 2023 Integrated Knowledge Management
* Copyright (C) 2023 - 2024 Integrated Knowledge Management
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -31,9 +31,19 @@
import dev.ikm.elk.snomed.model.Definition;
import dev.ikm.elk.snomed.model.DefinitionType;

public class OwlTransformerTestIT extends SnomedTestBase {
public class OwlTransformerUs20230301TestIT extends SnomedTestBase implements SnomedVersionUs {

private static final Logger LOG = LoggerFactory.getLogger(OwlTransformerTestIT.class);
private static final Logger LOG = LoggerFactory.getLogger(OwlTransformerUs20230301TestIT.class);

@Override
public String getVersion() {
return "20230301";
}

@Override
public String getInternationalVersion() {
return "20221231";
}

@Test
public void transform() throws Exception {
Expand All @@ -44,15 +54,16 @@ public void transform() throws Exception {
OwlTransformer ot = new OwlTransformer();
SnomedOntology so = ot.transform(ontology);
LOG.info("Transform complete");
assertEquals(361331, so.getConcepts().size());
assertEquals(131, so.getRoleTypes().size());
assertEquals(367565, so.getConcepts().size());
assertEquals(126, so.getRoleTypes().size());
{
// 86299006 |Tetralogy of Fallot (disorder)|
Concept con = so.getConcept(86299006);
Definition def = con.getDefinitions().getFirst();
assertEquals(DefinitionType.EquivalentConcept, def.getDefinitionType());
assertEquals(1, def.getSuperConcepts().size());
assertEquals(0, def.getUngroupedRoles().size());
assertEquals(0, def.getUngroupedConcreteRoles().size());
assertEquals(4, def.getRoleGroups().size());
}
{
Expand All @@ -62,9 +73,10 @@ public void transform() throws Exception {
Definition def = con.getDefinitions().getFirst();
assertEquals(DefinitionType.EquivalentConcept, def.getDefinitionType());
assertEquals(1, def.getSuperConcepts().size());
assertEquals(3, def.getUngroupedRoles().size());
assertEquals(2, def.getUngroupedRoles().size());
assertEquals(1, def.getUngroupedConcreteRoles().size());
assertEquals(1, def.getRoleGroups().size());
assertEquals(6, def.getRoleGroups().iterator().next().getRoles().size());
assertEquals(4, def.getRoleGroups().iterator().next().getRoles().size());
}
{
// 10000006 |Radiating chest pain (finding)|
Expand All @@ -73,6 +85,7 @@ public void transform() throws Exception {
assertEquals(DefinitionType.SubConcept, def.getDefinitionType());
assertEquals(2, def.getSuperConcepts().size());
assertEquals(0, def.getUngroupedRoles().size());
assertEquals(0, def.getUngroupedConcreteRoles().size());
assertEquals(0, def.getRoleGroups().size());
}
}
Expand Down

This file was deleted.

Loading

0 comments on commit 36417b1

Please sign in to comment.