From ff81c16aebc90160a1dd8f1aabb147e398f6ed44 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 13 Dec 2023 09:07:48 -0500 Subject: [PATCH] Fix using wrong resource type when validating constraints in data type definitions (R6) --- .../validation/instance/type/StructureDefinitionValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index 7dcd5ed99..bf34be42f 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -574,7 +574,7 @@ public class StructureDefinitionValidator extends BaseValidator { fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings); } else { StructureDefinition sd = context.fetchTypeDefinition(rootPath); - if (sd != null) { + if (sd != null && sd.getKind() == StructureDefinitionKind.RESOURCE) { fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings); } else { fpe.checkOnTypes(vc, "DomainResource", types, fpe.parse(exp), warnings);