diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e69de29bb..a4ec44081 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -0,0 +1 @@ +* adding fix for R4 when target profile is a reference, and that reference returns an empty list of target profiles \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java index fdd4e5fc5..cc3fd0233 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java @@ -2602,7 +2602,10 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat // the type has to match the specified String tu = isAbsolute(reference.getType()) ? reference.getType() : "http://hl7.org/fhir/StructureDefinition/" + reference.getType(); TypeRefComponent containerType = container.getType("Reference"); - if (!containerType.hasTargetProfile(tu) && !containerType.hasTargetProfile("http://hl7.org/fhir/StructureDefinition/Resource")) { + if (!containerType.hasTargetProfile(tu) + && !containerType.hasTargetProfile("http://hl7.org/fhir/StructureDefinition/Resource") + && !containerType.getTargetProfile().isEmpty() + ) { boolean matchingResource = false; for (CanonicalType target : containerType.getTargetProfile()) { StructureDefinition sd = resolveProfile(profile, target.asStringValue()); diff --git a/pom.xml b/pom.xml index 9374ad20d..76eb08e49 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.1.0 - 1.1.58 + 1.1.59 5.7.1 1.7.1 3.0.0-M4