This commit is contained in:
Mark Iantorno 2021-04-01 12:50:09 -04:00 committed by GitHub
parent 91e31e813f
commit 5c9cd6830a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1 @@
* adding fix for R4 when target profile is a reference, and that reference returns an empty list of target profiles

View File

@ -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());

View File

@ -19,7 +19,7 @@
<properties>
<hapi_fhir_version>5.1.0</hapi_fhir_version>
<validator_test_case_version>1.1.58</validator_test_case_version>
<validator_test_case_version>1.1.59</validator_test_case_version>
<junit_jupiter_version>5.7.1</junit_jupiter_version>
<junit_platform_launcher_version>1.7.1</junit_platform_launcher_version>
<maven_surefire_version>3.0.0-M4</maven_surefire_version>