From bce35251f3a929da5e645d661e176fc410fad11d Mon Sep 17 00:00:00 2001 From: Oliver Egger Date: Fri, 26 Apr 2019 16:28:16 +0200 Subject: [PATCH] GF#21004: fixed values for complex types --- .../java/org/hl7/fhir/r5/validation/InstanceValidator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java index 82cc9ad70..54ed3f6e8 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/InstanceValidator.java @@ -3817,6 +3817,9 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L checkPrimitive(hostContext, errors, ei.path, type, ei.definition, ei.element, profile); } else { // checkNonPrimitive(appContext, errors, ei.path, type, ei.definition, ei.element, profile); + if (ei.definition.hasFixed()) { + checkFixedValue(errors,ei.path, ei.element, ei.definition.getFixed(), ei.definition.getSliceName(), null); + } } if (type.equals("Identifier")) { checkIdentifier(errors, ei.path, ei.element, ei.definition); @@ -3833,7 +3836,7 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L } else if (type.equals("Resource")) { validateContains(hostContext, errors, ei.path, ei.definition, definition, resource, ei.element, localStack, idStatusForEntry(element, ei)); // if // (str.matches(".*([.,/])work\\1$")) - } + } } else { if (rule(errors, IssueType.STRUCTURE, ei.line(), ei.col(), stack.getLiteralPath(), ei.definition != null, "Unrecognised Content " + ei.name)) validateElement(hostContext, errors, profile, ei.definition, null, null, resource, ei.element, type, localStack, false);