From a31e3d5ed11c2dc43c52485dccf8be3c59c11780 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 12 Oct 2023 12:32:56 -0400 Subject: [PATCH] Fix DSTU3 testValidateBuiltInProfiles() --- .../FhirInstanceValidatorDstu3Test.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index e1c4f3840ce..5a081f24810 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -686,8 +686,21 @@ public class FhirInstanceValidatorDstu3Test { } else if (t.getMessage().contains("side is inherently a collection") && t.getMessage().endsWith("may fail or return false if there is more than one item in the content being evaluated")) { // Some DSTU3 FHIRPath expressions now produce warnings if a singleton is compared to a collection that potentially has > 1 elements return false; - } else { - return true; + } else if (t.getMessage().contains("When HL7 is publishing a resource, the owning committee must be stated using the http://hl7.org/fhir/StructureDefinition/structuredefinition-wg extension")) { + // DSTU3 resources predate this strict requirement + return false; + } else if (t.getMessage().equals("The nominated WG 'rcrim' is unknown")) { + //The rcrim workgroup is now brr http://www.hl7.org/Special/committees/rcrim/index.cfm + return false; + } else if (t.getSeverity() == ResultSeverityEnum.WARNING + && ( t.getMessageId().equals("VALIDATION_HL7_PUBLISHER_MISMATCH") + || t.getMessageId().equals("VALIDATION_HL7_WG_URL") + )) { + // Workgroups have been updated and have slightly different naming conventions and URLs. + return false; + } + else { + return true; } }) .collect(Collectors.toList());