Skip to content

Commit

Permalink
Bump OCL version from 1.2.9 to 2.4.0 (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaboso authored Oct 8, 2024
1 parent 726f314 commit 714ca3e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.io.File;
import java.util.zip.ZipFile;

@OpenmrsProfile(modules = { "openconceptlab:1.2.9" })
@OpenmrsProfile(modules = { "openconceptlab:1.2.9 - 9.*" })
public class OpenConceptLabLoader extends BaseFileLoader {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public void load_shouldImportOCLPackages() {
Concept c = conceptService.getConceptByUuid("1419AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
Assert.assertNotNull(c);
Assert.assertFalse(c.getRetired());
Assert.assertEquals("VACCINE MANUFACTURER", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine manufacturer", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Fabricant du vaccin", c.getName(Locale.FRENCH).getName());
Assert.assertEquals("Kiwanda cha kutengeneza chanjo", c.getName(LOCALE_SW).getName());
Assert.assertEquals(0, c.getDescriptions().size());
Expand All @@ -100,20 +100,20 @@ public void load_shouldImportOCLPackages() {
Context.setLocale(Locale.ENGLISH);
Concept c = conceptService.getConceptByUuid("5864AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
Assert.assertNotNull(c);
Assert.assertEquals("YELLOW FEVER VACCINATION", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine given for Yellow Fever.", c.getDescription().toString());
Assert.assertEquals("Drug", c.getConceptClass().getName());
Assert.assertEquals("Yellow fever vaccination", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccination given for Yellow Fever.", c.getDescription().toString());
Assert.assertEquals("Procedure", c.getConceptClass().getName());
Assert.assertEquals("N/A", c.getDatatype().getName());
}

// Verify by name
{
Context.setLocale(Locale.ENGLISH);
Concept c = conceptService.getConceptByName("VACCINE MANUFACTURER");
Concept c = conceptService.getConceptByName("Vaccine manufacturer");
Assert.assertNotNull(c);
Assert.assertFalse(c.getRetired());
Assert.assertEquals("VACCINE MANUFACTURER", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine manufacturer", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Fabricant du vaccin", c.getName(Locale.FRENCH).getName());
Assert.assertEquals("Kiwanda cha kutengeneza chanjo", c.getName(LOCALE_SW).getName());
Assert.assertEquals(0, c.getDescriptions().size());
Expand All @@ -140,8 +140,8 @@ public void load_shouldImportOCLPackages() {
Concept c = conceptService.getConceptByMapping("1419", "CIEL");
Assert.assertNotNull(c);
Assert.assertFalse(c.getRetired());
Assert.assertEquals("VACCINE MANUFACTURER", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine manufacturer", c.getName(Locale.ENGLISH).getName());
Assert.assertEquals("Vaccine maker", c.getShortNameInLocale(Locale.ENGLISH).getName());
Assert.assertEquals("Fabricant du vaccin", c.getName(Locale.FRENCH).getName());
Assert.assertEquals("Kiwanda cha kutengeneza chanjo", c.getName(LOCALE_SW).getName());
Assert.assertEquals(0, c.getDescriptions().size());
Expand Down Expand Up @@ -189,7 +189,7 @@ public void load_shouldImportOCLPackages() {
Context.setLocale(Locale.ENGLISH);
Concept c = conceptService.getConceptByName("PNEUMOCOCCAL VACCINE");
Assert.assertNotNull(c);
Assert.assertEquals(3, c.getNames().size());
Assert.assertEquals(6, c.getNames().size());
Assert.assertEquals(0, c.getShortNames().size());
Assert.assertEquals(0, c.getDescriptions().size());
Assert.assertEquals("Drug", c.getConceptClass().getName());
Expand Down Expand Up @@ -218,7 +218,7 @@ public void load_shouldImportOCLPackages() {
Concept c = conceptService.getConceptByUuid("17AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
Assert.assertNotNull(c);
Assert.assertFalse(c.getRetired());
Assert.assertEquals("DIPTHERIA TETANUS BOOSTER", c.getFullySpecifiedName(Locale.ENGLISH).getName());
Assert.assertEquals("Diptheria tetanus booster", c.getFullySpecifiedName(Locale.ENGLISH).getName());
Assert.assertEquals("Drug", c.getConceptClass().getName());
Assert.assertEquals("N/A", c.getDatatype().getName());
}
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<idgenVersion>4.6.0</idgenVersion>
<metadatasharingVersion>1.2.2</metadatasharingVersion>
<metadatamappingVersion>1.3.4</metadatamappingVersion>
<openconceptlabVersion>1.2.9</openconceptlabVersion>
<openconceptlabVersion>2.4.0</openconceptlabVersion>
<fhir2Version>1.6.0</fhir2Version>
<billingVersion>1.1.0</billingVersion>
<stockmanagementVersion>2.0.2-SNAPSHOT</stockmanagementVersion>
Expand Down

0 comments on commit 714ca3e

Please sign in to comment.