Skip to content

Commit

Permalink
BAH-3500 | Add a method getRouteConceptByName to get correct concept …
Browse files Browse the repository at this point in the history
…irrespective of the locale.
  • Loading branch information
poojadeshpande01 committed Jan 30, 2024
1 parent aa45884 commit 12de773
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api-1.10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-api-1.10</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion api-1.11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-api-1.11</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion api-1.12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-api-1.12</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public DrugOrder map(EncounterTransaction.DosingInstructions dosingInstructions,
drugOrder.setDose(dosingInstructions.getDose());
drugOrder.setDoseUnits(orderMetadataService.getDoseUnitsConceptByName(dosingInstructions.getDoseUnits()));
drugOrder.setDosingInstructions(dosingInstructions.getAdministrationInstructions());
drugOrder.setRoute(conceptByName(dosingInstructions.getRoute()));
drugOrder.setRoute(orderMetadataService.getRouteConceptByName(dosingInstructions.getRoute()));
drugOrder.setAsNeeded(dosingInstructions.getAsNeeded());
drugOrder.setFrequency(orderMetadataService.getOrderFrequencyByName(dosingInstructions.getFrequency(), false));
drugOrder.setQuantity(Double.valueOf(dosingInstructions.getQuantity()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,15 @@ public Concept getDispenseUnitsConceptByName(String conceptName) {
}
return null;
}

public Concept getRouteConceptByName(String conceptName) {
List<Concept> drugRoutes = orderService.getDrugRoutes();
for (Concept route : drugRoutes) {
if(route.getName().getName().equals(conceptName)){
return route;
}
}
return null;
}

}
2 changes: 1 addition & 1 deletion api-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-api-2.2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion api-pre2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion condition-list/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>emrapi</artifactId>
<groupId>org.openmrs.module</groupId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-condition-list</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion fhir-condition/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>emrapi</artifactId>
<groupId>org.openmrs.module</groupId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-omod</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>EMR API Module</name>
<description>Higher-level APIs to support building EMR functionality in OpenMRS, to supplement the data-level APIs
Expand Down
2 changes: 1 addition & 1 deletion web-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>emrapi</artifactId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>

<artifactId>emrapi-web-2.2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion web-pre2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>emrapi</artifactId>
<groupId>org.openmrs.module</groupId>
<version>1.35.0-SNAPSHOT</version>
<version>1.36.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit 12de773

Please sign in to comment.