fix problem with conversion of ElementDefinition between R3 and R5
This commit is contained in:
parent
9bcc947885
commit
9dc8b910c3
|
@ -328,6 +328,18 @@ public class VersionConvertor_30_50 {
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static org.hl7.fhir.r5.model.UriType convertCodeToUri(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException {
|
||||||
|
org.hl7.fhir.r5.model.UriType tgt = new org.hl7.fhir.r5.model.UriType(src.getValue());
|
||||||
|
copyElement(src, tgt);
|
||||||
|
return tgt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static org.hl7.fhir.dstu3.model.CodeType convertUriToCode(org.hl7.fhir.r5.model.UriType src) throws FHIRException {
|
||||||
|
org.hl7.fhir.dstu3.model.CodeType tgt = new org.hl7.fhir.dstu3.model.CodeType(src.getValue());
|
||||||
|
copyElement(src, tgt);
|
||||||
|
return tgt;
|
||||||
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.UuidType convertUuid(org.hl7.fhir.dstu3.model.UuidType src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.UuidType convertUuid(org.hl7.fhir.dstu3.model.UuidType src) throws FHIRException {
|
||||||
org.hl7.fhir.r5.model.UuidType tgt = new org.hl7.fhir.r5.model.UuidType(src.getValue());
|
org.hl7.fhir.r5.model.UuidType tgt = new org.hl7.fhir.r5.model.UuidType(src.getValue());
|
||||||
copyElement(src, tgt);
|
copyElement(src, tgt);
|
||||||
|
|
|
@ -175,8 +175,9 @@ public class StructureDefinition30_50 {
|
||||||
if (src.hasAbstractElement())
|
if (src.hasAbstractElement())
|
||||||
tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement()));
|
tgt.setAbstractElement((org.hl7.fhir.dstu3.model.BooleanType) VersionConvertor_30_50.convertType(src.getAbstractElement()));
|
||||||
for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) {
|
for (org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) {
|
||||||
if (!tgt.hasContextType())
|
if (!tgt.hasContextType()) {
|
||||||
tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getTypeElement()));
|
tgt.setTypeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertUriToCode(src.getTypeElement()));
|
||||||
|
}
|
||||||
tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression());
|
tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression());
|
||||||
}
|
}
|
||||||
if (src.hasContextInvariant()) {
|
if (src.hasContextInvariant()) {
|
||||||
|
|
Loading…
Reference in New Issue