Skip to content

Commit 2d5b30d

Browse files
authored
U4X-833: Ensure that provider which are null are not added to the collection of providers at resource generation (#183)
1 parent 2a9d24a commit 2d5b30d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/src/main/java/org/openmrs/module/ugandaemrsync/server/SyncFHIRRecord.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,10 @@ private String generateFHIRCaseResource(SyncFhirProfile syncFhirProfile, SyncFhi
574574
}
575575

576576
for (Encounter encounter : encounters) {
577-
providerList.add(getProviderFromEncounter(encounter));
577+
Provider provider = getProviderFromEncounter(encounter);
578+
if (provider != null) {
579+
providerList.add(provider);
580+
}
578581
}
579582

580583
if (providerList.size() > 0) {

0 commit comments

Comments
 (0)