Merge pull request #127 from hapifhir/initial_refactor_of_convertors
Refactored main version convertor files
This commit is contained in:
commit
9e8ba4b597
|
@ -19,6 +19,7 @@ tmp.txt
|
|||
ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString/
|
||||
ca.uhn.fhir.jpa.entity.ResourceTable/
|
||||
ca.uhn.fhir.jpa.entity.TermConcept/
|
||||
.java-version
|
||||
|
||||
# Vagrant stuff.
|
||||
.vagrant
|
||||
|
|
|
@ -413,7 +413,7 @@ public class ExtensionDefinitionGenerator {
|
|||
return new org.hl7.fhir.dstu2016may.formats.JsonParser().composeBytes(res);
|
||||
} else if (v == FHIRVersion._1_0_2) {
|
||||
VersionConvertorAdvisor40 advisor = new IGR2ConvertorAdvisor();
|
||||
org.hl7.fhir.dstu2.model.Resource res = new VersionConvertor_10_40(advisor ).convertResource(resource);
|
||||
org.hl7.fhir.dstu2.model.Resource res = VersionConvertor_10_40.convertResource(resource, advisor);
|
||||
return new org.hl7.fhir.dstu2.formats.JsonParser().composeBytes(res);
|
||||
} else if (v == FHIRVersion._4_0_0) {
|
||||
return new JsonParser().composeBytes(resource);
|
||||
|
@ -431,7 +431,7 @@ public class ExtensionDefinitionGenerator {
|
|||
} else if (v == FHIRVersion._1_0_2) {
|
||||
org.hl7.fhir.dstu2.model.Resource res = new org.hl7.fhir.dstu2.formats.JsonParser().parse(inputStream);
|
||||
VersionConvertorAdvisor40 advisor = new IGR2ConvertorAdvisor();
|
||||
return new VersionConvertor_10_40(advisor ).convertResource(res);
|
||||
return VersionConvertor_10_40.convertResource(res, advisor);
|
||||
} else if (v == FHIRVersion._4_0_0) {
|
||||
return new JsonParser().parse(inputStream);
|
||||
} else
|
||||
|
|
|
@ -53,7 +53,7 @@ public class IGPackConverter102 implements VersionConvertorAdvisor30 {
|
|||
System.out.println("process "+s);
|
||||
org.hl7.fhir.dstu2.formats.XmlParser xp = new org.hl7.fhir.dstu2.formats.XmlParser();
|
||||
org.hl7.fhir.dstu2.model.Resource r10 = xp.parse(new FileInputStream("C:\\temp\\igpack2\\"+s));
|
||||
org.hl7.fhir.dstu3.model.Resource r17 = new VersionConvertor_10_30(this).convertResource(r10);
|
||||
org.hl7.fhir.dstu3.model.Resource r17 = VersionConvertor_10_30.convertResource(r10, this);
|
||||
org.hl7.fhir.dstu3.formats.XmlParser xc = new org.hl7.fhir.dstu3.formats.XmlParser();
|
||||
xc.setOutputStyle(OutputStyle.PRETTY);
|
||||
xc.compose(new FileOutputStream("C:\\temp\\igpack2\\"+s), r17);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class R2ToR3Loader implements IContextResourceLoader, VersionConvertorAdv
|
|||
r2 = new JsonParser().parse(stream);
|
||||
else
|
||||
r2 = new XmlParser().parse(stream);
|
||||
org.hl7.fhir.dstu3.model.Resource r3 = new VersionConvertor_10_30(this).convertResource(r2);
|
||||
org.hl7.fhir.dstu3.model.Resource r3 = VersionConvertor_10_30.convertResource(r2, this);
|
||||
Bundle b;
|
||||
if (r3 instanceof Bundle)
|
||||
b = (Bundle) r3;
|
||||
|
|
|
@ -55,7 +55,7 @@ public class R2ToR4Loader implements IContextResourceLoader, VersionConvertorAdv
|
|||
r2 = new JsonParser().parse(stream);
|
||||
else
|
||||
r2 = new XmlParser().parse(stream);
|
||||
org.hl7.fhir.r4.model.Resource r4 = new VersionConvertor_10_40(this).convertResource(r2);
|
||||
org.hl7.fhir.r4.model.Resource r4 = VersionConvertor_10_40.convertResource(r2, this);
|
||||
Bundle b;
|
||||
if (r4 instanceof Bundle)
|
||||
b = (Bundle) r4;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class R2ToR5Loader extends BaseLoader implements IContextResourceLoader,
|
|||
r2 = new JsonParser().parse(stream);
|
||||
else
|
||||
r2 = new XmlParser().parse(stream);
|
||||
org.hl7.fhir.r5.model.Resource r5 = new VersionConvertor_10_50(this).convertResource(r2);
|
||||
org.hl7.fhir.r5.model.Resource r5 = VersionConvertor_10_50.convertResource(r2, this);
|
||||
Bundle b;
|
||||
if (r5 instanceof Bundle)
|
||||
b = (Bundle) r5;
|
||||
|
|
|
@ -36,16 +36,14 @@ import org.hl7.fhir.r5.terminologies.TerminologyClient;
|
|||
public class TerminologyClientR2 implements TerminologyClient {
|
||||
|
||||
private FHIRToolingClient client; // todo: use the R2 client
|
||||
private VersionConvertor_10_50 conv;
|
||||
|
||||
|
||||
public TerminologyClientR2(String address) throws URISyntaxException {
|
||||
client = new FHIRToolingClient(address);
|
||||
conv = new VersionConvertor_10_50(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerminologyCapabilities getTerminologyCapabilities() throws FHIRException {
|
||||
return (TerminologyCapabilities) conv.convertTerminologyCapabilities(client.getTerminologyCapabilities());
|
||||
return VersionConvertor_10_50.convertTerminologyCapabilities(client.getTerminologyCapabilities());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,24 +53,24 @@ public class TerminologyClientR2 implements TerminologyClient {
|
|||
|
||||
@Override
|
||||
public ValueSet expandValueset(ValueSet vs, Parameters p, Map<String, String> params) throws FHIRException {
|
||||
org.hl7.fhir.dstu2.model.ValueSet vs2 = (org.hl7.fhir.dstu2.model.ValueSet) conv.convertResource(vs);
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) conv.convertResource(p);
|
||||
org.hl7.fhir.dstu2.model.ValueSet vs2 = (org.hl7.fhir.dstu2.model.ValueSet) VersionConvertor_10_50.convertResource(vs);
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) VersionConvertor_10_50.convertResource(p);
|
||||
vs2 = client.expandValueset(vs2, p2, params);
|
||||
return (ValueSet) conv.convertResource(vs2);
|
||||
return (ValueSet) VersionConvertor_10_50.convertResource(vs2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Parameters validateCS(Parameters pin) throws FHIRException {
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) conv.convertResource(pin);
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) VersionConvertor_10_50.convertResource(pin);
|
||||
p2 = client.operateType(org.hl7.fhir.dstu2.model.ValueSet.class, "validate-code", p2);
|
||||
return (Parameters) conv.convertResource(p2);
|
||||
return (Parameters) VersionConvertor_10_50.convertResource(p2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Parameters validateVS(Parameters pin) throws FHIRException {
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) conv.convertResource(pin);
|
||||
org.hl7.fhir.dstu2.model.Parameters p2 = (org.hl7.fhir.dstu2.model.Parameters) VersionConvertor_10_50.convertResource(pin);
|
||||
p2 = client.operateType(org.hl7.fhir.dstu2.model.ValueSet.class, "validate-code", p2);
|
||||
return (Parameters) conv.convertResource(p2);
|
||||
return (Parameters) VersionConvertor_10_50.convertResource(p2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,11 +85,11 @@ public class TerminologyClientR2 implements TerminologyClient {
|
|||
|
||||
@Override
|
||||
public CapabilityStatement getCapabilitiesStatementQuick() throws FHIRException {
|
||||
return (CapabilityStatement) conv.convertResource(client.getConformanceStatementQuick());
|
||||
return (CapabilityStatement) VersionConvertor_10_50.convertResource(client.getConformanceStatementQuick());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Parameters lookupCode(Map<String, String> params) throws FHIRException {
|
||||
return (Parameters) conv.convertResource(client.lookupCode(params));
|
||||
return (Parameters) VersionConvertor_10_50.convertResource(client.lookupCode(params));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,12 +179,12 @@ public class VersionConversionService {
|
|||
case DSTU2016May: throw new FHIRException("Conversion from DSTU2 to 2016May version is not supported");
|
||||
case R4:
|
||||
if (useJava && VersionConvertor_10_40.convertsResource(src.fhirType()))
|
||||
return saveResource40(new VersionConvertor_10_40(null).convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
return saveResource40(VersionConvertor_10_40.convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
else
|
||||
throw new FHIRException("Conversion from R4 to 2016May version is not supported for resources of type "+src.fhirType());
|
||||
case STU3:
|
||||
if (useJava && VersionConvertor_10_30.convertsResource(src.fhirType()))
|
||||
return saveResource30(new VersionConvertor_10_30(null).convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
return saveResource30(VersionConvertor_10_30.convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
else
|
||||
throw new FHIRException("todo: use script based conversion....");
|
||||
default: throw new FHIRException("FHIR Version 'unknown' is not supported by the inter-version convertor");
|
||||
|
@ -215,7 +215,7 @@ public class VersionConversionService {
|
|||
case DSTU1: throw new FHIRException("FHIR Version #1 is not supported by the inter-version convertor");
|
||||
case DSTU2:
|
||||
if (useJava && VersionConvertor_10_30.convertsResource(src.fhirType()))
|
||||
return saveResource10(new VersionConvertor_10_30(null).convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
return saveResource10(VersionConvertor_10_30.convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
else
|
||||
throw new FHIRException("todo: use script based conversion....");
|
||||
case DSTU2016May:
|
||||
|
@ -238,7 +238,7 @@ public class VersionConversionService {
|
|||
case DSTU1: throw new FHIRException("FHIR Version #1 is not supported by the inter-version convertor");
|
||||
case DSTU2:
|
||||
if (useJava && VersionConvertor_10_40.convertsResource(src.fhirType()))
|
||||
return saveResource10(new VersionConvertor_10_40(null).convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
return saveResource10(VersionConvertor_10_40.convertResource(src), dstFormat, style); // todo: handle code system?
|
||||
else
|
||||
throw new FHIRException("Conversion from R4 to DSTU2 version is not supported for resources of type "+src.fhirType());
|
||||
case DSTU2016May:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,69 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Account10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Account convertAccount(org.hl7.fhir.dstu3.model.Account src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Account tgt = new org.hl7.fhir.dstu2.model.Account();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setStatus(convertAccountStatus(src.getStatus()));
|
||||
tgt.setActivePeriod(VersionConvertor_10_30.convertPeriod(src.getActive()));
|
||||
tgt.setBalance(VersionConvertor_10_30.convertMoney(src.getBalance()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Account convertAccount(org.hl7.fhir.dstu2.model.Account src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Account tgt = new org.hl7.fhir.dstu3.model.Account();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
if (src.hasName())
|
||||
tgt.setName(src.getName());
|
||||
if (src.hasType())
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setStatus(convertAccountStatus(src.getStatus()));
|
||||
tgt.setActive(VersionConvertor_10_30.convertPeriod(src.getActivePeriod()));
|
||||
tgt.setBalance(VersionConvertor_10_30.convertMoney(src.getBalance()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.dstu2.model.Account.AccountStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Account.AccountStatus.ACTIVE;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Account.AccountStatus.INACTIVE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Account.AccountStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Account.AccountStatus convertAccountStatus(org.hl7.fhir.dstu3.model.Account.AccountStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Account.AccountStatus.ACTIVE;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Account.AccountStatus.INACTIVE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Account.AccountStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Appointment10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment convertAppointment(org.hl7.fhir.dstu3.model.Appointment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Appointment tgt = new org.hl7.fhir.dstu2.model.Appointment();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertAppointmentStatus(src.getStatus()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPriority(src.getPriority());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setMinutesDuration(src.getMinutesDuration());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setComment(src.getComment());
|
||||
for (org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Appointment convertAppointment(org.hl7.fhir.dstu2.model.Appointment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Appointment tgt = new org.hl7.fhir.dstu3.model.Appointment();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertAppointmentStatus(src.getStatus()));
|
||||
if (src.hasType())
|
||||
tgt.addServiceType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setPriority(src.getPriority());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setMinutesDuration(src.getMinutesDuration());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setComment(src.getComment());
|
||||
for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setRequired(convertParticipantRequired(src.getRequired()));
|
||||
tgt.setStatus(convertParticipationStatus(src.getStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setRequired(convertParticipantRequired(src.getRequired()));
|
||||
tgt.setStatus(convertParticipationStatus(src.getStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.PROPOSED;
|
||||
case PENDING:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.PENDING;
|
||||
case BOOKED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.BOOKED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.ARRIVED;
|
||||
case FULFILLED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.FULFILLED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.CANCELLED;
|
||||
case NOSHOW:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.NOSHOW;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PROPOSED;
|
||||
case PENDING:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.PENDING;
|
||||
case BOOKED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.BOOKED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ARRIVED;
|
||||
case FULFILLED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.FULFILLED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.CANCELLED;
|
||||
case NOSHOW:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NOSHOW;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.REQUIRED;
|
||||
case OPTIONAL:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.OPTIONAL;
|
||||
case INFORMATIONONLY:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.INFORMATIONONLY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.REQUIRED;
|
||||
case OPTIONAL:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.OPTIONAL;
|
||||
case INFORMATIONONLY:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.INFORMATIONONLY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipantRequired.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class AppointmentResponse10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu3.model.AppointmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AppointmentResponse tgt = new org.hl7.fhir.dstu2.model.AppointmentResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu2.model.AppointmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AppointmentResponse tgt = new org.hl7.fhir.dstu3.model.AppointmentResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus src) {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.TENTATIVE;
|
||||
case INPROCESS:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus src) {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,291 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class AuditEvent10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu3.model.AuditEvent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent tgt = new org.hl7.fhir.dstu2.model.AuditEvent();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.getEvent().setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getSubtype()) tgt.getEvent().addSubtype(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.getEvent().setAction(convertAuditEventAction(src.getAction()));
|
||||
tgt.getEvent().setDateTime(src.getRecorded());
|
||||
tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome()));
|
||||
tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.dstu3.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_30.convertCoding(cc));
|
||||
for (org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent t : src.getAgent()) tgt.addParticipant(convertAuditEventAgentComponent(t));
|
||||
tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent t : src.getEntity()) tgt.addObject(convertAuditEventEntityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu2.model.AuditEvent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent tgt = new org.hl7.fhir.dstu3.model.AuditEvent();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
if (src.hasEvent()) {
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getEvent().getType()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getSubtype()) tgt.addSubtype(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setAction(convertAuditEventAction(src.getEvent().getAction()));
|
||||
tgt.setRecorded(src.getEvent().getDateTime());
|
||||
tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome()));
|
||||
tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_30.convertCoding(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent t : src.getParticipant()) tgt.addAgent(convertAuditEventAgentComponent(t));
|
||||
tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent t : src.getObject()) tgt.addEntity(convertAuditEventEntityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case C:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.C;
|
||||
case R:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.R;
|
||||
case U:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.U;
|
||||
case D:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.D;
|
||||
case E:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.E;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case C:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.C;
|
||||
case R:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.R;
|
||||
case U:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.U;
|
||||
case D:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.D;
|
||||
case E:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.E;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setUserId(VersionConvertor_10_30.convertIdentifier(src.getUserId()));
|
||||
tgt.setAltId(src.getAltId());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRequestor(src.getRequestor());
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
tgt.setMedia(VersionConvertor_10_30.convertCoding(src.getMedia()));
|
||||
tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getPurposeOfUse()) tgt.addPurposeOfUse().addCoding(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setUserId(VersionConvertor_10_30.convertIdentifier(src.getUserId()));
|
||||
tgt.setAltId(src.getAltId());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRequestor(src.getRequestor());
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu3.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
tgt.setMedia(VersionConvertor_10_30.convertCoding(src.getMedia()));
|
||||
tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPurposeOfUse()) for (org.hl7.fhir.dstu3.model.Coding cc : t.getCoding()) tgt.addPurposeOfUse(VersionConvertor_10_30.convertCoding(cc));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAddress(src.getAddress());
|
||||
tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAddress(src.getAddress());
|
||||
tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setRole(VersionConvertor_10_30.convertCoding(src.getRole()));
|
||||
tgt.setLifecycle(VersionConvertor_10_30.convertCoding(src.getLifecycle()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setQuery(src.getQuery());
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setRole(VersionConvertor_10_30.convertCoding(src.getRole()));
|
||||
tgt.setLifecycle(VersionConvertor_10_30.convertCoding(src.getLifecycle()));
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setQuery(src.getQuery());
|
||||
for (org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _0:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._0;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._4;
|
||||
case _8:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._8;
|
||||
case _12:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome._12;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventOutcome src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _0:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._0;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._4;
|
||||
case _8:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._8;
|
||||
case _12:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._12;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _1:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._1;
|
||||
case _2:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._2;
|
||||
case _3:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._3;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._4;
|
||||
case _5:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._5;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _1:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType._1;
|
||||
case _2:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType._2;
|
||||
case _3:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType._3;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType._4;
|
||||
case _5:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType._5;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSite(src.getSite());
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSite(src.getSite());
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Basic10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Basic convertBasic(org.hl7.fhir.dstu3.model.Basic src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Basic tgt = new org.hl7.fhir.dstu2.model.Basic();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Basic convertBasic(org.hl7.fhir.dstu2.model.Basic src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Basic tgt = new org.hl7.fhir.dstu3.model.Basic();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Binary10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Binary convertBinary(org.hl7.fhir.dstu3.model.Binary src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
tgt.setContentType(src.getContentType());
|
||||
tgt.setContent(src.getContent());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Binary convertBinary(org.hl7.fhir.dstu2.model.Binary src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Binary tgt = new org.hl7.fhir.dstu3.model.Binary();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
tgt.setContentType(src.getContentType());
|
||||
tgt.setContent(src.getContent());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,291 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertorAdvisor30;
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Bundle10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2.model.Bundle src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
tgt.setType(convertBundleType(src.getType()));
|
||||
if (src.hasTotal())
|
||||
tgt.setTotal(src.getTotal());
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t));
|
||||
tgt.setSignature(VersionConvertor_10_30.convertSignature(src.getSignature()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src, VersionConvertorAdvisor30 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle tgt = new org.hl7.fhir.dstu2.model.Bundle();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
tgt.setType(convertBundleType(src.getType()));
|
||||
if (src.hasTotal())
|
||||
tgt.setTotal(src.getTotal());
|
||||
for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t, advisor));
|
||||
if (src.hasSignature())
|
||||
tgt.setSignature(VersionConvertor_10_30.convertSignature(src.getSignature()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
|
||||
return convertBundle(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src, VersionConvertorAdvisor30 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
if (advisor.ignoreEntry(src))
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
tgt.setFullUrl(src.getFullUrl());
|
||||
org.hl7.fhir.dstu2.model.Resource res = advisor.convert(src.getResource());
|
||||
if (res == null)
|
||||
res = VersionConvertor_10_30.convertResource(src.getResource());
|
||||
tgt.setResource(res);
|
||||
if (src.hasSearch())
|
||||
tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
|
||||
if (src.hasRequest())
|
||||
tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
|
||||
if (src.hasResponse())
|
||||
tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src) throws FHIRException {
|
||||
return convertBundleEntryComponent(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
tgt.setFullUrl(src.getFullUrl());
|
||||
tgt.setResource(VersionConvertor_10_30.convertResource(src.getResource()));
|
||||
tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
|
||||
tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
|
||||
tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMethod(convertHTTPVerb(src.getMethod()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIfNoneMatch(src.getIfNoneMatch());
|
||||
tgt.setIfModifiedSince(src.getIfModifiedSince());
|
||||
tgt.setIfMatch(src.getIfMatch());
|
||||
tgt.setIfNoneExist(src.getIfNoneExist());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMethod(convertHTTPVerb(src.getMethod()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIfNoneMatch(src.getIfNoneMatch());
|
||||
tgt.setIfModifiedSince(src.getIfModifiedSince());
|
||||
tgt.setIfMatch(src.getIfMatch());
|
||||
tgt.setIfNoneExist(src.getIfNoneExist());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStatus(src.getStatus());
|
||||
tgt.setLocation(src.getLocation());
|
||||
tgt.setEtag(src.getEtag());
|
||||
tgt.setLastModified(src.getLastModified());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStatus(src.getStatus());
|
||||
tgt.setLocation(src.getLocation());
|
||||
tgt.setEtag(src.getEtag());
|
||||
tgt.setLastModified(src.getLastModified());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertSearchEntryMode(src.getMode()));
|
||||
tgt.setScore(src.getScore());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertSearchEntryMode(src.getMode()));
|
||||
tgt.setScore(src.getScore());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRelation(src.getRelation());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRelation(src.getRelation());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.BundleType convertBundleType(org.hl7.fhir.dstu2.model.Bundle.BundleType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DOCUMENT:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.DOCUMENT;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.MESSAGE;
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTION;
|
||||
case TRANSACTIONRESPONSE:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTIONRESPONSE;
|
||||
case BATCH:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCH;
|
||||
case BATCHRESPONSE:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCHRESPONSE;
|
||||
case HISTORY:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.HISTORY;
|
||||
case SEARCHSET:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.SEARCHSET;
|
||||
case COLLECTION:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.COLLECTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.BundleType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleType convertBundleType(org.hl7.fhir.dstu3.model.Bundle.BundleType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DOCUMENT:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.DOCUMENT;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.MESSAGE;
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTION;
|
||||
case TRANSACTIONRESPONSE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTIONRESPONSE;
|
||||
case BATCH:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCH;
|
||||
case BATCHRESPONSE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCHRESPONSE;
|
||||
case HISTORY:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.HISTORY;
|
||||
case SEARCHSET:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.SEARCHSET;
|
||||
case COLLECTION:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.COLLECTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case GET:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.GET;
|
||||
case POST:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.POST;
|
||||
case PUT:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.PUT;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.DELETE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case GET:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.GET;
|
||||
case POST:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.POST;
|
||||
case PUT:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.PUT;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.DELETE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MATCH:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.MATCH;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.INCLUDE;
|
||||
case OUTCOME:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.OUTCOME;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MATCH:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.MATCH;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.INCLUDE;
|
||||
case OUTCOME:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.OUTCOME;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class CarePlan10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan convertCarePlan(org.hl7.fhir.dstu2.model.CarePlan src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CarePlan tgt = new org.hl7.fhir.dstu3.model.CarePlan();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertCarePlanStatus(src.getStatus()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) tgt.addActivity(convertCarePlanActivityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan convertCarePlan(org.hl7.fhir.dstu3.model.CarePlan src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan tgt = new org.hl7.fhir.dstu2.model.CarePlan();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertCarePlanStatus(src.getStatus()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) tgt.addActivity(convertCarePlanActivityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getProgress()) tgt.addProgress(VersionConvertor_10_30.convertAnnotation(t));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Annotation t : src.getProgress()) tgt.addProgress(VersionConvertor_10_30.convertAnnotation(t));
|
||||
tgt.setReference(VersionConvertor_10_30.convertReference(src.getReference()));
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference()) tgt.addReasonReference(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
|
||||
tgt.setProhibited(src.getProhibited());
|
||||
tgt.setScheduled(VersionConvertor_10_30.convertType(src.getScheduled()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setProduct(VersionConvertor_10_30.convertType(src.getProduct()));
|
||||
tgt.setDailyAmount(VersionConvertor_10_30.convertSimpleQuantity(src.getDailyAmount()));
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) tgt.addReasonReference(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
|
||||
tgt.setProhibited(src.getProhibited());
|
||||
tgt.setScheduled(VersionConvertor_10_30.convertType(src.getScheduled()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setProduct(VersionConvertor_10_30.convertType(src.getProduct()));
|
||||
tgt.setDailyAmount(VersionConvertor_10_30.convertSimpleQuantity(src.getDailyAmount()));
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSTARTED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED;
|
||||
case SCHEDULED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSTARTED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NOTSTARTED;
|
||||
case SCHEDULED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.SCHEDULED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CarePlan.CarePlanStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.UriType;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ClinicalImpression10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.dstu2.model.ClinicalImpression src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ClinicalImpression tgt = new org.hl7.fhir.dstu3.model.ClinicalImpression();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setAssessor(VersionConvertor_10_30.convertReference(src.getAssessor()));
|
||||
tgt.setStatus(convertClinicalImpressionStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setPrevious(VersionConvertor_10_30.convertReference(src.getPrevious()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getProblem()) tgt.addProblem(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.addProtocol(src.getProtocol());
|
||||
tgt.setSummary(src.getSummary());
|
||||
for (org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t));
|
||||
if (src.hasPrognosis())
|
||||
tgt.addPrognosisCodeableConcept().setText(src.getPrognosis());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ClinicalImpression convertClinicalImpression(org.hl7.fhir.dstu3.model.ClinicalImpression src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ClinicalImpression tgt = new org.hl7.fhir.dstu2.model.ClinicalImpression();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setAssessor(VersionConvertor_10_30.convertReference(src.getAssessor()));
|
||||
tgt.setStatus(convertClinicalImpressionStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setPrevious(VersionConvertor_10_30.convertReference(src.getPrevious()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getProblem()) tgt.addProblem(VersionConvertor_10_30.convertReference(t));
|
||||
for (UriType t : src.getProtocol()) tgt.setProtocol(t.asStringValue());
|
||||
tgt.setSummary(src.getSummary());
|
||||
for (org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent t : src.getFinding()) tgt.addFinding(convertClinicalImpressionFindingComponent(t));
|
||||
tgt.setPrognosis(src.getPrognosisCodeableConceptFirstRep().getText());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setItem(VersionConvertor_10_30.convertCodeableConcept(src.getItem()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt = new org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasItemCodeableConcept())
|
||||
try {
|
||||
tgt.setItem(VersionConvertor_10_30.convertCodeableConcept(src.getItemCodeableConcept()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.DRAFT;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus convertClinicalImpressionStatus(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Communication10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Communication convertCommunication(org.hl7.fhir.dstu2.model.Communication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Communication tgt = new org.hl7.fhir.dstu3.model.Communication();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSender(VersionConvertor_10_30.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setStatus(convertCommunicationStatus(src.getStatus()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setSent(src.getSent());
|
||||
tgt.setReceived(src.getReceived());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication convertCommunication(org.hl7.fhir.dstu3.model.Communication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Communication tgt = new org.hl7.fhir.dstu2.model.Communication();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategoryFirstRep()));
|
||||
tgt.setSender(VersionConvertor_10_30.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setStatus(convertCommunicationStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setSent(src.getSent());
|
||||
tgt.setReceived(src.getReceived());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.dstu2.model.Communication.CommunicationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.SUSPENDED;
|
||||
case REJECTED:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ENTEREDINERROR;
|
||||
case FAILED:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.ABORTED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Communication.CommunicationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.dstu3.model.Communication.CommunicationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.SUSPENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.REJECTED;
|
||||
case ABORTED:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.FAILED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class CommunicationRequest10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu3.model.CommunicationRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CommunicationRequest tgt = new org.hl7.fhir.dstu2.model.CommunicationRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategoryFirstRep()));
|
||||
tgt.setSender(VersionConvertor_10_30.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequester(VersionConvertor_10_30.convertReference(src.getRequester().getAgent()));
|
||||
tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setScheduled(VersionConvertor_10_30.convertType(src.getOccurrence()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequestedOn(src.getAuthoredOn());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setPriority(convertPriorityCode(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu2.model.CommunicationRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CommunicationRequest tgt = new org.hl7.fhir.dstu3.model.CommunicationRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSender(VersionConvertor_10_30.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.getRequester().setAgent(VersionConvertor_10_30.convertReference(src.getRequester()));
|
||||
tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setOccurrence(VersionConvertor_10_30.convertType(src.getScheduled()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setAuthoredOn(src.getRequestedOn());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setPriority(convertPriorityCode(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.DRAFT;
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case RECEIVED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED;
|
||||
case REJECTED:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.PROPOSED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.REJECTED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.CodeableConcept convertPriorityCode(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority priority) {
|
||||
org.hl7.fhir.dstu2.model.CodeableConcept cc = new org.hl7.fhir.dstu2.model.CodeableConcept();
|
||||
switch(priority) {
|
||||
case ROUTINE:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("routine");
|
||||
break;
|
||||
case URGENT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("urgent");
|
||||
break;
|
||||
case STAT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("stat");
|
||||
break;
|
||||
case ASAP:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("asap");
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return cc;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.dstu2.model.CodeableConcept priority) {
|
||||
for (org.hl7.fhir.dstu2.model.Coding c : priority.getCoding()) {
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ROUTINE;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.URGENT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.STAT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationPriority.ASAP;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Composition10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition convertComposition(org.hl7.fhir.dstu2.model.Composition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Composition tgt = new org.hl7.fhir.dstu3.model.Composition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_()));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setStatus(convertCompositionStatus(src.getStatus()));
|
||||
try {
|
||||
tgt.setConfidentiality(org.hl7.fhir.dstu3.model.Composition.DocumentConfidentiality.fromCode(src.getConfidentiality()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent t : src.getAttester()) tgt.addAttester(convertCompositionAttesterComponent(t));
|
||||
tgt.setCustodian(VersionConvertor_10_30.convertReference(src.getCustodian()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent t : src.getEvent()) tgt.addEvent(convertCompositionEventComponent(t));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition convertComposition(org.hl7.fhir.dstu3.model.Composition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition tgt = new org.hl7.fhir.dstu2.model.Composition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_()));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setStatus(convertCompositionStatus(src.getStatus()));
|
||||
tgt.setConfidentiality(src.getConfidentiality().toCode());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent t : src.getAttester()) tgt.addAttester(convertCompositionAttesterComponent(t));
|
||||
tgt.setCustodian(VersionConvertor_10_30.convertReference(src.getCustodian()));
|
||||
for (org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent t : src.getEvent()) tgt.addEvent(convertCompositionEventComponent(t));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSONAL:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PERSONAL;
|
||||
case PROFESSIONAL:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.PROFESSIONAL;
|
||||
case LEGAL:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.LEGAL;
|
||||
case OFFICIAL:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.OFFICIAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSONAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.PERSONAL;
|
||||
case PROFESSIONAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.PROFESSIONAL;
|
||||
case LEGAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.LEGAL;
|
||||
case OFFICIAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.OFFICIAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode> t : src.getMode()) VersionConvertor_10_30.copyElement(t, tgt.addModeElement().setValue(convertCompositionAttestationMode(t.getValue())));
|
||||
tgt.setTime(src.getTime());
|
||||
tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode> t : src.getMode()) VersionConvertor_10_30.copyElement(t, tgt.addModeElement().setValue(convertCompositionAttestationMode(t.getValue())));
|
||||
tgt.setTime(src.getTime());
|
||||
tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.dstu2.model.Composition.CompositionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.AMENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Composition.CompositionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.dstu3.model.Composition.CompositionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.AMENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu2.model.Composition.SectionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu3.model.Composition.SectionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setText(VersionConvertor_10_30.convertNarrative(src.getText()));
|
||||
try {
|
||||
tgt.setMode(org.hl7.fhir.dstu3.model.Composition.SectionMode.fromCode(src.getMode()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getEntry()) tgt.addEntry(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setEmptyReason(VersionConvertor_10_30.convertCodeableConcept(src.getEmptyReason()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu3.model.Composition.SectionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setText(VersionConvertor_10_30.convertNarrative(src.getText()));
|
||||
tgt.setMode(src.getMode().toCode());
|
||||
tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getEntry()) tgt.addEntry(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setEmptyReason(VersionConvertor_10_30.convertCodeableConcept(src.getEmptyReason()));
|
||||
for (org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.ConceptMap;
|
||||
import org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ConceptMap10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap convertConceptMap(org.hl7.fhir.dstu3.model.ConceptMap src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setSource(VersionConvertor_10_30.convertType(src.getSource()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertType(src.getTarget()));
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) for (org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent t : g.getElement()) tgt.addElement(convertSourceElementComponent(t, g));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap convertConceptMap(org.hl7.fhir.dstu2.model.ConceptMap src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap tgt = new org.hl7.fhir.dstu3.model.ConceptMap();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setSource(VersionConvertor_10_30.convertType(src.getSource()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertType(src.getTarget()));
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent t : src.getElement()) {
|
||||
List<VersionConvertor_10_30.SourceElementComponentWrapper> ws = convertSourceElementComponent(t);
|
||||
for (VersionConvertor_10_30.SourceElementComponentWrapper w : ws) getGroup(tgt, w.source, w.target).addElement(w.comp);
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertConceptMapContactComponent(org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent convertConceptMapContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUAL;
|
||||
case WIDER:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.WIDER;
|
||||
case SUBSUMES:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
|
||||
case NARROWER:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NARROWER;
|
||||
case SPECIALIZES:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
|
||||
case INEXACT:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.INEXACT;
|
||||
case UNMATCHED:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
|
||||
case DISJOINT:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.DISJOINT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUAL;
|
||||
case WIDER:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.WIDER;
|
||||
case SUBSUMES:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
|
||||
case NARROWER:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NARROWER;
|
||||
case SPECIALIZES:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
|
||||
case INEXACT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.INEXACT;
|
||||
case UNMATCHED:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
|
||||
case DISJOINT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.DISJOINT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setProperty(src.getElement());
|
||||
tgt.setSystem(src.getCodeSystem());
|
||||
tgt.setCode(src.getCode());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setElement(src.getProperty());
|
||||
tgt.setCodeSystem(src.getSystem());
|
||||
tgt.setCode(src.getCode());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static List<VersionConvertor_10_30.SourceElementComponentWrapper> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
List<VersionConvertor_10_30.SourceElementComponentWrapper> res = new ArrayList<VersionConvertor_10_30.SourceElementComponentWrapper>();
|
||||
if (src == null || src.isEmpty())
|
||||
return res;
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) {
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
res.add(new VersionConvertor_10_30.SourceElementComponentWrapper(tgt, src.getCodeSystem(), t.getCodeSystem()));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCodeSystem(g.getSource());
|
||||
tgt.setCode(src.getCode());
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCodeSystem(g.getTarget());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
|
||||
tgt.setComments(src.getComment());
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct()) tgt.addProduct(convertOtherElementComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
|
||||
tgt.setComment(src.getComments());
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getProduct()) tgt.addProduct(convertOtherElementComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) {
|
||||
for (ConceptMapGroupComponent grp : map.getGroup()) {
|
||||
if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts))
|
||||
return grp;
|
||||
}
|
||||
ConceptMapGroupComponent grp = map.addGroup();
|
||||
grp.setSource(srcs);
|
||||
grp.setTarget(tgts);
|
||||
return grp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Condition10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Condition convertCondition(org.hl7.fhir.dstu2.model.Condition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Condition tgt = new org.hl7.fhir.dstu3.model.Condition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setAsserter(VersionConvertor_10_30.convertReference(src.getAsserter()));
|
||||
if (src.hasDateRecorded())
|
||||
tgt.setAssertedDate(src.getDateRecorded());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
try {
|
||||
tgt.setClinicalStatus(org.hl7.fhir.dstu3.model.Condition.ConditionClinicalStatus.fromCode(src.getClinicalStatus()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
|
||||
tgt.setSeverity(VersionConvertor_10_30.convertCodeableConcept(src.getSeverity()));
|
||||
tgt.setOnset(VersionConvertor_10_30.convertType(src.getOnset()));
|
||||
tgt.setAbatement(VersionConvertor_10_30.convertType(src.getAbatement()));
|
||||
tgt.setStage(convertConditionStageComponent(src.getStage()));
|
||||
for (org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertConditionEvidenceComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition convertCondition(org.hl7.fhir.dstu3.model.Condition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition tgt = new org.hl7.fhir.dstu2.model.Condition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setAsserter(VersionConvertor_10_30.convertReference(src.getAsserter()));
|
||||
if (src.hasAssertedDate())
|
||||
tgt.setDateRecorded(src.getAssertedDate());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setClinicalStatus(src.getClinicalStatus().toCode());
|
||||
tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
|
||||
tgt.setSeverity(VersionConvertor_10_30.convertCodeableConcept(src.getSeverity()));
|
||||
tgt.setOnset(VersionConvertor_10_30.convertType(src.getOnset()));
|
||||
tgt.setAbatement(VersionConvertor_10_30.convertType(src.getAbatement()));
|
||||
tgt.setStage(convertConditionStageComponent(src.getStage()));
|
||||
for (org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertConditionEvidenceComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept cc : src.getCode()) tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(cc));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.addCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSummary(VersionConvertor_10_30.convertCodeableConcept(src.getSummary()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAssessment()) tgt.addAssessment(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.dstu3.model.Condition.ConditionStageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSummary(VersionConvertor_10_30.convertCodeableConcept(src.getSummary()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAssessment()) tgt.addAssessment(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROVISIONAL:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.PROVISIONAL;
|
||||
case DIFFERENTIAL:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.DIFFERENTIAL;
|
||||
case CONFIRMED:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.CONFIRMED;
|
||||
case REFUTED:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.REFUTED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.ENTEREDINERROR;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.UNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROVISIONAL:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.PROVISIONAL;
|
||||
case DIFFERENTIAL:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.DIFFERENTIAL;
|
||||
case CONFIRMED:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.CONFIRMED;
|
||||
case REFUTED:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.REFUTED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.ENTEREDINERROR;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.UNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Condition.ConditionVerificationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,757 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Conformance10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSUPPORTED:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.NOTSUPPORTED;
|
||||
case SINGLE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.SINGLE;
|
||||
case MULTIPLE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.MULTIPLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSUPPORTED:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED;
|
||||
case SINGLE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE;
|
||||
case MULTIPLE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setKind(convertConformanceStatementKind(src.getKind()));
|
||||
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
|
||||
if (src.hasImplementation())
|
||||
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest()) tgt.addRest(convertConformanceRestComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging()) tgt.addMessaging(convertConformanceMessagingComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument()) tgt.addDocument(convertConformanceDocumentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement convertConformance(org.hl7.fhir.dstu2.model.Conformance src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setKind(convertConformanceStatementKind(src.getKind()));
|
||||
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
|
||||
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent t : src.getRest()) tgt.addRest(convertConformanceRestComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent t : src.getMessaging()) tgt.addMessaging(convertConformanceMessagingComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent t : src.getDocument()) tgt.addDocument(convertConformanceDocumentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertConformanceContactComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertDocumentMode(src.getMode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertDocumentMode(src.getMode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode convertConformanceEventMode(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case SENDER:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.SENDER;
|
||||
case RECEIVER:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.RECEIVER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode convertConformanceEventMode(org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case SENDER:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.SENDER;
|
||||
case RECEIVER:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.RECEIVER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
|
||||
tgt.setReliableCache(src.getReliableCache());
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
|
||||
tgt.setReliableCache(src.getReliableCache());
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setProtocol(VersionConvertor_10_30.convertCoding(src.getProtocol()));
|
||||
tgt.setAddress(src.getAddress());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setProtocol(VersionConvertor_10_30.convertCoding(src.getProtocol()));
|
||||
tgt.setAddress(src.getAddress());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCoding(src.getCode()));
|
||||
tgt.setCategory(convertMessageSignificanceCategory(src.getCategory()));
|
||||
tgt.setMode(convertConformanceEventMode(src.getMode()));
|
||||
tgt.setFocus(src.getFocus());
|
||||
tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest()));
|
||||
tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCoding(src.getCode()));
|
||||
tgt.setCategory(convertMessageSignificanceCategory(src.getCategory()));
|
||||
tgt.setMode(convertConformanceEventMode(src.getMode()));
|
||||
tgt.setFocus(src.getFocus());
|
||||
tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest()));
|
||||
tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertRestfulConformanceMode(src.getMode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertSystemInteractionComponent(t));
|
||||
if (src.getTransactionMode() == org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BATCH || src.getTransactionMode() == org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BOTH)
|
||||
tgt.addInteraction().setCode(SystemRestfulInteraction.BATCH);
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setMode(convertRestfulConformanceMode(src.getMode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t));
|
||||
boolean batch = false;
|
||||
boolean transaction = false;
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) {
|
||||
if (t.getCode().equals(SystemRestfulInteraction.BATCH))
|
||||
batch = true;
|
||||
else
|
||||
tgt.addInteraction(convertSystemInteractionComponent(t));
|
||||
if (t.getCode().equals(SystemRestfulInteraction.TRANSACTION))
|
||||
transaction = true;
|
||||
}
|
||||
if (batch)
|
||||
tgt.setTransactionMode(transaction ? org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BOTH : org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BATCH);
|
||||
else
|
||||
tgt.setTransactionMode(transaction ? org.hl7.fhir.dstu2.model.Conformance.TransactionMode.TRANSACTION : org.hl7.fhir.dstu2.model.Conformance.TransactionMode.NOTSUPPORTED);
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
if (src.hasProfile())
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t));
|
||||
tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
|
||||
tgt.setReadHistory(src.getReadHistory());
|
||||
tgt.setUpdateCreate(src.getUpdateCreate());
|
||||
tgt.setConditionalCreate(src.getConditionalCreate());
|
||||
tgt.setConditionalUpdate(src.getConditionalUpdate());
|
||||
tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t));
|
||||
tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
|
||||
tgt.setReadHistory(src.getReadHistory());
|
||||
tgt.setUpdateCreate(src.getUpdateCreate());
|
||||
tgt.setConditionalCreate(src.getConditionalCreate());
|
||||
tgt.setConditionalUpdate(src.getConditionalUpdate());
|
||||
tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDefinition(src.getDefinition());
|
||||
tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDefinition(src.getDefinition());
|
||||
tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setBlob(src.getBlob());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setBlob(src.getBlob());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCors(src.getCors());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCors(src.getCors());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setReleaseDate(src.getReleaseDate());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setReleaseDate(src.getReleaseDate());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind convertConformanceStatementKind(org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INSTANCE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.INSTANCE;
|
||||
case CAPABILITY:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY;
|
||||
case REQUIREMENTS:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind convertConformanceStatementKind(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INSTANCE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.INSTANCE;
|
||||
case CAPABILITY:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.CAPABILITY;
|
||||
case REQUIREMENTS:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.REQUIREMENTS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode convertDocumentMode(org.hl7.fhir.dstu2.model.Conformance.DocumentMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRODUCER:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.PRODUCER;
|
||||
case CONSUMER:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.CONSUMER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.DocumentMode convertDocumentMode(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRODUCER:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.DocumentMode.PRODUCER;
|
||||
case CONSUMER:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.DocumentMode.CONSUMER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.DocumentMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CONSEQUENCE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE;
|
||||
case CURRENCY:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY;
|
||||
case NOTIFICATION:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CONSEQUENCE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.CONSEQUENCE;
|
||||
case CURRENCY:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.CURRENCY;
|
||||
case NOTIFICATION:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.NOTIFICATION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertTypeRestfulInteraction(src.getCode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertTypeRestfulInteraction(src.getCode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOVERSION:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.NOVERSION;
|
||||
case VERSIONED:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.VERSIONED;
|
||||
case VERSIONEDUPDATE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.VERSIONEDUPDATE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy convertResourceVersionPolicy(org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOVERSION:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION;
|
||||
case VERSIONED:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED;
|
||||
case VERSIONEDUPDATE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode convertRestfulConformanceMode(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CLIENT:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.CLIENT;
|
||||
case SERVER:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.SERVER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode convertRestfulConformanceMode(org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CLIENT:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.CLIENT;
|
||||
case SERVER:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.SERVER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertSystemRestfulInteraction(src.getCode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertSystemRestfulInteraction(src.getCode()));
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION;
|
||||
case SEARCHSYSTEM:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM;
|
||||
case HISTORYSYSTEM:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction convertSystemRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.TRANSACTION;
|
||||
case SEARCHSYSTEM:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.SEARCHSYSTEM;
|
||||
case HISTORYSYSTEM:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.HISTORYSYSTEM;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case READ:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.READ;
|
||||
case VREAD:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.VREAD;
|
||||
case UPDATE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.UPDATE;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.DELETE;
|
||||
case HISTORYINSTANCE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE;
|
||||
case HISTORYTYPE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE;
|
||||
case CREATE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.CREATE;
|
||||
case SEARCHTYPE:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction convertTypeRestfulInteraction(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case READ:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.READ;
|
||||
case VREAD:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.VREAD;
|
||||
case UPDATE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.UPDATE;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.DELETE;
|
||||
case HISTORYINSTANCE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.HISTORYINSTANCE;
|
||||
case HISTORYTYPE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.HISTORYTYPE;
|
||||
case CREATE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.CREATE;
|
||||
case SEARCHTYPE:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.SEARCHTYPE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NO:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NO;
|
||||
case EXTENSIONS:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.EXTENSIONS;
|
||||
case ELEMENTS:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.ELEMENTS;
|
||||
case BOTH:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.BOTH;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode convertUnknownContentCode(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NO:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.NO;
|
||||
case EXTENSIONS:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.EXTENSIONS;
|
||||
case ELEMENTS:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.ELEMENTS;
|
||||
case BOTH:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.BOTH;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,279 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Contract10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.AgentComponent convertAgentComponent(org.hl7.fhir.dstu2.model.Contract.ActorComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.AgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.AgentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getEntity()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.ActorComponent convertAgentComponent(org.hl7.fhir.dstu3.model.Contract.AgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.ActorComponent tgt = new org.hl7.fhir.dstu2.model.Contract.ActorComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent tgt = new org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract convertContract(org.hl7.fhir.dstu3.model.Contract src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract tgt = new org.hl7.fhir.dstu2.model.Contract();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSubject()) tgt.addSubject(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthority()) tgt.addAuthority(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDomain()) tgt.addDomain(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSubType()) tgt.addSubType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getActionReason()) tgt.addActionReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.AgentComponent t : src.getAgent()) tgt.addActor(convertAgentComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.SignatoryComponent t : src.getSigner()) tgt.addSigner(convertSignatoryComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertValuedItemComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getTerm()) tgt.addTerm(convertTermComponent(t));
|
||||
tgt.setBinding(VersionConvertor_10_30.convertType(src.getBinding()));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) tgt.addFriendly(convertFriendlyLanguageComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent t : src.getLegal()) tgt.addLegal(convertLegalLanguageComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent t : src.getRule()) tgt.addRule(convertComputableLanguageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract convertContract(org.hl7.fhir.dstu2.model.Contract src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract tgt = new org.hl7.fhir.dstu3.model.Contract();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSubject()) tgt.addSubject(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthority()) tgt.addAuthority(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getDomain()) tgt.addDomain(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSubType()) tgt.addSubType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getActionReason()) tgt.addActionReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.ActorComponent t : src.getActor()) tgt.addAgent(convertAgentComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.SignatoryComponent t : src.getSigner()) tgt.addSigner(convertSignatoryComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertValuedItemComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.TermComponent t : src.getTerm()) tgt.addTerm(convertTermComponent(t));
|
||||
tgt.setBinding(VersionConvertor_10_30.convertType(src.getBinding()));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent t : src.getFriendly()) tgt.addFriendly(convertFriendlyLanguageComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent t : src.getLegal()) tgt.addLegal(convertLegalLanguageComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent t : src.getRule()) tgt.addRule(convertComputableLanguageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent tgt = new org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent tgt = new org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_30.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu2.model.Contract.SignatoryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.dstu3.model.Contract.SignatoryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty()));
|
||||
if (src.hasSignature())
|
||||
tgt.addSignature(new org.hl7.fhir.dstu3.model.Signature().setBlob(src.getSignature().getBytes()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu3.model.Contract.SignatoryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.SignatoryComponent tgt = new org.hl7.fhir.dstu2.model.Contract.SignatoryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setParty(VersionConvertor_10_30.convertReference(src.getParty()));
|
||||
for (org.hl7.fhir.dstu3.model.Signature t : src.getSignature()) tgt.setSignature(Base64.encodeBase64String(t.getBlob()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.TermActorComponent convertTermAgentComponent(org.hl7.fhir.dstu3.model.Contract.TermAgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.TermActorComponent tgt = new org.hl7.fhir.dstu2.model.Contract.TermActorComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.TermAgentComponent convertTermAgentComponent(org.hl7.fhir.dstu2.model.Contract.TermActorComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.TermAgentComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermAgentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getEntity()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.dstu2.model.Contract.TermComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.TermComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setSubType(VersionConvertor_10_30.convertCodeableConcept(src.getSubType()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getActionReason()) tgt.addActionReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.TermActorComponent t : src.getActor()) tgt.addAgent(convertTermAgentComponent(t));
|
||||
tgt.setText(src.getText());
|
||||
for (org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertTermValuedItemComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Contract.TermComponent t : src.getGroup()) tgt.addGroup(convertTermComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.TermComponent convertTermComponent(org.hl7.fhir.dstu3.model.Contract.TermComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.TermComponent tgt = new org.hl7.fhir.dstu2.model.Contract.TermComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
tgt.setApplies(VersionConvertor_10_30.convertPeriod(src.getApplies()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setSubType(VersionConvertor_10_30.convertCodeableConcept(src.getSubType()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAction()) tgt.addAction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getActionReason()) tgt.addActionReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.TermAgentComponent t : src.getAgent()) tgt.addActor(convertTermAgentComponent(t));
|
||||
tgt.setText(src.getText());
|
||||
for (org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent t : src.getValuedItem()) tgt.addValuedItem(convertTermValuedItemComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Contract.TermComponent t : src.getGroup()) tgt.addGroup(convertTermComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertType(src.getEntity()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setEffectiveTime(src.getEffectiveTime());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice()));
|
||||
tgt.setFactor(src.getFactor());
|
||||
tgt.setPoints(src.getPoints());
|
||||
tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent convertTermValuedItemComponent(org.hl7.fhir.dstu2.model.Contract.TermValuedItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.TermValuedItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertType(src.getEntity()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setEffectiveTime(src.getEffectiveTime());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice()));
|
||||
tgt.setFactor(src.getFactor());
|
||||
tgt.setPoints(src.getPoints());
|
||||
tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertType(src.getEntity()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setEffectiveTime(src.getEffectiveTime());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice()));
|
||||
tgt.setFactor(src.getFactor());
|
||||
tgt.setPoints(src.getPoints());
|
||||
tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent tgt = new org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertType(src.getEntity()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setEffectiveTime(src.getEffectiveTime());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setUnitPrice(VersionConvertor_10_30.convertMoney(src.getUnitPrice()));
|
||||
tgt.setFactor(src.getFactor());
|
||||
tgt.setPoints(src.getPoints());
|
||||
tgt.setNet(VersionConvertor_10_30.convertMoney(src.getNet()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DataElement10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DataElement convertDataElement(org.hl7.fhir.dstu3.model.DataElement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DataElement tgt = new org.hl7.fhir.dstu2.model.DataElement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setStringency(convertDataElementStringency(src.getStringency()));
|
||||
for (org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping()) tgt.addMapping(convertDataElementMappingComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DataElement convertDataElement(org.hl7.fhir.dstu2.model.DataElement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DataElement tgt = new org.hl7.fhir.dstu3.model.DataElement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setStringency(convertDataElementStringency(src.getStringency()));
|
||||
for (org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent t : src.getMapping()) tgt.addMapping(convertDataElementMappingComponent(t));
|
||||
List<String> slicePaths = new ArrayList<String>();
|
||||
for (org.hl7.fhir.dstu2.model.ElementDefinition t : src.getElement()) {
|
||||
if (t.hasSlicing())
|
||||
slicePaths.add(t.getPath());
|
||||
tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t, slicePaths));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertDataElementContactComponent(org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent convertDataElementContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentity(src.getIdentity());
|
||||
tgt.setUri(src.getUri());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setComment(src.getComments());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentity(src.getIdentity());
|
||||
tgt.setUri(src.getUri());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setComments(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.dstu3.model.DataElement.DataElementStringency src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case COMPARABLE:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.COMPARABLE;
|
||||
case FULLYSPECIFIED:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.FULLYSPECIFIED;
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.EQUIVALENT;
|
||||
case CONVERTABLE:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.CONVERTABLE;
|
||||
case SCALEABLE:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.SCALEABLE;
|
||||
case FLEXIBLE:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.FLEXIBLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DataElement.DataElementStringency.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DataElement.DataElementStringency convertDataElementStringency(org.hl7.fhir.dstu2.model.DataElement.DataElementStringency src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case COMPARABLE:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.COMPARABLE;
|
||||
case FULLYSPECIFIED:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FULLYSPECIFIED;
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.EQUIVALENT;
|
||||
case CONVERTABLE:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.CONVERTABLE;
|
||||
case SCALEABLE:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.SCALEABLE;
|
||||
case FLEXIBLE:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.FLEXIBLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DataElement.DataElementStringency.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DetectedIssue10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.dstu3.model.DetectedIssue src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DetectedIssue tgt = new org.hl7.fhir.dstu2.model.DetectedIssue();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setDetail(src.getDetail());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setReference(src.getReference());
|
||||
for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DetectedIssue convertDetectedIssue(org.hl7.fhir.dstu2.model.DetectedIssue src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DetectedIssue tgt = new org.hl7.fhir.dstu3.model.DetectedIssue();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSeverity(convertDetectedIssueSeverity(src.getSeverity()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setDetail(src.getDetail());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setReference(src.getReference());
|
||||
for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent tgt = new org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case HIGH:
|
||||
return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.HIGH;
|
||||
case MODERATE:
|
||||
return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.MODERATE;
|
||||
case LOW:
|
||||
return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.LOW;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity convertDetectedIssueSeverity(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueSeverity src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case HIGH:
|
||||
return org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity.HIGH;
|
||||
case MODERATE:
|
||||
return org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity.MODERATE;
|
||||
case LOW:
|
||||
return org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity.LOW;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueSeverity.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Device10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Device convertDevice(org.hl7.fhir.dstu3.model.Device src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Device tgt = new org.hl7.fhir.dstu2.model.Device();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
if (src.hasUdi())
|
||||
tgt.setUdi(src.getUdi().getDeviceIdentifier());
|
||||
tgt.setStatus(convertDeviceStatus(src.getStatus()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setLotNumber(src.getLotNumber());
|
||||
tgt.setManufacturer(src.getManufacturer());
|
||||
tgt.setManufactureDate(src.getManufactureDate());
|
||||
tgt.setExpiry(src.getExpirationDate());
|
||||
tgt.setModel(src.getModel());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner()));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Device convertDevice(org.hl7.fhir.dstu2.model.Device src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Device tgt = new org.hl7.fhir.dstu3.model.Device();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setUdi((new org.hl7.fhir.dstu3.model.Device.DeviceUdiComponent()).setDeviceIdentifier(src.getUdi()));
|
||||
tgt.setStatus(convertDeviceStatus(src.getStatus()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setLotNumber(src.getLotNumber());
|
||||
tgt.setManufacturer(src.getManufacturer());
|
||||
tgt.setManufactureDate(src.getManufactureDate());
|
||||
tgt.setExpirationDate(src.getExpiry());
|
||||
tgt.setModel(src.getModel());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setOwner(VersionConvertor_10_30.convertReference(src.getOwner()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu2.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus convertDeviceStatus(org.hl7.fhir.dstu2.model.Device.DeviceStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case AVAILABLE:
|
||||
return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ACTIVE;
|
||||
case NOTAVAILABLE:
|
||||
return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.INACTIVE;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Device.DeviceStatus convertDeviceStatus(org.hl7.fhir.dstu3.model.Device.FHIRDeviceStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Device.DeviceStatus.AVAILABLE;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Device.DeviceStatus.NOTAVAILABLE;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Device.DeviceStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Device.DeviceStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DeviceComponent10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.dstu3.model.DeviceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DeviceComponent tgt = new org.hl7.fhir.dstu2.model.DeviceComponent();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setLastSystemChange(src.getLastSystemChange());
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setParent(VersionConvertor_10_30.convertReference(src.getParent()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getOperationalStatus()) tgt.addOperationalStatus(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setParameterGroup(VersionConvertor_10_30.convertCodeableConcept(src.getParameterGroup()));
|
||||
tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple()));
|
||||
for (org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t));
|
||||
tgt.setLanguageCode(VersionConvertor_10_30.convertCodeableConcept(src.getLanguageCode()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceComponent convertDeviceComponent(org.hl7.fhir.dstu2.model.DeviceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DeviceComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setLastSystemChange(src.getLastSystemChange());
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setParent(VersionConvertor_10_30.convertReference(src.getParent()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getOperationalStatus()) tgt.addOperationalStatus(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setParameterGroup(VersionConvertor_10_30.convertCodeableConcept(src.getParameterGroup()));
|
||||
tgt.setMeasurementPrinciple(convertMeasmntPrinciple(src.getMeasurementPrinciple()));
|
||||
for (org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent t : src.getProductionSpecification()) tgt.addProductionSpecification(convertDeviceComponentProductionSpecificationComponent(t));
|
||||
tgt.setLanguageCode(VersionConvertor_10_30.convertCodeableConcept(src.getLanguageCode()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSpecType(VersionConvertor_10_30.convertCodeableConcept(src.getSpecType()));
|
||||
tgt.setComponentId(VersionConvertor_10_30.convertIdentifier(src.getComponentId()));
|
||||
tgt.setProductionSpec(src.getProductionSpec());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSpecType(VersionConvertor_10_30.convertCodeableConcept(src.getSpecType()));
|
||||
tgt.setComponentId(VersionConvertor_10_30.convertIdentifier(src.getComponentId()));
|
||||
tgt.setProductionSpec(src.getProductionSpec());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OTHER;
|
||||
case CHEMICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.CHEMICAL;
|
||||
case ELECTRICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL;
|
||||
case IMPEDANCE:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE;
|
||||
case NUCLEAR:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NUCLEAR;
|
||||
case OPTICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.OPTICAL;
|
||||
case THERMAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.THERMAL;
|
||||
case BIOLOGICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL;
|
||||
case MECHANICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MECHANICAL;
|
||||
case ACOUSTICAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL;
|
||||
case MANUAL:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.MANUAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple convertMeasmntPrinciple(org.hl7.fhir.dstu3.model.DeviceComponent.MeasmntPrinciple src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.OTHER;
|
||||
case CHEMICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.CHEMICAL;
|
||||
case ELECTRICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.ELECTRICAL;
|
||||
case IMPEDANCE:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.IMPEDANCE;
|
||||
case NUCLEAR:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.NUCLEAR;
|
||||
case OPTICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.OPTICAL;
|
||||
case THERMAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.THERMAL;
|
||||
case BIOLOGICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.BIOLOGICAL;
|
||||
case MECHANICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.MECHANICAL;
|
||||
case ACOUSTICAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.ACOUSTICAL;
|
||||
case MANUAL:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.MANUAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceComponent.MeasmntPrinciple.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,247 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DeviceMetric10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu3.model.DeviceMetric src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DeviceMetric tgt = new org.hl7.fhir.dstu2.model.DeviceMetric();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setUnit(VersionConvertor_10_30.convertCodeableConcept(src.getUnit()));
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setParent(VersionConvertor_10_30.convertReference(src.getParent()));
|
||||
tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus()));
|
||||
tgt.setColor(convertDeviceMetricColor(src.getColor()));
|
||||
tgt.setCategory(convertDeviceMetricCategory(src.getCategory()));
|
||||
tgt.setMeasurementPeriod(VersionConvertor_10_30.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu2.model.DeviceMetric src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DeviceMetric tgt = new org.hl7.fhir.dstu3.model.DeviceMetric();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setUnit(VersionConvertor_10_30.convertCodeableConcept(src.getUnit()));
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setParent(VersionConvertor_10_30.convertReference(src.getParent()));
|
||||
tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus()));
|
||||
tgt.setColor(convertDeviceMetricColor(src.getColor()));
|
||||
tgt.setCategory(convertDeviceMetricCategory(src.getCategory()));
|
||||
tgt.setMeasurementPeriod(VersionConvertor_10_30.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertDeviceMetricCalibrationType(src.getType()));
|
||||
tgt.setState(convertDeviceMetricCalibrationState(src.getState()));
|
||||
tgt.setTime(src.getTime());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent convertDeviceMetricCalibrationComponent(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent tgt = new org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertDeviceMetricCalibrationType(src.getType()));
|
||||
tgt.setState(convertDeviceMetricCalibrationState(src.getState()));
|
||||
tgt.setTime(src.getTime());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTCALIBRATED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED;
|
||||
case CALIBRATIONREQUIRED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED;
|
||||
case CALIBRATED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED;
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState convertDeviceMetricCalibrationState(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationState src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTCALIBRATED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NOTCALIBRATED;
|
||||
case CALIBRATIONREQUIRED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATIONREQUIRED;
|
||||
case CALIBRATED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.CALIBRATED;
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.UNSPECIFIED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationState.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED;
|
||||
case OFFSET:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET;
|
||||
case GAIN:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.GAIN;
|
||||
case TWOPOINT:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType convertDeviceMetricCalibrationType(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType.UNSPECIFIED;
|
||||
case OFFSET:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType.OFFSET;
|
||||
case GAIN:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType.GAIN;
|
||||
case TWOPOINT:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType.TWOPOINT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MEASUREMENT:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT;
|
||||
case SETTING:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.SETTING;
|
||||
case CALCULATION:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.CALCULATION;
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory convertDeviceMetricCategory(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCategory src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MEASUREMENT:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory.MEASUREMENT;
|
||||
case SETTING:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory.SETTING;
|
||||
case CALCULATION:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory.CALCULATION;
|
||||
case UNSPECIFIED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory.UNSPECIFIED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCategory.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case BLACK:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.BLACK;
|
||||
case RED:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.RED;
|
||||
case GREEN:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.GREEN;
|
||||
case YELLOW:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.YELLOW;
|
||||
case BLUE:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.BLUE;
|
||||
case MAGENTA:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.MAGENTA;
|
||||
case CYAN:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.CYAN;
|
||||
case WHITE:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.WHITE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor convertDeviceMetricColor(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricColor src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case BLACK:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLACK;
|
||||
case RED:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.RED;
|
||||
case GREEN:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.GREEN;
|
||||
case YELLOW:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.YELLOW;
|
||||
case BLUE:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.BLUE;
|
||||
case MAGENTA:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.MAGENTA;
|
||||
case CYAN:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.CYAN;
|
||||
case WHITE:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.WHITE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricColor.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ON:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus.ON;
|
||||
case OFF:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus.OFF;
|
||||
case STANDBY:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus convertDeviceMetricOperationalStatus(org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricOperationalStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ON:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.ON;
|
||||
case OFF:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.OFF;
|
||||
case STANDBY:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.STANDBY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricOperationalStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.Annotation;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DeviceUseStatement10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu3.model.DeviceUseStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DeviceUseStatement tgt = new org.hl7.fhir.dstu2.model.DeviceUseStatement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertType(src.getBodySite()));
|
||||
tgt.setWhenUsed(VersionConvertor_10_30.convertPeriod(src.getWhenUsed()));
|
||||
tgt.setDevice(VersionConvertor_10_30.convertReference(src.getDevice()));
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getIndication()) tgt.addIndication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (Annotation t : src.getNote()) tgt.addNotes(t.getText());
|
||||
tgt.setRecordedOn(src.getRecordedOn());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setTiming(VersionConvertor_10_30.convertType(src.getTiming()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu2.model.DeviceUseStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DeviceUseStatement tgt = new org.hl7.fhir.dstu3.model.DeviceUseStatement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
if (src.hasBodySiteCodeableConcept())
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySiteCodeableConcept()));
|
||||
tgt.setWhenUsed(VersionConvertor_10_30.convertPeriod(src.getWhenUsed()));
|
||||
tgt.setDevice(VersionConvertor_10_30.convertReference(src.getDevice()));
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getIndication()) tgt.addIndication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue());
|
||||
tgt.setRecordedOn(src.getRecordedOn());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setTiming(VersionConvertor_10_30.convertType(src.getTiming()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DiagnosticReport10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.dstu3.model.DiagnosticReport src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DiagnosticReport tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertDiagnosticReportStatus(src.getStatus()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getBasedOn()) tgt.addRequest(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getResult()) tgt.addResult(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getImagingStudy()) tgt.addImagingStudy(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addImage(convertDiagnosticReportImageComponent(t));
|
||||
tgt.setConclusion(src.getConclusion());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addCodedDiagnosis(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getPresentedForm()) tgt.addPresentedForm(VersionConvertor_10_30.convertAttachment(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.dstu2.model.DiagnosticReport src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DiagnosticReport tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertDiagnosticReportStatus(src.getStatus()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRequest()) tgt.addBasedOn(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getResult()) tgt.addResult(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getImagingStudy()) tgt.addImagingStudy(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addImage(convertDiagnosticReportImageComponent(t));
|
||||
tgt.setConclusion(src.getConclusion());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addCodedDiagnosis(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPresentedForm()) tgt.addPresentedForm(VersionConvertor_10_30.convertAttachment(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setComment(src.getComment());
|
||||
tgt.setLink(VersionConvertor_10_30.convertReference(src.getLink()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setComment(src.getComment());
|
||||
tgt.setLink(VersionConvertor_10_30.convertReference(src.getLink()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REGISTERED:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED;
|
||||
case PARTIAL:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.FINAL;
|
||||
case CORRECTED:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED;
|
||||
case APPENDED:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.APPENDED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus convertDiagnosticReportStatus(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REGISTERED:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.REGISTERED;
|
||||
case PARTIAL:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.PARTIAL;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.FINAL;
|
||||
case CORRECTED:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.CORRECTED;
|
||||
case APPENDED:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.APPENDED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.CANCELLED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DocumentManifest10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu3.model.DocumentManifest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentManifest tgt = new org.hl7.fhir.dstu2.model.DocumentManifest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setMasterIdentifier(VersionConvertor_10_30.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setSource(src.getSource());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) tgt.addContent(convertDocumentManifestContentComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) tgt.addRelated(convertDocumentManifestRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu2.model.DocumentManifest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentManifest tgt = new org.hl7.fhir.dstu3.model.DocumentManifest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setMasterIdentifier(VersionConvertor_10_30.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setSource(src.getSource());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent()) tgt.addContent(convertDocumentManifestContentComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) tgt.addRelated(convertDocumentManifestRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setP(VersionConvertor_10_30.convertType(src.getP()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setP(VersionConvertor_10_30.convertType(src.getP()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setRef(VersionConvertor_10_30.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setRef(VersionConvertor_10_30.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,216 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu2.model.CodeableConcept;
|
||||
import org.hl7.fhir.dstu3.model.DocumentReference.ReferredDocumentStatus;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DocumentReference10_30 {
|
||||
|
||||
static public ReferredDocumentStatus convertDocStatus(CodeableConcept cc) {
|
||||
if (VersionConvertor_10_30.hasConcept(cc, "http://hl7.org/fhir/composition-status", "preliminary"))
|
||||
return ReferredDocumentStatus.PRELIMINARY;
|
||||
if (VersionConvertor_10_30.hasConcept(cc, "http://hl7.org/fhir/composition-status", "final"))
|
||||
return ReferredDocumentStatus.FINAL;
|
||||
if (VersionConvertor_10_30.hasConcept(cc, "http://hl7.org/fhir/composition-status", "amended"))
|
||||
return ReferredDocumentStatus.AMENDED;
|
||||
if (VersionConvertor_10_30.hasConcept(cc, "http://hl7.org/fhir/composition-status", "entered-in-error"))
|
||||
return ReferredDocumentStatus.ENTEREDINERROR;
|
||||
return null;
|
||||
}
|
||||
|
||||
static public CodeableConcept convertDocStatus(ReferredDocumentStatus docStatus) {
|
||||
CodeableConcept cc = new CodeableConcept();
|
||||
switch(docStatus) {
|
||||
case AMENDED:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/composition-status").setCode("amended");
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/composition-status").setCode("entered-in-error");
|
||||
break;
|
||||
case FINAL:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/composition-status").setCode("final");
|
||||
break;
|
||||
case PRELIMINARY:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/composition-status").setCode("preliminary");
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return cc;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference convertDocumentReference(org.hl7.fhir.dstu2.model.DocumentReference src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentReference tgt = new org.hl7.fhir.dstu3.model.DocumentReference();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setMasterIdentifier(VersionConvertor_10_30.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCustodian(VersionConvertor_10_30.convertReference(src.getCustodian()));
|
||||
tgt.setAuthenticator(VersionConvertor_10_30.convertReference(src.getAuthenticator()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setIndexed(src.getIndexed());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus()));
|
||||
tgt.setDocStatus(convertDocStatus(src.getDocStatus()));
|
||||
for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) tgt.addContent(convertDocumentReferenceContentComponent(t));
|
||||
tgt.setContext(convertDocumentReferenceContextComponent(src.getContext()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference convertDocumentReference(org.hl7.fhir.dstu3.model.DocumentReference src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentReference tgt = new org.hl7.fhir.dstu2.model.DocumentReference();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setMasterIdentifier(VersionConvertor_10_30.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setClass_(VersionConvertor_10_30.convertCodeableConcept(src.getClass_()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCustodian(VersionConvertor_10_30.convertReference(src.getCustodian()));
|
||||
tgt.setAuthenticator(VersionConvertor_10_30.convertReference(src.getAuthenticator()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setIndexed(src.getIndexed());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertDocumentReferenceStatus(src.getStatus()));
|
||||
tgt.setDocStatus(convertDocStatus(src.getDocStatus()));
|
||||
for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent t : src.getContent()) tgt.addContent(convertDocumentReferenceContentComponent(t));
|
||||
tgt.setContext(convertDocumentReferenceContextComponent(src.getContext()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAttachment(VersionConvertor_10_30.convertAttachment(src.getAttachment()));
|
||||
tgt.addFormat(VersionConvertor_10_30.convertCoding(src.getFormat()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAttachment(VersionConvertor_10_30.convertAttachment(src.getAttachment()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getFormat()) tgt.setFormat(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getEvent()) tgt.addEvent(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setFacilityType(VersionConvertor_10_30.convertCodeableConcept(src.getFacilityType()));
|
||||
tgt.setPracticeSetting(VersionConvertor_10_30.convertCodeableConcept(src.getPracticeSetting()));
|
||||
tgt.setSourcePatientInfo(VersionConvertor_10_30.convertReference(src.getSourcePatientInfo()));
|
||||
for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent convertDocumentReferenceContextComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getEvent()) tgt.addEvent(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setFacilityType(VersionConvertor_10_30.convertCodeableConcept(src.getFacilityType()));
|
||||
tgt.setPracticeSetting(VersionConvertor_10_30.convertCodeableConcept(src.getPracticeSetting()));
|
||||
tgt.setSourcePatientInfo(VersionConvertor_10_30.convertReference(src.getSourcePatientInfo()));
|
||||
for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated()) tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setRef(VersionConvertor_10_30.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setRef(VersionConvertor_10_30.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertDocumentRelationshipType(src.getCode()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent tgt = new org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(convertDocumentRelationshipType(src.getCode()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REPLACES:
|
||||
return org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType.REPLACES;
|
||||
case TRANSFORMS:
|
||||
return org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType.TRANSFORMS;
|
||||
case SIGNS:
|
||||
return org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType.SIGNS;
|
||||
case APPENDS:
|
||||
return org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType.APPENDS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType convertDocumentRelationshipType(org.hl7.fhir.dstu2.model.DocumentReference.DocumentRelationshipType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REPLACES:
|
||||
return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.REPLACES;
|
||||
case TRANSFORMS:
|
||||
return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.TRANSFORMS;
|
||||
case SIGNS:
|
||||
return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.SIGNS;
|
||||
case APPENDS:
|
||||
return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.APPENDS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.DocumentReference.DocumentRelationshipType.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,258 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Encounter10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter convertEncounter(org.hl7.fhir.dstu2.model.Encounter src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter tgt = new org.hl7.fhir.dstu3.model.Encounter();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertEncounterState(src.getStatus()));
|
||||
tgt.setClass_(convertEncounterClass(src.getClass_()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPriority(VersionConvertor_10_30.convertCodeableConcept(src.getPriority()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getEpisodeOfCare()) tgt.addEpisodeOfCare(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getIncomingReferral()) tgt.addIncomingReferral(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertEncounterParticipantComponent(t));
|
||||
tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setLength(VersionConvertor_10_30.convertDuration(src.getLength()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
|
||||
for (org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
tgt.setServiceProvider(VersionConvertor_10_30.convertReference(src.getServiceProvider()));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter convertEncounter(org.hl7.fhir.dstu3.model.Encounter src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Encounter tgt = new org.hl7.fhir.dstu2.model.Encounter();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertEncounterState(src.getStatus()));
|
||||
tgt.setClass_(convertEncounterClass(src.getClass_()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPriority(VersionConvertor_10_30.convertCodeableConcept(src.getPriority()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getEpisodeOfCare()) tgt.addEpisodeOfCare(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getIncomingReferral()) tgt.addIncomingReferral(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertEncounterParticipantComponent(t));
|
||||
tgt.setAppointment(VersionConvertor_10_30.convertReference(src.getAppointment()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setLength(VersionConvertor_10_30.convertDuration(src.getLength()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
tgt.setServiceProvider(VersionConvertor_10_30.convertReference(src.getServiceProvider()));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Coding convertEncounterClass(org.hl7.fhir.dstu2.model.Encounter.EncounterClass src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPATIENT:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("IMP");
|
||||
case OUTPATIENT:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("AMB");
|
||||
case AMBULATORY:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("AMB");
|
||||
case EMERGENCY:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("EMER");
|
||||
case HOME:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("HH");
|
||||
case FIELD:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("FLD");
|
||||
case DAYTIME:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("SS");
|
||||
case VIRTUAL:
|
||||
return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("VR");
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterClass convertEncounterClass(org.hl7.fhir.dstu3.model.Coding src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
if (src.getSystem().equals("http://hl7.org/fhir/v3/ActCode")) {
|
||||
if (src.getCode().equals("IMP"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.INPATIENT;
|
||||
if (src.getCode().equals("AMB"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.AMBULATORY;
|
||||
if (src.getCode().equals("EMER"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.EMERGENCY;
|
||||
if (src.getCode().equals("HH"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.HOME;
|
||||
if (src.getCode().equals("FLD"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.FIELD;
|
||||
if (src.getCode().equals(""))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.DAYTIME;
|
||||
if (src.getCode().equals("VR"))
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.VIRTUAL;
|
||||
}
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterClass.NULL;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setPreAdmissionIdentifier(VersionConvertor_10_30.convertIdentifier(src.getPreAdmissionIdentifier()));
|
||||
tgt.setOrigin(VersionConvertor_10_30.convertReference(src.getOrigin()));
|
||||
tgt.setAdmitSource(VersionConvertor_10_30.convertCodeableConcept(src.getAdmitSource()));
|
||||
tgt.setReAdmission(VersionConvertor_10_30.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getDietPreference()) tgt.addDietPreference(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialCourtesy()) tgt.addSpecialCourtesy(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialArrangement()) tgt.addSpecialArrangement(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
tgt.setDischargeDisposition(VersionConvertor_10_30.convertCodeableConcept(src.getDischargeDisposition()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setPreAdmissionIdentifier(VersionConvertor_10_30.convertIdentifier(src.getPreAdmissionIdentifier()));
|
||||
tgt.setOrigin(VersionConvertor_10_30.convertReference(src.getOrigin()));
|
||||
tgt.setAdmitSource(VersionConvertor_10_30.convertCodeableConcept(src.getAdmitSource()));
|
||||
tgt.setReAdmission(VersionConvertor_10_30.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getDietPreference()) tgt.addDietPreference(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialCourtesy()) tgt.addSpecialCourtesy(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialArrangement()) tgt.addSpecialArrangement(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
tgt.setDischargeDisposition(VersionConvertor_10_30.convertCodeableConcept(src.getDischargeDisposition()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setStatus(convertEncounterLocationStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent convertEncounterLocationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setStatus(convertEncounterLocationStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.PLANNED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.ACTIVE;
|
||||
case RESERVED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.RESERVED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.COMPLETED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus convertEncounterLocationStatus(org.hl7.fhir.dstu3.model.Encounter.EncounterLocationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus.PLANNED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus.ACTIVE;
|
||||
case RESERVED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus.RESERVED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus.COMPLETED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterLocationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterParticipantComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setIndividual(VersionConvertor_10_30.convertReference(src.getIndividual()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterParticipantComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setIndividual(VersionConvertor_10_30.convertReference(src.getIndividual()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterState convertEncounterState(org.hl7.fhir.dstu3.model.Encounter.EncounterStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.PLANNED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.ARRIVED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.INPROGRESS;
|
||||
case ONLEAVE:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.ONLEAVE;
|
||||
case FINISHED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.FINISHED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Encounter.EncounterState.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterStatus convertEncounterState(org.hl7.fhir.dstu2.model.Encounter.EncounterState src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.PLANNED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ARRIVED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.INPROGRESS;
|
||||
case ONLEAVE:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.ONLEAVE;
|
||||
case FINISHED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.FINISHED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Encounter.EncounterStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class EnrollmentRequest10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.dstu2.model.EnrollmentRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.EnrollmentRequest tgt = new org.hl7.fhir.dstu3.model.EnrollmentRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setProvider(VersionConvertor_10_30.convertReference(src.getProvider()));
|
||||
tgt.setOrganization(VersionConvertor_10_30.convertReference(src.getOrganization()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCoverage(VersionConvertor_10_30.convertReference(src.getCoverage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.dstu3.model.EnrollmentRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.EnrollmentRequest tgt = new org.hl7.fhir.dstu2.model.EnrollmentRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setCoverage(VersionConvertor_10_30.convertReference(src.getCoverage()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class EnrollmentResponse10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.dstu2.model.EnrollmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.EnrollmentResponse tgt = new org.hl7.fhir.dstu3.model.EnrollmentResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest()));
|
||||
tgt.setDisposition(src.getDisposition());
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setOrganization(VersionConvertor_10_30.convertReference(src.getOrganization()));
|
||||
tgt.setRequestProvider(VersionConvertor_10_30.convertReference(src.getRequestProvider()));
|
||||
tgt.setRequestOrganization(VersionConvertor_10_30.convertReference(src.getRequestOrganization()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.dstu3.model.EnrollmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.EnrollmentResponse tgt = new org.hl7.fhir.dstu2.model.EnrollmentResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setDisposition(src.getDisposition());
|
||||
tgt.setCreated(src.getCreated());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class EpisodeOfCare10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.dstu2.model.EpisodeOfCare src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.EpisodeOfCare tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
|
||||
for (org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReferralRequest()) tgt.addReferralRequest(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCareManager(VersionConvertor_10_30.convertReference(src.getCareManager()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.EpisodeOfCare convertEpisodeOfCare(org.hl7.fhir.dstu3.model.EpisodeOfCare src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.EpisodeOfCare tgt = new org.hl7.fhir.dstu2.model.EpisodeOfCare();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
|
||||
for (org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent t : src.getStatusHistory()) tgt.addStatusHistory(convertEpisodeOfCareStatusHistoryComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReferralRequest()) tgt.addReferralRequest(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setCareManager(VersionConvertor_10_30.convertReference(src.getCareManager()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED;
|
||||
case WAITLIST:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD;
|
||||
case FINISHED:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus convertEpisodeOfCareStatus(org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.PLANNED;
|
||||
case WAITLIST:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.WAITLIST;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ACTIVE;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.ONHOLD;
|
||||
case FINISHED:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.FINISHED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class FamilyMemberHistory10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PARTIAL:
|
||||
return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR;
|
||||
case HEALTHUNKNOWN:
|
||||
return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus convertFamilyHistoryStatus(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyHistoryStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PARTIAL:
|
||||
return org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus.PARTIAL;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus.ENTEREDINERROR;
|
||||
case HEALTHUNKNOWN:
|
||||
return org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus.HEALTHUNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyHistoryStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.dstu2.model.FamilyMemberHistory src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.FamilyMemberHistory tgt = new org.hl7.fhir.dstu3.model.FamilyMemberHistory();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship()));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBorn(VersionConvertor_10_30.convertType(src.getBorn()));
|
||||
tgt.setAge(VersionConvertor_10_30.convertType(src.getAge()));
|
||||
tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased()));
|
||||
for (org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent t : src.getCondition()) tgt.addCondition(convertFamilyMemberHistoryConditionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.dstu3.model.FamilyMemberHistory src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.FamilyMemberHistory tgt = new org.hl7.fhir.dstu2.model.FamilyMemberHistory();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship()));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBorn(VersionConvertor_10_30.convertType(src.getBorn()));
|
||||
tgt.setAge(VersionConvertor_10_30.convertType(src.getAge()));
|
||||
tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased()));
|
||||
for (org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent t : src.getCondition()) tgt.addCondition(convertFamilyMemberHistoryConditionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent tgt = new org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
tgt.setOnset(VersionConvertor_10_30.convertType(src.getOnset()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent tgt = new org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
tgt.setOnset(VersionConvertor_10_30.convertType(src.getOnset()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Flag10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Flag convertFlag(org.hl7.fhir.dstu2.model.Flag src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Flag tgt = new org.hl7.fhir.dstu3.model.Flag();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setStatus(convertFlagStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Flag convertFlag(org.hl7.fhir.dstu3.model.Flag src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Flag tgt = new org.hl7.fhir.dstu2.model.Flag();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setStatus(convertFlagStatus(src.getStatus()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Flag.FlagStatus convertFlagStatus(org.hl7.fhir.dstu2.model.Flag.FlagStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Flag.FlagStatus.ACTIVE;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Flag.FlagStatus.INACTIVE;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Flag.FlagStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Flag.FlagStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Flag.FlagStatus convertFlagStatus(org.hl7.fhir.dstu3.model.Flag.FlagStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Flag.FlagStatus.ACTIVE;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Flag.FlagStatus.INACTIVE;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Flag.FlagStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Flag.FlagStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Group10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Group convertGroup(org.hl7.fhir.dstu3.model.Group src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Group tgt = new org.hl7.fhir.dstu2.model.Group();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setType(convertGroupType(src.getType()));
|
||||
tgt.setActual(src.getActual());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setQuantity(src.getQuantity());
|
||||
for (org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Group.GroupMemberComponent t : src.getMember()) tgt.addMember(convertGroupMemberComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Group convertGroup(org.hl7.fhir.dstu2.model.Group src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Group tgt = new org.hl7.fhir.dstu3.model.Group();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setType(convertGroupType(src.getType()));
|
||||
tgt.setActual(src.getActual());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setQuantity(src.getQuantity());
|
||||
for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Group.GroupMemberComponent t : src.getMember()) tgt.addMember(convertGroupMemberComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent convertGroupCharacteristicComponent(org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent tgt = new org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setExclude(src.getExclude());
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent convertGroupCharacteristicComponent(org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent tgt = new org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setExclude(src.getExclude());
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Group.GroupMemberComponent convertGroupMemberComponent(org.hl7.fhir.dstu3.model.Group.GroupMemberComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Group.GroupMemberComponent tgt = new org.hl7.fhir.dstu2.model.Group.GroupMemberComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertReference(src.getEntity()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setInactive(src.getInactive());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Group.GroupMemberComponent convertGroupMemberComponent(org.hl7.fhir.dstu2.model.Group.GroupMemberComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Group.GroupMemberComponent tgt = new org.hl7.fhir.dstu3.model.Group.GroupMemberComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setEntity(VersionConvertor_10_30.convertReference(src.getEntity()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setInactive(src.getInactive());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Group.GroupType convertGroupType(org.hl7.fhir.dstu3.model.Group.GroupType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSON:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.PERSON;
|
||||
case ANIMAL:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.ANIMAL;
|
||||
case PRACTITIONER:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.PRACTITIONER;
|
||||
case DEVICE:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.DEVICE;
|
||||
case MEDICATION:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.MEDICATION;
|
||||
case SUBSTANCE:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.SUBSTANCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Group.GroupType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Group.GroupType convertGroupType(org.hl7.fhir.dstu2.model.Group.GroupType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSON:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.PERSON;
|
||||
case ANIMAL:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.ANIMAL;
|
||||
case PRACTITIONER:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.PRACTITIONER;
|
||||
case DEVICE:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.DEVICE;
|
||||
case MEDICATION:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.MEDICATION;
|
||||
case SUBSTANCE:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.SUBSTANCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Group.GroupType.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class HealthcareService10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MON:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.MON;
|
||||
case TUE:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.TUE;
|
||||
case WED:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.WED;
|
||||
case THU:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.THU;
|
||||
case FRI:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.FRI;
|
||||
case SAT:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.SAT;
|
||||
case SUN:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.SUN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek convertDaysOfWeek(org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MON:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.MON;
|
||||
case TUE:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.TUE;
|
||||
case WED:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.WED;
|
||||
case THU:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.THU;
|
||||
case FRI:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.FRI;
|
||||
case SAT:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SAT;
|
||||
case SUN:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.SUN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.HealthcareService convertHealthcareService(org.hl7.fhir.dstu3.model.HealthcareService src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.HealthcareService tgt = new org.hl7.fhir.dstu2.model.HealthcareService();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setProvidedBy(VersionConvertor_10_30.convertReference(src.getProvidedBy()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialty()) {
|
||||
if (!tgt.hasServiceType())
|
||||
tgt.addServiceType();
|
||||
tgt.getServiceType().get(0).addSpecialty(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setComment(src.getComment());
|
||||
tgt.setExtraDetails(src.getExtraDetails());
|
||||
tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto()));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getCoverageArea()) tgt.addCoverageArea(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceProvisionCode()) tgt.addServiceProvisionCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setEligibility(VersionConvertor_10_30.convertCodeableConcept(src.getEligibility()));
|
||||
tgt.setEligibilityNote(src.getEligibilityNote());
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getProgramName()) tgt.addProgramName(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCharacteristic()) tgt.addCharacteristic(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setAppointmentRequired(src.getAppointmentRequired());
|
||||
for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
|
||||
tgt.setAvailabilityExceptions(src.getAvailabilityExceptions());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.HealthcareService convertHealthcareService(org.hl7.fhir.dstu2.model.HealthcareService src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.HealthcareService tgt = new org.hl7.fhir.dstu3.model.HealthcareService();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setProvidedBy(VersionConvertor_10_30.convertReference(src.getProvidedBy()));
|
||||
for (org.hl7.fhir.dstu2.model.HealthcareService.ServiceTypeComponent t : src.getServiceType()) {
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept tj : t.getSpecialty()) tgt.addSpecialty(VersionConvertor_10_30.convertCodeableConcept(tj));
|
||||
}
|
||||
tgt.addLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setComment(src.getComment());
|
||||
tgt.setExtraDetails(src.getExtraDetails());
|
||||
tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getCoverageArea()) tgt.addCoverageArea(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getServiceProvisionCode()) tgt.addServiceProvisionCode(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setEligibility(VersionConvertor_10_30.convertCodeableConcept(src.getEligibility()));
|
||||
tgt.setEligibilityNote(src.getEligibilityNote());
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getProgramName()) tgt.addProgramName(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCharacteristic()) tgt.addCharacteristic(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setAppointmentRequired(src.getAppointmentRequired());
|
||||
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
|
||||
tgt.setAvailabilityExceptions(src.getAvailabilityExceptions());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_30.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue())));
|
||||
tgt.setAllDay(src.getAllDay());
|
||||
tgt.setAvailableStartTime(src.getAvailableStartTime());
|
||||
tgt.setAvailableEndTime(src.getAvailableEndTime());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_30.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue())));
|
||||
tgt.setAllDay(src.getAllDay());
|
||||
tgt.setAvailableStartTime(src.getAvailableStartTime());
|
||||
tgt.setAvailableEndTime(src.getAvailableEndTime());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDuring(VersionConvertor_10_30.convertPeriod(src.getDuring()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDuring(VersionConvertor_10_30.convertPeriod(src.getDuring()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ImagingStudy10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImagingStudy convertImagingStudy(org.hl7.fhir.dstu2.model.ImagingStudy src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImagingStudy tgt = new org.hl7.fhir.dstu3.model.ImagingStudy();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setAccession(VersionConvertor_10_30.convertIdentifier(src.getAccession()));
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setAvailability(convertInstanceAvailability(src.getAvailability()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getModalityList()) tgt.addModalityList(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setStarted(src.getStarted());
|
||||
tgt.setReferrer(VersionConvertor_10_30.convertReference(src.getReferrer()));
|
||||
tgt.addInterpreter(VersionConvertor_10_30.convertReference(src.getInterpreter()));
|
||||
tgt.setNumberOfSeries(src.getNumberOfSeries());
|
||||
tgt.setNumberOfInstances(src.getNumberOfInstances());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getProcedure()) tgt.addProcedureReference(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) tgt.addSeries(convertImagingStudySeriesComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImagingStudy convertImagingStudy(org.hl7.fhir.dstu3.model.ImagingStudy src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImagingStudy tgt = new org.hl7.fhir.dstu2.model.ImagingStudy();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setAccession(VersionConvertor_10_30.convertIdentifier(src.getAccession()));
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setAvailability(convertInstanceAvailability(src.getAvailability()));
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getModalityList()) tgt.addModalityList(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setStarted(src.getStarted());
|
||||
tgt.setReferrer(VersionConvertor_10_30.convertReference(src.getReferrer()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) tgt.setInterpreter(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setNumberOfSeries(src.getNumberOfSeries());
|
||||
tgt.setNumberOfInstances(src.getNumberOfInstances());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getProcedureReference()) tgt.addProcedure(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent t : src.getSeries()) tgt.addSeries(convertImagingStudySeriesComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent convertImagingStudySeriesComponent(org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setNumber(src.getNumber());
|
||||
tgt.setModality(VersionConvertor_10_30.convertCoding(src.getModality()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setNumberOfInstances(src.getNumberOfInstances());
|
||||
tgt.setAvailability(convertInstanceAvailability(src.getAvailability()));
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCoding(src.getBodySite()));
|
||||
tgt.setLaterality(VersionConvertor_10_30.convertCoding(src.getLaterality()));
|
||||
tgt.setStarted(src.getStarted());
|
||||
for (org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) tgt.addInstance(convertImagingStudySeriesInstanceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent convertImagingStudySeriesComponent(org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setNumber(src.getNumber());
|
||||
tgt.setModality(VersionConvertor_10_30.convertCoding(src.getModality()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setNumberOfInstances(src.getNumberOfInstances());
|
||||
tgt.setAvailability(convertInstanceAvailability(src.getAvailability()));
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCoding(src.getBodySite()));
|
||||
tgt.setLaterality(VersionConvertor_10_30.convertCoding(src.getLaterality()));
|
||||
tgt.setStarted(src.getStarted());
|
||||
for (org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent t : src.getInstance()) tgt.addInstance(convertImagingStudySeriesInstanceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent convertImagingStudySeriesInstanceComponent(org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setNumber(src.getNumber());
|
||||
tgt.setSopClass(src.getSopClass());
|
||||
tgt.setTitle(src.getTitle());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent convertImagingStudySeriesInstanceComponent(org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt = new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUid(src.getUid());
|
||||
tgt.setNumber(src.getNumber());
|
||||
tgt.setSopClass(src.getSopClass());
|
||||
tgt.setTitle(src.getTitle());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ONLINE:
|
||||
return org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability.ONLINE;
|
||||
case OFFLINE:
|
||||
return org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability.OFFLINE;
|
||||
case NEARLINE:
|
||||
return org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability.NEARLINE;
|
||||
case UNAVAILABLE:
|
||||
return org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability.UNAVAILABLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability convertInstanceAvailability(org.hl7.fhir.dstu2.model.ImagingStudy.InstanceAvailability src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ONLINE:
|
||||
return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.ONLINE;
|
||||
case OFFLINE:
|
||||
return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.OFFLINE;
|
||||
case NEARLINE:
|
||||
return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NEARLINE;
|
||||
case UNAVAILABLE:
|
||||
return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.UNAVAILABLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ImagingStudy.InstanceAvailability.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.Coding;
|
||||
import org.hl7.fhir.dstu3.model.Immunization.ImmunizationPractitionerComponent;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Immunization10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Immunization convertImmunization(org.hl7.fhir.dstu3.model.Immunization src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Immunization tgt = new org.hl7.fhir.dstu2.model.Immunization();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(src.getStatus().toCode());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setWasNotGiven(src.getNotGiven());
|
||||
tgt.setReported(!src.getPrimarySource());
|
||||
tgt.setPerformer(VersionConvertor_10_30.convertReference(getPerformer(src.getPractitioner())));
|
||||
tgt.setRequester(VersionConvertor_10_30.convertReference(getRequester(src.getPractitioner())));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setLotNumber(src.getLotNumber());
|
||||
tgt.setExpirationDate(src.getExpirationDate());
|
||||
tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSite()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setDoseQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getDoseQuantity()));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t));
|
||||
tgt.setExplanation(convertImmunizationExplanationComponent(src.getExplanation()));
|
||||
for (org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent t : src.getReaction()) tgt.addReaction(convertImmunizationReactionComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent t : src.getVaccinationProtocol()) tgt.addVaccinationProtocol(convertImmunizationVaccinationProtocolComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Immunization convertImmunization(org.hl7.fhir.dstu2.model.Immunization src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Immunization tgt = new org.hl7.fhir.dstu3.model.Immunization();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
try {
|
||||
tgt.setStatus(org.hl7.fhir.dstu3.model.Immunization.ImmunizationStatus.fromCode(src.getStatus()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setNotGiven(src.getWasNotGiven());
|
||||
tgt.setPrimarySource(!src.getReported());
|
||||
if (src.hasPerformer())
|
||||
tgt.addPractitioner().setActor(VersionConvertor_10_30.convertReference(src.getPerformer())).setRole(new org.hl7.fhir.dstu3.model.CodeableConcept().addCoding(new Coding().setSystem("http://hl7.org/fhir/v2/0443").setCode("AP")));
|
||||
if (src.hasRequester())
|
||||
tgt.addPractitioner().setActor(VersionConvertor_10_30.convertReference(src.getRequester())).setRole(new org.hl7.fhir.dstu3.model.CodeableConcept().addCoding(new Coding().setSystem("http://hl7.org/fhir/v2/0443").setCode("OP")));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setLotNumber(src.getLotNumber());
|
||||
tgt.setExpirationDate(src.getExpirationDate());
|
||||
tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSite()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setDoseQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getDoseQuantity()));
|
||||
for (org.hl7.fhir.dstu2.model.Annotation t : src.getNote()) tgt.addNote(VersionConvertor_10_30.convertAnnotation(t));
|
||||
tgt.setExplanation(convertImmunizationExplanationComponent(src.getExplanation()));
|
||||
for (org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent t : src.getReaction()) tgt.addReaction(convertImmunizationReactionComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Immunization.ImmunizationVaccinationProtocolComponent t : src.getVaccinationProtocol()) tgt.addVaccinationProtocol(convertImmunizationVaccinationProtocolComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven()) tgt.addReasonNotGiven(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonNotGiven()) tgt.addReasonNotGiven(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDetail(VersionConvertor_10_30.convertReference(src.getDetail()));
|
||||
tgt.setReported(src.getReported());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent tgt = new org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDetail(VersionConvertor_10_30.convertReference(src.getDetail()));
|
||||
tgt.setReported(src.getReported());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.dstu2.model.Immunization.ImmunizationVaccinationProtocolComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDoseSequence(src.getDoseSequence());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority()));
|
||||
tgt.setSeries(src.getSeries());
|
||||
tgt.setSeriesDoses(src.getSeriesDoses());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTargetDisease()) tgt.addTargetDisease(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDoseStatus(VersionConvertor_10_30.convertCodeableConcept(src.getDoseStatus()));
|
||||
tgt.setDoseStatusReason(VersionConvertor_10_30.convertCodeableConcept(src.getDoseStatusReason()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent convertImmunizationVaccinationProtocolComponent(org.hl7.fhir.dstu2.model.Immunization.ImmunizationVaccinationProtocolComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent tgt = new org.hl7.fhir.dstu3.model.Immunization.ImmunizationVaccinationProtocolComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDoseSequence(src.getDoseSequence());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority()));
|
||||
tgt.setSeries(src.getSeries());
|
||||
tgt.setSeriesDoses(src.getSeriesDoses());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getTargetDisease()) tgt.addTargetDisease(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setDoseStatus(VersionConvertor_10_30.convertCodeableConcept(src.getDoseStatus()));
|
||||
tgt.setDoseStatusReason(VersionConvertor_10_30.convertCodeableConcept(src.getDoseStatusReason()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Reference getPerformer(List<ImmunizationPractitionerComponent> practitioner) {
|
||||
for (ImmunizationPractitionerComponent p : practitioner) {
|
||||
if (VersionConvertor_10_30.hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "AP"))
|
||||
return p.getActor();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Reference getRequester(List<ImmunizationPractitionerComponent> practitioner) {
|
||||
for (ImmunizationPractitionerComponent p : practitioner) {
|
||||
if (VersionConvertor_10_30.hasConcept(p.getRole(), "http://hl7.org/fhir/v2/0443", "OP"))
|
||||
return p.getActor();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ImmunizationRecommendation10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImmunizationRecommendation convertImmunizationRecommendation(org.hl7.fhir.dstu3.model.ImmunizationRecommendation src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImmunizationRecommendation tgt = new org.hl7.fhir.dstu2.model.ImmunizationRecommendation();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
for (org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent t : src.getRecommendation()) tgt.addRecommendation(convertImmunizationRecommendationRecommendationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImmunizationRecommendation convertImmunizationRecommendation(org.hl7.fhir.dstu2.model.ImmunizationRecommendation src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImmunizationRecommendation tgt = new org.hl7.fhir.dstu3.model.ImmunizationRecommendation();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
for (org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent t : src.getRecommendation()) tgt.addRecommendation(convertImmunizationRecommendationRecommendationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent convertImmunizationRecommendationRecommendationComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt = new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode()));
|
||||
tgt.setDoseNumber(src.getDoseNumber());
|
||||
tgt.setForecastStatus(VersionConvertor_10_30.convertCodeableConcept(src.getForecastStatus()));
|
||||
for (org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion()) tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t));
|
||||
tgt.setProtocol(convertImmunizationRecommendationRecommendationProtocolComponent(src.getProtocol()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingImmunization()) tgt.addSupportingImmunization(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingPatientInformation()) tgt.addSupportingPatientInformation(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent convertImmunizationRecommendationRecommendationComponent(org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt = new org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setVaccineCode(VersionConvertor_10_30.convertCodeableConcept(src.getVaccineCode()));
|
||||
tgt.setDoseNumber(src.getDoseNumber());
|
||||
tgt.setForecastStatus(VersionConvertor_10_30.convertCodeableConcept(src.getForecastStatus()));
|
||||
for (org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion()) tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t));
|
||||
tgt.setProtocol(convertImmunizationRecommendationRecommendationProtocolComponent(src.getProtocol()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingImmunization()) tgt.addSupportingImmunization(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingPatientInformation()) tgt.addSupportingPatientInformation(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent convertImmunizationRecommendationRecommendationDateCriterionComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent tgt = new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent convertImmunizationRecommendationRecommendationDateCriterionComponent(org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent tgt = new org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent convertImmunizationRecommendationRecommendationProtocolComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent tgt = new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDoseSequence(src.getDoseSequence());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority()));
|
||||
tgt.setSeries(src.getSeries());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent convertImmunizationRecommendationRecommendationProtocolComponent(org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent tgt = new org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setDoseSequence(src.getDoseSequence());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAuthority(VersionConvertor_10_30.convertReference(src.getAuthority()));
|
||||
tgt.setSeries(src.getSeries());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,285 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ImplementationGuide10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REFERENCE:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE;
|
||||
case INCLUSION:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.INCLUSION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType convertGuideDependencyType(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REFERENCE:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.REFERENCE;
|
||||
case INCLUSION:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.INCLUSION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PAGE:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.PAGE;
|
||||
case EXAMPLE:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.EXAMPLE;
|
||||
case LIST:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.LIST;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.INCLUDE;
|
||||
case DIRECTORY:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DIRECTORY;
|
||||
case DICTIONARY:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DICTIONARY;
|
||||
case TOC:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.TOC;
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.RESOURCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind convertGuidePageKind(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PAGE:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.PAGE;
|
||||
case EXAMPLE:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.EXAMPLE;
|
||||
case LIST:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.LIST;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.INCLUDE;
|
||||
case DIRECTORY:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.DIRECTORY;
|
||||
case DICTIONARY:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.DICTIONARY;
|
||||
case TOC:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.TOC;
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.RESOURCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.dstu2.model.ImplementationGuide src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent t : src.getPackage()) tgt.addPackage(convertImplementationGuidePackageComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) tgt.addGlobal(convertImplementationGuideGlobalComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue());
|
||||
tgt.setPage(convertImplementationGuidePageComponent(src.getPage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.dstu3.model.ImplementationGuide src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) tgt.addDependency(convertImplementationGuideDependencyComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent t : src.getPackage()) tgt.addPackage(convertImplementationGuidePackageComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) tgt.addGlobal(convertImplementationGuideGlobalComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue());
|
||||
tgt.setPage(convertImplementationGuidePageComponent(src.getPage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent convertImplementationGuideContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertImplementationGuideContactComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent convertImplementationGuideDependencyComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertGuideDependencyType(src.getType()));
|
||||
tgt.setUri(src.getUri());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent convertImplementationGuideDependencyComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertGuideDependencyType(src.getType()));
|
||||
tgt.setUri(src.getUri());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) tgt.addResource(convertImplementationGuidePackageResourceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent convertImplementationGuidePackageResourceComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setExample(src.getPurpose() == org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.EXAMPLE);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAcronym(src.getAcronym());
|
||||
tgt.setSource(VersionConvertor_10_30.convertType(src.getSource()));
|
||||
tgt.setExampleFor(VersionConvertor_10_30.convertReference(src.getExampleFor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent convertImplementationGuidePackageResourceComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.getExample())
|
||||
tgt.setPurpose(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.EXAMPLE);
|
||||
else
|
||||
tgt.setPurpose(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideResourcePurpose.PROFILE);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAcronym(src.getAcronym());
|
||||
tgt.setSource(VersionConvertor_10_30.convertType(src.getSource()));
|
||||
tgt.setExampleFor(VersionConvertor_10_30.convertReference(src.getExampleFor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSource(src.getSource());
|
||||
tgt.setName(src.getTitle());
|
||||
tgt.setKind(convertGuidePageKind(src.getKind()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getType()) tgt.addType(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue());
|
||||
tgt.setFormat(src.getFormat());
|
||||
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSource(src.getSource());
|
||||
tgt.setTitle(src.getName());
|
||||
tgt.setKind(convertGuidePageKind(src.getKind()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addType(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue());
|
||||
tgt.setFormat(src.getFormat());
|
||||
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) tgt.addPage(convertImplementationGuidePageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class List10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.List_ convertList(org.hl7.fhir.dstu3.model.ListResource src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.List_ tgt = new org.hl7.fhir.dstu2.model.List_();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setStatus(convertListStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy()));
|
||||
tgt.setMode(convertListMode(src.getMode()));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.setNote(t.getText());
|
||||
for (org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent t : src.getEntry()) tgt.addEntry(convertListEntry(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ListResource convertList(org.hl7.fhir.dstu2.model.List_ src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ListResource tgt = new org.hl7.fhir.dstu3.model.ListResource();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setStatus(convertListStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setOrderedBy(VersionConvertor_10_30.convertCodeableConcept(src.getOrderedBy()));
|
||||
tgt.setMode(convertListMode(src.getMode()));
|
||||
if (src.hasNote())
|
||||
tgt.addNote(new org.hl7.fhir.dstu3.model.Annotation().setText(src.getNote()));
|
||||
for (org.hl7.fhir.dstu2.model.List_.ListEntryComponent t : src.getEntry()) tgt.addEntry(convertListEntry(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent convertListEntry(org.hl7.fhir.dstu2.model.List_.ListEntryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent tgt = new org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent();
|
||||
copyBackboneElement(src, tgt);
|
||||
tgt.setFlag(VersionConvertor_10_30.convertCodeableConcept(src.getFlag()));
|
||||
tgt.setDeleted(src.getDeleted());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setItem(VersionConvertor_10_30.convertReference(src.getItem()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.List_.ListEntryComponent convertListEntry(org.hl7.fhir.dstu3.model.ListResource.ListEntryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.List_.ListEntryComponent tgt = new org.hl7.fhir.dstu2.model.List_.ListEntryComponent();
|
||||
copyBackboneElement(src, tgt);
|
||||
tgt.setFlag(VersionConvertor_10_30.convertCodeableConcept(src.getFlag()));
|
||||
tgt.setDeleted(src.getDeleted());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setItem(VersionConvertor_10_30.convertReference(src.getItem()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ListResource.ListMode convertListMode(org.hl7.fhir.dstu2.model.List_.ListMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case WORKING:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListMode.WORKING;
|
||||
case SNAPSHOT:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListMode.SNAPSHOT;
|
||||
case CHANGES:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListMode.CHANGES;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.List_.ListMode convertListMode(org.hl7.fhir.dstu3.model.ListResource.ListMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case WORKING:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListMode.WORKING;
|
||||
case SNAPSHOT:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListMode.SNAPSHOT;
|
||||
case CHANGES:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListMode.CHANGES;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.List_.ListStatus convertListStatus(org.hl7.fhir.dstu3.model.ListResource.ListStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CURRENT:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListStatus.CURRENT;
|
||||
case RETIRED:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListStatus.RETIRED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.List_.ListStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ListResource.ListStatus convertListStatus(org.hl7.fhir.dstu2.model.List_.ListStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CURRENT:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListStatus.CURRENT;
|
||||
case RETIRED:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListStatus.RETIRED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ListResource.ListStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyBackboneElement(org.hl7.fhir.dstu2.model.BackboneElement src, org.hl7.fhir.dstu3.model.BackboneElement tgt) throws FHIRException {
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Extension e : src.getModifierExtension()) {
|
||||
tgt.addModifierExtension(VersionConvertor_10_30.convertExtension(e));
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyBackboneElement(org.hl7.fhir.dstu3.model.BackboneElement src, org.hl7.fhir.dstu2.model.BackboneElement tgt) throws FHIRException {
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Extension e : src.getModifierExtension()) {
|
||||
tgt.addModifierExtension(VersionConvertor_10_30.convertExtension(e));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Location10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Location convertLocation(org.hl7.fhir.dstu3.model.Location src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Location tgt = new org.hl7.fhir.dstu2.model.Location();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertLocationStatus(src.getStatus()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setMode(convertLocationMode(src.getMode()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
tgt.setPhysicalType(VersionConvertor_10_30.convertCodeableConcept(src.getPhysicalType()));
|
||||
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Location convertLocation(org.hl7.fhir.dstu2.model.Location src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Location tgt = new org.hl7.fhir.dstu3.model.Location();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertLocationStatus(src.getStatus()));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setMode(convertLocationMode(src.getMode()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
tgt.setPhysicalType(VersionConvertor_10_30.convertCodeableConcept(src.getPhysicalType()));
|
||||
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Location.LocationMode convertLocationMode(org.hl7.fhir.dstu3.model.Location.LocationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INSTANCE:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationMode.INSTANCE;
|
||||
case KIND:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationMode.KIND;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Location.LocationMode convertLocationMode(org.hl7.fhir.dstu2.model.Location.LocationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INSTANCE:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationMode.INSTANCE;
|
||||
case KIND:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationMode.KIND;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Location.LocationPositionComponent convertLocationPositionComponent(org.hl7.fhir.dstu2.model.Location.LocationPositionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu3.model.Location.LocationPositionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLongitude(src.getLongitude());
|
||||
tgt.setLatitude(src.getLatitude());
|
||||
tgt.setAltitude(src.getAltitude());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Location.LocationPositionComponent convertLocationPositionComponent(org.hl7.fhir.dstu3.model.Location.LocationPositionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLongitude(src.getLongitude());
|
||||
tgt.setLatitude(src.getLatitude());
|
||||
tgt.setAltitude(src.getAltitude());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.dstu3.model.Location.LocationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationStatus.ACTIVE;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationStatus.SUSPENDED;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationStatus.INACTIVE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Location.LocationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Location.LocationStatus convertLocationStatus(org.hl7.fhir.dstu2.model.Location.LocationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationStatus.ACTIVE;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationStatus.SUSPENDED;
|
||||
case INACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationStatus.INACTIVE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Location.LocationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Media10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.dstu3.model.Media.DigitalMediaType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PHOTO:
|
||||
return org.hl7.fhir.dstu2.model.Media.DigitalMediaType.PHOTO;
|
||||
case VIDEO:
|
||||
return org.hl7.fhir.dstu2.model.Media.DigitalMediaType.VIDEO;
|
||||
case AUDIO:
|
||||
return org.hl7.fhir.dstu2.model.Media.DigitalMediaType.AUDIO;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Media.DigitalMediaType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Media.DigitalMediaType convertDigitalMediaType(org.hl7.fhir.dstu2.model.Media.DigitalMediaType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PHOTO:
|
||||
return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.PHOTO;
|
||||
case VIDEO:
|
||||
return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.VIDEO;
|
||||
case AUDIO:
|
||||
return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.AUDIO;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Media.DigitalMediaType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Media convertMedia(org.hl7.fhir.dstu3.model.Media src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Media tgt = new org.hl7.fhir.dstu2.model.Media();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setType(convertDigitalMediaType(src.getType()));
|
||||
tgt.setSubtype(VersionConvertor_10_30.convertCodeableConcept(src.getSubtype()));
|
||||
tgt.setView(VersionConvertor_10_30.convertCodeableConcept(src.getView()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setOperator(VersionConvertor_10_30.convertReference(src.getOperator()));
|
||||
tgt.setDeviceName(src.getDevice().getDisplay());
|
||||
tgt.setHeight(src.getHeight());
|
||||
tgt.setWidth(src.getWidth());
|
||||
tgt.setFrames(src.getFrames());
|
||||
tgt.setDuration(src.getDuration());
|
||||
tgt.setContent(VersionConvertor_10_30.convertAttachment(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Media convertMedia(org.hl7.fhir.dstu2.model.Media src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Media tgt = new org.hl7.fhir.dstu3.model.Media();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setType(convertDigitalMediaType(src.getType()));
|
||||
tgt.setSubtype(VersionConvertor_10_30.convertCodeableConcept(src.getSubtype()));
|
||||
tgt.setView(VersionConvertor_10_30.convertCodeableConcept(src.getView()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setOperator(VersionConvertor_10_30.convertReference(src.getOperator()));
|
||||
tgt.getDevice().setDisplay(src.getDeviceName());
|
||||
tgt.setHeight(src.getHeight());
|
||||
tgt.setWidth(src.getWidth());
|
||||
tgt.setFrames(src.getFrames());
|
||||
tgt.setDuration(src.getDuration());
|
||||
tgt.setContent(VersionConvertor_10_30.convertAttachment(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Medication10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Medication convertMedication(org.hl7.fhir.dstu3.model.Medication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Medication tgt = new org.hl7.fhir.dstu2.model.Medication();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setIsBrand(src.getIsBrand());
|
||||
tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer()));
|
||||
tgt.setPackage(convertMedicationPackageComponent(src.getPackage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Medication convertMedication(org.hl7.fhir.dstu2.model.Medication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Medication tgt = new org.hl7.fhir.dstu3.model.Medication();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setIsBrand(src.getIsBrand());
|
||||
tgt.setManufacturer(VersionConvertor_10_30.convertReference(src.getManufacturer()));
|
||||
tgt.setPackage(convertMedicationPackageComponent(src.getPackage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContainer(VersionConvertor_10_30.convertCodeableConcept(src.getContainer()));
|
||||
for (org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent t : src.getContent()) tgt.addContent(convertMedicationPackageContentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setContainer(VersionConvertor_10_30.convertCodeableConcept(src.getContainer()));
|
||||
for (org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent t : src.getContent()) tgt.addContent(convertMedicationPackageContentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasItemReference())
|
||||
tgt.setItem((org.hl7.fhir.dstu2.model.Reference) VersionConvertor_10_30.convertType(src.getItem()));
|
||||
tgt.setAmount(VersionConvertor_10_30.convertSimpleQuantity(src.getAmount()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent tgt = new org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setItem(VersionConvertor_10_30.convertType(src.getItem()));
|
||||
tgt.setAmount(VersionConvertor_10_30.convertSimpleQuantity(src.getAmount()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.Dosage;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class MedicationDispense10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.dstu2.model.MedicationDispense src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MedicationDispense tgt = new org.hl7.fhir.dstu3.model.MedicationDispense();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setStatus(convertMedicationDispenseStatus(src.getStatus()));
|
||||
tgt.setMedication(VersionConvertor_10_30.convertType(src.getMedication()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthorizingPrescription()) tgt.addAuthorizingPrescription(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDaysSupply(VersionConvertor_10_30.convertSimpleQuantity(src.getDaysSupply()));
|
||||
tgt.setWhenPrepared(src.getWhenPrepared());
|
||||
tgt.setWhenHandedOver(src.getWhenHandedOver());
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_30.convertReference(t));
|
||||
if (src.hasNote())
|
||||
tgt.addNote().setText(src.getNote());
|
||||
for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t));
|
||||
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.dstu3.model.MedicationDispense src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationDispense tgt = new org.hl7.fhir.dstu2.model.MedicationDispense();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifierFirstRep()));
|
||||
tgt.setStatus(convertMedicationDispenseStatus(src.getStatus()));
|
||||
tgt.setMedication(VersionConvertor_10_30.convertType(src.getMedication()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthorizingPrescription()) tgt.addAuthorizingPrescription(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDaysSupply(VersionConvertor_10_30.convertSimpleQuantity(src.getDaysSupply()));
|
||||
tgt.setWhenPrepared(src.getWhenPrepared());
|
||||
tgt.setWhenHandedOver(src.getWhenHandedOver());
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.setNote(t.getText());
|
||||
for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t));
|
||||
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Dosage convertMedicationDispenseDosageInstructionComponent(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Dosage tgt = new org.hl7.fhir.dstu3.model.Dosage();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setText(src.getText());
|
||||
tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
if (src.hasSiteCodeableConcept())
|
||||
tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSiteCodeableConcept()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setDose(VersionConvertor_10_30.convertType(src.getDose()));
|
||||
tgt.setRate(VersionConvertor_10_30.convertType(src.getRate()));
|
||||
tgt.setMaxDosePerPeriod(VersionConvertor_10_30.convertRatio(src.getMaxDosePerPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent convertMedicationDispenseDosageInstructionComponent(Dosage src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setText(src.getText());
|
||||
tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
tgt.setSite(VersionConvertor_10_30.convertType(src.getSite()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setDose(VersionConvertor_10_30.convertType(src.getDose()));
|
||||
tgt.setRate(VersionConvertor_10_30.convertType(src.getRate()));
|
||||
tgt.setMaxDosePerPeriod(VersionConvertor_10_30.convertRatio(src.getMaxDosePerPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR;
|
||||
case STOPPED:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.STOPPED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR;
|
||||
case STOPPED:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.STOPPED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseSubstitutionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getResponsibleParty()) tgt.addResponsibleParty(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getResponsibleParty()) tgt.addResponsibleParty(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class MedicationStatement10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MedicationStatement tgt = new org.hl7.fhir.dstu3.model.MedicationStatement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertMedicationStatementStatus(src.getStatus()));
|
||||
tgt.setMedication(VersionConvertor_10_30.convertType(src.getMedication()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setInformationSource(VersionConvertor_10_30.convertReference(src.getInformationSource()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_30.convertReference(t));
|
||||
if (src.hasDateAsserted())
|
||||
tgt.setDateAsserted(src.getDateAsserted());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonNotTaken()) tgt.addReasonNotTaken(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
if (src.hasNote())
|
||||
tgt.addNote().setText(src.getNote());
|
||||
for (org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationStatement tgt = new org.hl7.fhir.dstu2.model.MedicationStatement();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertMedicationStatementStatus(src.getStatus()));
|
||||
tgt.setMedication(VersionConvertor_10_30.convertType(src.getMedication()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setInformationSource(VersionConvertor_10_30.convertReference(src.getInformationSource()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_30.convertReference(t));
|
||||
if (src.hasDateAsserted())
|
||||
tgt.setDateAsserted(src.getDateAsserted());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotTaken()) tgt.addReasonNotTaken(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.setNote(t.getText());
|
||||
for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Dosage convertMedicationStatementDosageComponent(org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Dosage tgt = new org.hl7.fhir.dstu3.model.Dosage();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setText(src.getText());
|
||||
tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
if (src.hasSiteCodeableConcept())
|
||||
tgt.setSite(VersionConvertor_10_30.convertCodeableConcept(src.getSiteCodeableConcept()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setRate(VersionConvertor_10_30.convertType(src.getRate()));
|
||||
tgt.setMaxDosePerPeriod(VersionConvertor_10_30.convertRatio(src.getMaxDosePerPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.dstu3.model.Dosage src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setText(src.getText());
|
||||
tgt.setTiming(VersionConvertor_10_30.convertTiming(src.getTiming()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
tgt.setSite(VersionConvertor_10_30.convertType(src.getSite()));
|
||||
tgt.setRoute(VersionConvertor_10_30.convertCodeableConcept(src.getRoute()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setRate(VersionConvertor_10_30.convertType(src.getRate()));
|
||||
tgt.setMaxDosePerPeriod(VersionConvertor_10_30.convertRatio(src.getMaxDosePerPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR;
|
||||
case INTENDED:
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus.INTENDED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR;
|
||||
case INTENDED:
|
||||
return org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus.INTENDED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class MessageHeader10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MessageHeader convertMessageHeader(org.hl7.fhir.dstu3.model.MessageHeader src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MessageHeader tgt = new org.hl7.fhir.dstu2.model.MessageHeader();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setTimestamp(src.getTimestamp());
|
||||
tgt.setEvent(VersionConvertor_10_30.convertCoding(src.getEvent()));
|
||||
tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse()));
|
||||
tgt.setSource(convertMessageSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
tgt.setEnterer(VersionConvertor_10_30.convertReference(src.getEnterer()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setReceiver(VersionConvertor_10_30.convertReference(src.getReceiver()));
|
||||
tgt.setResponsible(VersionConvertor_10_30.convertReference(src.getResponsible()));
|
||||
tgt.setReason(VersionConvertor_10_30.convertCodeableConcept(src.getReason()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getFocus()) tgt.addData(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MessageHeader convertMessageHeader(org.hl7.fhir.dstu2.model.MessageHeader src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MessageHeader tgt = new org.hl7.fhir.dstu3.model.MessageHeader();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setTimestamp(src.getTimestamp());
|
||||
tgt.setEvent(VersionConvertor_10_30.convertCoding(src.getEvent()));
|
||||
tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse()));
|
||||
tgt.setSource(convertMessageSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
tgt.setEnterer(VersionConvertor_10_30.convertReference(src.getEnterer()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setReceiver(VersionConvertor_10_30.convertReference(src.getReceiver()));
|
||||
tgt.setResponsible(VersionConvertor_10_30.convertReference(src.getResponsible()));
|
||||
tgt.setReason(VersionConvertor_10_30.convertCodeableConcept(src.getReason()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getData()) tgt.addFocus(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(src.getIdentifier());
|
||||
tgt.setCode(convertResponseType(src.getCode()));
|
||||
tgt.setDetails(VersionConvertor_10_30.convertReference(src.getDetails()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(src.getIdentifier());
|
||||
tgt.setCode(convertResponseType(src.getCode()));
|
||||
tgt.setDetails(VersionConvertor_10_30.convertReference(src.getDetails()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setSoftware(src.getSoftware());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setContact(VersionConvertor_10_30.convertContactPoint(src.getContact()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setSoftware(src.getSoftware());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setContact(VersionConvertor_10_30.convertContactPoint(src.getContact()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.dstu2.model.MessageHeader.ResponseType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OK:
|
||||
return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.OK;
|
||||
case TRANSIENTERROR:
|
||||
return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.TRANSIENTERROR;
|
||||
case FATALERROR:
|
||||
return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.FATALERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.MessageHeader.ResponseType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MessageHeader.ResponseType convertResponseType(org.hl7.fhir.dstu3.model.MessageHeader.ResponseType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OK:
|
||||
return org.hl7.fhir.dstu2.model.MessageHeader.ResponseType.OK;
|
||||
case TRANSIENTERROR:
|
||||
return org.hl7.fhir.dstu2.model.MessageHeader.ResponseType.TRANSIENTERROR;
|
||||
case FATALERROR:
|
||||
return org.hl7.fhir.dstu2.model.MessageHeader.ResponseType.FATALERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.MessageHeader.ResponseType.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class NamingSystem10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu2.model.NamingSystem src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.NamingSystem tgt = new org.hl7.fhir.dstu3.model.NamingSystem();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setKind(convertNamingSystemType(src.getKind()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t));
|
||||
tgt.setResponsible(src.getResponsible());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setUsage(src.getUsage());
|
||||
for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t));
|
||||
tgt.setReplacedBy(VersionConvertor_10_30.convertReference(src.getReplacedBy()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setKind(convertNamingSystemType(src.getKind()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t));
|
||||
tgt.setResponsible(src.getResponsible());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setUsage(src.getUsage());
|
||||
for (org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t));
|
||||
tgt.setReplacedBy(VersionConvertor_10_30.convertReference(src.getReplacedBy()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent convertNamingSystemContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertNamingSystemContactComponent(org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OID:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType.OID;
|
||||
case UUID:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType.UUID;
|
||||
case URI:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType.URI;
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType.OTHER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType convertNamingSystemIdentifierType(org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemIdentifierType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OID:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OID;
|
||||
case UUID:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.UUID;
|
||||
case URI:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.URI;
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.OTHER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemIdentifierType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CODESYSTEM:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType.CODESYSTEM;
|
||||
case IDENTIFIER:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType.IDENTIFIER;
|
||||
case ROOT:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType.ROOT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType convertNamingSystemType(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case CODESYSTEM:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType.CODESYSTEM;
|
||||
case IDENTIFIER:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType.IDENTIFIER;
|
||||
case ROOT:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType.ROOT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertNamingSystemIdentifierType(src.getType()));
|
||||
tgt.setValue(src.getValue());
|
||||
tgt.setPreferred(src.getPreferred());
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertNamingSystemIdentifierType(src.getType()));
|
||||
tgt.setValue(src.getValue());
|
||||
tgt.setPreferred(src.getPreferred());
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Observation10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation convertObservation(org.hl7.fhir.dstu2.model.Observation src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Observation tgt = new org.hl7.fhir.dstu3.model.Observation();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertObservationStatus(src.getStatus()));
|
||||
tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setDataAbsentReason(VersionConvertor_10_30.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
tgt.setInterpretation(VersionConvertor_10_30.convertCodeableConcept(src.getInterpretation()));
|
||||
tgt.setComment(src.getComments());
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySite()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setSpecimen(VersionConvertor_10_30.convertReference(src.getSpecimen()));
|
||||
tgt.setDevice(VersionConvertor_10_30.convertReference(src.getDevice()));
|
||||
for (org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent t : src.getRelated()) tgt.addRelated(convertObservationRelatedComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent t : src.getComponent()) tgt.addComponent(convertObservationComponentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation convertObservation(org.hl7.fhir.dstu3.model.Observation src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Observation tgt = new org.hl7.fhir.dstu2.model.Observation();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertObservationStatus(src.getStatus()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept c : src.getCategory()) tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(c));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setEffective(VersionConvertor_10_30.convertType(src.getEffective()));
|
||||
tgt.setIssued(src.getIssued());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setDataAbsentReason(VersionConvertor_10_30.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
tgt.setInterpretation(VersionConvertor_10_30.convertCodeableConcept(src.getInterpretation()));
|
||||
tgt.setComments(src.getComment());
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySite()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
tgt.setSpecimen(VersionConvertor_10_30.convertReference(src.getSpecimen()));
|
||||
tgt.setDevice(VersionConvertor_10_30.convertReference(src.getDevice()));
|
||||
for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent t : src.getRelated()) tgt.addRelated(convertObservationRelatedComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent t : src.getComponent()) tgt.addComponent(convertObservationComponentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setDataAbsentReason(VersionConvertor_10_30.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setDataAbsentReason(VersionConvertor_10_30.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
for (org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLow(VersionConvertor_10_30.convertSimpleQuantity(src.getLow()));
|
||||
tgt.setHigh(VersionConvertor_10_30.convertSimpleQuantity(src.getHigh()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getMeaning()));
|
||||
tgt.setAge(VersionConvertor_10_30.convertRange(src.getAge()));
|
||||
tgt.setText(src.getText());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent tgt = new org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLow(VersionConvertor_10_30.convertSimpleQuantity(src.getLow()));
|
||||
tgt.setHigh(VersionConvertor_10_30.convertSimpleQuantity(src.getHigh()));
|
||||
tgt.setMeaning(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setAge(VersionConvertor_10_30.convertRange(src.getAge()));
|
||||
tgt.setText(src.getText());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertObservationRelationshipType(src.getType()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertObservationRelationshipType(src.getType()));
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case HASMEMBER:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.HASMEMBER;
|
||||
case DERIVEDFROM:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.DERIVEDFROM;
|
||||
case SEQUELTO:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.SEQUELTO;
|
||||
case REPLACES:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.REPLACES;
|
||||
case QUALIFIEDBY:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.QUALIFIEDBY;
|
||||
case INTERFEREDBY:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.INTERFEREDBY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType convertObservationRelationshipType(org.hl7.fhir.dstu3.model.Observation.ObservationRelationshipType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case HASMEMBER:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.HASMEMBER;
|
||||
case DERIVEDFROM:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.DERIVEDFROM;
|
||||
case SEQUELTO:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.SEQUELTO;
|
||||
case REPLACES:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.REPLACES;
|
||||
case QUALIFIEDBY:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.QUALIFIEDBY;
|
||||
case INTERFEREDBY:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.INTERFEREDBY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationRelationshipType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.dstu3.model.Observation.ObservationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REGISTERED:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.REGISTERED;
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.AMENDED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.CANCELLED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.ENTEREDINERROR;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.UNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Observation.ObservationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Observation.ObservationStatus convertObservationStatus(org.hl7.fhir.dstu2.model.Observation.ObservationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REGISTERED:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.REGISTERED;
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.AMENDED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.CANCELLED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.ENTEREDINERROR;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.UNKNOWN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Observation.ObservationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.SearchParamType;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class OperationDefinition10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setKind(convertOperationKind(src.getKind()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setIdempotent(src.getIdempotent());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setNotes(src.getComment());
|
||||
if (src.hasBase())
|
||||
tgt.setBase(VersionConvertor_10_30.convertReference(src.getBase()));
|
||||
tgt.setSystem(src.getSystem());
|
||||
if (src.getType())
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addType(t.getValue());
|
||||
tgt.setInstance(src.getInstance());
|
||||
for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu2.model.OperationDefinition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.OperationDefinition tgt = new org.hl7.fhir.dstu3.model.OperationDefinition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setKind(convertOperationKind(src.getKind()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
if (src.hasIdempotent())
|
||||
tgt.setIdempotent(src.getIdempotent());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setComment(src.getNotes());
|
||||
tgt.setBase(VersionConvertor_10_30.convertReference(src.getBase()));
|
||||
tgt.setSystem(src.getSystem());
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue());
|
||||
tgt.setType(tgt.hasResource());
|
||||
tgt.setInstance(src.getInstance());
|
||||
for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent convertOperationDefinitionContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertOperationDefinitionContactComponent(org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStrength(VersionConvertor_10_30.convertBindingStrength(src.getStrength()));
|
||||
tgt.setValueSet(VersionConvertor_10_30.convertType(src.getValueSet()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setStrength(VersionConvertor_10_30.convertBindingStrength(src.getStrength()));
|
||||
tgt.setValueSet(VersionConvertor_10_30.convertType(src.getValueSet()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setUse(convertOperationParameterUse(src.getUse()));
|
||||
tgt.setMin(src.getMin());
|
||||
tgt.setMax(src.getMax());
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
if (src.hasSearchType()) {
|
||||
tgt.setType(src.getSearchType().toCode());
|
||||
} else
|
||||
tgt.setType(src.getType());
|
||||
if (src.hasProfile())
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
if (src.hasBinding())
|
||||
tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding()));
|
||||
for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) tgt.addPart(convertOperationDefinitionParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setUse(convertOperationParameterUse(src.getUse()));
|
||||
tgt.setMin(src.getMin());
|
||||
tgt.setMax(src.getMax());
|
||||
tgt.setDocumentation(src.getDocumentation());
|
||||
if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) {
|
||||
tgt.setType("string");
|
||||
tgt.setSearchType(SearchParamType.fromCode(src.getType()));
|
||||
} else {
|
||||
tgt.setType(src.getType());
|
||||
}
|
||||
tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
|
||||
tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding()));
|
||||
for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart()) tgt.addPart(convertOperationDefinitionParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OPERATION:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationKind.OPERATION;
|
||||
case QUERY:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationKind.QUERY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind convertOperationKind(org.hl7.fhir.dstu2.model.OperationDefinition.OperationKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OPERATION:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.OPERATION;
|
||||
case QUERY:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.QUERY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationParameterUse.IN;
|
||||
case OUT:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationParameterUse.OUT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.OperationDefinition.OperationParameterUse.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse convertOperationParameterUse(org.hl7.fhir.dstu2.model.OperationDefinition.OperationParameterUse src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.IN;
|
||||
case OUT:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.OUT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.OperationDefinition.OperationParameterUse.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class OperationOutcome10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case FATAL:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.FATAL;
|
||||
case ERROR:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.ERROR;
|
||||
case WARNING:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.WARNING;
|
||||
case INFORMATION:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.INFORMATION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity convertIssueSeverity(org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case FATAL:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity.FATAL;
|
||||
case ERROR:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity.ERROR;
|
||||
case WARNING:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity.WARNING;
|
||||
case INFORMATION:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity.INFORMATION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueSeverity.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.dstu3.model.OperationOutcome.IssueType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INVALID:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.INVALID;
|
||||
case STRUCTURE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.STRUCTURE;
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.REQUIRED;
|
||||
case VALUE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.VALUE;
|
||||
case INVARIANT:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.INVARIANT;
|
||||
case SECURITY:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.SECURITY;
|
||||
case LOGIN:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.LOGIN;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.UNKNOWN;
|
||||
case EXPIRED:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.EXPIRED;
|
||||
case FORBIDDEN:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.FORBIDDEN;
|
||||
case SUPPRESSED:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.SUPPRESSED;
|
||||
case PROCESSING:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.PROCESSING;
|
||||
case NOTSUPPORTED:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.NOTSUPPORTED;
|
||||
case DUPLICATE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.DUPLICATE;
|
||||
case NOTFOUND:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.NOTFOUND;
|
||||
case TOOLONG:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.TOOLONG;
|
||||
case CODEINVALID:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.CODEINVALID;
|
||||
case EXTENSION:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.EXTENSION;
|
||||
case TOOCOSTLY:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.TOOCOSTLY;
|
||||
case BUSINESSRULE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.BUSINESSRULE;
|
||||
case CONFLICT:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.CONFLICT;
|
||||
case INCOMPLETE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.INCOMPLETE;
|
||||
case TRANSIENT:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.TRANSIENT;
|
||||
case LOCKERROR:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.LOCKERROR;
|
||||
case NOSTORE:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.NOSTORE;
|
||||
case EXCEPTION:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.EXCEPTION;
|
||||
case TIMEOUT:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.TIMEOUT;
|
||||
case THROTTLED:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.THROTTLED;
|
||||
case INFORMATIONAL:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.INFORMATIONAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.OperationOutcome.IssueType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationOutcome.IssueType convertIssueType(org.hl7.fhir.dstu2.model.OperationOutcome.IssueType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INVALID:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVALID;
|
||||
case STRUCTURE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.STRUCTURE;
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.REQUIRED;
|
||||
case VALUE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.VALUE;
|
||||
case INVARIANT:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INVARIANT;
|
||||
case SECURITY:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SECURITY;
|
||||
case LOGIN:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOGIN;
|
||||
case UNKNOWN:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.UNKNOWN;
|
||||
case EXPIRED:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXPIRED;
|
||||
case FORBIDDEN:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.FORBIDDEN;
|
||||
case SUPPRESSED:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.SUPPRESSED;
|
||||
case PROCESSING:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.PROCESSING;
|
||||
case NOTSUPPORTED:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTSUPPORTED;
|
||||
case DUPLICATE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.DUPLICATE;
|
||||
case NOTFOUND:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTFOUND;
|
||||
case TOOLONG:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOLONG;
|
||||
case CODEINVALID:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CODEINVALID;
|
||||
case EXTENSION:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXTENSION;
|
||||
case TOOCOSTLY:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TOOCOSTLY;
|
||||
case BUSINESSRULE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.BUSINESSRULE;
|
||||
case CONFLICT:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.CONFLICT;
|
||||
case INCOMPLETE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INCOMPLETE;
|
||||
case TRANSIENT:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TRANSIENT;
|
||||
case LOCKERROR:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.LOCKERROR;
|
||||
case NOSTORE:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOSTORE;
|
||||
case EXCEPTION:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.EXCEPTION;
|
||||
case TIMEOUT:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.TIMEOUT;
|
||||
case THROTTLED:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.THROTTLED;
|
||||
case INFORMATIONAL:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.INFORMATIONAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.dstu2.model.OperationOutcome src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.OperationOutcome tgt = new org.hl7.fhir.dstu3.model.OperationOutcome();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) tgt.addIssue(convertOperationOutcomeIssueComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationOutcome convertOperationOutcome(org.hl7.fhir.dstu3.model.OperationOutcome src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationOutcome tgt = new org.hl7.fhir.dstu2.model.OperationOutcome();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent t : src.getIssue()) tgt.addIssue(convertOperationOutcomeIssueComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.dstu2.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSeverity(convertIssueSeverity(src.getSeverity()));
|
||||
tgt.setCode(convertIssueType(src.getCode()));
|
||||
tgt.setDetails(VersionConvertor_10_30.convertCodeableConcept(src.getDetails()));
|
||||
tgt.setDiagnostics(src.getDiagnostics());
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.OperationOutcome.OperationOutcomeIssueComponent convertOperationOutcomeIssueComponent(org.hl7.fhir.dstu3.model.OperationOutcome.OperationOutcomeIssueComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.OperationOutcome.OperationOutcomeIssueComponent tgt = new org.hl7.fhir.dstu2.model.OperationOutcome.OperationOutcomeIssueComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSeverity(convertIssueSeverity(src.getSeverity()));
|
||||
tgt.setCode(convertIssueType(src.getCode()));
|
||||
tgt.setDetails(VersionConvertor_10_30.convertCodeableConcept(src.getDetails()));
|
||||
tgt.setDiagnostics(src.getDiagnostics());
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Organization10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Organization convertOrganization(org.hl7.fhir.dstu2.model.Organization src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Organization tgt = new org.hl7.fhir.dstu3.model.Organization();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
tgt.addType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
for (org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent t : src.getContact()) tgt.addContact(convertOrganizationContactComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Organization convertOrganization(org.hl7.fhir.dstu3.model.Organization src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Organization tgt = new org.hl7.fhir.dstu2.model.Organization();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getTypeFirstRep()));
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setPartOf(VersionConvertor_10_30.convertReference(src.getPartOf()));
|
||||
for (org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent t : src.getContact()) tgt.addContact(convertOrganizationContactComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setPurpose(VersionConvertor_10_30.convertCodeableConcept(src.getPurpose()));
|
||||
tgt.setName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setPurpose(VersionConvertor_10_30.convertCodeableConcept(src.getPurpose()));
|
||||
tgt.setName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Parameters10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Parameters convertParameters(org.hl7.fhir.dstu2.model.Parameters src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Parameters tgt = new org.hl7.fhir.dstu3.model.Parameters();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent t : src.getParameter()) tgt.addParameter(convertParametersParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Parameters convertParameters(org.hl7.fhir.dstu3.model.Parameters src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Parameters tgt = new org.hl7.fhir.dstu2.model.Parameters();
|
||||
VersionConvertor_10_30.copyResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getParameter()) tgt.addParameter(convertParametersParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setResource(VersionConvertor_10_30.convertResource(src.getResource()));
|
||||
for (org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent t : src.getPart()) tgt.addPart(convertParametersParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent convertParametersParameterComponent(org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
tgt.setResource(VersionConvertor_10_30.convertResource(src.getResource()));
|
||||
for (org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent t : src.getPart()) tgt.addPart(convertParametersParameterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Patient10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu2.model.Patient.AnimalComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Patient.AnimalComponent tgt = new org.hl7.fhir.dstu3.model.Patient.AnimalComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSpecies(VersionConvertor_10_30.convertCodeableConcept(src.getSpecies()));
|
||||
tgt.setBreed(VersionConvertor_10_30.convertCodeableConcept(src.getBreed()));
|
||||
tgt.setGenderStatus(VersionConvertor_10_30.convertCodeableConcept(src.getGenderStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu3.model.Patient.AnimalComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Patient.AnimalComponent tgt = new org.hl7.fhir.dstu2.model.Patient.AnimalComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSpecies(VersionConvertor_10_30.convertCodeableConcept(src.getSpecies()));
|
||||
tgt.setBreed(VersionConvertor_10_30.convertCodeableConcept(src.getBreed()));
|
||||
tgt.setGenderStatus(VersionConvertor_10_30.convertCodeableConcept(src.getGenderStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu2.model.Patient.ContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Patient.ContactComponent tgt = new org.hl7.fhir.dstu3.model.Patient.ContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setOrganization(VersionConvertor_10_30.convertReference(src.getOrganization()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Patient.ContactComponent tgt = new org.hl7.fhir.dstu2.model.Patient.ContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setAddress(VersionConvertor_10_30.convertAddress(src.getAddress()));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setOrganization(VersionConvertor_10_30.convertReference(src.getOrganization()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient.LinkType convertLinkType(org.hl7.fhir.dstu3.model.Patient.LinkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REPLACEDBY:
|
||||
return org.hl7.fhir.dstu2.model.Patient.LinkType.REPLACE;
|
||||
case REPLACES:
|
||||
return org.hl7.fhir.dstu2.model.Patient.LinkType.REPLACE;
|
||||
case REFER:
|
||||
return org.hl7.fhir.dstu2.model.Patient.LinkType.REFER;
|
||||
case SEEALSO:
|
||||
return org.hl7.fhir.dstu2.model.Patient.LinkType.SEEALSO;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Patient.LinkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient.LinkType convertLinkType(org.hl7.fhir.dstu2.model.Patient.LinkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REPLACE:
|
||||
return org.hl7.fhir.dstu3.model.Patient.LinkType.REPLACEDBY;
|
||||
case REFER:
|
||||
return org.hl7.fhir.dstu3.model.Patient.LinkType.REFER;
|
||||
case SEEALSO:
|
||||
return org.hl7.fhir.dstu3.model.Patient.LinkType.SEEALSO;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Patient.LinkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient convertPatient(org.hl7.fhir.dstu2.model.Patient src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Patient tgt = new org.hl7.fhir.dstu3.model.Patient();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_30.convertHumanName(t));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased()));
|
||||
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setMaritalStatus(VersionConvertor_10_30.convertCodeableConcept(src.getMaritalStatus()));
|
||||
tgt.setMultipleBirth(VersionConvertor_10_30.convertType(src.getMultipleBirth()));
|
||||
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
for (org.hl7.fhir.dstu2.model.Patient.ContactComponent t : src.getContact()) tgt.addContact(convertContactComponent(t));
|
||||
tgt.setAnimal(convertAnimalComponent(src.getAnimal()));
|
||||
for (org.hl7.fhir.dstu2.model.Patient.PatientCommunicationComponent t : src.getCommunication()) tgt.addCommunication(convertPatientCommunicationComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getCareProvider()) tgt.addGeneralPractitioner(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
for (org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent t : src.getLink()) tgt.addLink(convertPatientLinkComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient convertPatient(org.hl7.fhir.dstu3.model.Patient src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Patient tgt = new org.hl7.fhir.dstu2.model.Patient();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_30.convertHumanName(t));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
tgt.setDeceased(VersionConvertor_10_30.convertType(src.getDeceased()));
|
||||
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setMaritalStatus(VersionConvertor_10_30.convertCodeableConcept(src.getMaritalStatus()));
|
||||
tgt.setMultipleBirth(VersionConvertor_10_30.convertType(src.getMultipleBirth()));
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
for (org.hl7.fhir.dstu3.model.Patient.ContactComponent t : src.getContact()) tgt.addContact(convertContactComponent(t));
|
||||
tgt.setAnimal(convertAnimalComponent(src.getAnimal()));
|
||||
for (org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent t : src.getCommunication()) tgt.addCommunication(convertPatientCommunicationComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getGeneralPractitioner()) tgt.addCareProvider(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
for (org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent t : src.getLink()) tgt.addLink(convertPatientLinkComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent convertPatientCommunicationComponent(org.hl7.fhir.dstu2.model.Patient.PatientCommunicationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent tgt = new org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLanguage(VersionConvertor_10_30.convertCodeableConcept(src.getLanguage()));
|
||||
tgt.setPreferred(src.getPreferred());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient.PatientCommunicationComponent convertPatientCommunicationComponent(org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Patient.PatientCommunicationComponent tgt = new org.hl7.fhir.dstu2.model.Patient.PatientCommunicationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLanguage(VersionConvertor_10_30.convertCodeableConcept(src.getLanguage()));
|
||||
tgt.setPreferred(src.getPreferred());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent convertPatientLinkComponent(org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent tgt = new org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOther(VersionConvertor_10_30.convertReference(src.getOther()));
|
||||
tgt.setType(convertLinkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent convertPatientLinkComponent(org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent tgt = new org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOther(VersionConvertor_10_30.convertReference(src.getOther()));
|
||||
tgt.setType(convertLinkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Person10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case LEVEL1:
|
||||
return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL1;
|
||||
case LEVEL2:
|
||||
return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL2;
|
||||
case LEVEL3:
|
||||
return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL3;
|
||||
case LEVEL4:
|
||||
return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.LEVEL4;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel convertIdentityAssuranceLevel(org.hl7.fhir.dstu3.model.Person.IdentityAssuranceLevel src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case LEVEL1:
|
||||
return org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel.LEVEL1;
|
||||
case LEVEL2:
|
||||
return org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel.LEVEL2;
|
||||
case LEVEL3:
|
||||
return org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel.LEVEL3;
|
||||
case LEVEL4:
|
||||
return org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel.LEVEL4;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Person.IdentityAssuranceLevel.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Person convertPerson(org.hl7.fhir.dstu2.model.Person src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Person tgt = new org.hl7.fhir.dstu3.model.Person();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_30.convertHumanName(t));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setActive(src.getActive());
|
||||
for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Person convertPerson(org.hl7.fhir.dstu3.model.Person src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Person tgt = new org.hl7.fhir.dstu2.model.Person();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_30.convertHumanName(t));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setPhoto(VersionConvertor_10_30.convertAttachment(src.getPhoto()));
|
||||
tgt.setManagingOrganization(VersionConvertor_10_30.convertReference(src.getManagingOrganization()));
|
||||
tgt.setActive(src.getActive());
|
||||
for (org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Person.PersonLinkComponent convertPersonLinkComponent(org.hl7.fhir.dstu2.model.Person.PersonLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Person.PersonLinkComponent tgt = new org.hl7.fhir.dstu3.model.Person.PersonLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
tgt.setAssurance(convertIdentityAssuranceLevel(src.getAssurance()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Person.PersonLinkComponent convertPersonLinkComponent(org.hl7.fhir.dstu3.model.Person.PersonLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Person.PersonLinkComponent tgt = new org.hl7.fhir.dstu2.model.Person.PersonLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setTarget(VersionConvertor_10_30.convertReference(src.getTarget()));
|
||||
tgt.setAssurance(convertIdentityAssuranceLevel(src.getAssurance()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Practitioner10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Practitioner convertPractitioner(org.hl7.fhir.dstu2.model.Practitioner src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Practitioner tgt = new org.hl7.fhir.dstu3.model.Practitioner();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
if (src.hasName())
|
||||
tgt.addName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
for (org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCommunication()) tgt.addCommunication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Practitioner convertPractitioner(org.hl7.fhir.dstu3.model.Practitioner src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Practitioner tgt = new org.hl7.fhir.dstu2.model.Practitioner();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setActive(src.getActive());
|
||||
for (org.hl7.fhir.dstu3.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_30.convertHumanName(t));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
for (org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCommunication()) tgt.addCommunication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent convertPractitionerQualificationComponent(org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent tgt = new org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setIssuer(VersionConvertor_10_30.convertReference(src.getIssuer()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent convertPractitionerQualificationComponent(org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent tgt = new org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setIssuer(VersionConvertor_10_30.convertReference(src.getIssuer()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Procedure10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Procedure convertProcedure(org.hl7.fhir.dstu3.model.Procedure src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Procedure tgt = new org.hl7.fhir.dstu2.model.Procedure();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertProcedureStatus(src.getStatus()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setNotPerformed(src.getNotDone());
|
||||
tgt.addReasonNotPerformed(VersionConvertor_10_30.convertCodeableConcept(src.getNotDoneReason()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setReason(VersionConvertor_10_30.convertType(src.getReasonCodeFirstRep()));
|
||||
for (org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent t : src.getPerformer()) tgt.addPerformer(convertProcedurePerformerComponent(t));
|
||||
tgt.setPerformed(VersionConvertor_10_30.convertType(src.getPerformed()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReport()) tgt.addReport(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getComplication()) tgt.addComplication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFollowUp()) tgt.addFollowUp(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequest(VersionConvertor_10_30.convertReference(src.getBasedOnFirstRep()));
|
||||
for (org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent t : src.getFocalDevice()) tgt.addFocalDevice(convertProcedureFocalDeviceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Procedure convertProcedure(org.hl7.fhir.dstu2.model.Procedure src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Procedure tgt = new org.hl7.fhir.dstu3.model.Procedure();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertProcedureStatus(src.getStatus()));
|
||||
tgt.setCategory(VersionConvertor_10_30.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setNotDone(src.getNotPerformed());
|
||||
if (src.hasReasonNotPerformed())
|
||||
tgt.setNotDoneReason(VersionConvertor_10_30.convertCodeableConcept(src.getReasonNotPerformed().get(0)));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
if (src.hasReasonCodeableConcept())
|
||||
tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(src.getReasonCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent t : src.getPerformer()) tgt.addPerformer(convertProcedurePerformerComponent(t));
|
||||
tgt.setPerformed(VersionConvertor_10_30.convertType(src.getPerformed()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReport()) tgt.addReport(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getComplication()) tgt.addComplication(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getFollowUp()) tgt.addFollowUp(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.addBasedOn(VersionConvertor_10_30.convertReference(src.getRequest()));
|
||||
for (org.hl7.fhir.dstu2.model.Procedure.ProcedureFocalDeviceComponent t : src.getFocalDevice()) tgt.addFocalDevice(convertProcedureFocalDeviceComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.dstu2.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction()));
|
||||
tgt.setManipulated(VersionConvertor_10_30.convertReference(src.getManipulated()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Procedure.ProcedureFocalDeviceComponent convertProcedureFocalDeviceComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Procedure.ProcedureFocalDeviceComponent tgt = new org.hl7.fhir.dstu2.model.Procedure.ProcedureFocalDeviceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAction(VersionConvertor_10_30.convertCodeableConcept(src.getAction()));
|
||||
tgt.setManipulated(VersionConvertor_10_30.convertReference(src.getManipulated()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent tgt = new org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setRole(VersionConvertor_10_30.convertCodeableConcept(src.getRole()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent tgt = new org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setRole(VersionConvertor_10_30.convertCodeableConcept(src.getRole()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.INPROGRESS;
|
||||
case ABORTED:
|
||||
return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ABORTED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus convertProcedureStatus(org.hl7.fhir.dstu3.model.Procedure.ProcedureStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus.INPROGRESS;
|
||||
case ABORTED:
|
||||
return org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus.ABORTED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Procedure.ProcedureStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ProcedureRequest10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ProcedureRequest convertProcedureRequest(org.hl7.fhir.dstu2.model.ProcedureRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ProcedureRequest tgt = new org.hl7.fhir.dstu3.model.ProcedureRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
if (src.hasReasonCodeableConcept())
|
||||
tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(src.getReasonCodeableConcept()));
|
||||
tgt.setOccurrence(VersionConvertor_10_30.convertType(src.getScheduled()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setPerformer(VersionConvertor_10_30.convertReference(src.getPerformer()));
|
||||
tgt.setStatus(convertProcedureRequestStatus(src.getStatus()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
tgt.setAuthoredOn(src.getOrderedOn());
|
||||
tgt.setPriority(convertProcedureRequestPriority(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ProcedureRequest convertProcedureRequest(org.hl7.fhir.dstu3.model.ProcedureRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ProcedureRequest tgt = new org.hl7.fhir.dstu2.model.ProcedureRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setReason(VersionConvertor_10_30.convertType(src.getReasonCodeFirstRep()));
|
||||
tgt.setScheduled(VersionConvertor_10_30.convertType(src.getOccurrence()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setPerformer(VersionConvertor_10_30.convertReference(src.getPerformer()));
|
||||
tgt.setStatus(convertProcedureRequestStatus(src.getStatus()));
|
||||
tgt.setAsNeeded(VersionConvertor_10_30.convertType(src.getAsNeeded()));
|
||||
tgt.setOrderedOn(src.getAuthoredOn());
|
||||
tgt.setPriority(convertProcedureRequestPriority(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ROUTINE:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE;
|
||||
case URGENT:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority.URGENT;
|
||||
case STAT:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority.STAT;
|
||||
case ASAP:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority.ASAP;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority convertProcedureRequestPriority(org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestPriority src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ROUTINE:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority.ROUTINE;
|
||||
case URGENT:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority.URGENT;
|
||||
case STAT:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority.STAT;
|
||||
case ASAP:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority.ASAP;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestPriority.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.ABORTED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus convertProcedureRequestStatus(org.hl7.fhir.dstu2.model.ProcedureRequest.ProcedureRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.DRAFT;
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.DRAFT;
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
|
||||
case RECEIVED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.SUSPENDED;
|
||||
case ABORTED:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ProcedureRequest.ProcedureRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Provenance10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Provenance convertProvenance(org.hl7.fhir.dstu3.model.Provenance src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Provenance tgt = new org.hl7.fhir.dstu2.model.Provenance();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getTarget()) tgt.addTarget(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setRecorded(src.getRecorded());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getReason()) tgt.addReason().addCoding(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setActivity(new org.hl7.fhir.dstu2.model.CodeableConcept().addCoding(VersionConvertor_10_30.convertCoding(src.getActivity())));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu3.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.addAgent(convertProvenanceAgentComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent t : src.getEntity()) tgt.addEntity(convertProvenanceEntityComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Signature t : src.getSignature()) tgt.addSignature(VersionConvertor_10_30.convertSignature(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Provenance convertProvenance(org.hl7.fhir.dstu2.model.Provenance src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Provenance tgt = new org.hl7.fhir.dstu3.model.Provenance();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getTarget()) tgt.addTarget(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
tgt.setRecorded(src.getRecorded());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) for (org.hl7.fhir.dstu2.model.Coding tc : t.getCoding()) tgt.addReason(VersionConvertor_10_30.convertCoding(tc));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getActivity().getCoding()) tgt.setActivity(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setLocation(VersionConvertor_10_30.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.addAgent(convertProvenanceAgentComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityComponent t : src.getEntity()) tgt.addEntity(convertProvenanceEntityComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Signature t : src.getSignature()) tgt.addSignature(VersionConvertor_10_30.convertSignature(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentComponent convertProvenanceAgentComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentComponent tgt = new org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasWhoReference())
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getWhoReference()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent convertProvenanceAgentComponent(org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent tgt = new org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setWho(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRole(convertProvenanceEntityRole(src.getRole()));
|
||||
if (src.hasWhatReference() && src.getWhatReference().hasReference())
|
||||
tgt.setReference(src.getWhatReference().getReference());
|
||||
for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.setAgent(convertProvenanceAgentComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRole(convertProvenanceEntityRole(src.getRole()));
|
||||
if (src.hasReference())
|
||||
tgt.setWhat(new org.hl7.fhir.dstu3.model.Reference().setReference(src.getReference()));
|
||||
tgt.addAgent(convertProvenanceAgentComponent(src.getAgent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole convertProvenanceEntityRole(org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DERIVATION:
|
||||
return org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.DERIVATION;
|
||||
case REVISION:
|
||||
return org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.REVISION;
|
||||
case QUOTATION:
|
||||
return org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.QUOTATION;
|
||||
case SOURCE:
|
||||
return org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.SOURCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole convertProvenanceEntityRole(org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DERIVATION:
|
||||
return org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.DERIVATION;
|
||||
case REVISION:
|
||||
return org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.REVISION;
|
||||
case QUOTATION:
|
||||
return org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.QUOTATION;
|
||||
case SOURCE:
|
||||
return org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.SOURCE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,240 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.ContactDetail;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Questionnaire10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Questionnaire convertQuestionnaire(org.hl7.fhir.dstu3.model.Questionnaire src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Questionnaire tgt = new org.hl7.fhir.dstu2.model.Questionnaire();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (ContactDetail t : src.getContact()) for (org.hl7.fhir.dstu3.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t1));
|
||||
org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = tgt.getGroup();
|
||||
root.setTitle(src.getTitle());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) {
|
||||
root.addConcept(VersionConvertor_10_30.convertCoding(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getSubjectType()) tgt.addSubjectType(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)
|
||||
root.addGroup(convertQuestionnaireGroupComponent(t));
|
||||
else
|
||||
root.addQuestion(convertQuestionnaireQuestionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Questionnaire convertQuestionnaire(org.hl7.fhir.dstu2.model.Questionnaire src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Questionnaire tgt = new org.hl7.fhir.dstu3.model.Questionnaire();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t));
|
||||
org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup();
|
||||
tgt.setTitle(root.getTitle());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : root.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getSubjectType()) tgt.addSubjectType(t.getValue());
|
||||
tgt.addItem(convertQuestionnaireGroupComponent(root));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertQuestionnaireContactComponent(org.hl7.fhir.dstu2.model.ContactPoint src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(src));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent convertQuestionnaireGroupComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setText(src.getText());
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setRepeats(src.getRepeats());
|
||||
for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)
|
||||
tgt.addGroup(convertQuestionnaireGroupComponent(t));
|
||||
else
|
||||
tgt.addQuestion(convertQuestionnaireQuestionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireGroupComponent(org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setText(src.getText());
|
||||
tgt.setType(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP);
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setRepeats(src.getRepeats());
|
||||
for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent t : src.getQuestion()) tgt.addItem(convertQuestionnaireQuestionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat convertQuestionnaireItemType(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case BOOLEAN:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.BOOLEAN;
|
||||
case DECIMAL:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.DECIMAL;
|
||||
case INTEGER:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.INTEGER;
|
||||
case DATE:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.DATE;
|
||||
case DATETIME:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.DATETIME;
|
||||
case TIME:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.TIME;
|
||||
case STRING:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.STRING;
|
||||
case TEXT:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.TEXT;
|
||||
case URL:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.URL;
|
||||
case CHOICE:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.CHOICE;
|
||||
case OPENCHOICE:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.OPENCHOICE;
|
||||
case ATTACHMENT:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.ATTACHMENT;
|
||||
case REFERENCE:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.REFERENCE;
|
||||
case QUANTITY:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.QUANTITY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireQuestionComponent(org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setText(src.getText());
|
||||
tgt.setType(convertQuestionnaireQuestionType(src.getType()));
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setRepeats(src.getRepeats());
|
||||
tgt.setOptions(VersionConvertor_10_30.convertReference(src.getOptions()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getOption()) tgt.addOption().setValue(VersionConvertor_10_30.convertCoding(t));
|
||||
for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent convertQuestionnaireQuestionComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setText(src.getText());
|
||||
tgt.setType(convertQuestionnaireItemType(src.getType()));
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setRepeats(src.getRepeats());
|
||||
tgt.setOptions(VersionConvertor_10_30.convertReference(src.getOptions()));
|
||||
for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent t : src.getOption()) if (t.hasValueCoding())
|
||||
try {
|
||||
tgt.addOption(VersionConvertor_10_30.convertCoding(t.getValueCoding()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) tgt.addGroup(convertQuestionnaireGroupComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType convertQuestionnaireQuestionType(org.hl7.fhir.dstu2.model.Questionnaire.AnswerFormat src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case BOOLEAN:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.BOOLEAN;
|
||||
case DECIMAL:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.DECIMAL;
|
||||
case INTEGER:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.INTEGER;
|
||||
case DATE:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.DATE;
|
||||
case DATETIME:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.DATETIME;
|
||||
case INSTANT:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.DATETIME;
|
||||
case TIME:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.TIME;
|
||||
case STRING:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.STRING;
|
||||
case TEXT:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.TEXT;
|
||||
case URL:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.URL;
|
||||
case CHOICE:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.CHOICE;
|
||||
case OPENCHOICE:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.OPENCHOICE;
|
||||
case ATTACHMENT:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.ATTACHMENT;
|
||||
case REFERENCE:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.REFERENCE;
|
||||
case QUANTITY:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.QUANTITY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus convertQuestionnaireStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus.PUBLISHED;
|
||||
case RETIRED:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus.RETIRED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus convertQuestionnaireStatus(org.hl7.fhir.dstu2.model.Questionnaire.QuestionnaireStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.DRAFT;
|
||||
case PUBLISHED:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE;
|
||||
case RETIRED:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.RETIRED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class QuestionnaireResponse10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent convertQuestionnaireItemToGroup(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
tgt.setText(src.getText());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) if (t.hasAnswer())
|
||||
tgt.addQuestion(convertQuestionnaireItemToQuestion(t));
|
||||
else
|
||||
tgt.addGroup(convertQuestionnaireItemToGroup(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent convertQuestionnaireItemToQuestion(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
tgt.setText(src.getText());
|
||||
for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.dstu3.model.QuestionnaireResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.QuestionnaireResponse tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setQuestionnaire(VersionConvertor_10_30.convertReference(src.getQuestionnaire()));
|
||||
tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setAuthored(src.getAuthored());
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
if (src.getItem().size() != 1)
|
||||
throw new FHIRException("multiple root items not supported");
|
||||
tgt.setGroup(convertQuestionnaireItemToGroup(src.getItem().get(0)));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.dstu2.model.QuestionnaireResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.QuestionnaireResponse tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setQuestionnaire(VersionConvertor_10_30.convertReference(src.getQuestionnaire()));
|
||||
tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setAuthor(VersionConvertor_10_30.convertReference(src.getAuthor()));
|
||||
tgt.setAuthored(src.getAuthored());
|
||||
tgt.setSource(VersionConvertor_10_30.convertReference(src.getSource()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
if (src.hasGroup())
|
||||
tgt.addItem(convertQuestionnaireResponseGroupComponent(src.getGroup()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseGroupComponent(org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
tgt.setText(src.getText());
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent t : src.getQuestion()) tgt.addItem(convertQuestionnaireResponseQuestionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
for (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) tgt.addGroup(convertQuestionnaireItemToGroup(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseQuestionComponent(org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLinkId(src.getLinkId());
|
||||
tgt.setText(src.getText());
|
||||
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus convertQuestionnaireResponseStatus(org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionnaireResponseStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu2.model.CodeableConcept;
|
||||
import org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class ReferralRequest10_30 {
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.CodeableConcept convertReferralPriorityCode(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority priority) {
|
||||
org.hl7.fhir.dstu2.model.CodeableConcept cc = new org.hl7.fhir.dstu2.model.CodeableConcept();
|
||||
switch(priority) {
|
||||
case ROUTINE:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("routine");
|
||||
break;
|
||||
case URGENT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("urgent");
|
||||
break;
|
||||
case STAT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("stat");
|
||||
break;
|
||||
case ASAP:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("asap");
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return cc;
|
||||
}
|
||||
|
||||
static public ReferralPriority convertReferralPriorityCode(CodeableConcept priority) {
|
||||
for (org.hl7.fhir.dstu2.model.Coding c : priority.getCoding()) {
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.ROUTINE;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.URGENT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.STAT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode()))
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralPriority.ASAP;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ReferralRequest convertReferralRequest(org.hl7.fhir.dstu3.model.ReferralRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ReferralRequest tgt = new org.hl7.fhir.dstu2.model.ReferralRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertReferralStatus(src.getStatus()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setPriority(convertReferralPriorityCode(src.getPriority()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setFulfillmentTime(VersionConvertor_10_30.convertPeriod(src.getOccurrencePeriod()));
|
||||
tgt.setRequester(VersionConvertor_10_30.convertReference(src.getRequester().getAgent()));
|
||||
tgt.setSpecialty(VersionConvertor_10_30.convertCodeableConcept(src.getSpecialty()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept cc : src.getReasonCode()) tgt.setReason(VersionConvertor_10_30.convertCodeableConcept(cc));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceRequested()) tgt.addServiceRequested(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInfo()) tgt.addSupportingInformation(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ReferralRequest convertReferralRequest(org.hl7.fhir.dstu2.model.ReferralRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ReferralRequest tgt = new org.hl7.fhir.dstu3.model.ReferralRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setStatus(convertReferralStatus(src.getStatus()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setPriority(convertReferralPriorityCode(src.getPriority()));
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setOccurrence(VersionConvertor_10_30.convertPeriod(src.getFulfillmentTime()));
|
||||
tgt.getRequester().setAgent(VersionConvertor_10_30.convertReference(src.getRequester()));
|
||||
tgt.setSpecialty(VersionConvertor_10_30.convertCodeableConcept(src.getSpecialty()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_30.convertReference(t));
|
||||
tgt.addReasonCode(VersionConvertor_10_30.convertCodeableConcept(src.getReason()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getServiceRequested()) tgt.addServiceRequested(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addSupportingInfo(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus convertReferralStatus(org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.ACTIVE;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.CANCELLED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.COMPLETED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.REJECTED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus convertReferralStatus(org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.DRAFT;
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.ACTIVE;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.CANCELLED;
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.ACTIVE;
|
||||
case REJECTED:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.ENTEREDINERROR;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.COMPLETED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ReferralRequest.ReferralRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class RelatedPerson10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.RelatedPerson convertRelatedPerson(org.hl7.fhir.dstu2.model.RelatedPerson src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.RelatedPerson tgt = new org.hl7.fhir.dstu3.model.RelatedPerson();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship()));
|
||||
tgt.addName(VersionConvertor_10_30.convertHumanName(src.getName()));
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.RelatedPerson convertRelatedPerson(org.hl7.fhir.dstu3.model.RelatedPerson src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.RelatedPerson tgt = new org.hl7.fhir.dstu2.model.RelatedPerson();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setRelationship(VersionConvertor_10_30.convertCodeableConcept(src.getRelationship()));
|
||||
if (!src.getName().isEmpty())
|
||||
tgt.setName(VersionConvertor_10_30.convertHumanName(src.getName().get(0)));
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setGender(VersionConvertor_10_30.convertAdministrativeGender(src.getGender()));
|
||||
tgt.setBirthDate(src.getBirthDate());
|
||||
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_30.convertAddress(t));
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_30.convertAttachment(t));
|
||||
tgt.setPeriod(VersionConvertor_10_30.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class RiskAssessment10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.dstu3.model.RiskAssessment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.RiskAssessment tgt = new org.hl7.fhir.dstu2.model.RiskAssessment();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCondition(VersionConvertor_10_30.convertReference(src.getCondition()));
|
||||
tgt.setEncounter(VersionConvertor_10_30.convertReference(src.getContext()));
|
||||
tgt.setPerformer(VersionConvertor_10_30.convertReference(src.getPerformer()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getBasis()) tgt.addBasis(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
|
||||
tgt.setMitigation(src.getMitigation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.dstu2.model.RiskAssessment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.RiskAssessment tgt = new org.hl7.fhir.dstu3.model.RiskAssessment();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
tgt.setCondition(VersionConvertor_10_30.convertReference(src.getCondition()));
|
||||
tgt.setContext(VersionConvertor_10_30.convertReference(src.getEncounter()));
|
||||
tgt.setPerformer(VersionConvertor_10_30.convertReference(src.getPerformer()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getBasis()) tgt.addBasis(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
|
||||
tgt.setMitigation(src.getMitigation());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
tgt.setProbability(VersionConvertor_10_30.convertType(src.getProbability()));
|
||||
tgt.setRelativeRisk(src.getRelativeRisk());
|
||||
tgt.setWhen(VersionConvertor_10_30.convertType(src.getWhen()));
|
||||
tgt.setRationale(src.getRationale());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent tgt = new org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOutcome(VersionConvertor_10_30.convertCodeableConcept(src.getOutcome()));
|
||||
tgt.setProbability(VersionConvertor_10_30.convertType(src.getProbability()));
|
||||
tgt.setRelativeRisk(src.getRelativeRisk());
|
||||
tgt.setWhen(VersionConvertor_10_30.convertType(src.getWhen()));
|
||||
tgt.setRationale(src.getRationale());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Schedule10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Schedule convertSchedule(org.hl7.fhir.dstu3.model.Schedule src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Schedule tgt = new org.hl7.fhir.dstu2.model.Schedule();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType()) tgt.addType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_30.convertReference(src.getActorFirstRep()));
|
||||
tgt.setPlanningHorizon(VersionConvertor_10_30.convertPeriod(src.getPlanningHorizon()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Schedule convertSchedule(org.hl7.fhir.dstu2.model.Schedule src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Schedule tgt = new org.hl7.fhir.dstu3.model.Schedule();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addServiceType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.addActor(VersionConvertor_10_30.convertReference(src.getActor()));
|
||||
tgt.setPlanningHorizon(VersionConvertor_10_30.convertPeriod(src.getPlanningHorizon()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu2.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class SearchParameter10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SearchParameter convertSearchParameter(org.hl7.fhir.dstu3.model.SearchParameter src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCode(src.getCode());
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
|
||||
tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression());
|
||||
tgt.setXpath(src.getXpath());
|
||||
tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.SearchParameter convertSearchParameter(org.hl7.fhir.dstu2.model.SearchParameter src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.SearchParameter tgt = new org.hl7.fhir.dstu3.model.SearchParameter();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.addBase(src.getBase());
|
||||
tgt.setType(VersionConvertor_10_30.convertSearchParamType(src.getType()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
|
||||
tgt.setXpath(src.getXpath());
|
||||
tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertSearchParameterContactComponent(org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NORMAL:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.NORMAL;
|
||||
case PHONETIC:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.PHONETIC;
|
||||
case NEARBY:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.NEARBY;
|
||||
case DISTANCE:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.DISTANCE;
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.OTHER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType convertXPathUsageType(org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NORMAL:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NORMAL;
|
||||
case PHONETIC:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.PHONETIC;
|
||||
case NEARBY:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NEARBY;
|
||||
case DISTANCE:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.DISTANCE;
|
||||
case OTHER:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.OTHER;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Slot10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Slot convertSlot(org.hl7.fhir.dstu2.model.Slot src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Slot tgt = new org.hl7.fhir.dstu3.model.Slot();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
if (src.hasType())
|
||||
tgt.addServiceType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setSchedule(VersionConvertor_10_30.convertReference(src.getSchedule()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setOverbooked(src.getOverbooked());
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Slot convertSlot(org.hl7.fhir.dstu3.model.Slot src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Slot tgt = new org.hl7.fhir.dstu2.model.Slot();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setSchedule(VersionConvertor_10_30.convertReference(src.getSchedule()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setOverbooked(src.getOverbooked());
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.Specimen;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Specimen10_30 {
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Specimen convertSpecimen(Specimen src) {
|
||||
if (src == null) {
|
||||
return null;
|
||||
}
|
||||
org.hl7.fhir.dstu2.model.Specimen tgt = new org.hl7.fhir.dstu2.model.Specimen();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
if (src.hasAccessionIdentifier())
|
||||
tgt.setAccessionIdentifier(VersionConvertor_10_30.convertIdentifier(src.getAccessionIdentifier()));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatus(convertSpecimenStatus(src.getStatus()));
|
||||
if (src.hasType())
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(VersionConvertor_10_30.convertReference(src.getSubject()));
|
||||
if (src.hasReceivedTime())
|
||||
tgt.setReceivedTime(src.getReceivedTime());
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getParent()) tgt.addParent(VersionConvertor_10_30.convertReference(t));
|
||||
if (src.hasCollection())
|
||||
tgt.setCollection(convertSpecimenCollectionComponent(src.getCollection()));
|
||||
for (org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent t : src.getProcessing()) tgt.addTreatment(convertSpecimenProcessingComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent t : src.getContainer()) tgt.addContainer(convertSpecimenContainerComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Specimen.SpecimenCollectionComponent convertSpecimenCollectionComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenCollectionComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Specimen.SpecimenCollectionComponent tgt = new org.hl7.fhir.dstu2.model.Specimen.SpecimenCollectionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasCollector())
|
||||
tgt.setCollector(VersionConvertor_10_30.convertReference(src.getCollector()));
|
||||
if (src.hasCollected())
|
||||
tgt.setCollected(VersionConvertor_10_30.convertType(src.getCollected()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
if (src.hasMethod())
|
||||
tgt.setMethod(VersionConvertor_10_30.convertCodeableConcept(src.getMethod()));
|
||||
if (src.hasBodySite())
|
||||
tgt.setBodySite(VersionConvertor_10_30.convertCodeableConcept(src.getBodySite()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent convertSpecimenContainerComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent tgt = new org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescription(src.getDescription());
|
||||
if (src.hasType())
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
if (src.hasCapacity())
|
||||
tgt.setCapacity(VersionConvertor_10_30.convertSimpleQuantity(src.getCapacity()));
|
||||
if (src.hasSpecimenQuantity())
|
||||
tgt.setSpecimenQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getSpecimenQuantity()));
|
||||
if (src.hasAdditive())
|
||||
tgt.setAdditive(VersionConvertor_10_30.convertType(src.getAdditive()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Specimen.SpecimenTreatmentComponent convertSpecimenProcessingComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenProcessingComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Specimen.SpecimenTreatmentComponent tgt = new org.hl7.fhir.dstu2.model.Specimen.SpecimenTreatmentComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
if (src.hasDescription())
|
||||
tgt.setDescription(src.getDescription());
|
||||
if (src.hasProcedure())
|
||||
tgt.setProcedure(VersionConvertor_10_30.convertCodeableConcept(src.getProcedure()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAdditive()) tgt.addAdditive(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus convertSpecimenStatus(Specimen.SpecimenStatus status) {
|
||||
if (status == null) {
|
||||
return null;
|
||||
}
|
||||
switch(status) {
|
||||
case AVAILABLE:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.AVAILABLE;
|
||||
case UNAVAILABLE:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.UNAVAILABLE;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.ENTEREDINERROR;
|
||||
case UNSATISFACTORY:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.UNSATISFACTORY;
|
||||
case NULL:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.NULL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Specimen.SpecimenStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,270 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
|
||||
import org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class StructureDefinition10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.RESOURCE;
|
||||
case DATATYPE:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.DATATYPE;
|
||||
case EXTENSION:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.EXTENSION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext convertExtensionContext(org.hl7.fhir.dstu3.model.StructureDefinition.ExtensionContext src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext.RESOURCE;
|
||||
case DATATYPE:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext.DATATYPE;
|
||||
case EXTENSION:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext.EXTENSION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.ExtensionContext.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.dstu3.model.StructureDefinition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDisplay(src.getTitle());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
for (org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t));
|
||||
tgt.setKind(convertStructureDefinitionKind(src.getKind()));
|
||||
tgt.setAbstract(src.getAbstract());
|
||||
tgt.setContextType(convertExtensionContext(src.getContextType()));
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getContext()) tgt.addContext(t.getValue());
|
||||
tgt.setConstrainedType(src.getType());
|
||||
tgt.setBase(src.getBaseDefinition());
|
||||
tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
|
||||
tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential()));
|
||||
if (tgt.hasBase()) {
|
||||
if (tgt.hasDifferential())
|
||||
tgt.getDifferential().getElement().get(0).addType().setCode(tail(tgt.getBase()));
|
||||
if (tgt.hasSnapshot())
|
||||
tgt.getSnapshot().getElement().get(0).addType().setCode(tail(tgt.getBase()));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.dstu2.model.StructureDefinition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.StructureDefinition tgt = new org.hl7.fhir.dstu3.model.StructureDefinition();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setTitle(src.getDisplay());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_30.convertCoding(t));
|
||||
tgt.setFhirVersion(src.getFhirVersion());
|
||||
for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping()) tgt.addMapping(convertStructureDefinitionMappingComponent(t));
|
||||
tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId()));
|
||||
tgt.setAbstract(src.getAbstract());
|
||||
tgt.setContextType(convertExtensionContext(src.getContextType()));
|
||||
for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) tgt.addContext(t.getValue());
|
||||
if (src.hasConstrainedType())
|
||||
tgt.setType(src.getConstrainedType());
|
||||
else if (src.getSnapshot().hasElement())
|
||||
tgt.setType(src.getSnapshot().getElement().get(0).getPath());
|
||||
else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains("."))
|
||||
tgt.setType(src.getDifferential().getElement().get(0).getPath());
|
||||
else
|
||||
tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf(".")));
|
||||
tgt.setBaseDefinition(src.getBase());
|
||||
tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.dstu3.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION);
|
||||
tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
|
||||
tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential()));
|
||||
if (tgt.hasSnapshot())
|
||||
tgt.getSnapshot().getElementFirstRep().getType().clear();
|
||||
if (tgt.hasDifferential())
|
||||
tgt.getDifferential().getElementFirstRep().getType().clear();
|
||||
if (tgt.getKind() == StructureDefinitionKind.PRIMITIVETYPE && !tgt.getType().equals(tgt.getId())) {
|
||||
tgt.setDerivation(TypeDerivationRule.SPECIALIZATION);
|
||||
tgt.setBaseDefinition("http://hl7.org/fhir/StructureDefinition/" + tgt.getType());
|
||||
tgt.setType(tgt.getId());
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent convertStructureDefinitionContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertStructureDefinitionContactComponent(org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
List<String> slicePaths = new ArrayList<String>();
|
||||
for (org.hl7.fhir.dstu2.model.ElementDefinition t : src.getElement()) {
|
||||
if (t.hasSlicing())
|
||||
slicePaths.add(t.getPath());
|
||||
tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t, slicePaths));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRIMITIVETYPE:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind.DATATYPE;
|
||||
case COMPLEXTYPE:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind.DATATYPE;
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind.RESOURCE;
|
||||
case LOGICAL:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind.LOGICAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind convertStructureDefinitionKind(org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionKind src, String dtName) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DATATYPE:
|
||||
if (Utilities.existsInList(dtName, "boolean", "integer", "decimal", "base64Binary", "instant", "string", "uri", "date", "dateTime", "time", "code", "oid", "uuid", "id", "unsignedInt", "positiveInt", "markdown", "xhtml", "url", "canonical"))
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE;
|
||||
else
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind.COMPLEXTYPE;
|
||||
case RESOURCE:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind.RESOURCE;
|
||||
case LOGICAL:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind.LOGICAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentity(src.getIdentity());
|
||||
tgt.setUri(src.getUri());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setComments(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent convertStructureDefinitionMappingComponent(org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentity(src.getIdentity());
|
||||
tgt.setUri(src.getUri());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setComment(src.getComments());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement()) tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt = new org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
List<String> slicePaths = new ArrayList<String>();
|
||||
for (org.hl7.fhir.dstu2.model.ElementDefinition t : src.getElement()) {
|
||||
if (t.hasSlicing())
|
||||
slicePaths.add(t.getPath());
|
||||
tgt.addElement(VersionConvertor_10_30.convertElementDefinition(t, slicePaths));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public String tail(String base) {
|
||||
return base.substring(base.lastIndexOf("/") + 1);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Subscription10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Subscription convertSubscription(org.hl7.fhir.dstu2.model.Subscription src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Subscription tgt = new org.hl7.fhir.dstu3.model.Subscription();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setCriteria(src.getCriteria());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setReason(src.getReason());
|
||||
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
|
||||
tgt.setError(src.getError());
|
||||
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getTag()) tgt.addTag(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Subscription convertSubscription(org.hl7.fhir.dstu3.model.Subscription src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Subscription tgt = new org.hl7.fhir.dstu2.model.Subscription();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setCriteria(src.getCriteria());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_30.convertContactPoint(t));
|
||||
tgt.setReason(src.getReason());
|
||||
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
|
||||
tgt.setError(src.getError());
|
||||
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(VersionConvertor_10_30.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertSubscriptionChannelType(src.getType()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setPayload(src.getPayload());
|
||||
if (src.hasHeader())
|
||||
tgt.setHeaderElement(VersionConvertor_10_30.convertString(src.getHeader().get(0)));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(convertSubscriptionChannelType(src.getType()));
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setPayload(src.getPayload());
|
||||
tgt.addHeader(src.getHeader());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESTHOOK:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.RESTHOOK;
|
||||
case WEBSOCKET:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.WEBSOCKET;
|
||||
case EMAIL:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.EMAIL;
|
||||
case SMS:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.SMS;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.MESSAGE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESTHOOK:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.RESTHOOK;
|
||||
case WEBSOCKET:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.WEBSOCKET;
|
||||
case EMAIL:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.EMAIL;
|
||||
case SMS:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.SMS;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.MESSAGE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.REQUESTED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ACTIVE;
|
||||
case ERROR:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.ERROR;
|
||||
case OFF:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.OFF;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.dstu3.model.Subscription.SubscriptionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus.REQUESTED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus.ACTIVE;
|
||||
case ERROR:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus.ERROR;
|
||||
case OFF:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus.OFF;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Substance10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Substance convertSubstance(org.hl7.fhir.dstu3.model.Substance src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Substance tgt = new org.hl7.fhir.dstu2.model.Substance();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertSubstanceIngredientComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Substance convertSubstance(org.hl7.fhir.dstu2.model.Substance src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Substance tgt = new org.hl7.fhir.dstu3.model.Substance();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setCode(VersionConvertor_10_30.convertCodeableConcept(src.getCode()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertSubstanceIngredientComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertRatio(src.getQuantity()));
|
||||
tgt.setSubstance(VersionConvertor_10_30.convertReference(src.getSubstance()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent convertSubstanceIngredientComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent tgt = new org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertRatio(src.getQuantity()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setExpiry(src.getExpiry());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent tgt = new org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setExpiry(src.getExpiry());
|
||||
tgt.setQuantity(VersionConvertor_10_30.convertSimpleQuantity(src.getQuantity()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class SupplyDelivery10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.dstu2.model.SupplyDelivery src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.SupplyDelivery tgt = new org.hl7.fhir.dstu3.model.SupplyDelivery();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setSupplier(VersionConvertor_10_30.convertReference(src.getSupplier()));
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SupplyDelivery convertSupplyDelivery(org.hl7.fhir.dstu3.model.SupplyDelivery src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.SupplyDelivery tgt = new org.hl7.fhir.dstu2.model.SupplyDelivery();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setStatus(convertSupplyDeliveryStatus(src.getStatus()));
|
||||
tgt.setPatient(VersionConvertor_10_30.convertReference(src.getPatient()));
|
||||
tgt.setType(VersionConvertor_10_30.convertCodeableConcept(src.getType()));
|
||||
tgt.setSupplier(VersionConvertor_10_30.convertReference(src.getSupplier()));
|
||||
tgt.setDestination(VersionConvertor_10_30.convertReference(src.getDestination()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_30.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED;
|
||||
case ABANDONED:
|
||||
return org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus convertSupplyDeliveryStatus(org.hl7.fhir.dstu2.model.SupplyDelivery.SupplyDeliveryStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus.COMPLETED;
|
||||
case ABANDONED:
|
||||
return org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus.ABANDONED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliveryStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class SupplyRequest10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.dstu2.model.SupplyRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.SupplyRequest tgt = new org.hl7.fhir.dstu3.model.SupplyRequest();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.dstu3.model.SupplyRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.SupplyRequest tgt = new org.hl7.fhir.dstu2.model.SupplyRequest();
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,614 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class TestScript10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESPONSE:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionDirectionType.RESPONSE;
|
||||
case REQUEST:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionDirectionType.REQUEST;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionDirectionType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType convertAssertionDirectionType(org.hl7.fhir.dstu2.model.TestScript.AssertionDirectionType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case RESPONSE:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.RESPONSE;
|
||||
case REQUEST:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.REQUEST;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUALS:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EQUALS;
|
||||
case NOTEQUALS:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEQUALS;
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.IN;
|
||||
case NOTIN:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTIN;
|
||||
case GREATERTHAN:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.GREATERTHAN;
|
||||
case LESSTHAN:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.LESSTHAN;
|
||||
case EMPTY:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EMPTY;
|
||||
case NOTEMPTY:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEMPTY;
|
||||
case CONTAINS:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.CONTAINS;
|
||||
case NOTCONTAINS:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTCONTAINS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType convertAssertionOperatorType(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUALS:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.EQUALS;
|
||||
case NOTEQUALS:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.NOTEQUALS;
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.IN;
|
||||
case NOTIN:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.NOTIN;
|
||||
case GREATERTHAN:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.GREATERTHAN;
|
||||
case LESSTHAN:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.LESSTHAN;
|
||||
case EMPTY:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.EMPTY;
|
||||
case NOTEMPTY:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.NOTEMPTY;
|
||||
case CONTAINS:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.CONTAINS;
|
||||
case NOTCONTAINS:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.NOTCONTAINS;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionOperatorType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OKAY:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.OKAY;
|
||||
case CREATED:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.CREATED;
|
||||
case NOCONTENT:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NOCONTENT;
|
||||
case NOTMODIFIED:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NOTMODIFIED;
|
||||
case BAD:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.BAD;
|
||||
case FORBIDDEN:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.FORBIDDEN;
|
||||
case NOTFOUND:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NOTFOUND;
|
||||
case METHODNOTALLOWED:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED;
|
||||
case CONFLICT:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.CONFLICT;
|
||||
case GONE:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.GONE;
|
||||
case PRECONDITIONFAILED:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED;
|
||||
case UNPROCESSABLE:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.UNPROCESSABLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes convertAssertionResponseTypes(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case OKAY:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.OKAY;
|
||||
case CREATED:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CREATED;
|
||||
case NOCONTENT:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOCONTENT;
|
||||
case NOTMODIFIED:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED;
|
||||
case BAD:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD;
|
||||
case FORBIDDEN:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.FORBIDDEN;
|
||||
case NOTFOUND:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTFOUND;
|
||||
case METHODNOTALLOWED:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED;
|
||||
case CONFLICT:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CONFLICT;
|
||||
case GONE:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.GONE;
|
||||
case PRECONDITIONFAILED:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED;
|
||||
case UNPROCESSABLE:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.ContentType convertContentType(org.hl7.fhir.dstu3.model.TestScript.ContentType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case XML:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.ContentType.XML;
|
||||
case JSON:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.ContentType.JSON;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.TestScript.ContentType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.ContentType convertContentType(org.hl7.fhir.dstu2.model.TestScript.ContentType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case XML:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.ContentType.XML;
|
||||
case JSON:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.ContentType.JSON;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.TestScript.ContentType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLabel(src.getLabel());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
|
||||
tgt.setCompareToSourceId(src.getCompareToSourceId());
|
||||
tgt.setCompareToSourcePath(src.getCompareToSourcePath());
|
||||
tgt.setContentType(convertContentType(src.getContentType()));
|
||||
tgt.setHeaderField(src.getHeaderField());
|
||||
tgt.setMinimumId(src.getMinimumId());
|
||||
tgt.setNavigationLinks(src.getNavigationLinks());
|
||||
tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
|
||||
tgt.setPath(src.getPath());
|
||||
tgt.setResource(src.getResource());
|
||||
tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
|
||||
tgt.setResponseCode(src.getResponseCode());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
tgt.setValidateProfileId(src.getValidateProfileId());
|
||||
tgt.setValue(src.getValue());
|
||||
tgt.setWarningOnly(src.getWarningOnly());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLabel(src.getLabel());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
|
||||
tgt.setCompareToSourceId(src.getCompareToSourceId());
|
||||
tgt.setCompareToSourcePath(src.getCompareToSourcePath());
|
||||
tgt.setContentType(convertContentType(src.getContentType()));
|
||||
tgt.setHeaderField(src.getHeaderField());
|
||||
tgt.setMinimumId(src.getMinimumId());
|
||||
tgt.setNavigationLinks(src.getNavigationLinks());
|
||||
tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
|
||||
tgt.setPath(src.getPath());
|
||||
tgt.setResource(src.getResource());
|
||||
tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
|
||||
tgt.setResponseCode(src.getResponseCode());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
tgt.setValidateProfileId(src.getValidateProfileId());
|
||||
tgt.setValue(src.getValue());
|
||||
tgt.setWarningOnly(src.getWarningOnly());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setResource(src.getResource());
|
||||
tgt.setLabel(src.getLabel());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAccept(convertContentType(src.getAccept()));
|
||||
tgt.setContentType(convertContentType(src.getContentType()));
|
||||
tgt.setDestination(src.getDestination());
|
||||
tgt.setEncodeRequestUrl(src.getEncodeRequestUrl());
|
||||
tgt.setParams(src.getParams());
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
|
||||
tgt.setResponseId(src.getResponseId());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
tgt.setTargetId(src.getTargetId());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setType(VersionConvertor_10_30.convertCoding(src.getType()));
|
||||
tgt.setResource(src.getResource());
|
||||
tgt.setLabel(src.getLabel());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setAccept(convertContentType(src.getAccept()));
|
||||
tgt.setContentType(convertContentType(src.getContentType()));
|
||||
tgt.setDestination(src.getDestination());
|
||||
tgt.setEncodeRequestUrl(src.getEncodeRequestUrl());
|
||||
tgt.setParams(src.getParams());
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
|
||||
tgt.setResponseId(src.getResponseId());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
tgt.setTargetId(src.getTargetId());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setField(src.getField());
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setField(src.getField());
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
|
||||
tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript convertTestScript(org.hl7.fhir.dstu3.model.TestScript src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) tgt.addFixture(convertTestScriptFixtureComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent t : src.getVariable()) tgt.addVariable(convertTestScriptVariableComponent(t));
|
||||
tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent t : src.getTest()) tgt.addTest(convertTestScriptTestComponent(t));
|
||||
tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript convertTestScript(org.hl7.fhir.dstu2.model.TestScript src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent t : src.getFixture()) tgt.addFixture(convertTestScriptFixtureComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent t : src.getVariable()) tgt.addVariable(convertTestScriptVariableComponent(t));
|
||||
tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent t : src.getTest()) tgt.addTest(convertTestScriptTestComponent(t));
|
||||
tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertTestScriptContactComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAutocreate(src.getAutocreate());
|
||||
tgt.setAutodelete(src.getAutodelete());
|
||||
tgt.setResource(VersionConvertor_10_30.convertReference(src.getResource()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setAutocreate(src.getAutocreate());
|
||||
tgt.setAutodelete(src.getAutodelete());
|
||||
tgt.setResource(VersionConvertor_10_30.convertReference(src.getResource()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setValidated(src.getValidated());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDestination(src.getDestination());
|
||||
for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
|
||||
tgt.setConformance(VersionConvertor_10_30.convertReference(src.getCapabilities()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setRequired(src.getRequired());
|
||||
tgt.setValidated(src.getValidated());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setDestination(src.getDestination());
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
|
||||
tgt.setCapabilities(VersionConvertor_10_30.convertReference(src.getConformance()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) tgt.addLink(convertTestScriptMetadataLinkComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink()) tgt.addLink(convertTestScriptMetadataLinkComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability()) tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent t : src.getAction()) tgt.addAction(convertSetupActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent t : src.getAction()) tgt.addAction(convertSetupActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent t : src.getAction()) tgt.addAction(convertTeardownActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction()) tgt.addAction(convertTeardownActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setHeaderField(src.getHeaderField());
|
||||
tgt.setPath(src.getPath());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setHeaderField(src.getHeaderField());
|
||||
tgt.setPath(src.getPath());
|
||||
tgt.setSourceId(src.getSourceId());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,409 @@
|
|||
package org.hl7.fhir.convertors.conv10_30;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertorAdvisor30;
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_30;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemContentMode;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
|
||||
import org.hl7.fhir.dstu3.terminologies.CodeSystemUtilities;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ValueSet10_30 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setDisplay(src.getDisplay());
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setDisplay(src.getDisplay());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLanguage(src.getLanguage());
|
||||
tgt.setUse(VersionConvertor_10_30.convertCoding(src.getUse()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setLanguage(src.getLanguage());
|
||||
tgt.setUse(VersionConvertor_10_30.convertCoding(src.getUse()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSystem(src.getSystem());
|
||||
tgt.setVersion(src.getVersion());
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) tgt.addFilter(convertConceptSetFilterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSystem(src.getSystem());
|
||||
tgt.setVersion(src.getVersion());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) tgt.addFilter(convertConceptSetFilterComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setProperty(src.getProperty());
|
||||
tgt.setOp(convertFilterOperator(src.getOp()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setProperty(src.getProperty());
|
||||
tgt.setOp(convertFilterOperator(src.getOp()));
|
||||
tgt.setValue(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.dstu2.model.ValueSet.FilterOperator src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EQUAL;
|
||||
case ISA:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISA;
|
||||
case ISNOTA:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISNOTA;
|
||||
case REGEX:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.REGEX;
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.IN;
|
||||
case NOTIN:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NOTIN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.FilterOperator convertFilterOperator(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.EQUAL;
|
||||
case ISA:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.ISA;
|
||||
case ISNOTA:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.ISNOTA;
|
||||
case REGEX:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.REGEX;
|
||||
case IN:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.IN;
|
||||
case NOTIN:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.NOTIN;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.ValueSet.FilterOperator.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet convertValueSet(org.hl7.fhir.dstu2.model.ValueSet src, VersionConvertorAdvisor30 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.addIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setImmutable(src.getImmutable());
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setExtensible(src.getExtensible());
|
||||
if (src.hasCompose()) {
|
||||
tgt.setCompose(convertValueSetComposeComponent(src.getCompose()));
|
||||
tgt.getCompose().setLockedDate(src.getLockedDate());
|
||||
}
|
||||
if (src.hasCodeSystem() && advisor != null) {
|
||||
org.hl7.fhir.dstu3.model.CodeSystem tgtcs = new org.hl7.fhir.dstu3.model.CodeSystem();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgtcs);
|
||||
tgtcs.setUrl(src.getCodeSystem().getSystem());
|
||||
tgtcs.setIdentifier(VersionConvertor_10_30.convertIdentifier(src.getIdentifier()));
|
||||
tgtcs.setVersion(src.getCodeSystem().getVersion());
|
||||
tgtcs.setName(src.getName() + " Code System");
|
||||
tgtcs.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgtcs.setExperimental(src.getExperimental());
|
||||
tgtcs.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgtcs.setDate(src.getDate());
|
||||
tgtcs.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_30.isJurisdiction(t))
|
||||
tgtcs.addJurisdiction(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
else
|
||||
tgtcs.addUseContext(VersionConvertor_10_30.convertCodeableConceptToUsageContext(t));
|
||||
tgtcs.setPurpose(src.getRequirements());
|
||||
tgtcs.setCopyright(src.getCopyright());
|
||||
tgtcs.setContent(CodeSystemContentMode.COMPLETE);
|
||||
tgtcs.setCaseSensitive(src.getCodeSystem().getCaseSensitive());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent cs : src.getCodeSystem().getConcept()) processConcept(tgtcs.getConcept(), cs, tgtcs);
|
||||
advisor.handleCodeSystem(tgtcs, tgt);
|
||||
tgt.setUserData("r2-cs", tgtcs);
|
||||
tgt.getCompose().addInclude().setSystem(tgtcs.getUrl());
|
||||
}
|
||||
tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet convertValueSet(org.hl7.fhir.dstu3.model.ValueSet src, VersionConvertorAdvisor30 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet tgt = new org.hl7.fhir.dstu2.model.ValueSet();
|
||||
VersionConvertor_10_30.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
for (org.hl7.fhir.dstu3.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_30.convertIdentifier(i));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setLockedDate(src.getCompose().getLockedDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_30.convertCodeableConcept(t));
|
||||
tgt.setImmutable(src.getImmutable());
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setExtensible(src.getExtensible());
|
||||
org.hl7.fhir.dstu3.model.CodeSystem srcCS = (CodeSystem) src.getUserData("r2-cs");
|
||||
if (srcCS == null)
|
||||
srcCS = advisor.getCodeSystem(src);
|
||||
if (srcCS != null) {
|
||||
tgt.getCodeSystem().setSystem(srcCS.getUrl());
|
||||
tgt.getCodeSystem().setVersion(srcCS.getVersion());
|
||||
tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive());
|
||||
for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS);
|
||||
}
|
||||
tgt.setCompose(convertValueSetComposeComponent(src.getCompose(), srcCS == null ? null : srcCS.getUrl()));
|
||||
tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet convertValueSet(org.hl7.fhir.dstu2.model.ValueSet src) throws FHIRException {
|
||||
return convertValueSet(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet convertValueSet(org.hl7.fhir.dstu3.model.ValueSet src) throws FHIRException {
|
||||
return convertValueSet(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getImport()) tgt.addInclude().addValueSet(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src, String noSystem) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) {
|
||||
for (org.hl7.fhir.dstu3.model.UriType ti : t.getValueSet()) tgt.addImport(ti.getValue());
|
||||
if (noSystem == null || !t.getSystem().equals(noSystem))
|
||||
tgt.addInclude(convertConceptSetComponent(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent convertValueSetContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ContactDetail convertValueSetContactComponent(org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(src.getIdentifier());
|
||||
tgt.setTimestamp(src.getTimestamp());
|
||||
tgt.setTotal(src.getTotal());
|
||||
tgt.setOffset(src.getOffset());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setIdentifier(src.getIdentifier());
|
||||
tgt.setTimestamp(src.getTimestamp());
|
||||
tgt.setTotal(src.getTotal());
|
||||
tgt.setOffset(src.getOffset());
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSystem(src.getSystem());
|
||||
tgt.setAbstract(src.getAbstract());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setDisplay(src.getDisplay());
|
||||
for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setSystem(src.getSystem());
|
||||
tgt.setAbstract(src.getAbstract());
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setDisplay(src.getDisplay());
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent();
|
||||
VersionConvertor_10_30.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
tgt.setValue(VersionConvertor_10_30.convertType(src.getValue()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public void processConcept(List<ConceptDefinitionComponent> concepts, org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent cs, CodeSystem tgtcs) throws FHIRException {
|
||||
org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent ct = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent();
|
||||
concepts.add(ct);
|
||||
ct.setCode(cs.getCode());
|
||||
ct.setDisplay(cs.getDisplay());
|
||||
ct.setDefinition(cs.getDefinition());
|
||||
if (cs.getAbstract())
|
||||
CodeSystemUtilities.setNotSelectable(tgtcs, ct);
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) {
|
||||
org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent();
|
||||
cst.setLanguage(csd.getLanguage());
|
||||
cst.setUse(VersionConvertor_10_30.convertCoding(csd.getUse()));
|
||||
cst.setValue(csd.getValue());
|
||||
}
|
||||
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent csc : cs.getConcept()) processConcept(ct.getConcept(), csc, tgtcs);
|
||||
}
|
||||
|
||||
static public void processConcept(List<org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent> concepts, ConceptDefinitionComponent cs, CodeSystem srcCS) throws FHIRException {
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent ct = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent();
|
||||
concepts.add(ct);
|
||||
ct.setCode(cs.getCode());
|
||||
ct.setDisplay(cs.getDisplay());
|
||||
ct.setDefinition(cs.getDefinition());
|
||||
if (CodeSystemUtilities.isNotSelectable(srcCS, cs))
|
||||
ct.setAbstract(true);
|
||||
for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionDesignationComponent csd : cs.getDesignation()) {
|
||||
org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent cst = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent();
|
||||
cst.setLanguage(csd.getLanguage());
|
||||
cst.setUse(VersionConvertor_10_30.convertCoding(csd.getUse()));
|
||||
cst.setValue(csd.getValue());
|
||||
}
|
||||
for (ConceptDefinitionComponent csc : cs.getConcept()) processConcept(ct.getConcept(), csc, srcCS);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Appointment10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.Appointment convertAppointment(org.hl7.fhir.dstu2.model.Appointment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Appointment tgt = new org.hl7.fhir.r4.model.Appointment();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setStatus(convertAppointmentStatus(src.getStatus()));
|
||||
if (src.hasType())
|
||||
tgt.addServiceType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
|
||||
tgt.setPriority(src.getPriority());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setMinutesDuration(src.getMinutesDuration());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setComment(src.getComment());
|
||||
for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment convertAppointment(org.hl7.fhir.r4.model.Appointment src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Appointment tgt = new org.hl7.fhir.dstu2.model.Appointment();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setStatus(convertAppointmentStatus(src.getStatus()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setPriority(src.getPriority());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
tgt.setMinutesDuration(src.getMinutesDuration());
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setComment(src.getComment());
|
||||
for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_40.convertReference(src.getActor()));
|
||||
tgt.setRequired(convertParticipantRequired(src.getRequired()));
|
||||
tgt.setStatus(convertParticipationStatus(src.getStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent tgt = new org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) tgt.addType(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_40.convertReference(src.getActor()));
|
||||
tgt.setRequired(convertParticipantRequired(src.getRequired()));
|
||||
tgt.setStatus(convertParticipationStatus(src.getStatus()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.r4.model.Appointment.AppointmentStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.PROPOSED;
|
||||
case PENDING:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.PENDING;
|
||||
case BOOKED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.BOOKED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.ARRIVED;
|
||||
case FULFILLED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.FULFILLED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.CANCELLED;
|
||||
case NOSHOW:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.NOSHOW;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Appointment.AppointmentStatus convertAppointmentStatus(org.hl7.fhir.dstu2.model.Appointment.AppointmentStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PROPOSED;
|
||||
case PENDING:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.PENDING;
|
||||
case BOOKED:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.BOOKED;
|
||||
case ARRIVED:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.ARRIVED;
|
||||
case FULFILLED:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.FULFILLED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.CANCELLED;
|
||||
case NOSHOW:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NOSHOW;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Appointment.AppointmentStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.REQUIRED;
|
||||
case OPTIONAL:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.OPTIONAL;
|
||||
case INFORMATIONONLY:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.INFORMATIONONLY;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipantRequired.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired convertParticipantRequired(org.hl7.fhir.r4.model.Appointment.ParticipantRequired src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case REQUIRED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.REQUIRED;
|
||||
case OPTIONAL:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.OPTIONAL;
|
||||
case INFORMATIONONLY:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.INFORMATIONONLY;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipantRequired.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.r4.model.Appointment.ParticipationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Appointment.ParticipationStatus convertParticipationStatus(org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Appointment.ParticipationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class AppointmentResponse10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu2.model.AppointmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AppointmentResponse tgt = new org.hl7.fhir.r4.model.AppointmentResponse();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_40.convertReference(src.getActor()));
|
||||
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.r4.model.AppointmentResponse src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AppointmentResponse tgt = new org.hl7.fhir.dstu2.model.AppointmentResponse();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment()));
|
||||
tgt.setStart(src.getStart());
|
||||
tgt.setEnd(src.getEnd());
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setActor(VersionConvertor_10_40.convertReference(src.getActor()));
|
||||
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
|
||||
tgt.setComment(src.getComment());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus src) {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.TENTATIVE;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus convertParticipantStatus(org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus src) {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case DECLINED:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.DECLINED;
|
||||
case TENTATIVE:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.TENTATIVE;
|
||||
case INPROCESS:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.ACCEPTED;
|
||||
case NEEDSACTION:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NEEDSACTION;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,308 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class AuditEvent10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu2.model.AuditEvent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent tgt = new org.hl7.fhir.r4.model.AuditEvent();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
if (src.hasEvent()) {
|
||||
tgt.setType(VersionConvertor_10_40.convertCoding(src.getEvent().getType()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getSubtype()) tgt.addSubtype(VersionConvertor_10_40.convertCoding(t));
|
||||
tgt.setAction(convertAuditEventAction(src.getEvent().getAction()));
|
||||
tgt.setRecorded(src.getEvent().getDateTime());
|
||||
tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome()));
|
||||
tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc());
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_40.convertCoding(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent t : src.getParticipant()) tgt.addAgent(convertAuditEventAgentComponent(t));
|
||||
tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent t : src.getObject()) tgt.addEntity(convertAuditEventEntityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent convertAuditEvent(org.hl7.fhir.r4.model.AuditEvent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent tgt = new org.hl7.fhir.dstu2.model.AuditEvent();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
tgt.getEvent().setType(VersionConvertor_10_40.convertCoding(src.getType()));
|
||||
for (org.hl7.fhir.r4.model.Coding t : src.getSubtype()) tgt.getEvent().addSubtype(VersionConvertor_10_40.convertCoding(t));
|
||||
tgt.getEvent().setAction(convertAuditEventAction(src.getAction()));
|
||||
tgt.getEvent().setDateTime(src.getRecorded());
|
||||
tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome()));
|
||||
tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc());
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_40.convertCoding(cc));
|
||||
for (org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent t : src.getAgent()) tgt.addParticipant(convertAuditEventAgentComponent(t));
|
||||
tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent t : src.getEntity()) tgt.addObject(convertAuditEventEntityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.r4.model.AuditEvent.AuditEventAction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case C:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.C;
|
||||
case R:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.R;
|
||||
case U:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.U;
|
||||
case D:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.D;
|
||||
case E:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.E;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventAction convertAuditEventAction(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventAction src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case C:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.C;
|
||||
case R:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.R;
|
||||
case U:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.U;
|
||||
case D:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.D;
|
||||
case E:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.E;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAction.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setWho(VersionConvertor_10_40.convertReference(src.getReference()));
|
||||
if (src.hasUserId())
|
||||
tgt.getWho().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getUserId()));
|
||||
tgt.setAltId(src.getAltId());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRequestor(src.getRequestor());
|
||||
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
tgt.setMedia(VersionConvertor_10_40.convertCoding(src.getMedia()));
|
||||
tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getPurposeOfUse()) tgt.addPurposeOfUse().addCoding(VersionConvertor_10_40.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole()) tgt.addRole(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
if (src.hasWho()) {
|
||||
if (src.getWho().hasIdentifier())
|
||||
tgt.setUserId(VersionConvertor_10_40.convertIdentifier(src.getWho().getIdentifier()));
|
||||
if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId())
|
||||
tgt.setReference(VersionConvertor_10_40.convertReference(src.getWho()));
|
||||
}
|
||||
tgt.setAltId(src.getAltId());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setRequestor(src.getRequestor());
|
||||
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.r4.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue());
|
||||
tgt.setMedia(VersionConvertor_10_40.convertCoding(src.getMedia()));
|
||||
tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfUse()) for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) tgt.addPurposeOfUse(VersionConvertor_10_40.convertCoding(cc));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setAddress(src.getAddress());
|
||||
tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setAddress(src.getAddress());
|
||||
tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
if (src.hasIdentifier())
|
||||
tgt.getWhat().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasReference())
|
||||
tgt.setWhat(VersionConvertor_10_40.convertReference(src.getReference()));
|
||||
tgt.setType(VersionConvertor_10_40.convertCoding(src.getType()));
|
||||
tgt.setRole(VersionConvertor_10_40.convertCoding(src.getRole()));
|
||||
tgt.setLifecycle(VersionConvertor_10_40.convertCoding(src.getLifecycle()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setQuery(src.getQuery());
|
||||
for (org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
if (src.hasWhat()) {
|
||||
if (src.getWhat().hasIdentifier())
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getWhat().getIdentifier()));
|
||||
if (src.getWhat().hasReference() || src.getWhat().hasDisplay() || src.getWhat().hasExtension() || src.getWhat().hasId())
|
||||
tgt.setReference(VersionConvertor_10_40.convertReference(src.getWhat()));
|
||||
}
|
||||
tgt.setType(VersionConvertor_10_40.convertCoding(src.getType()));
|
||||
tgt.setRole(VersionConvertor_10_40.convertCoding(src.getRole()));
|
||||
tgt.setLifecycle(VersionConvertor_10_40.convertCoding(src.getLifecycle()));
|
||||
for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t));
|
||||
tgt.setName(src.getName());
|
||||
tgt.setDescription(src.getDescription());
|
||||
tgt.setQuery(src.getQuery());
|
||||
for (org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
if (src.hasValueStringType())
|
||||
tgt.setValue(src.getValueStringType().getValue().getBytes());
|
||||
else if (src.hasValueBase64BinaryType())
|
||||
tgt.setValue(src.getValueBase64BinaryType().getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent convertAuditEventEntityDetailComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setType(src.getType());
|
||||
if (src.hasValue())
|
||||
tgt.setValue(new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _0:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._0;
|
||||
case _4:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._4;
|
||||
case _8:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._8;
|
||||
case _12:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome._12;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome convertAuditEventOutcome(org.hl7.fhir.r4.model.AuditEvent.AuditEventOutcome src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _0:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._0;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._4;
|
||||
case _8:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._8;
|
||||
case _12:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome._12;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventOutcome.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _1:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._1;
|
||||
case _2:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._2;
|
||||
case _3:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._3;
|
||||
case _4:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._4;
|
||||
case _5:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType._5;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType convertAuditEventParticipantNetworkType(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case _1:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._1;
|
||||
case _2:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._2;
|
||||
case _3:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._3;
|
||||
case _4:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._4;
|
||||
case _5:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType._5;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setSite(src.getSite());
|
||||
if (src.hasIdentifier())
|
||||
tgt.getObserver().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
for (org.hl7.fhir.dstu2.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_40.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setSite(src.getSite());
|
||||
if (src.hasObserver())
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getObserver().getIdentifier()));
|
||||
for (org.hl7.fhir.r4.model.Coding t : src.getType()) tgt.addType(VersionConvertor_10_40.convertCoding(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Basic10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.Basic convertBasic(org.hl7.fhir.dstu2.model.Basic src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Basic tgt = new org.hl7.fhir.r4.model.Basic();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Basic convertBasic(org.hl7.fhir.r4.model.Basic src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Basic tgt = new org.hl7.fhir.dstu2.model.Basic();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setCreated(src.getCreated());
|
||||
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Binary10_40 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Binary convertBinary(org.hl7.fhir.r4.model.Binary src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary();
|
||||
VersionConvertor_10_40.copyResource(src, tgt);
|
||||
tgt.setContentType(src.getContentType());
|
||||
tgt.setContent(src.getContent());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Binary convertBinary(org.hl7.fhir.dstu2.model.Binary src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary();
|
||||
VersionConvertor_10_40.copyResource(src, tgt);
|
||||
tgt.setContentType(src.getContentType());
|
||||
tgt.setContent(src.getContent());
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,291 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertorAdvisor40;
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Bundle10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle convertBundle(org.hl7.fhir.dstu2.model.Bundle src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle tgt = new org.hl7.fhir.r4.model.Bundle();
|
||||
VersionConvertor_10_40.copyResource(src, tgt);
|
||||
tgt.setType(convertBundleType(src.getType()));
|
||||
if (src.hasTotal())
|
||||
tgt.setTotal(src.getTotal());
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t));
|
||||
tgt.setSignature(VersionConvertor_10_40.convertSignature(src.getSignature()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src, VersionConvertorAdvisor40 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle tgt = new org.hl7.fhir.dstu2.model.Bundle();
|
||||
VersionConvertor_10_40.copyResource(src, tgt);
|
||||
tgt.setType(convertBundleType(src.getType()));
|
||||
if (src.hasTotal())
|
||||
tgt.setTotal(src.getTotal());
|
||||
for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t, advisor));
|
||||
if (src.hasSignature())
|
||||
tgt.setSignature(VersionConvertor_10_40.convertSignature(src.getSignature()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src) throws FHIRException {
|
||||
return convertBundle(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
tgt.setFullUrl(src.getFullUrl());
|
||||
tgt.setResource(VersionConvertor_10_40.convertResource(src.getResource()));
|
||||
tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
|
||||
tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
|
||||
tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src, VersionConvertorAdvisor40 advisor) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
if (advisor.ignoreEntry(src))
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
|
||||
tgt.setFullUrl(src.getFullUrl());
|
||||
org.hl7.fhir.dstu2.model.Resource res = advisor.convertR2(src.getResource());
|
||||
if (res == null)
|
||||
res = VersionConvertor_10_40.convertResource(src.getResource());
|
||||
tgt.setResource(res);
|
||||
if (src.hasSearch())
|
||||
tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
|
||||
if (src.hasRequest())
|
||||
tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
|
||||
if (src.hasResponse())
|
||||
tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src) throws FHIRException {
|
||||
return convertBundleEntryComponent(src, null);
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setMethod(convertHTTPVerb(src.getMethod()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIfNoneMatch(src.getIfNoneMatch());
|
||||
tgt.setIfModifiedSince(src.getIfModifiedSince());
|
||||
tgt.setIfMatch(src.getIfMatch());
|
||||
tgt.setIfNoneExist(src.getIfNoneExist());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setMethod(convertHTTPVerb(src.getMethod()));
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIfNoneMatch(src.getIfNoneMatch());
|
||||
tgt.setIfModifiedSince(src.getIfModifiedSince());
|
||||
tgt.setIfMatch(src.getIfMatch());
|
||||
tgt.setIfNoneExist(src.getIfNoneExist());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setStatus(src.getStatus());
|
||||
tgt.setLocation(src.getLocation());
|
||||
tgt.setEtag(src.getEtag());
|
||||
tgt.setLastModified(src.getLastModified());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setStatus(src.getStatus());
|
||||
tgt.setLocation(src.getLocation());
|
||||
tgt.setEtag(src.getEtag());
|
||||
tgt.setLastModified(src.getLastModified());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setMode(convertSearchEntryMode(src.getMode()));
|
||||
tgt.setScore(src.getScore());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setMode(convertSearchEntryMode(src.getMode()));
|
||||
tgt.setScore(src.getScore());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setRelation(src.getRelation());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setRelation(src.getRelation());
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.BundleType convertBundleType(org.hl7.fhir.r4.model.Bundle.BundleType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DOCUMENT:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.DOCUMENT;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.MESSAGE;
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTION;
|
||||
case TRANSACTIONRESPONSE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTIONRESPONSE;
|
||||
case BATCH:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCH;
|
||||
case BATCHRESPONSE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCHRESPONSE;
|
||||
case HISTORY:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.HISTORY;
|
||||
case SEARCHSET:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.SEARCHSET;
|
||||
case COLLECTION:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.COLLECTION;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.BundleType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.BundleType convertBundleType(org.hl7.fhir.dstu2.model.Bundle.BundleType src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DOCUMENT:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT;
|
||||
case MESSAGE:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE;
|
||||
case TRANSACTION:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION;
|
||||
case TRANSACTIONRESPONSE:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE;
|
||||
case BATCH:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.BATCH;
|
||||
case BATCHRESPONSE:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE;
|
||||
case HISTORY:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY;
|
||||
case SEARCHSET:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET;
|
||||
case COLLECTION:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Bundle.BundleType.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.r4.model.Bundle.HTTPVerb src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case GET:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.GET;
|
||||
case POST:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.POST;
|
||||
case PUT:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.PUT;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.DELETE;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.HTTPVerb convertHTTPVerb(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case GET:
|
||||
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET;
|
||||
case POST:
|
||||
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST;
|
||||
case PUT:
|
||||
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT;
|
||||
case DELETE:
|
||||
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.r4.model.Bundle.SearchEntryMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MATCH:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.MATCH;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.INCLUDE;
|
||||
case OUTCOME:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.OUTCOME;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Bundle.SearchEntryMode convertSearchEntryMode(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case MATCH:
|
||||
return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH;
|
||||
case INCLUDE:
|
||||
return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE;
|
||||
case OUTCOME:
|
||||
return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,192 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class CarePlan10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan convertCarePlan(org.hl7.fhir.dstu2.model.CarePlan src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CarePlan tgt = new org.hl7.fhir.r4.model.CarePlan();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertCarePlanStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getContext()));
|
||||
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) if (!tgt.hasAuthor())
|
||||
tgt.setAuthor(VersionConvertor_10_40.convertReference(t));
|
||||
else
|
||||
tgt.addContributor(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) tgt.addActivity(convertCarePlanActivityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan convertCarePlan(org.hl7.fhir.r4.model.CarePlan src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan tgt = new org.hl7.fhir.dstu2.model.CarePlan();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setStatus(convertCarePlanStatus(src.getStatus()));
|
||||
tgt.setContext(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
|
||||
if (src.hasAuthor())
|
||||
tgt.addAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getContributor()) tgt.addAuthor(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent t : src.getActivity()) tgt.addActivity(convertCarePlanActivityComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Annotation t : src.getProgress()) tgt.addProgress(VersionConvertor_10_40.convertAnnotation(t));
|
||||
tgt.setReference(VersionConvertor_10_40.convertReference(src.getReference()));
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Annotation t : src.getProgress()) tgt.addProgress(VersionConvertor_10_40.convertAnnotation(t));
|
||||
tgt.setReference(VersionConvertor_10_40.convertReference(src.getReference()));
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) tgt.addReasonReference(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
|
||||
tgt.setProhibited(src.getDoNotPerform());
|
||||
tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled()));
|
||||
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setProduct(VersionConvertor_10_40.convertType(src.getProduct()));
|
||||
tgt.setDailyAmount(VersionConvertor_10_40.convertSimpleQuantity(src.getDailyAmount()));
|
||||
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference()) tgt.addReasonReference(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
|
||||
tgt.setDoNotPerform(src.getProhibited());
|
||||
tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled()));
|
||||
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setProduct(VersionConvertor_10_40.convertType(src.getProduct()));
|
||||
tgt.setDailyAmount(VersionConvertor_10_40.convertSimpleQuantity(src.getDailyAmount()));
|
||||
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
|
||||
tgt.setDescription(src.getDescription());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSTARTED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED;
|
||||
case SCHEDULED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus convertCarePlanActivityStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case NOTSTARTED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED;
|
||||
case SCHEDULED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.COMPLETED;
|
||||
case CANCELLED:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.REVOKED;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.CarePlan.CarePlanStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus convertCarePlanStatus(org.hl7.fhir.r4.model.CarePlan.CarePlanStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.DRAFT;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.COMPLETED;
|
||||
case REVOKED:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.CANCELLED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Communication10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.Communication convertCommunication(org.hl7.fhir.dstu2.model.Communication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Communication tgt = new org.hl7.fhir.r4.model.Communication();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSender(VersionConvertor_10_40.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setStatus(convertCommunicationStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setSent(src.getSent());
|
||||
tgt.setReceived(src.getReceived());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication convertCommunication(org.hl7.fhir.r4.model.Communication src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Communication tgt = new org.hl7.fhir.dstu2.model.Communication();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep()));
|
||||
tgt.setSender(VersionConvertor_10_40.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationPayloadComponent(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setStatus(convertCommunicationStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setSent(src.getSent());
|
||||
tgt.setReceived(src.getReceived());
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_40.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent tgt = new org.hl7.fhir.r4.model.Communication.CommunicationPayloadComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_40.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.r4.model.Communication.CommunicationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.COMPLETED;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.SUSPENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.REJECTED;
|
||||
case NOTDONE:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.FAILED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Communication.CommunicationStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Communication.CommunicationStatus convertCommunicationStatus(org.hl7.fhir.dstu2.model.Communication.CommunicationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ONHOLD;
|
||||
case REJECTED:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.ENTEREDINERROR;
|
||||
case FAILED:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NOTDONE;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Communication.CommunicationStatus.NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class CommunicationRequest10_40 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.r4.model.CommunicationRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CommunicationRequest tgt = new org.hl7.fhir.dstu2.model.CommunicationRequest();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setCategory(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep()));
|
||||
tgt.setSender(VersionConvertor_10_40.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setRequester(VersionConvertor_10_40.convertReference(src.getRequester()));
|
||||
tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setScheduled(VersionConvertor_10_40.convertType(src.getOccurrence()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setRequestedOn(src.getAuthoredOn());
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setPriority(convertPriorityCode(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu2.model.CommunicationRequest src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CommunicationRequest tgt = new org.hl7.fhir.r4.model.CommunicationRequest();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getCategory()));
|
||||
tgt.setSender(VersionConvertor_10_40.convertReference(src.getSender()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient()) tgt.addRecipient(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload()) tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getMedium()) tgt.addMedium(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setRequester(VersionConvertor_10_40.convertReference(src.getRequester()));
|
||||
tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setOccurrence(VersionConvertor_10_40.convertType(src.getScheduled()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setAuthoredOn(src.getRequestedOn());
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setPriority(convertPriorityCode(src.getPriority()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_40.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt = new org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setContent(VersionConvertor_10_40.convertType(src.getContent()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PROPOSED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.DRAFT;
|
||||
case PLANNED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case REQUESTED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case RECEIVED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case ACCEPTED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case INPROGRESS:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ACTIVE;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED;
|
||||
case SUSPENDED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ONHOLD;
|
||||
case REJECTED:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus convertCommunicationRequestStatus(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case DRAFT:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.PROPOSED;
|
||||
case ACTIVE:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.INPROGRESS;
|
||||
case COMPLETED:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.COMPLETED;
|
||||
case ONHOLD:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.SUSPENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.REJECTED;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.CodeableConcept convertPriorityCode(org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority priority) {
|
||||
org.hl7.fhir.dstu2.model.CodeableConcept cc = new org.hl7.fhir.dstu2.model.CodeableConcept();
|
||||
switch(priority) {
|
||||
case ROUTINE:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("routine");
|
||||
break;
|
||||
case URGENT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("urgent");
|
||||
break;
|
||||
case STAT:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("stat");
|
||||
break;
|
||||
case ASAP:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/diagnostic-order-priority").setCode("asap");
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return cc;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority convertPriorityCode(org.hl7.fhir.dstu2.model.CodeableConcept priority) {
|
||||
for (org.hl7.fhir.dstu2.model.Coding c : priority.getCoding()) {
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "routine".equals(c.getCode()))
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ROUTINE;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "urgent".equals(c.getCode()))
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.URGENT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "stat".equals(c.getCode()))
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.STAT;
|
||||
if ("http://hl7.org/fhir/diagnostic-order-priority".equals(c.getSystem()) && "asap".equals(c.getCode()))
|
||||
return org.hl7.fhir.r4.model.CommunicationRequest.CommunicationPriority.ASAP;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,208 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Composition10_40 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition convertComposition(org.hl7.fhir.r4.model.Composition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition tgt = new org.hl7.fhir.dstu2.model.Composition();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
|
||||
if (src.hasCategory())
|
||||
tgt.setClass_(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep()));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setStatus(convertCompositionStatus(src.getStatus()));
|
||||
tgt.setConfidentiality(src.getConfidentiality().toCode());
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent t : src.getAttester()) tgt.addAttester(convertCompositionAttesterComponent(t));
|
||||
tgt.setCustodian(VersionConvertor_10_40.convertReference(src.getCustodian()));
|
||||
for (org.hl7.fhir.r4.model.Composition.CompositionEventComponent t : src.getEvent()) tgt.addEvent(convertCompositionEventComponent(t));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition convertComposition(org.hl7.fhir.dstu2.model.Composition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Composition tgt = new org.hl7.fhir.r4.model.Composition();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
|
||||
tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getClass_()));
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setStatus(convertCompositionStatus(src.getStatus()));
|
||||
try {
|
||||
tgt.setConfidentiality(org.hl7.fhir.r4.model.Composition.DocumentConfidentiality.fromCode(src.getConfidentiality()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(VersionConvertor_10_40.convertReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent t : src.getAttester()) tgt.addAttester(convertCompositionAttesterComponent(t));
|
||||
tgt.setCustodian(VersionConvertor_10_40.convertReference(src.getCustodian()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent t : src.getEvent()) tgt.addEvent(convertCompositionEventComponent(t));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSONAL:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PERSONAL;
|
||||
case PROFESSIONAL:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.PROFESSIONAL;
|
||||
case LEGAL:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.LEGAL;
|
||||
case OFFICIAL:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.OFFICIAL;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionAttestationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode convertCompositionAttestationMode(org.hl7.fhir.r4.model.Composition.CompositionAttestationMode src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PERSONAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.PERSONAL;
|
||||
case PROFESSIONAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.PROFESSIONAL;
|
||||
case LEGAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.LEGAL;
|
||||
case OFFICIAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.OFFICIAL;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionAttestationMode.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
if (src.hasMode())
|
||||
tgt.addMode(convertCompositionAttestationMode(src.getMode()));
|
||||
tgt.setTime(src.getTime());
|
||||
tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
if (src.hasMode())
|
||||
tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue()));
|
||||
tgt.setTime(src.getTime());
|
||||
tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.r4.model.Composition.CompositionEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Composition.CompositionEventComponent tgt = new org.hl7.fhir.r4.model.Composition.CompositionEventComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.dstu2.model.Composition.CompositionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionStatus.AMENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Composition.CompositionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.CompositionStatus convertCompositionStatus(org.hl7.fhir.r4.model.Composition.CompositionStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case PRELIMINARY:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.PRELIMINARY;
|
||||
case FINAL:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.FINAL;
|
||||
case AMENDED:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.AMENDED;
|
||||
case ENTEREDINERROR:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.ENTEREDINERROR;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Composition.CompositionStatus.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu2.model.Composition.SectionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
tgt.setText(VersionConvertor_10_40.convertNarrative(src.getText()));
|
||||
try {
|
||||
tgt.setMode(org.hl7.fhir.r4.model.Composition.SectionMode.fromCode(src.getMode()));
|
||||
} catch (org.hl7.fhir.exceptions.FHIRException e) {
|
||||
throw new FHIRException(e);
|
||||
}
|
||||
tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getEntry()) tgt.addEntry(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setEmptyReason(VersionConvertor_10_40.convertCodeableConcept(src.getEmptyReason()));
|
||||
for (org.hl7.fhir.dstu2.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.r4.model.Composition.SectionComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setTitle(src.getTitle());
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
tgt.setText(VersionConvertor_10_40.convertNarrative(src.getText()));
|
||||
tgt.setMode(src.getMode().toCode());
|
||||
tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getEntry()) tgt.addEntry(VersionConvertor_10_40.convertReference(t));
|
||||
tgt.setEmptyReason(VersionConvertor_10_40.convertCodeableConcept(src.getEmptyReason()));
|
||||
for (org.hl7.fhir.r4.model.Composition.SectionComponent t : src.getSection()) tgt.addSection(convertSectionComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r4.model.CanonicalType;
|
||||
import org.hl7.fhir.r4.model.ConceptMap;
|
||||
import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ConceptMap10_40 {
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap convertConceptMap(org.hl7.fhir.dstu2.model.ConceptMap src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
|
||||
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
else
|
||||
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t));
|
||||
tgt.setPurpose(src.getRequirements());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
org.hl7.fhir.r4.model.Type r = VersionConvertor_10_40.convertType(src.getSource());
|
||||
tgt.setSource(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r);
|
||||
r = VersionConvertor_10_40.convertType(src.getTarget());
|
||||
tgt.setTarget(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r);
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent t : src.getElement()) {
|
||||
List<VersionConvertor_10_40.SourceElementComponentWrapper> ws = convertSourceElementComponent(t);
|
||||
for (VersionConvertor_10_40.SourceElementComponentWrapper w : ws) getGroup(tgt, w.source, w.target).addElement(w.comp);
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap convertConceptMap(org.hl7.fhir.r4.model.ConceptMap src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
tgt.setUrl(src.getUrl());
|
||||
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
|
||||
tgt.setVersion(src.getVersion());
|
||||
tgt.setName(src.getName());
|
||||
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
|
||||
if (src.hasExperimental())
|
||||
tgt.setExperimental(src.getExperimental());
|
||||
tgt.setPublisher(src.getPublisher());
|
||||
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
|
||||
if (src.hasDate())
|
||||
tgt.setDate(src.getDate());
|
||||
tgt.setDescription(src.getDescription());
|
||||
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
|
||||
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
tgt.setRequirements(src.getPurpose());
|
||||
tgt.setCopyright(src.getCopyright());
|
||||
tgt.setSource(VersionConvertor_10_40.convertType(src.getSource()));
|
||||
tgt.setTarget(VersionConvertor_10_40.convertType(src.getTarget()));
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : g.getElement()) tgt.addElement(convertSourceElementComponent(t, g));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent convertConceptMapContactComponent(org.hl7.fhir.r4.model.ContactDetail src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ContactDetail convertConceptMapContactComponent(org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setName(src.getName());
|
||||
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUAL;
|
||||
case WIDER:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.WIDER;
|
||||
case SUBSUMES:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
|
||||
case NARROWER:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NARROWER;
|
||||
case SPECIALIZES:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
|
||||
case INEXACT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.INEXACT;
|
||||
case UNMATCHED:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
|
||||
case DISJOINT:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.DISJOINT;
|
||||
default:
|
||||
return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
switch(src) {
|
||||
case EQUIVALENT:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
|
||||
case EQUAL:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL;
|
||||
case WIDER:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER;
|
||||
case SUBSUMES:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
|
||||
case NARROWER:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER;
|
||||
case SPECIALIZES:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
|
||||
case INEXACT:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT;
|
||||
case UNMATCHED:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
|
||||
case DISJOINT:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT;
|
||||
default:
|
||||
return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setProperty(src.getElement());
|
||||
tgt.setSystem(src.getCodeSystem());
|
||||
tgt.setValue(src.getCode());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setElement(src.getProperty());
|
||||
tgt.setCodeSystem(src.getSystem());
|
||||
tgt.setCode(src.getValue());
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static List<VersionConvertor_10_40.SourceElementComponentWrapper> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
List<VersionConvertor_10_40.SourceElementComponentWrapper> res = new ArrayList<VersionConvertor_10_40.SourceElementComponentWrapper>();
|
||||
if (src == null || src.isEmpty())
|
||||
return res;
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) {
|
||||
org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
res.add(new VersionConvertor_10_40.SourceElementComponentWrapper(tgt, src.getCodeSystem(), t.getCodeSystem()));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCodeSystem(g.getSource());
|
||||
tgt.setCode(src.getCode());
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCodeSystem(g.getTarget());
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
|
||||
tgt.setComments(src.getComment());
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) tgt.addProduct(convertOtherElementComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setCode(src.getCode());
|
||||
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
|
||||
tgt.setComment(src.getComments());
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getProduct()) tgt.addProduct(convertOtherElementComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) {
|
||||
for (ConceptMapGroupComponent grp : map.getGroup()) {
|
||||
if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts))
|
||||
return grp;
|
||||
}
|
||||
ConceptMapGroupComponent grp = map.addGroup();
|
||||
grp.setSource(srcs);
|
||||
grp.setTarget(tgts);
|
||||
return grp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
package org.hl7.fhir.convertors.conv10_40;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertor_10_40;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Condition10_40 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition convertCondition(org.hl7.fhir.r4.model.Condition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition tgt = new org.hl7.fhir.dstu2.model.Condition();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setPatient(VersionConvertor_10_40.convertReference(src.getSubject()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter()));
|
||||
if (src.hasRecordedDate())
|
||||
tgt.setDateRecorded(src.getRecordedDate());
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.setCategory(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
if (src.hasClinicalStatus())
|
||||
tgt.setClinicalStatus(convertConditionClinicalStatus(src.getClinicalStatus()));
|
||||
tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
|
||||
tgt.setSeverity(VersionConvertor_10_40.convertCodeableConcept(src.getSeverity()));
|
||||
tgt.setOnset(VersionConvertor_10_40.convertType(src.getOnset()));
|
||||
tgt.setAbatement(VersionConvertor_10_40.convertType(src.getAbatement()));
|
||||
tgt.setStage(convertConditionStageComponent(src.getStageFirstRep()));
|
||||
for (org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertConditionEvidenceComponent(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Condition convertCondition(org.hl7.fhir.dstu2.model.Condition src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Condition tgt = new org.hl7.fhir.r4.model.Condition();
|
||||
VersionConvertor_10_40.copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
|
||||
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getPatient()));
|
||||
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
|
||||
tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter()));
|
||||
if (src.hasDateRecorded())
|
||||
tgt.setRecordedDate(src.getDateRecorded());
|
||||
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getCategory()));
|
||||
if (src.hasClinicalStatus())
|
||||
tgt.setClinicalStatus(convertConditionClinicalStatus(src.getClinicalStatus()));
|
||||
tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
|
||||
tgt.setSeverity(VersionConvertor_10_40.convertCodeableConcept(src.getSeverity()));
|
||||
tgt.setOnset(VersionConvertor_10_40.convertType(src.getOnset()));
|
||||
tgt.setAbatement(VersionConvertor_10_40.convertType(src.getAbatement()));
|
||||
tgt.addStage(convertConditionStageComponent(src.getStage()));
|
||||
for (org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertConditionEvidenceComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(VersionConvertor_10_40.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.CodeableConcept convertConditionClinicalStatus(String src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CodeableConcept cc = new org.hl7.fhir.r4.model.CodeableConcept();
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-clinical").setCode(src);
|
||||
return cc;
|
||||
}
|
||||
|
||||
static public String convertConditionClinicalStatus(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
for (org.hl7.fhir.r4.model.Coding c : src.getCoding()) {
|
||||
if ("http://hl7.org/fhir/condition-clinical".equals(c.getSystem()))
|
||||
return c.getCode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.addCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept cc : src.getCode()) tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(cc));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) tgt.addDetail(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.r4.model.Condition.ConditionStageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setSummary(VersionConvertor_10_40.convertCodeableConcept(src.getSummary()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getAssessment()) tgt.addAssessment(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Condition.ConditionStageComponent convertConditionStageComponent(org.hl7.fhir.dstu2.model.Condition.ConditionStageComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Condition.ConditionStageComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionStageComponent();
|
||||
VersionConvertor_10_40.copyElement(src, tgt);
|
||||
tgt.setSummary(VersionConvertor_10_40.convertCodeableConcept(src.getSummary()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getAssessment()) tgt.addAssessment(VersionConvertor_10_40.convertReference(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.CodeableConcept convertConditionVerificationStatus(org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CodeableConcept cc = new org.hl7.fhir.r4.model.CodeableConcept();
|
||||
switch(src) {
|
||||
case PROVISIONAL:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-ver-status").setCode("provisional");
|
||||
return cc;
|
||||
case DIFFERENTIAL:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-ver-status").setCode("differential");
|
||||
return cc;
|
||||
case CONFIRMED:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-ver-status").setCode("confirmed");
|
||||
return cc;
|
||||
case REFUTED:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-ver-status").setCode("refuted");
|
||||
return cc;
|
||||
case ENTEREDINERROR:
|
||||
cc.addCoding().setSystem("http://hl7.org/fhir/condition-ver-status").setCode("entered-in-error");
|
||||
return cc;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus convertConditionVerificationStatus(org.hl7.fhir.r4.model.CodeableConcept src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
if (src.hasCoding("http://hl7.org/fhir/condition-clinical", "provisional"))
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.PROVISIONAL;
|
||||
if (src.hasCoding("http://hl7.org/fhir/condition-clinical", "differential"))
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.DIFFERENTIAL;
|
||||
if (src.hasCoding("http://hl7.org/fhir/condition-clinical", "confirmed"))
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.CONFIRMED;
|
||||
if (src.hasCoding("http://hl7.org/fhir/condition-clinical", "refuted"))
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.REFUTED;
|
||||
if (src.hasCoding("http://hl7.org/fhir/condition-clinical", "entered-in-error"))
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.ENTEREDINERROR;
|
||||
return org.hl7.fhir.dstu2.model.Condition.ConditionVerificationStatus.NULL;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue