Fix version problem with MessageHeader.entry
This commit is contained in:
parent
31238146a0
commit
0148208a14
|
@ -2,6 +2,8 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
|
|||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.model.Type;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
|
||||
public class Canonical40_50 {
|
||||
public static org.hl7.fhir.r5.model.CanonicalType convertCanonical(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException {
|
||||
|
@ -15,4 +17,31 @@ public class Canonical40_50 {
|
|||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.UriType convertCanonicalToUri(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException {
|
||||
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 convertCanonicalToUri(org.hl7.fhir.r5.model.CanonicalType src) throws FHIRException {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static org.hl7.fhir.r5.model.CanonicalType convertUriToCanonical(org.hl7.fhir.r4.model.UriType src) throws FHIRException {
|
||||
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 convertUriToCanonical(org.hl7.fhir.r5.model.UriType src) throws FHIRException {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv40_50.resources40_50;
|
|||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.ContactPoint40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
|
||||
|
@ -45,8 +46,11 @@ public class MessageHeader40_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r5.model.MessageHeader tgt = new org.hl7.fhir.r5.model.MessageHeader();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||
if (src.hasEvent())
|
||||
tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent()));
|
||||
if (src.hasEventUriType())
|
||||
tgt.setEvent(Canonical40_50.convertUriToCanonical(src.getEventUriType()));
|
||||
if (src.hasEventCoding())
|
||||
tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding()));
|
||||
|
||||
for (org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
|
||||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasSender())
|
||||
|
@ -74,8 +78,10 @@ public class MessageHeader40_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r4.model.MessageHeader tgt = new org.hl7.fhir.r4.model.MessageHeader();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||
if (src.hasEvent())
|
||||
tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent()));
|
||||
if (src.hasEventCanonicalType())
|
||||
tgt.setEvent(Canonical40_50.convertCanonicalToUri(src.getEventCanonicalType()));
|
||||
if (src.hasEventCoding())
|
||||
tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding()));
|
||||
for (org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
|
||||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasSender())
|
||||
|
|
Loading…
Reference in New Issue