diff --git a/exec/pom.xml b/exec/pom.xml index b10f7edc..cb1fca03 100755 --- a/exec/pom.xml +++ b/exec/pom.xml @@ -21,7 +21,7 @@ com.google.fhir.gateway fhir-gateway - 0.1.34 + 0.1.35 exec diff --git a/plugins/pom.xml b/plugins/pom.xml index 7c4cda08..ae174164 100755 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -23,7 +23,7 @@ implementations do not have to do this; they can redeclare those deps. --> com.google.fhir.gateway fhir-gateway - 0.1.34 + 0.1.35 plugins diff --git a/plugins/src/main/java/com/google/fhir/gateway/plugin/OpenSRPHelper.java b/plugins/src/main/java/com/google/fhir/gateway/plugin/OpenSRPHelper.java index ccb2a65c..ba9371d6 100644 --- a/plugins/src/main/java/com/google/fhir/gateway/plugin/OpenSRPHelper.java +++ b/plugins/src/main/java/com/google/fhir/gateway/plugin/OpenSRPHelper.java @@ -98,7 +98,7 @@ private Bundle getAttributedPractitionerDetailsByPractitioner(Practitioner pract List officialLocationIds = getOfficialLocationIdentifiersByLocationIds(supervisorCareTeamOrganizationLocationIds); List locationHierarchies = - getLocationsHierarchyByOfficialLocationIdentifiers(officialLocationIds); + getLocationsHierarchyByLocationIds(officialLocationIds); List attributedLocationsList = getAttributedLocations(locationHierarchies); List attributedOrganizationIds = getOrganizationIdsByLocationIds(attributedLocationsList); @@ -261,14 +261,8 @@ private PractitionerDetails getPractitionerDetailsByPractitioner(Practitioner pr List locationIds = getLocationIdentifiersByOrganizationAffiliations(organizationAffiliations); - List locationsIdentifiers = - getOfficialLocationIdentifiersByLocationIds( - locationIds); // TODO Investigate why the Location ID and official identifiers are - // different - logger.info("Searching for location hierarchy list by locations identifiers"); - List locationHierarchyList = - getLocationsHierarchyByOfficialLocationIdentifiers(locationsIdentifiers); + List locationHierarchyList = getLocationsHierarchyByLocationIds(locationIds); fhirPractitionerDetails.setLocationHierarchyList(locationHierarchyList); logger.info("Searching for locations by ids"); @@ -503,15 +497,14 @@ private List mapBundleToOrganizationAffiliation( .collect(Collectors.toList()); } - private List getLocationsHierarchyByOfficialLocationIdentifiers( - List officialLocationIdentifiers) { - if (officialLocationIdentifiers.isEmpty()) return new ArrayList<>(); + private List getLocationsHierarchyByLocationIds(List locationIds) { + if (locationIds.isEmpty()) return new ArrayList<>(); Bundle bundle = getFhirClientForR4() .search() .forResource(LocationHierarchy.class) - .where(LocationHierarchy.IDENTIFIER.exactly().codes(officialLocationIdentifiers)) + .where(LocationHierarchy.RES_ID.exactly().codes(locationIds)) .returnBundle(Bundle.class) .execute(); diff --git a/pom.xml b/pom.xml index 3d177f4c..da62eba3 100755 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ com.google.fhir.gateway fhir-gateway - 0.1.34 + 0.1.35 pom FHIR Information Gateway diff --git a/server/pom.xml b/server/pom.xml index c5d0a4b8..c52d3070 100755 --- a/server/pom.xml +++ b/server/pom.xml @@ -21,7 +21,7 @@ com.google.fhir.gateway fhir-gateway - 0.1.34 + 0.1.35 server