From b6fabaef1c5404052dbfbe2f53a33c00b5c2cbfc Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 26 Nov 2020 08:51:20 +1100 Subject: [PATCH] fix bug converting type mode in Structure Map --- .../hl7/fhir/convertors/conv40_50/StructureMap40_50.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java index ee3be5756..f525cb558 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/StructureMap40_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv40_50; import org.hl7.fhir.convertors.VersionConvertor_40_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4.model.StructureMap.StructureMapGroupTypeMode; import java.util.stream.Collectors; @@ -220,8 +221,11 @@ public class StructureMap40_50 extends VersionConvertor_40_50 { tgt.setNameElement(convertId(src.getNameElement())); if (src.hasExtends()) tgt.setExtendsElement(convertId(src.getExtendsElement())); - if (src.hasTypeMode()) + if (src.hasTypeMode()) { tgt.setTypeModeElement(convertStructureMapGroupTypeMode(src.getTypeModeElement())); + } else { + tgt.setTypeMode(StructureMapGroupTypeMode.NONE); + } if (src.hasDocumentation()) tgt.setDocumentationElement(convertString(src.getDocumentationElement())); for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent t : src.getInput()) tgt.addInput(convertStructureMapGroupInputComponent(t));