Skip to content

Commit

Permalink
fix Remote source identifier with asterisk
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Sep 12, 2024
1 parent ee3d12d commit 3442165
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ public String[] getRemoteStorePaths() {
}

public List<String> getRemoteStoreIdentifier() {
if (remoteStoreIdentifier.get(0).equals(ResourceType.Practitioner + "/*")) {
remoteStoreIdentifier = new ArrayList<>();

if (remoteStoreIdentifier.contains(ResourceType.Practitioner + "/*")) {
List<String> fetchedIdentifiers = new ArrayList<>();
for (String remoteStorePath : getRemoteStorePaths()) {
IGenericClient fhirClient = fhirContext().newRestfulGenericClient(remoteStorePath);
if (!GenericValidator.isBlankOrNull(getUsername())
Expand All @@ -105,14 +106,17 @@ public List<String> getRemoteStoreIdentifier() {
if (bundleComponent.hasResource()
&& ResourceType.Practitioner.equals(bundleComponent.getResource().getResourceType())) {

remoteStoreIdentifier.add(ResourceType.Practitioner + "/"
fetchedIdentifiers.add(ResourceType.Practitioner + "/"
+ bundleComponent.getResource().getIdElement().getIdPart());
}
}
}
}
return fetchedIdentifiers;
} else {
return remoteStoreIdentifier;
}
return remoteStoreIdentifier;

}

}

0 comments on commit 3442165

Please sign in to comment.