From e6e1ba404f55fa3c694a0c053297873d4e5b6b38 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Sun, 27 Oct 2019 19:13:46 -0400 Subject: [PATCH] FIx ID issue in 10-50 converter --- .../org/hl7/fhir/convertors/VersionConvertor_10_50.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_50.java index 46a409a9d..1f5d47673 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_50.java @@ -10300,7 +10300,7 @@ public class VersionConvertor_10_50 { tgt.setFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t)); - tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); + tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getIdElement().getIdPart())); tgt.setAbstract(src.getAbstract()); for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) { org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); @@ -10325,7 +10325,7 @@ public class VersionConvertor_10_50 { tgt.getDifferential().getElementFirstRep().getType().clear(); - if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) { + if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getIdElement().getIdPart())) { tgt.setDerivation(TypeDerivationRule.SPECIALIZATION); tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/"+tgt.getType()); // for (ElementDefinition ed : tgt.getSnapshot().getElement()) { @@ -10334,7 +10334,7 @@ public class VersionConvertor_10_50 { // for (ElementDefinition ed : tgt.getDifferential().getElement()) { // ed.setPath(ed.getPath().replace(tgt.getType()+".", tgt.getId()+".")); // } - tgt.setType(tgt.getId()); + tgt.setType(tgt.getIdElement().getIdPart()); } if (tgt.getDerivation() == TypeDerivationRule.SPECIALIZATION) { for (ElementDefinition ed : tgt.getSnapshot().getElement()) {