Skip to content

Commit

Permalink
Issue #1980 - don't add version to contains if CodeSystem has none
Browse files Browse the repository at this point in the history
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
  • Loading branch information
JohnTimm committed Mar 12, 2021
1 parent 22b1079 commit dd0aea4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.ibm.fhir.model.type.String;
import com.ibm.fhir.model.type.Uri;
import com.ibm.fhir.registry.FHIRRegistry;
import com.ibm.fhir.registry.resource.FHIRRegistryResource;
import com.ibm.fhir.term.service.FHIRTermService;

/**
Expand Down Expand Up @@ -279,7 +280,7 @@ private static Set<Expansion.Contains> getContains(Expansion.Contains contains)

private static String getLatestVersion(Uri system) {
java.lang.String version = FHIRRegistry.getInstance().getLatestVersion(system.getValue(), CodeSystem.class);
return (version != null) ? string(version) : null;
return (version != null && !FHIRRegistryResource.NO_VERSION.toString().equals(version)) ? string(version) : null;
}

private static boolean hasResource(java.lang.String url, Class<? extends Resource> resourceType) {
Expand Down

0 comments on commit dd0aea4

Please sign in to comment.