Generate ElementDefinition.condition in profiles correctly

This commit is contained in:
Grahame Grieve 2019-09-24 07:23:43 +10:00
parent 8821de94ca
commit 1b3af9be18
1 changed files with 4 additions and 0 deletions

View File

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