Add tests + changes for Canonical + 1 more UUID coverage fix
Add changes for canonical
This commit is contained in:
parent
48d6829abf
commit
48f8b3ac2c
|
@ -133,9 +133,9 @@ public class Type10_40 {
|
|||
return UnsignedInt10_40.convertUnsignedInt((org.hl7.fhir.r4.model.UnsignedIntType) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.IntegerType)
|
||||
return Integer10_40.convertInteger((org.hl7.fhir.r4.model.IntegerType) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.UriType) return Uri10_40.convertUri((org.hl7.fhir.r4.model.UriType) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.UuidType)
|
||||
return Uuid10_40.convertUuid((org.hl7.fhir.r4.model.UuidType) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.UriType) return Uri10_40.convertUri((org.hl7.fhir.r4.model.UriType) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.Extension)
|
||||
return Extension10_40.convertExtension((org.hl7.fhir.r4.model.Extension) src);
|
||||
if (src instanceof org.hl7.fhir.r4.model.Narrative)
|
||||
|
|
|
@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
|
||||
public class Canonical40_50 {
|
||||
public static org.hl7.fhir.r5.model.CanonicalType convertCanonical(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException {
|
||||
org.hl7.fhir.r5.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CanonicalType(src.getValue()) : new org.hl7.fhir.r5.model.CanonicalType();
|
||||
org.hl7.fhir.r5.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CanonicalType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CanonicalType convertCanonical(org.hl7.fhir.r5.model.CanonicalType src) throws FHIRException {
|
||||
org.hl7.fhir.r4.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.CanonicalType(src.getValue()) : new org.hl7.fhir.r4.model.CanonicalType();
|
||||
org.hl7.fhir.r4.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r4.model.CanonicalType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
|
|
@ -608,6 +608,12 @@ public class VersionConvertorPrimitiveTypeTests {
|
|||
org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
URI_STRINGS),
|
||||
|
||||
//Canonical
|
||||
getFactoryConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.CanonicalType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
org.hl7.fhir.r5.model.CanonicalType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
URI_STRINGS),
|
||||
|
||||
//Url
|
||||
getFactoryConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.UrlType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
|
|
Loading…
Reference in New Issue