From 1b3af9be18a23fa05e687c1ab48757466c435f3e Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 24 Sep 2019 07:23:43 +1000 Subject: [PATCH] Generate ElementDefinition.condition in profiles correctly --- .../java/org/hl7/fhir/r5/conformance/ProfileUtilities.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 0c9c5f277..6e5e135a7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -66,6 +66,7 @@ import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumerations.BindingStrength; import org.hl7.fhir.r5.model.Enumerations.FHIRVersion; import org.hl7.fhir.r5.model.Extension; +import org.hl7.fhir.r5.model.IdType; import org.hl7.fhir.r5.model.IntegerType; import org.hl7.fhir.r5.model.PrimitiveType; import org.hl7.fhir.r5.model.Quantity; @@ -1975,6 +1976,9 @@ public class ProfileUtilities extends TranslatingUtilities { base.getConstraint().add(inv); } } + for (IdType id : derived.getCondition()) { + base.getCondition().add(id); + } // now, check that we still have a bindable type; if not, delete the binding - see task 8477 if (dest.hasBinding() && !hasBindableType(dest))