diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/primitivetypes10_30/Uri10_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/primitivetypes10_30/Uri10_30.java index c7a5137e8..c15d1af87 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/primitivetypes10_30/Uri10_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/datatypes10_30/primitivetypes10_30/Uri10_30.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri10_30 { public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.dstu2.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValue()) : new org.hl7.fhir.dstu3.model.UriType(); + org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.UriType(); ConversionContext10_30.INSTANCE.getVersionConvertor_10_30().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValue()) : new org.hl7.fhir.dstu2.model.UriType(); + org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2.model.UriType(); ConversionContext10_30.INSTANCE.getVersionConvertor_10_30().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/primitivetypes10_40/Uri10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/primitivetypes10_40/Uri10_40.java index 93a6b0b44..23054a585 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/primitivetypes10_40/Uri10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/datatypes10_40/primitivetypes10_40/Uri10_40.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri10_40 { public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.dstu2.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValue()) : new org.hl7.fhir.r4.model.UriType(); + org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType(); ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValue()) : new org.hl7.fhir.dstu2.model.UriType(); + org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2.model.UriType(); ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/primitivetypes10_50/Uri10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/primitivetypes10_50/Uri10_50.java index 21cdbdbca..5f47569dd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/primitivetypes10_50/Uri10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/primitivetypes10_50/Uri10_50.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri10_50 { public static org.hl7.fhir.r5.model.UriType convertUri(org.hl7.fhir.dstu2.model.UriType src) throws FHIRException { - org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValue()) : new org.hl7.fhir.r5.model.UriType(); + org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2.model.UriType convertUri(org.hl7.fhir.r5.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValue()) : new org.hl7.fhir.dstu2.model.UriType(); + org.hl7.fhir.dstu2.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2.model.UriType(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/primitivetypes14_30/Uri14_30.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/primitivetypes14_30/Uri14_30.java index 715f59859..bf7a80721 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/primitivetypes14_30/Uri14_30.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_30/datatypes14_30/primitivetypes14_30/Uri14_30.java @@ -5,15 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri14_30 { public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.dstu2016may.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UriType tgt = new org.hl7.fhir.dstu3.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.UriType(); ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2016may.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2016may.model.UriType tgt = new org.hl7.fhir.dstu2016may.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.dstu2016may.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2016may.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2016may.model.UriType(); ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/primitivetypes14_40/Uri14_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/primitivetypes14_40/Uri14_40.java index 5538af34c..d3a8fc704 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/primitivetypes14_40/Uri14_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_40/datatypes14_40/primitivetypes14_40/Uri14_40.java @@ -5,15 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri14_40 { public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.dstu2016may.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = new org.hl7.fhir.r4.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType(); ConversionContext14_40.INSTANCE.getVersionConvertor_14_40().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2016may.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2016may.model.UriType tgt = new org.hl7.fhir.dstu2016may.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.dstu2016may.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2016may.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2016may.model.UriType(); ConversionContext14_40.INSTANCE.getVersionConvertor_14_40().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Uri14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Uri14_50.java index 67e8fe346..bbd481e4d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Uri14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Uri14_50.java @@ -5,15 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri14_50 { public static org.hl7.fhir.r5.model.UriType convertUri(org.hl7.fhir.dstu2016may.model.UriType src) throws FHIRException { - org.hl7.fhir.r5.model.UriType tgt = new org.hl7.fhir.r5.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu2016may.model.UriType convertUri(org.hl7.fhir.r5.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu2016may.model.UriType tgt = new org.hl7.fhir.dstu2016may.model.UriType(); - if (src.hasValue()) tgt.setValue(src.getValue()); + org.hl7.fhir.dstu2016may.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu2016may.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu2016may.model.UriType(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/primitivetypes30_40/Uri30_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/primitivetypes30_40/Uri30_40.java index aec3ca25f..846526c4d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/primitivetypes30_40/Uri30_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_40/datatypes30_40/primitivetypes30_40/Uri30_40.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri30_40 { public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValue()) : new org.hl7.fhir.r4.model.UriType(); + org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType(); ConversionContext30_40.INSTANCE.getVersionConvertor_30_40().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValue()) : new org.hl7.fhir.dstu3.model.UriType(); + org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.UriType(); ConversionContext30_40.INSTANCE.getVersionConvertor_30_40().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Uri30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Uri30_50.java index b6a46ee3f..ee61eeef6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Uri30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Uri30_50.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri30_50 { public static org.hl7.fhir.r5.model.UriType convertUri(org.hl7.fhir.dstu3.model.UriType src) throws FHIRException { - org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValue()) : new org.hl7.fhir.r5.model.UriType(); + org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.dstu3.model.UriType convertUri(org.hl7.fhir.r5.model.UriType src) throws FHIRException { - org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValue()) : new org.hl7.fhir.dstu3.model.UriType(); + org.hl7.fhir.dstu3.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UriType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.UriType(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Uri40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Uri40_50.java index 4253f385a..73b15e073 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Uri40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Uri40_50.java @@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException; public class Uri40_50 { public static org.hl7.fhir.r5.model.UriType convertUri(org.hl7.fhir.r4.model.UriType src) throws FHIRException { - org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValue()) : new org.hl7.fhir.r5.model.UriType(); + org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); return tgt; } public static org.hl7.fhir.r4.model.UriType convertUri(org.hl7.fhir.r5.model.UriType src) throws FHIRException { - org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValue()) : new org.hl7.fhir.r4.model.UriType(); + org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); return tgt; } diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveTypeTests.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveTypeTests.java index 0d172a93e..bf5f24c93 100644 --- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveTypeTests.java +++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveTypeTests.java @@ -247,6 +247,44 @@ public class VersionConvertorPrimitiveTypeTests { org.hl7.fhir.r4.model.StringType.class, org.hl7.fhir.r4.model.Type.class, org.hl7.fhir.r5.model.StringType.class, org.hl7.fhir.r5.model.DataType.class, STRING_STRINGS), + + //Uri + getConversionParams(VersionConvertorFactory_10_30.class, + org.hl7.fhir.dstu2.model.UriType.class, org.hl7.fhir.dstu2.model.Type.class, + org.hl7.fhir.dstu3.model.UriType.class, org.hl7.fhir.dstu3.model.Type.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_10_40.class, + org.hl7.fhir.dstu2.model.UriType.class, org.hl7.fhir.dstu2.model.Type.class, + org.hl7.fhir.r4.model.UriType.class, org.hl7.fhir.r4.model.Type.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_10_50.class, + org.hl7.fhir.dstu2.model.UriType.class, org.hl7.fhir.dstu2.model.Type.class, + org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_14_30.class, + org.hl7.fhir.dstu2016may.model.UriType.class, org.hl7.fhir.dstu2016may.model.Type.class, + org.hl7.fhir.dstu3.model.UriType.class, org.hl7.fhir.dstu3.model.Type.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_14_40.class, + org.hl7.fhir.dstu2016may.model.UriType.class, org.hl7.fhir.dstu2016may.model.Type.class, + org.hl7.fhir.r4.model.UriType.class, org.hl7.fhir.r4.model.Type.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_14_50.class, + org.hl7.fhir.dstu2016may.model.UriType.class, org.hl7.fhir.dstu2016may.model.Type.class, + org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_30_40.class, + org.hl7.fhir.dstu3.model.UriType.class, org.hl7.fhir.dstu3.model.Type.class, + org.hl7.fhir.r4.model.UriType.class, org.hl7.fhir.r4.model.Type.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_30_50.class, + org.hl7.fhir.dstu3.model.UriType.class, org.hl7.fhir.dstu3.model.Type.class, + org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class, + URI_STRINGS), + getConversionParams(VersionConvertorFactory_40_50.class, + org.hl7.fhir.r4.model.UriType.class, org.hl7.fhir.r4.model.Type.class, + org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class, + URI_STRINGS), //Date getConversionParams(VersionConvertorFactory_10_30.class,