more bug fixes in R3/R5 conversions

This commit is contained in:
Grahame Grieve 2020-02-12 18:02:36 +11:00
parent 582a2699a5
commit 9b562f3489
2 changed files with 27 additions and 3 deletions

View File

@ -154,6 +154,30 @@ public class VersionConvertor_30_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.CodeType convertStringToCode(org.hl7.fhir.dstu3.model.StringType src) throws FHIRException {
org.hl7.fhir.r5.model.CodeType tgt = new org.hl7.fhir.r5.model.CodeType(src.getValue());
copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.dstu3.model.StringType convertCodeToString(org.hl7.fhir.r5.model.CodeType src) throws FHIRException {
org.hl7.fhir.dstu3.model.StringType tgt = new org.hl7.fhir.dstu3.model.StringType(src.getValue());
copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.dstu3.model.CodeType convertStringToCode(org.hl7.fhir.r5.model.StringType 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.StringType convertCodeToString(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException {
org.hl7.fhir.r5.model.StringType tgt = new org.hl7.fhir.r5.model.StringType(src.getValue());
copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.DateType convertDate(org.hl7.fhir.dstu3.model.DateType src) throws FHIRException {
org.hl7.fhir.r5.model.DateType tgt = new org.hl7.fhir.r5.model.DateType(src.getValueAsString());
copyElement(src, tgt);

View File

@ -117,7 +117,7 @@ public class ValueSet30_50 {
if (src.hasOp())
tgt.setOp(convertFilterOperator2(src.getOp()));
if (src.hasValueElement())
tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getValueElement()));
tgt.setValueElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertStringToCode(src.getValueElement()));
return tgt;
}
@ -131,7 +131,7 @@ public class ValueSet30_50 {
if (src.hasOp())
tgt.setOp(VersionConvertor_30_50.convertFilterOperator(src.getOp()));
if (src.hasValueElement())
tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement()));
tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertCodeToString(src.getValueElement()));
return tgt;
}