This commit is contained in:
Chris Schuler 2019-10-22 15:15:22 -06:00
commit e0622d191b
1632 changed files with 774471 additions and 768800 deletions

2
.gitignore vendored
View File

@ -298,3 +298,5 @@ local.properties
/org.hl7.fhir.r5/src/test/resources/snapshot-generation/au2-actual.xml
/org.hl7.fhir.r5/src/test/resources/snapshot-generation/au3-actual.xml
/org.hl7.fhir.r5/src/test/resources/snapshot-generation/t29b-input.xml
/org.hl7.fhir.r5/src/test/resources/snapshot-generation/logical1-actual.xml
/org.hl7.fhir.r5/src/test/resources/snapshot-generation/logical2-actual.xml

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -2006,25 +2006,37 @@ public class VersionConvertor_10_40 {
throw new FHIRException("Unknown type "+src.fhirType());
}
public void copyDomainResource(org.hl7.fhir.dstu2.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException {
private static boolean isExemptExtension(String url, String[] extensionsToIgnore) {
boolean ok = false;
for (String s : extensionsToIgnore)
if (s.equals(url))
ok = true;
return ok;
}
public void copyDomainResource(org.hl7.fhir.dstu2.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.dstu2.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.dstu2.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.dstu2.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu2.model.DomainResource tgt) throws FHIRException {
public void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu2.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.r4.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.r4.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.dstu2.model.Parameters src) throws FHIRException {
@ -4215,7 +4227,9 @@ public class VersionConvertor_10_40 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(
new org.hl7.fhir.r4.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu2.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
// for (org.hl7.fhir.dstu2.model.Reference t : src.getProfile())
@ -4233,7 +4247,7 @@ public class VersionConvertor_10_40 {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();
copyDomainResource(src, tgt);
copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
tgt.setUrl(src.getUrl());
tgt.setVersion(src.getVersion());
tgt.setName(src.getName());
@ -4254,7 +4268,9 @@ public class VersionConvertor_10_40 {
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
if (src.hasFhirVersion())
tgt.setFhirVersion(src.getFhirVersion().toCode());
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasExtension("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"))
tgt.setAcceptUnknown(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.fromCode(
src.getExtensionByUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").getValue().primitiveValue()));
for (org.hl7.fhir.r4.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (CapabilityStatementRestComponent r : src.getRest())

View File

@ -2006,25 +2006,37 @@ public class VersionConvertor_10_50 {
throw new FHIRException("Unknown type "+src.fhirType());
}
public void copyDomainResource(org.hl7.fhir.dstu2.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt) throws FHIRException {
private static boolean isExemptExtension(String url, String[] extensionsToIgnore) {
boolean ok = false;
for (String s : extensionsToIgnore)
if (s.equals(url))
ok = true;
return ok;
}
public void copyDomainResource(org.hl7.fhir.dstu2.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.dstu2.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.dstu2.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.dstu2.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.dstu2.model.DomainResource tgt) throws FHIRException {
public void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.dstu2.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.r5.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.r5.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.r5.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public org.hl7.fhir.r5.model.Parameters convertParameters(org.hl7.fhir.dstu2.model.Parameters src) throws FHIRException {
@ -2961,7 +2973,7 @@ public class VersionConvertor_10_50 {
tgt.addCategory(convertCodeableConcept(t));
tgt.setDescription(src.getDescription());
for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses())
tgt.addAddresses(convertReference(t));
tgt.addAddressesReference(convertReference(t));
// for (org.hl7.fhir.dstu2.model.Reference t : src.getSupport())
// tgt.addSupport(convertReference(t));
// for (org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent t : src.getRelatedPlan())
@ -2995,7 +3007,7 @@ public class VersionConvertor_10_50 {
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory())
tgt.addCategory(convertCodeableConcept(t));
tgt.setDescription(src.getDescription());
for (org.hl7.fhir.r5.model.Reference t : src.getAddresses())
for (org.hl7.fhir.r5.model.Reference t : src.getAddressesReference())
tgt.addAddresses(convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getSupport())
// tgt.addSupport(convertReference(t));
@ -3437,7 +3449,7 @@ public class VersionConvertor_10_50 {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
tgt.addCategory(convertCodeableConcept(src.getCategory()));
tgt.setSender(convertReference(src.getSender()));
tgt.addInformationProvider(convertReference(src.getSender()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getRecipient())
tgt.addRecipient(convertReference(t));
for (org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload())
@ -3478,7 +3490,7 @@ public class VersionConvertor_10_50 {
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep()));
tgt.setSender(convertReference(src.getSender()));
tgt.setSender(convertReference(src.getInformationProviderFirstRep()));
for (org.hl7.fhir.r5.model.Reference t : src.getRecipient())
tgt.addRecipient(convertReference(t));
for (org.hl7.fhir.r5.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload())
@ -4219,7 +4231,9 @@ public class VersionConvertor_10_50 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(
new org.hl7.fhir.r5.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu2.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
// for (org.hl7.fhir.dstu2.model.Reference t : src.getProfile())
@ -4237,7 +4251,7 @@ public class VersionConvertor_10_50 {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();
copyDomainResource(src, tgt);
copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
tgt.setUrl(src.getUrl());
tgt.setVersion(src.getVersion());
tgt.setName(src.getName());
@ -4258,7 +4272,9 @@ public class VersionConvertor_10_50 {
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
if (src.hasFhirVersion())
tgt.setFhirVersion(src.getFhirVersion().toCode());
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasExtension("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"))
tgt.setAcceptUnknown(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.fromCode(
src.getExtensionByUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").getValue().primitiveValue()));
for (org.hl7.fhir.r5.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (CapabilityStatementRestComponent r : src.getRest())
@ -6296,10 +6312,10 @@ public class VersionConvertor_10_50 {
return null;
switch (src) {
case PLANNED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED;
case ARRIVED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.ARRIVED;
case ARRIVED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case INPROGRESS: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case ONLEAVE: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.ONLEAVE;
case FINISHED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.FINISHED;
case ONLEAVE: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case FINISHED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED;
case CANCELLED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED;
default: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL;
}
@ -6310,10 +6326,8 @@ public class VersionConvertor_10_50 {
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 COMPLETED: 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;
}
@ -7807,7 +7821,7 @@ public class VersionConvertor_10_50 {
org.hl7.fhir.r5.model.MedicationDispense tgt = new org.hl7.fhir.r5.model.MedicationDispense();
copyDomainResource(src, tgt);
tgt.addIdentifier(convertIdentifier(src.getIdentifier()));
tgt.setStatus(convertMedicationDispenseStatus(src.getStatus()));
tgt.setStatusElement(convertMedicationDispenseStatus(src.getStatusElement()));
tgt.setMedication(convertType(src.getMedication()));
tgt.setSubject(convertReference(src.getPatient()));
// tgt.setDispenser(convertReference(src.getDispenser()));
@ -7835,7 +7849,7 @@ public class VersionConvertor_10_50 {
org.hl7.fhir.dstu2.model.MedicationDispense tgt = new org.hl7.fhir.dstu2.model.MedicationDispense();
copyDomainResource(src, tgt);
tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep()));
tgt.setStatus(convertMedicationDispenseStatus(src.getStatus()));
tgt.setStatusElement(convertMedicationDispenseStatus(src.getStatusElement()));
tgt.setMedication(convertType(src.getMedication()));
tgt.setPatient(convertReference(src.getSubject()));
// tgt.setDispenser(convertReference(src.getDispenser()));
@ -7857,16 +7871,36 @@ public class VersionConvertor_10_50 {
return tgt;
}
public String convertMedicationDispenseStatus(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus src) throws FHIRException {
public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> convertMedicationDispenseStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus> src) throws FHIRException {
if (src == null)
return null;
return src.toCode();
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus>();
copyElement(src, tgt);
switch (src.getValue()) {
case COMPLETED: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.COMPLETED); break;
case ENTEREDINERROR: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR); break;
case INPROGRESS: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS); break;
case NULL: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.NULL); break;
case ONHOLD: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.ONHOLD); break;
case STOPPED: tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus.STOPPED); break;
}
return tgt;
}
public org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus convertMedicationDispenseStatus(String src) throws FHIRException {
public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus> convertMedicationDispenseStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> src) throws FHIRException {
if (src == null)
return null;
return org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.fromCode(src);
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus>(new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatusEnumFactory());
copyElement(src, tgt);
switch (src.getValue()) {
case COMPLETED: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.COMPLETED); break;
case ENTEREDINERROR: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.ENTEREDINERROR); break;
case INPROGRESS: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.INPROGRESS); break;
case NULL: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.NULL); break;
case ONHOLD: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.ONHOLD); break;
case STOPPED: tgt.setValue(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus.STOPPED); break;
}
return tgt;
}
public org.hl7.fhir.r5.model.Dosage convertMedicationDispenseDosageInstructionComponent(org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent src) throws FHIRException {
@ -7922,7 +7956,7 @@ public class VersionConvertor_10_50 {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason())
tgt.addReason(convertCodeableConcept(t));
for (org.hl7.fhir.dstu2.model.Reference t : src.getResponsibleParty())
tgt.addResponsibleParty(convertReference(t));
tgt.setResponsibleParty(convertReference(t));
return tgt;
}
@ -7934,8 +7968,8 @@ public class VersionConvertor_10_50 {
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReason())
tgt.addReason(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResponsibleParty())
tgt.addResponsibleParty(convertReference(t));
if (src.hasResponsibleParty())
tgt.addResponsibleParty(convertReference(src.getResponsibleParty()));
return tgt;
}
@ -8117,10 +8151,10 @@ public class VersionConvertor_10_50 {
// return tgt;
// }
public org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException {
public org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement();
org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage();
copyDomainResource(src, tgt);
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
@ -8144,7 +8178,7 @@ public class VersionConvertor_10_50 {
return tgt;
}
public org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException {
public org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.MedicationStatement tgt = new org.hl7.fhir.dstu2.model.MedicationStatement();
@ -8171,19 +8205,19 @@ public class VersionConvertor_10_50 {
return tgt;
}
public org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
public org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case ACTIVE: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.ACTIVE;
case COMPLETED: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR;
case INTENDED: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.INTENDED;
default: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.NULL;
case ACTIVE: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.ACTIVE;
case COMPLETED: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.ENTEREDINERROR;
case INTENDED: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.INTENDED;
default: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.NULL;
}
}
public org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
public org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
@ -10513,112 +10547,112 @@ public class VersionConvertor_10_50 {
return tgt;
}
public org.hl7.fhir.r5.model.Subscription convertSubscription(org.hl7.fhir.dstu2.model.Subscription src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Subscription tgt = new org.hl7.fhir.r5.model.Subscription();
copyDomainResource(src, tgt);
tgt.setCriteria(src.getCriteria());
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact())
tgt.addContact(convertContactPoint(t));
tgt.setReason(src.getReason());
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
tgt.setError(src.getError());
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
tgt.setEnd(src.getEnd());
return tgt;
}
public org.hl7.fhir.dstu2.model.Subscription convertSubscription(org.hl7.fhir.r5.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();
copyDomainResource(src, tgt);
tgt.setCriteria(src.getCriteria());
for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact())
tgt.addContact(convertContactPoint(t));
tgt.setReason(src.getReason());
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
tgt.setError(src.getError());
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
tgt.setEnd(src.getEnd());
return tgt;
}
public org.hl7.fhir.r5.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.r5.model.Subscription.SubscriptionStatus.REQUESTED;
case ACTIVE: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ACTIVE;
case ERROR: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ERROR;
case OFF: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.OFF;
default: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.NULL;
}
}
public org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r5.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;
}
}
public org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent();
copyElement(src, tgt);
tgt.setType(convertSubscriptionChannelType(src.getType()));
tgt.setEndpoint(src.getEndpoint());
tgt.setPayload(src.getPayload());
tgt.addHeader(src.getHeader());
return tgt;
}
public org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r5.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();
copyElement(src, tgt);
tgt.setType(convertSubscriptionChannelType(src.getType()));
tgt.setEndpoint(src.getEndpoint());
tgt.setPayload(src.getPayload());
if (src.hasHeader())
tgt.setHeaderElement(convertString(src.getHeader().get(0)));
return tgt;
}
public org.hl7.fhir.r5.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.r5.model.Subscription.SubscriptionChannelType.RESTHOOK;
case WEBSOCKET: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.WEBSOCKET;
case EMAIL: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.EMAIL;
case SMS: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.SMS;
case MESSAGE: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.MESSAGE;
default: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.NULL;
}
}
public org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r5.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 org.hl7.fhir.r5.model.Subscription convertSubscription(org.hl7.fhir.dstu2.model.Subscription src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.Subscription tgt = new org.hl7.fhir.r5.model.Subscription();
// copyDomainResource(src, tgt);
// tgt.setCriteria(src.getCriteria());
// for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact())
// tgt.addContact(convertContactPoint(t));
// tgt.setReason(src.getReason());
// tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
// tgt.setError(src.getError());
// tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
// tgt.setEnd(src.getEnd());
// return tgt;
// }
//
// public org.hl7.fhir.dstu2.model.Subscription convertSubscription(org.hl7.fhir.r5.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();
// copyDomainResource(src, tgt);
// tgt.setCriteria(src.getCriteria());
// for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact())
// tgt.addContact(convertContactPoint(t));
// tgt.setReason(src.getReason());
// tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
// tgt.setError(src.getError());
// tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
// tgt.setEnd(src.getEnd());
// return tgt;
// }
//
// public org.hl7.fhir.r5.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.r5.model.Subscription.SubscriptionStatus.REQUESTED;
// case ACTIVE: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ACTIVE;
// case ERROR: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ERROR;
// case OFF: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.OFF;
// default: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.NULL;
// }
// }
//
// public org.hl7.fhir.dstu2.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r5.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;
// }
// }
//
// public org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent();
// copyElement(src, tgt);
// tgt.setType(convertSubscriptionChannelType(src.getType()));
// tgt.setEndpoint(src.getEndpoint());
// tgt.setPayload(src.getPayload());
// tgt.addHeader(src.getHeader());
// return tgt;
// }
//
// public org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r5.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();
// copyElement(src, tgt);
// tgt.setType(convertSubscriptionChannelType(src.getType()));
// tgt.setEndpoint(src.getEndpoint());
// tgt.setPayload(src.getPayload());
// if (src.hasHeader())
// tgt.setHeaderElement(convertString(src.getHeader().get(0)));
// return tgt;
// }
//
// public org.hl7.fhir.r5.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.r5.model.Subscription.SubscriptionChannelType.RESTHOOK;
// case WEBSOCKET: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.WEBSOCKET;
// case EMAIL: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.EMAIL;
// case SMS: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.SMS;
// case MESSAGE: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.MESSAGE;
// default: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.NULL;
// }
// }
//
// public org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r5.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 org.hl7.fhir.r5.model.Substance convertSubstance(org.hl7.fhir.dstu2.model.Substance src) throws FHIRException {
if (src == null || src.isEmpty())
@ -12098,8 +12132,8 @@ public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent c
return convertSlot((org.hl7.fhir.dstu2.model.Slot) src);
if (src instanceof org.hl7.fhir.dstu2.model.StructureDefinition)
return convertStructureDefinition((org.hl7.fhir.dstu2.model.StructureDefinition) src);
if (src instanceof org.hl7.fhir.dstu2.model.Subscription)
return convertSubscription((org.hl7.fhir.dstu2.model.Subscription) src);
// if (src instanceof org.hl7.fhir.dstu2.model.Subscription)
// return convertSubscription((org.hl7.fhir.dstu2.model.Subscription) src);
if (src instanceof org.hl7.fhir.dstu2.model.Substance)
return convertSubstance((org.hl7.fhir.dstu2.model.Substance) src);
if (src instanceof org.hl7.fhir.dstu2.model.SupplyDelivery)
@ -12194,8 +12228,8 @@ public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent c
return convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src);
// if (src instanceof org.hl7.fhir.r5.model.MedicationOrder)
// return convertMedicationOrder((org.hl7.fhir.r5.model.MedicationOrder) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationStatement)
return convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationUsage)
return convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src);
if (src instanceof org.hl7.fhir.r5.model.MessageHeader)
return convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src);
if (src instanceof org.hl7.fhir.r5.model.NamingSystem)
@ -12230,8 +12264,8 @@ public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent c
return convertSlot((org.hl7.fhir.r5.model.Slot) src);
if (src instanceof org.hl7.fhir.r5.model.StructureDefinition)
return convertStructureDefinition((org.hl7.fhir.r5.model.StructureDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.Subscription)
return convertSubscription((org.hl7.fhir.r5.model.Subscription) src);
// if (src instanceof org.hl7.fhir.r5.model.Subscription)
// return convertSubscription((org.hl7.fhir.r5.model.Subscription) src);
if (src instanceof org.hl7.fhir.r5.model.Substance)
return convertSubstance((org.hl7.fhir.r5.model.Substance) src);
if (src instanceof org.hl7.fhir.r5.model.SupplyDelivery)

View File

@ -2258,26 +2258,38 @@ public class VersionConvertor_14_40 {
throw new FHIRException("Unknown type "+src.fhirType());
}
private static void copyDomainResource(org.hl7.fhir.dstu2016may.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException {
private static boolean isExemptExtension(String url, String[] extensionsToIgnore) {
boolean ok = false;
for (String s : extensionsToIgnore)
if (s.equals(url))
ok = true;
return ok;
}
private static void copyDomainResource(org.hl7.fhir.dstu2016may.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.dstu2016may.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.dstu2016may.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.dstu2016may.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu2016may.model.DomainResource tgt) throws FHIRException {
private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu2016may.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
if (src.hasText())
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.r4.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.r4.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.r4.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public static org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.dstu2016may.model.Parameters src) throws FHIRException {
if (src == null || src.isEmpty())
@ -3402,7 +3414,9 @@ public class VersionConvertor_14_40 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(
new org.hl7.fhir.r4.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
// for (org.hl7.fhir.dstu2016may.model.Reference t : src.getProfile())
@ -3432,7 +3446,7 @@ public class VersionConvertor_14_40 {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance();
copyDomainResource(src, tgt);
copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
if (src.hasUrl())
tgt.setUrl(src.getUrl());
if (src.hasVersion())
@ -3463,7 +3477,9 @@ public class VersionConvertor_14_40 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(src.getFhirVersion().toCode());
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasExtension("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"))
tgt.setAcceptUnknown(org.hl7.fhir.dstu2016may.model.Conformance.UnknownContentCode.fromCode(
src.getExtensionByUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").getValue().primitiveValue()));
for (org.hl7.fhir.r4.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (CapabilityStatementRestComponent r : src.getRest())

View File

@ -2256,26 +2256,38 @@ public class VersionConvertor_14_50 {
throw new FHIRException("Unknown type "+src.fhirType());
}
private static void copyDomainResource(org.hl7.fhir.dstu2016may.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt) throws FHIRException {
private static boolean isExemptExtension(String url, String[] extensionsToIgnore) {
boolean ok = false;
for (String s : extensionsToIgnore)
if (s.equals(url))
ok = true;
return ok;
}
private static void copyDomainResource(org.hl7.fhir.dstu2016may.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.dstu2016may.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.dstu2016may.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.dstu2016may.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
private static void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.dstu2016may.model.DomainResource tgt) throws FHIRException {
private static void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.dstu2016may.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
if (src.hasText())
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.r5.model.Resource t : src.getContained())
tgt.addContained(convertResource(t));
for (org.hl7.fhir.r5.model.Extension t : src.getExtension())
tgt.addExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t));
for (org.hl7.fhir.r5.model.Extension t : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t));
if (!isExemptExtension(t.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t));
}
public static org.hl7.fhir.r5.model.Parameters convertParameters(org.hl7.fhir.dstu2016may.model.Parameters src) throws FHIRException {
if (src == null || src.isEmpty())
@ -3404,7 +3416,9 @@ public class VersionConvertor_14_50 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(
new org.hl7.fhir.r5.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
// for (org.hl7.fhir.dstu2016may.model.Reference t : src.getProfile())
@ -3434,7 +3448,7 @@ public class VersionConvertor_14_50 {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance();
copyDomainResource(src, tgt);
copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
if (src.hasUrl())
tgt.setUrl(src.getUrl());
if (src.hasVersion())
@ -3465,7 +3479,9 @@ public class VersionConvertor_14_50 {
tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
tgt.setFhirVersion(src.getFhirVersion().toCode());
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasExtension("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"))
tgt.setAcceptUnknown(org.hl7.fhir.dstu2016may.model.Conformance.UnknownContentCode.fromCode(
src.getExtensionByUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").getValue().primitiveValue()));
for (org.hl7.fhir.r5.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (CapabilityStatementRestComponent r : src.getRest())

View File

@ -2949,27 +2949,39 @@ public class VersionConvertor_30_40 {
throw new FHIRException("Unknown type "+src.fhirType());
}
private static void copyDomainResource(org.hl7.fhir.dstu3.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt) throws FHIRException {
private static boolean isExemptExtension(String url, String[] extensionsToIgnore) {
boolean ok = false;
for (String s : extensionsToIgnore)
if (s.equals(url))
ok = true;
return ok;
}
private static void copyDomainResource(org.hl7.fhir.dstu3.model.DomainResource src, org.hl7.fhir.r4.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
if (src.hasText())
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.dstu3.model.Resource t1 : src.getContained())
tgt.addContained(convertResource(t1, false));
for (org.hl7.fhir.dstu3.model.Extension t2 : src.getExtension())
tgt.addExtension(convertExtension(t2));
if (!isExemptExtension(t2.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t2));
for (org.hl7.fhir.dstu3.model.Extension t3 : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t3));
if (!isExemptExtension(t3.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t3));
}
private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu3.model.DomainResource tgt) throws FHIRException {
private static void copyDomainResource(org.hl7.fhir.r4.model.DomainResource src, org.hl7.fhir.dstu3.model.DomainResource tgt, String... extensionsToIgnore) throws FHIRException {
copyResource(src, tgt);
if (src.hasText())
tgt.setText(convertNarrative(src.getText()));
for (org.hl7.fhir.r4.model.Resource t1 : src.getContained())
tgt.addContained(convertResource(t1, false));
for (org.hl7.fhir.r4.model.Extension t2 : src.getExtension())
tgt.addExtension(convertExtension(t2));
if (!isExemptExtension(t2.getUrl(), extensionsToIgnore))
tgt.addExtension(convertExtension(t2));
for (org.hl7.fhir.r4.model.Extension t3 : src.getModifierExtension())
tgt.addModifierExtension(convertExtension(t3));
if (!isExemptExtension(t3.getUrl(), extensionsToIgnore))
tgt.addModifierExtension(convertExtension(t3));
}
public static org.hl7.fhir.r4.model.Parameters convertParameters(org.hl7.fhir.dstu3.model.Parameters src) throws FHIRException {
if (src == null)
@ -4680,8 +4692,9 @@ public class VersionConvertor_30_40 {
tgt.setImplementation(convertCapabilityStatementImplementationComponent(src.getImplementation()));
if (src.hasFhirVersion())
tgt.setFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
// if (src.hasAcceptUnknown())
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasAcceptUnknown())
tgt.addExtension().setUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").setValue(
new org.hl7.fhir.r4.model.CodeType(src.getAcceptUnknownElement().asStringValue()));
for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (org.hl7.fhir.dstu3.model.CodeType t : src.getPatchFormat())
@ -4704,7 +4717,7 @@ public class VersionConvertor_30_40 {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement();
copyDomainResource(src, tgt);
copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
if (src.hasUrl())
tgt.setUrl(src.getUrl());
if (src.hasVersion())
@ -4743,8 +4756,9 @@ public class VersionConvertor_30_40 {
tgt.setImplementation(convertCapabilityStatementImplementationComponent(src.getImplementation()));
if (src.hasFhirVersion())
tgt.setFhirVersion(src.getFhirVersion().toCode());
// if (src.hasAcceptUnknown())
// tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
if (src.hasExtension("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"))
tgt.setAcceptUnknown(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.fromCode(
src.getExtensionByUrl("http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown").getValue().primitiveValue()));
for (org.hl7.fhir.r4.model.CodeType t : src.getFormat())
tgt.addFormat(t.getValue());
for (org.hl7.fhir.r4.model.CodeType t : src.getPatchFormat())

View File

@ -3288,8 +3288,8 @@ public class VersionConvertor_40_50 {
return Account.convertAccount((org.hl7.fhir.r4.model.Account) src);
if (src instanceof org.hl7.fhir.r4.model.ActivityDefinition)
return ActivityDefinition.convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.AdverseEvent)
return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r4.model.AdverseEvent) src);
// if (src instanceof org.hl7.fhir.r4.model.AdverseEvent)
// return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r4.model.AdverseEvent) src);
if (src instanceof org.hl7.fhir.r4.model.AllergyIntolerance)
return AllergyIntolerance.convertAllergyIntolerance((org.hl7.fhir.r4.model.AllergyIntolerance) src);
if (src instanceof org.hl7.fhir.r4.model.Appointment)
@ -3314,8 +3314,8 @@ public class VersionConvertor_40_50 {
return CarePlan.convertCarePlan((org.hl7.fhir.r4.model.CarePlan) src);
if (src instanceof org.hl7.fhir.r4.model.CareTeam)
return CareTeam.convertCareTeam((org.hl7.fhir.r4.model.CareTeam) src);
if (src instanceof org.hl7.fhir.r4.model.CatalogEntry)
return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r4.model.CatalogEntry) src);
// if (src instanceof org.hl7.fhir.r4.model.CatalogEntry)
// return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r4.model.CatalogEntry) src);
if (src instanceof org.hl7.fhir.r4.model.ChargeItem)
return ChargeItem.convertChargeItem((org.hl7.fhir.r4.model.ChargeItem) src);
if (src instanceof org.hl7.fhir.r4.model.ChargeItemDefinition)
@ -3368,8 +3368,6 @@ public class VersionConvertor_40_50 {
return DocumentManifest.convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src);
if (src instanceof org.hl7.fhir.r4.model.DocumentReference)
return DocumentReference.convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src);
if (src instanceof org.hl7.fhir.r4.model.EffectEvidenceSynthesis)
return EffectEvidenceSynthesis.convertEffectEvidenceSynthesis((org.hl7.fhir.r4.model.EffectEvidenceSynthesis) src);
if (src instanceof org.hl7.fhir.r4.model.Encounter)
return Encounter.convertEncounter((org.hl7.fhir.r4.model.Encounter) src);
if (src instanceof org.hl7.fhir.r4.model.Endpoint)
@ -3382,10 +3380,6 @@ public class VersionConvertor_40_50 {
return EpisodeOfCare.convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare) src);
if (src instanceof org.hl7.fhir.r4.model.EventDefinition)
return EventDefinition.convertEventDefinition((org.hl7.fhir.r4.model.EventDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.Evidence)
return Evidence.convertEvidence((org.hl7.fhir.r4.model.Evidence) src);
if (src instanceof org.hl7.fhir.r4.model.EvidenceVariable)
return EvidenceVariable.convertEvidenceVariable((org.hl7.fhir.r4.model.EvidenceVariable) src);
if (src instanceof org.hl7.fhir.r4.model.ExampleScenario)
return ExampleScenario.convertExampleScenario((org.hl7.fhir.r4.model.ExampleScenario) src);
if (src instanceof org.hl7.fhir.r4.model.ExplanationOfBenefit)
@ -3444,26 +3438,6 @@ public class VersionConvertor_40_50 {
return MedicationRequest.convertMedicationRequest((org.hl7.fhir.r4.model.MedicationRequest) src);
if (src instanceof org.hl7.fhir.r4.model.MedicationStatement)
return MedicationStatement.convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProduct)
return MedicinalProduct.convertMedicinalProduct((org.hl7.fhir.r4.model.MedicinalProduct) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductAuthorization)
return MedicinalProductAuthorization.convertMedicinalProductAuthorization((org.hl7.fhir.r4.model.MedicinalProductAuthorization) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductContraindication)
return MedicinalProductContraindication.convertMedicinalProductContraindication((org.hl7.fhir.r4.model.MedicinalProductContraindication) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductIndication)
return MedicinalProductIndication.convertMedicinalProductIndication((org.hl7.fhir.r4.model.MedicinalProductIndication) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductIngredient)
return MedicinalProductIngredient.convertMedicinalProductIngredient((org.hl7.fhir.r4.model.MedicinalProductIngredient) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductInteraction)
return MedicinalProductInteraction.convertMedicinalProductInteraction((org.hl7.fhir.r4.model.MedicinalProductInteraction) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductManufactured)
return MedicinalProductManufactured.convertMedicinalProductManufactured((org.hl7.fhir.r4.model.MedicinalProductManufactured) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductPackaged)
return MedicinalProductPackaged.convertMedicinalProductPackaged((org.hl7.fhir.r4.model.MedicinalProductPackaged) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductPharmaceutical)
return MedicinalProductPharmaceutical.convertMedicinalProductPharmaceutical((org.hl7.fhir.r4.model.MedicinalProductPharmaceutical) src);
if (src instanceof org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect)
return MedicinalProductUndesirableEffect.convertMedicinalProductUndesirableEffect((org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect) src);
if (src instanceof org.hl7.fhir.r4.model.MessageDefinition)
return MessageDefinition.convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.MessageHeader)
@ -3512,18 +3486,12 @@ public class VersionConvertor_40_50 {
return RelatedPerson.convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson) src);
if (src instanceof org.hl7.fhir.r4.model.RequestGroup)
return RequestGroup.convertRequestGroup((org.hl7.fhir.r4.model.RequestGroup) src);
if (src instanceof org.hl7.fhir.r4.model.ResearchDefinition)
return ResearchDefinition.convertResearchDefinition((org.hl7.fhir.r4.model.ResearchDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.ResearchElementDefinition)
return ResearchElementDefinition.convertResearchElementDefinition((org.hl7.fhir.r4.model.ResearchElementDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.ResearchStudy)
return ResearchStudy.convertResearchStudy((org.hl7.fhir.r4.model.ResearchStudy) src);
if (src instanceof org.hl7.fhir.r4.model.ResearchSubject)
return ResearchSubject.convertResearchSubject((org.hl7.fhir.r4.model.ResearchSubject) src);
if (src instanceof org.hl7.fhir.r4.model.RiskAssessment)
return RiskAssessment.convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment) src);
if (src instanceof org.hl7.fhir.r4.model.RiskEvidenceSynthesis)
return RiskEvidenceSynthesis.convertRiskEvidenceSynthesis((org.hl7.fhir.r4.model.RiskEvidenceSynthesis) src);
if (src instanceof org.hl7.fhir.r4.model.Schedule)
return Schedule.convertSchedule((org.hl7.fhir.r4.model.Schedule) src);
if (src instanceof org.hl7.fhir.r4.model.SearchParameter)
@ -3540,8 +3508,8 @@ public class VersionConvertor_40_50 {
return StructureDefinition.convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.StructureMap)
return StructureMap.convertStructureMap((org.hl7.fhir.r4.model.StructureMap) src);
if (src instanceof org.hl7.fhir.r4.model.Subscription)
return Subscription.convertSubscription((org.hl7.fhir.r4.model.Subscription) src);
// if (src instanceof org.hl7.fhir.r4.model.Subscription)
// return Subscription.convertSubscription((org.hl7.fhir.r4.model.Subscription) src);
if (src instanceof org.hl7.fhir.r4.model.Substance)
return Substance.convertSubstance((org.hl7.fhir.r4.model.Substance) src);
if (src instanceof org.hl7.fhir.r4.model.SubstanceNucleicAcid)
@ -3554,8 +3522,6 @@ public class VersionConvertor_40_50 {
return SubstanceReferenceInformation.convertSubstanceReferenceInformation((org.hl7.fhir.r4.model.SubstanceReferenceInformation) src);
if (src instanceof org.hl7.fhir.r4.model.SubstanceSourceMaterial)
return SubstanceSourceMaterial.convertSubstanceSourceMaterial((org.hl7.fhir.r4.model.SubstanceSourceMaterial) src);
if (src instanceof org.hl7.fhir.r4.model.SubstanceSpecification)
return SubstanceSpecification.convertSubstanceSpecification((org.hl7.fhir.r4.model.SubstanceSpecification) src);
if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery)
return SupplyDelivery.convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery) src);
if (src instanceof org.hl7.fhir.r4.model.SupplyRequest)
@ -3586,8 +3552,8 @@ public class VersionConvertor_40_50 {
return Account.convertAccount((org.hl7.fhir.r5.model.Account) src);
if (src instanceof org.hl7.fhir.r5.model.ActivityDefinition)
return ActivityDefinition.convertActivityDefinition((org.hl7.fhir.r5.model.ActivityDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.AdverseEvent)
return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r5.model.AdverseEvent) src);
// if (src instanceof org.hl7.fhir.r5.model.AdverseEvent)
// return AdverseEvent.convertAdverseEvent((org.hl7.fhir.r5.model.AdverseEvent) src);
if (src instanceof org.hl7.fhir.r5.model.AllergyIntolerance)
return AllergyIntolerance.convertAllergyIntolerance((org.hl7.fhir.r5.model.AllergyIntolerance) src);
if (src instanceof org.hl7.fhir.r5.model.Appointment)
@ -3612,8 +3578,8 @@ public class VersionConvertor_40_50 {
return CarePlan.convertCarePlan((org.hl7.fhir.r5.model.CarePlan) src);
if (src instanceof org.hl7.fhir.r5.model.CareTeam)
return CareTeam.convertCareTeam((org.hl7.fhir.r5.model.CareTeam) src);
if (src instanceof org.hl7.fhir.r5.model.CatalogEntry)
return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r5.model.CatalogEntry) src);
// if (src instanceof org.hl7.fhir.r5.model.CatalogEntry)
// return CatalogEntry.convertCatalogEntry((org.hl7.fhir.r5.model.CatalogEntry) src);
if (src instanceof org.hl7.fhir.r5.model.ChargeItem)
return ChargeItem.convertChargeItem((org.hl7.fhir.r5.model.ChargeItem) src);
if (src instanceof org.hl7.fhir.r5.model.ChargeItemDefinition)
@ -3666,8 +3632,6 @@ public class VersionConvertor_40_50 {
return DocumentManifest.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src);
if (src instanceof org.hl7.fhir.r5.model.DocumentReference)
return DocumentReference.convertDocumentReference((org.hl7.fhir.r5.model.DocumentReference) src);
if (src instanceof org.hl7.fhir.r5.model.EffectEvidenceSynthesis)
return EffectEvidenceSynthesis.convertEffectEvidenceSynthesis((org.hl7.fhir.r5.model.EffectEvidenceSynthesis) src);
if (src instanceof org.hl7.fhir.r5.model.Encounter)
return Encounter.convertEncounter((org.hl7.fhir.r5.model.Encounter) src);
if (src instanceof org.hl7.fhir.r5.model.Endpoint)
@ -3680,10 +3644,6 @@ public class VersionConvertor_40_50 {
return EpisodeOfCare.convertEpisodeOfCare((org.hl7.fhir.r5.model.EpisodeOfCare) src);
if (src instanceof org.hl7.fhir.r5.model.EventDefinition)
return EventDefinition.convertEventDefinition((org.hl7.fhir.r5.model.EventDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.Evidence)
return Evidence.convertEvidence((org.hl7.fhir.r5.model.Evidence) src);
if (src instanceof org.hl7.fhir.r5.model.EvidenceVariable)
return EvidenceVariable.convertEvidenceVariable((org.hl7.fhir.r5.model.EvidenceVariable) src);
if (src instanceof org.hl7.fhir.r5.model.ExampleScenario)
return ExampleScenario.convertExampleScenario((org.hl7.fhir.r5.model.ExampleScenario) src);
if (src instanceof org.hl7.fhir.r5.model.ExplanationOfBenefit)
@ -3728,8 +3688,8 @@ public class VersionConvertor_40_50 {
return Measure.convertMeasure((org.hl7.fhir.r5.model.Measure) src);
if (src instanceof org.hl7.fhir.r5.model.MeasureReport)
return MeasureReport.convertMeasureReport((org.hl7.fhir.r5.model.MeasureReport) src);
if (src instanceof org.hl7.fhir.r5.model.Media)
return Media.convertMedia((org.hl7.fhir.r5.model.Media) src);
if (src instanceof org.hl7.fhir.r5.model.DocumentReference) // todo: will never get here (doesn't work anyway)
return Media.convertMedia((org.hl7.fhir.r5.model.DocumentReference) src);
if (src instanceof org.hl7.fhir.r5.model.Medication)
return Medication.convertMedication((org.hl7.fhir.r5.model.Medication) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationAdministration)
@ -3740,28 +3700,8 @@ public class VersionConvertor_40_50 {
return MedicationKnowledge.convertMedicationKnowledge((org.hl7.fhir.r5.model.MedicationKnowledge) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationRequest)
return MedicationRequest.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationStatement)
return MedicationStatement.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProduct)
return MedicinalProduct.convertMedicinalProduct((org.hl7.fhir.r5.model.MedicinalProduct) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductAuthorization)
return MedicinalProductAuthorization.convertMedicinalProductAuthorization((org.hl7.fhir.r5.model.MedicinalProductAuthorization) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductContraindication)
return MedicinalProductContraindication.convertMedicinalProductContraindication((org.hl7.fhir.r5.model.MedicinalProductContraindication) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductIndication)
return MedicinalProductIndication.convertMedicinalProductIndication((org.hl7.fhir.r5.model.MedicinalProductIndication) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductIngredient)
return MedicinalProductIngredient.convertMedicinalProductIngredient((org.hl7.fhir.r5.model.MedicinalProductIngredient) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductInteraction)
return MedicinalProductInteraction.convertMedicinalProductInteraction((org.hl7.fhir.r5.model.MedicinalProductInteraction) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductManufactured)
return MedicinalProductManufactured.convertMedicinalProductManufactured((org.hl7.fhir.r5.model.MedicinalProductManufactured) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductPackaged)
return MedicinalProductPackaged.convertMedicinalProductPackaged((org.hl7.fhir.r5.model.MedicinalProductPackaged) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductPharmaceutical)
return MedicinalProductPharmaceutical.convertMedicinalProductPharmaceutical((org.hl7.fhir.r5.model.MedicinalProductPharmaceutical) src);
if (src instanceof org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect)
return MedicinalProductUndesirableEffect.convertMedicinalProductUndesirableEffect((org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect) src);
if (src instanceof org.hl7.fhir.r5.model.MedicationUsage)
return MedicationStatement.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src);
if (src instanceof org.hl7.fhir.r5.model.MessageDefinition)
return MessageDefinition.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.MessageHeader)
@ -3810,18 +3750,12 @@ public class VersionConvertor_40_50 {
return RelatedPerson.convertRelatedPerson((org.hl7.fhir.r5.model.RelatedPerson) src);
if (src instanceof org.hl7.fhir.r5.model.RequestGroup)
return RequestGroup.convertRequestGroup((org.hl7.fhir.r5.model.RequestGroup) src);
if (src instanceof org.hl7.fhir.r5.model.ResearchDefinition)
return ResearchDefinition.convertResearchDefinition((org.hl7.fhir.r5.model.ResearchDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.ResearchElementDefinition)
return ResearchElementDefinition.convertResearchElementDefinition((org.hl7.fhir.r5.model.ResearchElementDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.ResearchStudy)
return ResearchStudy.convertResearchStudy((org.hl7.fhir.r5.model.ResearchStudy) src);
if (src instanceof org.hl7.fhir.r5.model.ResearchSubject)
return ResearchSubject.convertResearchSubject((org.hl7.fhir.r5.model.ResearchSubject) src);
if (src instanceof org.hl7.fhir.r5.model.RiskAssessment)
return RiskAssessment.convertRiskAssessment((org.hl7.fhir.r5.model.RiskAssessment) src);
if (src instanceof org.hl7.fhir.r5.model.RiskEvidenceSynthesis)
return RiskEvidenceSynthesis.convertRiskEvidenceSynthesis((org.hl7.fhir.r5.model.RiskEvidenceSynthesis) src);
if (src instanceof org.hl7.fhir.r5.model.Schedule)
return Schedule.convertSchedule((org.hl7.fhir.r5.model.Schedule) src);
if (src instanceof org.hl7.fhir.r5.model.SearchParameter)
@ -3838,8 +3772,8 @@ public class VersionConvertor_40_50 {
return StructureDefinition.convertStructureDefinition((org.hl7.fhir.r5.model.StructureDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.StructureMap)
return StructureMap.convertStructureMap((org.hl7.fhir.r5.model.StructureMap) src);
if (src instanceof org.hl7.fhir.r5.model.Subscription)
return Subscription.convertSubscription((org.hl7.fhir.r5.model.Subscription) src);
// if (src instanceof org.hl7.fhir.r5.model.Subscription)
// return Subscription.convertSubscription((org.hl7.fhir.r5.model.Subscription) src);
if (src instanceof org.hl7.fhir.r5.model.Substance)
return Substance.convertSubstance((org.hl7.fhir.r5.model.Substance) src);
if (src instanceof org.hl7.fhir.r5.model.SubstanceNucleicAcid)
@ -3852,8 +3786,6 @@ public class VersionConvertor_40_50 {
return SubstanceReferenceInformation.convertSubstanceReferenceInformation((org.hl7.fhir.r5.model.SubstanceReferenceInformation) src);
if (src instanceof org.hl7.fhir.r5.model.SubstanceSourceMaterial)
return SubstanceSourceMaterial.convertSubstanceSourceMaterial((org.hl7.fhir.r5.model.SubstanceSourceMaterial) src);
if (src instanceof org.hl7.fhir.r5.model.SubstanceSpecification)
return SubstanceSpecification.convertSubstanceSpecification((org.hl7.fhir.r5.model.SubstanceSpecification) src);
if (src instanceof org.hl7.fhir.r5.model.SupplyDelivery)
return SupplyDelivery.convertSupplyDelivery((org.hl7.fhir.r5.model.SupplyDelivery) src);
if (src instanceof org.hl7.fhir.r5.model.SupplyRequest)

View File

@ -1,236 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class AdverseEvent extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.AdverseEvent convertAdverseEvent(org.hl7.fhir.r4.model.AdverseEvent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.AdverseEvent tgt = new org.hl7.fhir.r5.model.AdverseEvent();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasActuality())
tgt.setActuality(convertAdverseEventActuality(src.getActuality()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory())
tgt.addCategory(convertCodeableConcept(t));
if (src.hasEvent())
tgt.setEvent(convertCodeableConcept(src.getEvent()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasDetected())
tgt.setDetectedElement(convertDateTime(src.getDetectedElement()));
if (src.hasRecordedDate())
tgt.setRecordedDateElement(convertDateTime(src.getRecordedDateElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getResultingCondition())
tgt.addResultingCondition(convertReference(t));
if (src.hasLocation())
tgt.setLocation(convertReference(src.getLocation()));
if (src.hasSeriousness())
tgt.setSeriousness(convertCodeableConcept(src.getSeriousness()));
if (src.hasSeverity())
tgt.setSeverity(convertCodeableConcept(src.getSeverity()));
if (src.hasOutcome())
tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
if (src.hasRecorder())
tgt.setRecorder(convertReference(src.getRecorder()));
for (org.hl7.fhir.r4.model.Reference t : src.getContributor())
tgt.addContributor(convertReference(t));
for (org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityComponent t : src.getSuspectEntity())
tgt.addSuspectEntity(convertAdverseEventSuspectEntityComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getSubjectMedicalHistory())
tgt.addSubjectMedicalHistory(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getReferenceDocument())
tgt.addReferenceDocument(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getStudy())
tgt.addStudy(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.AdverseEvent convertAdverseEvent(org.hl7.fhir.r5.model.AdverseEvent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.AdverseEvent tgt = new org.hl7.fhir.r4.model.AdverseEvent();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasActuality())
tgt.setActuality(convertAdverseEventActuality(src.getActuality()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory())
tgt.addCategory(convertCodeableConcept(t));
if (src.hasEvent())
tgt.setEvent(convertCodeableConcept(src.getEvent()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasDetected())
tgt.setDetectedElement(convertDateTime(src.getDetectedElement()));
if (src.hasRecordedDate())
tgt.setRecordedDateElement(convertDateTime(src.getRecordedDateElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getResultingCondition())
tgt.addResultingCondition(convertReference(t));
if (src.hasLocation())
tgt.setLocation(convertReference(src.getLocation()));
if (src.hasSeriousness())
tgt.setSeriousness(convertCodeableConcept(src.getSeriousness()));
if (src.hasSeverity())
tgt.setSeverity(convertCodeableConcept(src.getSeverity()));
if (src.hasOutcome())
tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
if (src.hasRecorder())
tgt.setRecorder(convertReference(src.getRecorder()));
for (org.hl7.fhir.r5.model.Reference t : src.getContributor())
tgt.addContributor(convertReference(t));
for (org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityComponent t : src.getSuspectEntity())
tgt.addSuspectEntity(convertAdverseEventSuspectEntityComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSubjectMedicalHistory())
tgt.addSubjectMedicalHistory(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getReferenceDocument())
tgt.addReferenceDocument(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getStudy())
tgt.addStudy(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.AdverseEvent.AdverseEventActuality convertAdverseEventActuality(org.hl7.fhir.r4.model.AdverseEvent.AdverseEventActuality src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case ACTUAL: return org.hl7.fhir.r5.model.AdverseEvent.AdverseEventActuality.ACTUAL;
case POTENTIAL: return org.hl7.fhir.r5.model.AdverseEvent.AdverseEventActuality.POTENTIAL;
default: return org.hl7.fhir.r5.model.AdverseEvent.AdverseEventActuality.NULL;
}
}
public static org.hl7.fhir.r4.model.AdverseEvent.AdverseEventActuality convertAdverseEventActuality(org.hl7.fhir.r5.model.AdverseEvent.AdverseEventActuality src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case ACTUAL: return org.hl7.fhir.r4.model.AdverseEvent.AdverseEventActuality.ACTUAL;
case POTENTIAL: return org.hl7.fhir.r4.model.AdverseEvent.AdverseEventActuality.POTENTIAL;
default: return org.hl7.fhir.r4.model.AdverseEvent.AdverseEventActuality.NULL;
}
}
public static org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityComponent convertAdverseEventSuspectEntityComponent(org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityComponent tgt = new org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityComponent();
copyElement(src, tgt);
if (src.hasInstance())
tgt.setInstance(convertReference(src.getInstance()));
for (org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent t : src.getCausality())
tgt.addCausality(convertAdverseEventSuspectEntityCausalityComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityComponent convertAdverseEventSuspectEntityComponent(org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityComponent tgt = new org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityComponent();
copyElement(src, tgt);
if (src.hasInstance())
tgt.setInstance(convertReference(src.getInstance()));
for (org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent t : src.getCausality())
tgt.addCausality(convertAdverseEventSuspectEntityCausalityComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent convertAdverseEventSuspectEntityCausalityComponent(org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent tgt = new org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent();
copyElement(src, tgt);
if (src.hasAssessment())
tgt.setAssessment(convertCodeableConcept(src.getAssessment()));
if (src.hasProductRelatedness())
tgt.setProductRelatednessElement(convertString(src.getProductRelatednessElement()));
if (src.hasAuthor())
tgt.setAuthor(convertReference(src.getAuthor()));
if (src.hasMethod())
tgt.setMethod(convertCodeableConcept(src.getMethod()));
return tgt;
}
public static org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent convertAdverseEventSuspectEntityCausalityComponent(org.hl7.fhir.r5.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent tgt = new org.hl7.fhir.r4.model.AdverseEvent.AdverseEventSuspectEntityCausalityComponent();
copyElement(src, tgt);
if (src.hasAssessment())
tgt.setAssessment(convertCodeableConcept(src.getAssessment()));
if (src.hasProductRelatedness())
tgt.setProductRelatednessElement(convertString(src.getProductRelatednessElement()));
if (src.hasAuthor())
tgt.setAuthor(convertReference(src.getAuthor()));
if (src.hasMethod())
tgt.setMethod(convertCodeableConcept(src.getMethod()));
return tgt;
}
}

View File

@ -102,7 +102,7 @@ public class CarePlan extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.Reference t : src.getCareTeam())
tgt.addCareTeam(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getAddresses())
tgt.addAddresses(convertReference(t));
tgt.addAddressesReference(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInfo())
tgt.addSupportingInfo(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getGoal())
@ -155,7 +155,7 @@ public class CarePlan extends VersionConvertor_40_50 {
tgt.addContributor(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCareTeam())
tgt.addCareTeam(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getAddresses())
for (org.hl7.fhir.r5.model.Reference t : src.getAddressesReference())
tgt.addAddresses(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInfo())
tgt.addSupportingInfo(convertReference(t));

View File

@ -75,8 +75,6 @@ public class CareTeam extends VersionConvertor_40_50 {
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
for (org.hl7.fhir.r4.model.CareTeam.CareTeamParticipantComponent t : src.getParticipant())
@ -109,8 +107,6 @@ public class CareTeam extends VersionConvertor_40_50 {
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
for (org.hl7.fhir.r5.model.CareTeam.CareTeamParticipantComponent t : src.getParticipant())
@ -160,13 +156,13 @@ public class CareTeam extends VersionConvertor_40_50 {
org.hl7.fhir.r5.model.CareTeam.CareTeamParticipantComponent tgt = new org.hl7.fhir.r5.model.CareTeam.CareTeamParticipantComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRole())
tgt.addRole(convertCodeableConcept(t));
tgt.setRole(convertCodeableConcept(t));
if (src.hasMember())
tgt.setMember(convertReference(src.getMember()));
if (src.hasOnBehalfOf())
tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
tgt.setCoverage(convertPeriod(src.getPeriod()));
return tgt;
}
@ -175,14 +171,14 @@ public class CareTeam extends VersionConvertor_40_50 {
return null;
org.hl7.fhir.r4.model.CareTeam.CareTeamParticipantComponent tgt = new org.hl7.fhir.r4.model.CareTeam.CareTeamParticipantComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRole())
tgt.addRole(convertCodeableConcept(t));
if (src.hasRole())
tgt.addRole(convertCodeableConcept(src.getRole()));
if (src.hasMember())
tgt.setMember(convertReference(src.getMember()));
if (src.hasOnBehalfOf())
tgt.setOnBehalfOf(convertReference(src.getOnBehalfOf()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
if (src.hasCoveragePeriod())
tgt.setPeriod(convertPeriod(src.getCoveragePeriod()));
return tgt;
}

View File

@ -1,176 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class CatalogEntry extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.CatalogEntry convertCatalogEntry(org.hl7.fhir.r4.model.CatalogEntry src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.CatalogEntry tgt = new org.hl7.fhir.r5.model.CatalogEntry();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasOrderable())
tgt.setOrderableElement(convertBoolean(src.getOrderableElement()));
if (src.hasReferencedItem())
tgt.setReferencedItem(convertReference(src.getReferencedItem()));
for (org.hl7.fhir.r4.model.Identifier t : src.getAdditionalIdentifier())
tgt.addAdditionalIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getClassification())
tgt.addClassification(convertCodeableConcept(t));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
if (src.hasValidTo())
tgt.setValidToElement(convertDateTime(src.getValidToElement()));
if (src.hasLastUpdated())
tgt.setLastUpdatedElement(convertDateTime(src.getLastUpdatedElement()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAdditionalCharacteristic())
tgt.addAdditionalCharacteristic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAdditionalClassification())
tgt.addAdditionalClassification(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelatedEntryComponent t : src.getRelatedEntry())
tgt.addRelatedEntry(convertCatalogEntryRelatedEntryComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.CatalogEntry convertCatalogEntry(org.hl7.fhir.r5.model.CatalogEntry src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.CatalogEntry tgt = new org.hl7.fhir.r4.model.CatalogEntry();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasOrderable())
tgt.setOrderableElement(convertBoolean(src.getOrderableElement()));
if (src.hasReferencedItem())
tgt.setReferencedItem(convertReference(src.getReferencedItem()));
for (org.hl7.fhir.r5.model.Identifier t : src.getAdditionalIdentifier())
tgt.addAdditionalIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getClassification())
tgt.addClassification(convertCodeableConcept(t));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
if (src.hasValidTo())
tgt.setValidToElement(convertDateTime(src.getValidToElement()));
if (src.hasLastUpdated())
tgt.setLastUpdatedElement(convertDateTime(src.getLastUpdatedElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getAdditionalCharacteristic())
tgt.addAdditionalCharacteristic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getAdditionalClassification())
tgt.addAdditionalClassification(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelatedEntryComponent t : src.getRelatedEntry())
tgt.addRelatedEntry(convertCatalogEntryRelatedEntryComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelatedEntryComponent convertCatalogEntryRelatedEntryComponent(org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelatedEntryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelatedEntryComponent tgt = new org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelatedEntryComponent();
copyElement(src, tgt);
if (src.hasRelationtype())
tgt.setRelationtype(convertCatalogEntryRelationType(src.getRelationtype()));
if (src.hasItem())
tgt.setItem(convertReference(src.getItem()));
return tgt;
}
public static org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelatedEntryComponent convertCatalogEntryRelatedEntryComponent(org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelatedEntryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelatedEntryComponent tgt = new org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelatedEntryComponent();
copyElement(src, tgt);
if (src.hasRelationtype())
tgt.setRelationtype(convertCatalogEntryRelationType(src.getRelationtype()));
if (src.hasItem())
tgt.setItem(convertReference(src.getItem()));
return tgt;
}
public static org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelationType convertCatalogEntryRelationType(org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelationType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case TRIGGERS: return org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelationType.TRIGGERS;
case ISREPLACEDBY: return org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelationType.ISREPLACEDBY;
default: return org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelationType.NULL;
}
}
public static org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelationType convertCatalogEntryRelationType(org.hl7.fhir.r5.model.CatalogEntry.CatalogEntryRelationType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case TRIGGERS: return org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelationType.TRIGGERS;
case ISREPLACEDBY: return org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelationType.ISREPLACEDBY;
default: return org.hl7.fhir.r4.model.CatalogEntry.CatalogEntryRelationType.NULL;
}
}
}

View File

@ -84,13 +84,11 @@ public class ClinicalImpression extends VersionConvertor_40_50 {
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasAssessor())
tgt.setAssessor(convertReference(src.getAssessor()));
tgt.setPerformer(convertReference(src.getAssessor()));
if (src.hasPrevious())
tgt.setPrevious(convertReference(src.getPrevious()));
for (org.hl7.fhir.r4.model.Reference t : src.getProblem())
tgt.addProblem(convertReference(t));
for (org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent t : src.getInvestigation())
tgt.addInvestigation(convertClinicalImpressionInvestigationComponent(t));
for (org.hl7.fhir.r4.model.UriType t : src.getProtocol())
tgt.getProtocol().add(convertUri(t));
if (src.hasSummary())
@ -131,14 +129,12 @@ public class ClinicalImpression extends VersionConvertor_40_50 {
tgt.setEffective(convertType(src.getEffective()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasAssessor())
tgt.setAssessor(convertReference(src.getAssessor()));
if (src.hasPerformer())
tgt.setAssessor(convertReference(src.getPerformer()));
if (src.hasPrevious())
tgt.setPrevious(convertReference(src.getPrevious()));
for (org.hl7.fhir.r5.model.Reference t : src.getProblem())
tgt.addProblem(convertReference(t));
for (org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionInvestigationComponent t : src.getInvestigation())
tgt.addInvestigation(convertClinicalImpressionInvestigationComponent(t));
for (org.hl7.fhir.r5.model.UriType t : src.getProtocol())
tgt.getProtocol().add(convertUri(t));
if (src.hasSummary())
@ -178,30 +174,6 @@ public class ClinicalImpression extends VersionConvertor_40_50 {
}
}
public static org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionInvestigationComponent convertClinicalImpressionInvestigationComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionInvestigationComponent tgt = new org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionInvestigationComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r4.model.Reference t : src.getItem())
tgt.addItem(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent convertClinicalImpressionInvestigationComponent(org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionInvestigationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent tgt = new org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionInvestigationComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r5.model.Reference t : src.getItem())
tgt.addItem(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.r4.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException {
if (src == null)
return null;

View File

@ -102,7 +102,7 @@ public class CommunicationRequest extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.Reference t : src.getRecipient())
tgt.addRecipient(convertReference(t));
if (src.hasSender())
tgt.setSender(convertReference(src.getSender()));
tgt.addInformationProvider(convertReference(src.getSender()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
tgt.addReasonCode(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference())
@ -153,8 +153,8 @@ public class CommunicationRequest extends VersionConvertor_40_50 {
tgt.setRequester(convertReference(src.getRequester()));
for (org.hl7.fhir.r5.model.Reference t : src.getRecipient())
tgt.addRecipient(convertReference(t));
if (src.hasSender())
tgt.setSender(convertReference(src.getSender()));
if (src.hasInformationProvider())
tgt.setSender(convertReference(src.getInformationProviderFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReasonCode())
tgt.addReasonCode(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getReasonReference())

View File

@ -81,8 +81,10 @@ public class Consent extends VersionConvertor_40_50 {
tgt.addPerformer(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getOrganization())
tgt.addOrganization(convertReference(t));
if (src.hasSource())
tgt.setSource(convertType(src.getSource()));
if (src.hasSourceAttachment())
tgt.addSourceAttachment(convertAttachment(src.getSourceAttachment()));
if (src.hasSourceReference())
tgt.addSourceReference(convertReference(src.getSourceReference()));
for (org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent t : src.getPolicy())
tgt.addPolicy(convertConsentPolicyComponent(t));
if (src.hasPolicyRule())
@ -115,8 +117,10 @@ public class Consent extends VersionConvertor_40_50 {
tgt.addPerformer(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getOrganization())
tgt.addOrganization(convertReference(t));
if (src.hasSource())
tgt.setSource(convertType(src.getSource()));
if (src.hasSourceAttachment())
tgt.setSource(convertType(src.getSourceAttachmentFirstRep()));
if (src.hasSourceReference())
tgt.setSource(convertType(src.getSourceReferenceFirstRep()));
for (org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent t : src.getPolicy())
tgt.addPolicy(convertConsentPolicyComponent(t));
if (src.hasPolicyRule())

View File

@ -76,7 +76,7 @@ public class Coverage extends VersionConvertor_40_50 {
if (src.hasSubscriber())
tgt.setSubscriber(convertReference(src.getSubscriber()));
if (src.hasSubscriberId())
tgt.setSubscriberIdElement(convertString(src.getSubscriberIdElement()));
tgt.getSubscriberId().setValueElement(convertString(src.getSubscriberIdElement()));
if (src.hasBeneficiary())
tgt.setBeneficiary(convertReference(src.getBeneficiary()));
if (src.hasDependent())
@ -118,7 +118,7 @@ public class Coverage extends VersionConvertor_40_50 {
if (src.hasSubscriber())
tgt.setSubscriber(convertReference(src.getSubscriber()));
if (src.hasSubscriberId())
tgt.setSubscriberIdElement(convertString(src.getSubscriberIdElement()));
tgt.setSubscriberIdElement(convertString(src.getSubscriberId().getValueElement()));
if (src.hasBeneficiary())
tgt.setBeneficiary(convertReference(src.getBeneficiary()));
if (src.hasDependent())

View File

@ -1,420 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class EffectEvidenceSynthesis extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis convertEffectEvidenceSynthesis(org.hl7.fhir.r4.model.EffectEvidenceSynthesis src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasSynthesisType())
tgt.setSynthesisType(convertCodeableConcept(src.getSynthesisType()));
if (src.hasStudyType())
tgt.setStudyType(convertCodeableConcept(src.getStudyType()));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasExposureAlternative())
tgt.setExposureAlternative(convertReference(src.getExposureAlternative()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
if (src.hasSampleSize())
tgt.setSampleSize(convertEffectEvidenceSynthesisSampleSizeComponent(src.getSampleSize()));
for (org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent t : src.getResultsByExposure())
tgt.addResultsByExposure(convertEffectEvidenceSynthesisResultsByExposureComponent(t));
for (org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent t : src.getEffectEstimate())
tgt.addEffectEstimate(convertEffectEvidenceSynthesisEffectEstimateComponent(t));
for (org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent t : src.getCertainty())
tgt.addCertainty(convertEffectEvidenceSynthesisCertaintyComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis convertEffectEvidenceSynthesis(org.hl7.fhir.r5.model.EffectEvidenceSynthesis src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasSynthesisType())
tgt.setSynthesisType(convertCodeableConcept(src.getSynthesisType()));
if (src.hasStudyType())
tgt.setStudyType(convertCodeableConcept(src.getStudyType()));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasExposureAlternative())
tgt.setExposureAlternative(convertReference(src.getExposureAlternative()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
if (src.hasSampleSize())
tgt.setSampleSize(convertEffectEvidenceSynthesisSampleSizeComponent(src.getSampleSize()));
for (org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent t : src.getResultsByExposure())
tgt.addResultsByExposure(convertEffectEvidenceSynthesisResultsByExposureComponent(t));
for (org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent t : src.getEffectEstimate())
tgt.addEffectEstimate(convertEffectEvidenceSynthesisEffectEstimateComponent(t));
for (org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent t : src.getCertainty())
tgt.addCertainty(convertEffectEvidenceSynthesisCertaintyComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent convertEffectEvidenceSynthesisSampleSizeComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasNumberOfStudies())
tgt.setNumberOfStudiesElement(convertInteger(src.getNumberOfStudiesElement()));
if (src.hasNumberOfParticipants())
tgt.setNumberOfParticipantsElement(convertInteger(src.getNumberOfParticipantsElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent convertEffectEvidenceSynthesisSampleSizeComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisSampleSizeComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasNumberOfStudies())
tgt.setNumberOfStudiesElement(convertInteger(src.getNumberOfStudiesElement()));
if (src.hasNumberOfParticipants())
tgt.setNumberOfParticipantsElement(convertInteger(src.getNumberOfParticipantsElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent convertEffectEvidenceSynthesisResultsByExposureComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasExposureState())
tgt.setExposureState(convertExposureState(src.getExposureState()));
if (src.hasVariantState())
tgt.setVariantState(convertCodeableConcept(src.getVariantState()));
if (src.hasRiskEvidenceSynthesis())
tgt.setRiskEvidenceSynthesis(convertReference(src.getRiskEvidenceSynthesis()));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent convertEffectEvidenceSynthesisResultsByExposureComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisResultsByExposureComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasExposureState())
tgt.setExposureState(convertExposureState(src.getExposureState()));
if (src.hasVariantState())
tgt.setVariantState(convertCodeableConcept(src.getVariantState()));
if (src.hasRiskEvidenceSynthesis())
tgt.setRiskEvidenceSynthesis(convertReference(src.getRiskEvidenceSynthesis()));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.ExposureState convertExposureState(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.ExposureState src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EXPOSURE: return org.hl7.fhir.r5.model.EffectEvidenceSynthesis.ExposureState.EXPOSURE;
case EXPOSUREALTERNATIVE: return org.hl7.fhir.r5.model.EffectEvidenceSynthesis.ExposureState.EXPOSUREALTERNATIVE;
default: return org.hl7.fhir.r5.model.EffectEvidenceSynthesis.ExposureState.NULL;
}
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.ExposureState convertExposureState(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.ExposureState src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EXPOSURE: return org.hl7.fhir.r4.model.EffectEvidenceSynthesis.ExposureState.EXPOSURE;
case EXPOSUREALTERNATIVE: return org.hl7.fhir.r4.model.EffectEvidenceSynthesis.ExposureState.EXPOSUREALTERNATIVE;
default: return org.hl7.fhir.r4.model.EffectEvidenceSynthesis.ExposureState.NULL;
}
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent convertEffectEvidenceSynthesisEffectEstimateComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasVariantState())
tgt.setVariantState(convertCodeableConcept(src.getVariantState()));
if (src.hasValue())
tgt.setValueElement(convertDecimal(src.getValueElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
for (org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent t : src.getPrecisionEstimate())
tgt.addPrecisionEstimate(convertEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent convertEffectEvidenceSynthesisEffectEstimateComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimateComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasVariantState())
tgt.setVariantState(convertCodeableConcept(src.getVariantState()));
if (src.hasValue())
tgt.setValueElement(convertDecimal(src.getValueElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
for (org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent t : src.getPrecisionEstimate())
tgt.addPrecisionEstimate(convertEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent convertEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasLevel())
tgt.setLevelElement(convertDecimal(src.getLevelElement()));
if (src.hasFrom())
tgt.setFromElement(convertDecimal(src.getFromElement()));
if (src.hasTo())
tgt.setToElement(convertDecimal(src.getToElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent convertEffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisEffectEstimatePrecisionEstimateComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasLevel())
tgt.setLevelElement(convertDecimal(src.getLevelElement()));
if (src.hasFrom())
tgt.setFromElement(convertDecimal(src.getFromElement()));
if (src.hasTo())
tgt.setToElement(convertDecimal(src.getToElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent convertEffectEvidenceSynthesisCertaintyComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent t : src.getCertaintySubcomponent())
tgt.addCertaintySubcomponent(convertEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent convertEffectEvidenceSynthesisCertaintyComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent t : src.getCertaintySubcomponent())
tgt.addCertaintySubcomponent(convertEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent convertEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent tgt = new org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent convertEffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent(org.hl7.fhir.r5.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent tgt = new org.hl7.fhir.r4.model.EffectEvidenceSynthesis.EffectEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
return tgt;
}
}

View File

@ -173,11 +173,11 @@ public class Encounter extends VersionConvertor_40_50 {
return null;
switch (src) {
case PLANNED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED;
case ARRIVED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.ARRIVED;
case TRIAGED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.TRIAGED;
case ARRIVED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case TRIAGED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case INPROGRESS: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case ONLEAVE: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.ONLEAVE;
case FINISHED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.FINISHED;
case ONLEAVE: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS;
case FINISHED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED;
case CANCELLED: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR;
case UNKNOWN: return org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN;
@ -190,12 +190,9 @@ public class Encounter extends VersionConvertor_40_50 {
return null;
switch (src) {
case PLANNED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.PLANNED;
case ARRIVED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ARRIVED;
case TRIAGED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.TRIAGED;
case INPROGRESS: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.INPROGRESS;
case ONLEAVE: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ONLEAVE;
case FINISHED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED;
case CANCELLED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.CANCELLED;
case COMPLETED: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED;
case ENTEREDINERROR: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.ENTEREDINERROR;
case UNKNOWN: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.UNKNOWN;
default: return org.hl7.fhir.r4.model.Encounter.EncounterStatus.NULL;

View File

@ -1,192 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class Evidence extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.Evidence convertEvidence(org.hl7.fhir.r4.model.Evidence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Evidence tgt = new org.hl7.fhir.r5.model.Evidence();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasExposureBackground())
tgt.setExposureBackground(convertReference(src.getExposureBackground()));
for (org.hl7.fhir.r4.model.Reference t : src.getExposureVariant())
tgt.addExposureVariant(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getOutcome())
tgt.addOutcome(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.Evidence convertEvidence(org.hl7.fhir.r5.model.Evidence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Evidence tgt = new org.hl7.fhir.r4.model.Evidence();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasExposureBackground())
tgt.setExposureBackground(convertReference(src.getExposureBackground()));
for (org.hl7.fhir.r5.model.Reference t : src.getExposureVariant())
tgt.addExposureVariant(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getOutcome())
tgt.addOutcome(convertReference(t));
return tgt;
}
}

View File

@ -1,282 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class EvidenceVariable extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.EvidenceVariable convertEvidenceVariable(org.hl7.fhir.r4.model.EvidenceVariable src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EvidenceVariable tgt = new org.hl7.fhir.r5.model.EvidenceVariable();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasType())
tgt.setType(convertEvidenceVariableType(src.getType()));
for (org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableCharacteristicComponent t : src.getCharacteristic())
tgt.addCharacteristic(convertEvidenceVariableCharacteristicComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.EvidenceVariable convertEvidenceVariable(org.hl7.fhir.r5.model.EvidenceVariable src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EvidenceVariable tgt = new org.hl7.fhir.r4.model.EvidenceVariable();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasType())
tgt.setType(convertEvidenceVariableType(src.getType()));
for (org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableCharacteristicComponent t : src.getCharacteristic())
tgt.addCharacteristic(convertEvidenceVariableCharacteristicComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType convertEvidenceVariableType(org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case DICHOTOMOUS: return org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType.DICHOTOMOUS;
case CONTINUOUS: return org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType.CONTINUOUS;
case DESCRIPTIVE: return org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType.DESCRIPTIVE;
default: return org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType.NULL;
}
}
public static org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType convertEvidenceVariableType(org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case DICHOTOMOUS: return org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType.DICHOTOMOUS;
case CONTINUOUS: return org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType.CONTINUOUS;
case DESCRIPTIVE: return org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType.DESCRIPTIVE;
default: return org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableType.NULL;
}
}
public static org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableCharacteristicComponent convertEvidenceVariableCharacteristicComponent(org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableCharacteristicComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableCharacteristicComponent tgt = new org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableCharacteristicComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasDefinition())
tgt.setDefinition(convertType(src.getDefinition()));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUsageContext())
tgt.addUsageContext(convertUsageContext(t));
if (src.hasExclude())
tgt.setExcludeElement(convertBoolean(src.getExcludeElement()));
if (src.hasParticipantEffective())
tgt.setParticipantEffective(convertType(src.getParticipantEffective()));
if (src.hasTimeFromStart())
tgt.setTimeFromStart(convertDuration(src.getTimeFromStart()));
if (src.hasGroupMeasure())
tgt.setGroupMeasure(convertGroupMeasure(src.getGroupMeasure()));
return tgt;
}
public static org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableCharacteristicComponent convertEvidenceVariableCharacteristicComponent(org.hl7.fhir.r5.model.EvidenceVariable.EvidenceVariableCharacteristicComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableCharacteristicComponent tgt = new org.hl7.fhir.r4.model.EvidenceVariable.EvidenceVariableCharacteristicComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasDefinition())
tgt.setDefinition(convertType(src.getDefinition()));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUsageContext())
tgt.addUsageContext(convertUsageContext(t));
if (src.hasExclude())
tgt.setExcludeElement(convertBoolean(src.getExcludeElement()));
if (src.hasParticipantEffective())
tgt.setParticipantEffective(convertType(src.getParticipantEffective()));
if (src.hasTimeFromStart())
tgt.setTimeFromStart(convertDuration(src.getTimeFromStart()));
if (src.hasGroupMeasure())
tgt.setGroupMeasure(convertGroupMeasure(src.getGroupMeasure()));
return tgt;
}
public static org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure convertGroupMeasure(org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case MEAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEAN;
case MEDIAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEDIAN;
case MEANOFMEAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEANOFMEAN;
case MEANOFMEDIAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEANOFMEDIAN;
case MEDIANOFMEAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEDIANOFMEAN;
case MEDIANOFMEDIAN: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.MEDIANOFMEDIAN;
default: return org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure.NULL;
}
}
public static org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure convertGroupMeasure(org.hl7.fhir.r5.model.EvidenceVariable.GroupMeasure src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case MEAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEAN;
case MEDIAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEDIAN;
case MEANOFMEAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEANOFMEAN;
case MEANOFMEDIAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEANOFMEDIAN;
case MEDIANOFMEAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEDIANOFMEAN;
case MEDIANOFMEDIAN: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.MEDIANOFMEDIAN;
default: return org.hl7.fhir.r4.model.EvidenceVariable.GroupMeasure.NULL;
}
}
}

View File

@ -283,7 +283,6 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case DOCUMENTMANIFEST: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.DOCUMENTMANIFEST;
case DOCUMENTREFERENCE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.DOCUMENTREFERENCE;
case DOMAINRESOURCE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.DOMAINRESOURCE;
case EFFECTEVIDENCESYNTHESIS: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.EFFECTEVIDENCESYNTHESIS;
case ENCOUNTER: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.ENCOUNTER;
case ENDPOINT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.ENDPOINT;
case ENROLLMENTREQUEST: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.ENROLLMENTREQUEST;
@ -314,23 +313,13 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case LOCATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.LOCATION;
case MEASURE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEASURE;
case MEASUREREPORT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEASUREREPORT;
case MEDIA: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDIA;
case MEDIA: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.DOCUMENTREFERENCE;
case MEDICATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATION;
case MEDICATIONADMINISTRATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONADMINISTRATION;
case MEDICATIONDISPENSE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONDISPENSE;
case MEDICATIONKNOWLEDGE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONKNOWLEDGE;
case MEDICATIONREQUEST: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONREQUEST;
case MEDICATIONSTATEMENT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONSTATEMENT;
case MEDICINALPRODUCT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCT;
case MEDICINALPRODUCTAUTHORIZATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTAUTHORIZATION;
case MEDICINALPRODUCTCONTRAINDICATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTCONTRAINDICATION;
case MEDICINALPRODUCTINDICATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINDICATION;
case MEDICINALPRODUCTINGREDIENT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINGREDIENT;
case MEDICINALPRODUCTINTERACTION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINTERACTION;
case MEDICINALPRODUCTMANUFACTURED: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTMANUFACTURED;
case MEDICINALPRODUCTPACKAGED: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTPACKAGED;
case MEDICINALPRODUCTPHARMACEUTICAL: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTPHARMACEUTICAL;
case MEDICINALPRODUCTUNDESIRABLEEFFECT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT;
case MEDICATIONSTATEMENT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MEDICATIONUSAGE;
case MESSAGEDEFINITION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MESSAGEDEFINITION;
case MESSAGEHEADER: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MESSAGEHEADER;
case MOLECULARSEQUENCE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.MOLECULARSEQUENCE;
@ -356,13 +345,10 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case QUESTIONNAIRERESPONSE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.QUESTIONNAIRERESPONSE;
case RELATEDPERSON: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RELATEDPERSON;
case REQUESTGROUP: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.REQUESTGROUP;
case RESEARCHDEFINITION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RESEARCHDEFINITION;
case RESEARCHELEMENTDEFINITION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RESEARCHELEMENTDEFINITION;
case RESEARCHSTUDY: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RESEARCHSTUDY;
case RESEARCHSUBJECT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RESEARCHSUBJECT;
case RESOURCE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RESOURCE;
case RISKASSESSMENT: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RISKASSESSMENT;
case RISKEVIDENCESYNTHESIS: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.RISKEVIDENCESYNTHESIS;
case SCHEDULE: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SCHEDULE;
case SEARCHPARAMETER: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SEARCHPARAMETER;
case SERVICEREQUEST: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SERVICEREQUEST;
@ -378,7 +364,6 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case SUBSTANCEPROTEIN: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUBSTANCEPROTEIN;
case SUBSTANCEREFERENCEINFORMATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUBSTANCEREFERENCEINFORMATION;
case SUBSTANCESOURCEMATERIAL: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUBSTANCESOURCEMATERIAL;
case SUBSTANCESPECIFICATION: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUBSTANCESPECIFICATION;
case SUPPLYDELIVERY: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUPPLYDELIVERY;
case SUPPLYREQUEST: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.SUPPLYREQUEST;
case TASK: return org.hl7.fhir.r5.model.ExampleScenario.FHIRResourceType.TASK;
@ -439,7 +424,6 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case DOCUMENTMANIFEST: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.DOCUMENTMANIFEST;
case DOCUMENTREFERENCE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.DOCUMENTREFERENCE;
case DOMAINRESOURCE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.DOMAINRESOURCE;
case EFFECTEVIDENCESYNTHESIS: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.EFFECTEVIDENCESYNTHESIS;
case ENCOUNTER: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.ENCOUNTER;
case ENDPOINT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.ENDPOINT;
case ENROLLMENTREQUEST: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.ENROLLMENTREQUEST;
@ -470,23 +454,12 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case LOCATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.LOCATION;
case MEASURE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEASURE;
case MEASUREREPORT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEASUREREPORT;
case MEDIA: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDIA;
case MEDICATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATION;
case MEDICATIONADMINISTRATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONADMINISTRATION;
case MEDICATIONDISPENSE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONDISPENSE;
case MEDICATIONKNOWLEDGE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONKNOWLEDGE;
case MEDICATIONREQUEST: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONREQUEST;
case MEDICATIONSTATEMENT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONSTATEMENT;
case MEDICINALPRODUCT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCT;
case MEDICINALPRODUCTAUTHORIZATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTAUTHORIZATION;
case MEDICINALPRODUCTCONTRAINDICATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTCONTRAINDICATION;
case MEDICINALPRODUCTINDICATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINDICATION;
case MEDICINALPRODUCTINGREDIENT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINGREDIENT;
case MEDICINALPRODUCTINTERACTION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTINTERACTION;
case MEDICINALPRODUCTMANUFACTURED: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTMANUFACTURED;
case MEDICINALPRODUCTPACKAGED: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTPACKAGED;
case MEDICINALPRODUCTPHARMACEUTICAL: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTPHARMACEUTICAL;
case MEDICINALPRODUCTUNDESIRABLEEFFECT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT;
case MEDICATIONUSAGE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MEDICATIONSTATEMENT;
case MESSAGEDEFINITION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MESSAGEDEFINITION;
case MESSAGEHEADER: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MESSAGEHEADER;
case MOLECULARSEQUENCE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.MOLECULARSEQUENCE;
@ -512,13 +485,10 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case QUESTIONNAIRERESPONSE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.QUESTIONNAIRERESPONSE;
case RELATEDPERSON: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RELATEDPERSON;
case REQUESTGROUP: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.REQUESTGROUP;
case RESEARCHDEFINITION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RESEARCHDEFINITION;
case RESEARCHELEMENTDEFINITION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RESEARCHELEMENTDEFINITION;
case RESEARCHSTUDY: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RESEARCHSTUDY;
case RESEARCHSUBJECT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RESEARCHSUBJECT;
case RESOURCE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RESOURCE;
case RISKASSESSMENT: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RISKASSESSMENT;
case RISKEVIDENCESYNTHESIS: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.RISKEVIDENCESYNTHESIS;
case SCHEDULE: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SCHEDULE;
case SEARCHPARAMETER: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SEARCHPARAMETER;
case SERVICEREQUEST: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SERVICEREQUEST;
@ -534,7 +504,6 @@ public class ExampleScenario extends VersionConvertor_40_50 {
case SUBSTANCEPROTEIN: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUBSTANCEPROTEIN;
case SUBSTANCEREFERENCEINFORMATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUBSTANCEREFERENCEINFORMATION;
case SUBSTANCESOURCEMATERIAL: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUBSTANCESOURCEMATERIAL;
case SUBSTANCESPECIFICATION: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUBSTANCESPECIFICATION;
case SUPPLYDELIVERY: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUPPLYDELIVERY;
case SUPPLYREQUEST: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.SUPPLYREQUEST;
case TASK: return org.hl7.fhir.r4.model.ExampleScenario.FHIRResourceType.TASK;

View File

@ -84,7 +84,7 @@ public class Immunization extends VersionConvertor_40_50 {
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(convertBoolean(src.getPrimarySourceElement()));
if (src.hasReportOrigin())
tgt.setReportOrigin(convertCodeableConcept(src.getReportOrigin()));
tgt.setInformationSource(convertCodeableConcept(src.getReportOrigin()));
if (src.hasLocation())
tgt.setLocation(convertReference(src.getLocation()));
if (src.hasManufacturer())
@ -147,8 +147,8 @@ public class Immunization extends VersionConvertor_40_50 {
tgt.setRecordedElement(convertDateTime(src.getRecordedElement()));
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(convertBoolean(src.getPrimarySourceElement()));
if (src.hasReportOrigin())
tgt.setReportOrigin(convertCodeableConcept(src.getReportOrigin()));
if (src.hasInformationSourceCodeableConcept())
tgt.setReportOrigin(convertCodeableConcept(src.getInformationSourceCodeableConcept()));
if (src.hasLocation())
tgt.setLocation(convertReference(src.getLocation()));
if (src.hasManufacturer())

View File

@ -104,7 +104,7 @@ public class ImmunizationRecommendation extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getVaccineCode())
tgt.addVaccineCode(convertCodeableConcept(t));
if (src.hasTargetDisease())
tgt.setTargetDisease(convertCodeableConcept(src.getTargetDisease()));
tgt.addTargetDisease(convertCodeableConcept(src.getTargetDisease()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getContraindicatedVaccineCode())
tgt.addContraindicatedVaccineCode(convertCodeableConcept(t));
if (src.hasForecastStatus())
@ -136,7 +136,7 @@ public class ImmunizationRecommendation extends VersionConvertor_40_50 {
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getVaccineCode())
tgt.addVaccineCode(convertCodeableConcept(t));
if (src.hasTargetDisease())
tgt.setTargetDisease(convertCodeableConcept(src.getTargetDisease()));
tgt.setTargetDisease(convertCodeableConcept(src.getTargetDiseaseFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getContraindicatedVaccineCode())
tgt.addContraindicatedVaccineCode(convertCodeableConcept(t));
if (src.hasForecastStatus())

View File

@ -1096,25 +1096,25 @@ public class ImplementationGuide extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode convertGuideParameterCode(org.hl7.fhir.r4.model.ImplementationGuide.GuideParameterCode src) throws FHIRException {
public static org.hl7.fhir.r5.utils.GuideParameterCode convertGuideParameterCode(org.hl7.fhir.r4.model.ImplementationGuide.GuideParameterCode src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case APPLY: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.APPLY;
case PATHRESOURCE: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.PATHRESOURCE;
case PATHPAGES: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.PATHPAGES;
case PATHTXCACHE: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.PATHTXCACHE;
case EXPANSIONPARAMETER: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.EXPANSIONPARAMETER;
case RULEBROKENLINKS: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.RULEBROKENLINKS;
case GENERATEXML: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.GENERATEXML;
case GENERATEJSON: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.GENERATEJSON;
case GENERATETURTLE: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.GENERATETURTLE;
case HTMLTEMPLATE: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.HTMLTEMPLATE;
default: return org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode.NULL;
case APPLY: return org.hl7.fhir.r5.utils.GuideParameterCode.APPLY;
case PATHRESOURCE: return org.hl7.fhir.r5.utils.GuideParameterCode.PATHRESOURCE;
case PATHPAGES: return org.hl7.fhir.r5.utils.GuideParameterCode.PATHPAGES;
case PATHTXCACHE: return org.hl7.fhir.r5.utils.GuideParameterCode.PATHTXCACHE;
case EXPANSIONPARAMETER: return org.hl7.fhir.r5.utils.GuideParameterCode.EXPANSIONPARAMETER;
case RULEBROKENLINKS: return org.hl7.fhir.r5.utils.GuideParameterCode.RULEBROKENLINKS;
case GENERATEXML: return org.hl7.fhir.r5.utils.GuideParameterCode.GENERATEXML;
case GENERATEJSON: return org.hl7.fhir.r5.utils.GuideParameterCode.GENERATEJSON;
case GENERATETURTLE: return org.hl7.fhir.r5.utils.GuideParameterCode.GENERATETURTLE;
case HTMLTEMPLATE: return org.hl7.fhir.r5.utils.GuideParameterCode.HTMLTEMPLATE;
default: return org.hl7.fhir.r5.utils.GuideParameterCode.NULL;
}
}
public static org.hl7.fhir.r4.model.ImplementationGuide.GuideParameterCode convertGuideParameterCode(org.hl7.fhir.r5.model.ImplementationGuide.GuideParameterCode src) throws FHIRException {
public static org.hl7.fhir.r4.model.ImplementationGuide.GuideParameterCode convertGuideParameterCode(org.hl7.fhir.r5.utils.GuideParameterCode src) throws FHIRException {
if (src == null)
return null;
switch (src) {

View File

@ -60,141 +60,147 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50;
public class Media extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.Media convertMedia(org.hl7.fhir.r4.model.Media src) throws FHIRException {
public static org.hl7.fhir.r5.model.DocumentReference convertMedia(org.hl7.fhir.r4.model.Media src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Media tgt = new org.hl7.fhir.r5.model.Media();
org.hl7.fhir.r5.model.DocumentReference tgt = new org.hl7.fhir.r5.model.DocumentReference();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn())
tgt.addBasedOn(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatus(convertMediaStatus(src.getStatus()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasModality())
tgt.setModality(convertCodeableConcept(src.getModality()));
if (src.hasView())
tgt.setView(convertCodeableConcept(src.getView()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasCreated())
tgt.setCreated(convertType(src.getCreated()));
if (src.hasIssued())
tgt.setIssuedElement(convertInstant(src.getIssuedElement()));
if (src.hasOperator())
tgt.setOperator(convertReference(src.getOperator()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
tgt.addReasonCode(convertCodeableConcept(t));
if (src.hasBodySite())
tgt.setBodySite(convertCodeableConcept(src.getBodySite()));
if (src.hasDeviceName())
tgt.setDeviceNameElement(convertString(src.getDeviceNameElement()));
if (src.hasDevice())
tgt.setDevice(convertReference(src.getDevice()));
if (src.hasHeight())
tgt.setHeightElement(convertPositiveInt(src.getHeightElement()));
if (src.hasWidth())
tgt.setWidthElement(convertPositiveInt(src.getWidthElement()));
if (src.hasFrames())
tgt.setFramesElement(convertPositiveInt(src.getFramesElement()));
if (src.hasDuration())
tgt.setDurationElement(convertDecimal(src.getDurationElement()));
if (src.hasContent())
tgt.setContent(convertAttachment(src.getContent()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(convertIdentifier(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn())
// tgt.addBasedOn(convertReference(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getPartOf())
// tgt.addPartOf(convertReference(t));
// if (src.hasStatus())
// tgt.setStatus(convertMediaStatus(src.getStatus()));
// if (src.hasType())
// tgt.setType(convertCodeableConcept(src.getType()));
// if (src.hasModality())
// tgt.setModality(convertCodeableConcept(src.getModality()));
// if (src.hasView())
// tgt.setView(convertCodeableConcept(src.getView()));
// if (src.hasSubject())
// tgt.setSubject(convertReference(src.getSubject()));
// if (src.hasEncounter())
// tgt.setEncounter(convertReference(src.getEncounter()));
// if (src.hasCreated())
// tgt.setCreated(convertType(src.getCreated()));
// if (src.hasIssued())
// tgt.setIssuedElement(convertInstant(src.getIssuedElement()));
// if (src.hasOperator())
// tgt.setOperator(convertReference(src.getOperator()));
// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
// tgt.addReasonCode(convertCodeableConcept(t));
// if (src.hasBodySite())
// tgt.setBodySite(convertCodeableConcept(src.getBodySite()));
// if (src.hasDeviceName())
// tgt.setDeviceNameElement(convertString(src.getDeviceNameElement()));
// if (src.hasDevice())
// tgt.setDevice(convertReference(src.getDevice()));
// if (src.hasHeight())
// tgt.setHeightElement(convertPositiveInt(src.getHeightElement()));
// if (src.hasWidth())
// tgt.setWidthElement(convertPositiveInt(src.getWidthElement()));
// if (src.hasFrames())
// tgt.setFramesElement(convertPositiveInt(src.getFramesElement()));
// if (src.hasDuration())
// tgt.setDurationElement(convertDecimal(src.getDurationElement()));
// if (src.hasContent())
// tgt.setContent(convertAttachment(src.getContent()));
// for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
// tgt.addNote(convertAnnotation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.Media convertMedia(org.hl7.fhir.r5.model.Media src) throws FHIRException {
/**
* Todo: how do you decide that it maps to a media?
* @param src
* @return
* @throws FHIRException
*/
public static org.hl7.fhir.r4.model.Media convertMedia(org.hl7.fhir.r5.model.DocumentReference src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Media tgt = new org.hl7.fhir.r4.model.Media();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn())
tgt.addBasedOn(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatus(convertMediaStatus(src.getStatus()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasModality())
tgt.setModality(convertCodeableConcept(src.getModality()));
if (src.hasView())
tgt.setView(convertCodeableConcept(src.getView()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasCreated())
tgt.setCreated(convertType(src.getCreated()));
if (src.hasIssued())
tgt.setIssuedElement(convertInstant(src.getIssuedElement()));
if (src.hasOperator())
tgt.setOperator(convertReference(src.getOperator()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReasonCode())
tgt.addReasonCode(convertCodeableConcept(t));
if (src.hasBodySite())
tgt.setBodySite(convertCodeableConcept(src.getBodySite()));
if (src.hasDeviceName())
tgt.setDeviceNameElement(convertString(src.getDeviceNameElement()));
if (src.hasDevice())
tgt.setDevice(convertReference(src.getDevice()));
if (src.hasHeight())
tgt.setHeightElement(convertPositiveInt(src.getHeightElement()));
if (src.hasWidth())
tgt.setWidthElement(convertPositiveInt(src.getWidthElement()));
if (src.hasFrames())
tgt.setFramesElement(convertPositiveInt(src.getFramesElement()));
if (src.hasDuration())
tgt.setDurationElement(convertDecimal(src.getDurationElement()));
if (src.hasContent())
tgt.setContent(convertAttachment(src.getContent()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
// for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(convertIdentifier(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn())
// tgt.addBasedOn(convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getPartOf())
// tgt.addPartOf(convertReference(t));
// if (src.hasStatus())
// tgt.setStatus(convertMediaStatus(src.getStatus()));
// if (src.hasType())
// tgt.setType(convertCodeableConcept(src.getType()));
// if (src.hasModality())
// tgt.setModality(convertCodeableConcept(src.getModality()));
// if (src.hasView())
// tgt.setView(convertCodeableConcept(src.getView()));
// if (src.hasSubject())
// tgt.setSubject(convertReference(src.getSubject()));
// if (src.hasEncounter())
// tgt.setEncounter(convertReference(src.getEncounter()));
// if (src.hasCreated())
// tgt.setCreated(convertType(src.getCreated()));
// if (src.hasIssued())
// tgt.setIssuedElement(convertInstant(src.getIssuedElement()));
// if (src.hasOperator())
// tgt.setOperator(convertReference(src.getOperator()));
// for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReasonCode())
// tgt.addReasonCode(convertCodeableConcept(t));
// if (src.hasBodySite())
// tgt.setBodySite(convertCodeableConcept(src.getBodySite()));
// if (src.hasDeviceName())
// tgt.setDeviceNameElement(convertString(src.getDeviceNameElement()));
// if (src.hasDevice())
// tgt.setDevice(convertReference(src.getDevice()));
// if (src.hasHeight())
// tgt.setHeightElement(convertPositiveInt(src.getHeightElement()));
// if (src.hasWidth())
// tgt.setWidthElement(convertPositiveInt(src.getWidthElement()));
// if (src.hasFrames())
// tgt.setFramesElement(convertPositiveInt(src.getFramesElement()));
// if (src.hasDuration())
// tgt.setDurationElement(convertDecimal(src.getDurationElement()));
// if (src.hasContent())
// tgt.setContent(convertAttachment(src.getContent()));
// for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
// tgt.addNote(convertAnnotation(t));
return tgt;
}
public static org.hl7.fhir.r5.model.Media.MediaStatus convertMediaStatus(org.hl7.fhir.r4.model.Media.MediaStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case PREPARATION: return org.hl7.fhir.r5.model.Media.MediaStatus.PREPARATION;
case INPROGRESS: return org.hl7.fhir.r5.model.Media.MediaStatus.INPROGRESS;
case NOTDONE: return org.hl7.fhir.r5.model.Media.MediaStatus.NOTDONE;
case ONHOLD: return org.hl7.fhir.r5.model.Media.MediaStatus.ONHOLD;
case STOPPED: return org.hl7.fhir.r5.model.Media.MediaStatus.STOPPED;
case COMPLETED: return org.hl7.fhir.r5.model.Media.MediaStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.Media.MediaStatus.ENTEREDINERROR;
case UNKNOWN: return org.hl7.fhir.r5.model.Media.MediaStatus.UNKNOWN;
default: return org.hl7.fhir.r5.model.Media.MediaStatus.NULL;
}
}
public static org.hl7.fhir.r4.model.Media.MediaStatus convertMediaStatus(org.hl7.fhir.r5.model.Media.MediaStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case PREPARATION: return org.hl7.fhir.r4.model.Media.MediaStatus.PREPARATION;
case INPROGRESS: return org.hl7.fhir.r4.model.Media.MediaStatus.INPROGRESS;
case NOTDONE: return org.hl7.fhir.r4.model.Media.MediaStatus.NOTDONE;
case ONHOLD: return org.hl7.fhir.r4.model.Media.MediaStatus.ONHOLD;
case STOPPED: return org.hl7.fhir.r4.model.Media.MediaStatus.STOPPED;
case COMPLETED: return org.hl7.fhir.r4.model.Media.MediaStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r4.model.Media.MediaStatus.ENTEREDINERROR;
case UNKNOWN: return org.hl7.fhir.r4.model.Media.MediaStatus.UNKNOWN;
default: return org.hl7.fhir.r4.model.Media.MediaStatus.NULL;
}
}
// public static org.hl7.fhir.r5.model.Media.MediaStatus convertMediaStatus(org.hl7.fhir.r4.model.Media.MediaStatus src) throws FHIRException {
// if (src == null)
// return null;
// switch (src) {
// case PREPARATION: return org.hl7.fhir.r5.model.Media.MediaStatus.PREPARATION;
// case INPROGRESS: return org.hl7.fhir.r5.model.Media.MediaStatus.INPROGRESS;
// case NOTDONE: return org.hl7.fhir.r5.model.Media.MediaStatus.NOTDONE;
// case ONHOLD: return org.hl7.fhir.r5.model.Media.MediaStatus.ONHOLD;
// case STOPPED: return org.hl7.fhir.r5.model.Media.MediaStatus.STOPPED;
// case COMPLETED: return org.hl7.fhir.r5.model.Media.MediaStatus.COMPLETED;
// case ENTEREDINERROR: return org.hl7.fhir.r5.model.Media.MediaStatus.ENTEREDINERROR;
// case UNKNOWN: return org.hl7.fhir.r5.model.Media.MediaStatus.UNKNOWN;
// default: return org.hl7.fhir.r5.model.Media.MediaStatus.NULL;
// }
//}
//
// public static org.hl7.fhir.r4.model.Media.MediaStatus convertMediaStatus(org.hl7.fhir.r5.model.Media.MediaStatus src) throws FHIRException {
// if (src == null)
// return null;
// switch (src) {
// case PREPARATION: return org.hl7.fhir.r4.model.Media.MediaStatus.PREPARATION;
// case INPROGRESS: return org.hl7.fhir.r4.model.Media.MediaStatus.INPROGRESS;
// case NOTDONE: return org.hl7.fhir.r4.model.Media.MediaStatus.NOTDONE;
// case ONHOLD: return org.hl7.fhir.r4.model.Media.MediaStatus.ONHOLD;
// case STOPPED: return org.hl7.fhir.r4.model.Media.MediaStatus.STOPPED;
// case COMPLETED: return org.hl7.fhir.r4.model.Media.MediaStatus.COMPLETED;
// case ENTEREDINERROR: return org.hl7.fhir.r4.model.Media.MediaStatus.ENTEREDINERROR;
// case UNKNOWN: return org.hl7.fhir.r4.model.Media.MediaStatus.UNKNOWN;
// default: return org.hl7.fhir.r4.model.Media.MediaStatus.NULL;
// }
//}
}

View File

@ -74,7 +74,7 @@ public class Medication extends VersionConvertor_40_50 {
if (src.hasManufacturer())
tgt.setManufacturer(convertReference(src.getManufacturer()));
if (src.hasForm())
tgt.setForm(convertCodeableConcept(src.getForm()));
tgt.setDoseForm(convertCodeableConcept(src.getForm()));
if (src.hasAmount())
tgt.setAmount(convertRatio(src.getAmount()));
for (org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent t : src.getIngredient())
@ -97,8 +97,8 @@ public class Medication extends VersionConvertor_40_50 {
tgt.setStatus(convertMedicationStatus(src.getStatus()));
if (src.hasManufacturer())
tgt.setManufacturer(convertReference(src.getManufacturer()));
if (src.hasForm())
tgt.setForm(convertCodeableConcept(src.getForm()));
if (src.hasDoseForm())
tgt.setForm(convertCodeableConcept(src.getDoseForm()));
if (src.hasAmount())
tgt.setAmount(convertRatio(src.getAmount()));
for (org.hl7.fhir.r5.model.Medication.MedicationIngredientComponent t : src.getIngredient())
@ -153,8 +153,8 @@ public class Medication extends VersionConvertor_40_50 {
tgt.setItem(convertType(src.getItem()));
if (src.hasIsActive())
tgt.setIsActiveElement(convertBoolean(src.getIsActiveElement()));
if (src.hasStrength())
tgt.setStrength(convertRatio(src.getStrength()));
if (src.hasStrengthRatio())
tgt.setStrength(convertRatio(src.getStrengthRatio()));
return tgt;
}

View File

@ -22,7 +22,10 @@ package org.hl7.fhir.convertors.conv40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatus;
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
@ -68,25 +71,25 @@ public class MedicationAdministration extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r4.model.UriType t : src.getInstantiates())
tgt.getInstantiates().add(convertUri(t));
tgt.getInstantiatesUri().add(convertUri(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertMedicationAdministrationStatus(src.getStatusElement()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(convertCodeableConcept(t));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.addCategory(convertCodeableConcept(src.getCategory()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
tgt.setEncounter(convertReference(src.getContext()));
for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInformation())
tgt.addSupportingInformation(convertReference(t));
if (src.hasEffective())
tgt.setEffective(convertType(src.getEffective()));
tgt.setOccurence(convertType(src.getEffective()));
for (org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent t : src.getPerformer())
tgt.addPerformer(convertMedicationAdministrationPerformerComponent(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
@ -113,26 +116,26 @@ public class MedicationAdministration extends VersionConvertor_40_50 {
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r5.model.UriType t : src.getInstantiates())
for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri())
tgt.getInstantiates().add(convertUri(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertMedicationAdministrationStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(convertCodeableConcept(t));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
if (src.hasEncounter())
tgt.setContext(convertReference(src.getEncounter()));
for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInformation())
tgt.addSupportingInformation(convertReference(t));
if (src.hasEffective())
tgt.setEffective(convertType(src.getEffective()));
if (src.hasOccurence())
tgt.setEffective(convertType(src.getOccurence()));
for (org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent t : src.getPerformer())
tgt.addPerformer(convertMedicationAdministrationPerformerComponent(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReasonCode())
@ -152,6 +155,24 @@ public class MedicationAdministration extends VersionConvertor_40_50 {
return tgt;
}
private static CodeType convertMedicationAdministrationStatus(Enumeration<MedicationAdministrationStatus> src) {
if (src == null)
return null;
CodeType tgt = new CodeType();
copyElement(src, tgt);
tgt.setValue(src.getCode());
return tgt;
}
private static Enumeration<MedicationAdministrationStatus> convertMedicationAdministrationStatus(CodeType src) {
if (src == null)
return null;
Enumeration<MedicationAdministrationStatus> tgt = new Enumeration<MedicationAdministrationStatus>();
copyElement(src, tgt);
tgt.setValue(MedicationAdministrationStatus.fromCode(src.getCode()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent convertMedicationAdministrationPerformerComponent(org.hl7.fhir.r4.model.MedicationAdministration.MedicationAdministrationPerformerComponent src) throws FHIRException {
if (src == null)
return null;

View File

@ -22,7 +22,9 @@ package org.hl7.fhir.convertors.conv40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
@ -70,17 +72,17 @@ public class MedicationDispense extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertMedicationStatus(src.getStatusElement()));
if (src.hasStatusReason())
tgt.setStatusReason(convertType(src.getStatusReason()));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.addCategory(convertCodeableConcept(src.getCategory()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
tgt.setEncounter(convertReference(src.getContext()));
for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInformation())
tgt.addSupportingInformation(convertReference(t));
for (org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent t : src.getPerformer())
@ -126,17 +128,17 @@ public class MedicationDispense extends VersionConvertor_40_50 {
for (org.hl7.fhir.r5.model.Reference t : src.getPartOf())
tgt.addPartOf(convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertStatus(src.getStatusElement()));
if (src.hasStatusReason())
tgt.setStatusReason(convertType(src.getStatusReason()));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
if (src.hasEncounter())
tgt.setContext(convertReference(src.getEncounter()));
for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInformation())
tgt.addSupportingInformation(convertReference(t));
for (org.hl7.fhir.r5.model.MedicationDispense.MedicationDispensePerformerComponent t : src.getPerformer())
@ -172,6 +174,26 @@ public class MedicationDispense extends VersionConvertor_40_50 {
return tgt;
}
private static CodeType convertStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> src) {
if (src == null)
return null;
CodeType tgt = new CodeType();
copyElement(src, tgt);
if (src.getValue() == MedicationDispenseStatus.DECLINED)
tgt.setValue("stopped");
else
tgt.setValue(src.getValueAsString());
return tgt;
}
private static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> convertMedicationStatus(org.hl7.fhir.r4.model.CodeType src) {
if (src == null)
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus>();
copyElement(src, tgt);
tgt.setValue(MedicationDispenseStatus.fromCode(src.getCode()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationDispense.MedicationDispensePerformerComponent convertMedicationDispensePerformerComponent(org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent src) throws FHIRException {
if (src == null)
return null;
@ -208,7 +230,7 @@ public class MedicationDispense extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason())
tgt.addReason(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getResponsibleParty())
tgt.addResponsibleParty(convertReference(t));
tgt.setResponsibleParty(convertReference(t));
return tgt;
}
@ -223,8 +245,8 @@ public class MedicationDispense extends VersionConvertor_40_50 {
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getReason())
tgt.addReason(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResponsibleParty())
tgt.addResponsibleParty(convertReference(t));
if (src.hasResponsibleParty())
tgt.addResponsibleParty(convertReference(src.getResponsibleParty()));
return tgt;
}

View File

@ -22,7 +22,10 @@ package org.hl7.fhir.convertors.conv40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatus;
import org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatus;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
@ -68,7 +71,7 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertMedicationKnowledgeStatus(src.getStatusElement()));
if (src.hasManufacturer())
tgt.setManufacturer(convertReference(src.getManufacturer()));
if (src.hasDoseForm())
@ -95,20 +98,20 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
tgt.addCost(convertMedicationKnowledgeCostComponent(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent t : src.getMonitoringProgram())
tgt.addMonitoringProgram(convertMedicationKnowledgeMonitoringProgramComponent(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent t : src.getAdministrationGuidelines())
tgt.addAdministrationGuidelines(convertMedicationKnowledgeAdministrationGuidelinesComponent(t));
// for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent t : src.getAdministrationGuidelines())
// tgt.addAdministrationGuidelines(convertMedicationKnowledgeAdministrationGuidelinesComponent(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent t : src.getMedicineClassification())
tgt.addMedicineClassification(convertMedicationKnowledgeMedicineClassificationComponent(t));
if (src.hasPackaging())
tgt.setPackaging(convertMedicationKnowledgePackagingComponent(src.getPackaging()));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent t : src.getDrugCharacteristic())
tgt.addDrugCharacteristic(convertMedicationKnowledgeDrugCharacteristicComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getContraindication())
tgt.addContraindication(convertReference(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getContraindication())
// tgt.addContraindication(convertReference(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryComponent t : src.getRegulatory())
tgt.addRegulatory(convertMedicationKnowledgeRegulatoryComponent(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent t : src.getKinetics())
tgt.addKinetics(convertMedicationKnowledgeKineticsComponent(t));
// for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent t : src.getKinetics())
// tgt.addKinetics(convertMedicationKnowledgeKineticsComponent(t));
return tgt;
}
@ -120,7 +123,7 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatusElement(convertCode(src.getStatusElement()));
tgt.setStatusElement(convertMedicationKnowledgeStatus(src.getStatusElement()));
if (src.hasManufacturer())
tgt.setManufacturer(convertReference(src.getManufacturer()));
if (src.hasDoseForm())
@ -147,20 +150,38 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
tgt.addCost(convertMedicationKnowledgeCostComponent(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeMonitoringProgramComponent t : src.getMonitoringProgram())
tgt.addMonitoringProgram(convertMedicationKnowledgeMonitoringProgramComponent(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent t : src.getAdministrationGuidelines())
tgt.addAdministrationGuidelines(convertMedicationKnowledgeAdministrationGuidelinesComponent(t));
// for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent t : src.getAdministrationGuidelines())
// tgt.addAdministrationGuidelines(convertMedicationKnowledgeAdministrationGuidelinesComponent(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent t : src.getMedicineClassification())
tgt.addMedicineClassification(convertMedicationKnowledgeMedicineClassificationComponent(t));
if (src.hasPackaging())
tgt.setPackaging(convertMedicationKnowledgePackagingComponent(src.getPackaging()));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeDrugCharacteristicComponent t : src.getDrugCharacteristic())
tgt.addDrugCharacteristic(convertMedicationKnowledgeDrugCharacteristicComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getContraindication())
tgt.addContraindication(convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getContraindication())
// tgt.addContraindication(convertReference(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryComponent t : src.getRegulatory())
tgt.addRegulatory(convertMedicationKnowledgeRegulatoryComponent(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent t : src.getKinetics())
tgt.addKinetics(convertMedicationKnowledgeKineticsComponent(t));
// for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent t : src.getKinetics())
// tgt.addKinetics(convertMedicationKnowledgeKineticsComponent(t));
return tgt;
}
private static CodeType convertMedicationKnowledgeStatus(Enumeration<MedicationKnowledgeStatus> src) {
if (src == null)
return null;
CodeType tgt = new CodeType();
copyElement(src, tgt);
tgt.setValue(src.getValueAsString());
return tgt;
}
private static Enumeration<MedicationKnowledgeStatus> convertMedicationKnowledgeStatus(CodeType src) {
if (src == null)
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatus>();
copyElement(src, tgt);
tgt.setValue(MedicationKnowledgeStatus.fromCode(src.getCode()));
return tgt;
}
@ -292,81 +313,81 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent convertMedicationKnowledgeAdministrationGuidelinesComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent t : src.getDosage())
tgt.addDosage(convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(t));
if (src.hasIndication())
tgt.setIndication(convertType(src.getIndication()));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent t : src.getPatientCharacteristics())
tgt.addPatientCharacteristics(convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent convertMedicationKnowledgeAdministrationGuidelinesComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent t : src.getDosage())
tgt.addDosage(convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(t));
if (src.hasIndication())
tgt.setIndication(convertType(src.getIndication()));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent t : src.getPatientCharacteristics())
tgt.addPatientCharacteristics(convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r4.model.Dosage t : src.getDosage())
tgt.addDosage(convertDosage(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r5.model.Dosage t : src.getDosage())
tgt.addDosage(convertDosage(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent();
copyElement(src, tgt);
if (src.hasCharacteristic())
tgt.setCharacteristic(convertType(src.getCharacteristic()));
for (org.hl7.fhir.r4.model.StringType t : src.getValue())
tgt.getValue().add(convertString(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent();
copyElement(src, tgt);
if (src.hasCharacteristic())
tgt.setCharacteristic(convertType(src.getCharacteristic()));
for (org.hl7.fhir.r5.model.StringType t : src.getValue())
tgt.getValue().add(convertString(t));
return tgt;
}
// public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent convertMedicationKnowledgeAdministrationGuidelinesComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent();
// copyElement(src, tgt);
// for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent t : src.getDosage())
// tgt.addDosage(convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(t));
// if (src.hasIndication())
// tgt.setIndication(convertType(src.getIndication()));
// for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent t : src.getPatientCharacteristics())
// tgt.addPatientCharacteristics(convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(t));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent convertMedicationKnowledgeAdministrationGuidelinesComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesComponent();
// copyElement(src, tgt);
// for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent t : src.getDosage())
// tgt.addDosage(convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(t));
// if (src.hasIndication())
// tgt.setIndication(convertType(src.getIndication()));
// for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent t : src.getPatientCharacteristics())
// tgt.addPatientCharacteristics(convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(t));
// return tgt;
// }
//
// public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent();
// copyElement(src, tgt);
// if (src.hasType())
// tgt.setType(convertCodeableConcept(src.getType()));
// for (org.hl7.fhir.r4.model.Dosage t : src.getDosage())
// tgt.addDosage(convertDosage(t));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent convertMedicationKnowledgeAdministrationGuidelinesDosageComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesDosageComponent();
// copyElement(src, tgt);
// if (src.hasType())
// tgt.setType(convertCodeableConcept(src.getType()));
// for (org.hl7.fhir.r5.model.Dosage t : src.getDosage())
// tgt.addDosage(convertDosage(t));
// return tgt;
// }
//
// public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent();
// copyElement(src, tgt);
// if (src.hasCharacteristic())
// tgt.setCharacteristic(convertType(src.getCharacteristic()));
// for (org.hl7.fhir.r4.model.StringType t : src.getValue())
// tgt.getValue().add(convertString(t));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent convertMedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeAdministrationGuidelinesPatientCharacteristicsComponent();
// copyElement(src, tgt);
// if (src.hasCharacteristic())
// tgt.setCharacteristic(convertType(src.getCharacteristic()));
// for (org.hl7.fhir.r5.model.StringType t : src.getValue())
// tgt.getValue().add(convertString(t));
// return tgt;
// }
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent convertMedicationKnowledgeMedicineClassificationComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeMedicineClassificationComponent src) throws FHIRException {
if (src == null)
@ -449,8 +470,8 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
tgt.setRegulatoryAuthority(convertReference(src.getRegulatoryAuthority()));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent t : src.getSubstitution())
tgt.addSubstitution(convertMedicationKnowledgeRegulatorySubstitutionComponent(t));
for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent t : src.getSchedule())
tgt.addSchedule(convertMedicationKnowledgeRegulatoryScheduleComponent(t));
// for (org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent t : src.getSchedule())
// tgt.addSchedule(convertMedicationKnowledgeRegulatoryScheduleComponent(t));
if (src.hasMaxDispense())
tgt.setMaxDispense(convertMedicationKnowledgeRegulatoryMaxDispenseComponent(src.getMaxDispense()));
return tgt;
@ -465,8 +486,8 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
tgt.setRegulatoryAuthority(convertReference(src.getRegulatoryAuthority()));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatorySubstitutionComponent t : src.getSubstitution())
tgt.addSubstitution(convertMedicationKnowledgeRegulatorySubstitutionComponent(t));
for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent t : src.getSchedule())
tgt.addSchedule(convertMedicationKnowledgeRegulatoryScheduleComponent(t));
// for (org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent t : src.getSchedule())
// tgt.addSchedule(convertMedicationKnowledgeRegulatoryScheduleComponent(t));
if (src.hasMaxDispense())
tgt.setMaxDispense(convertMedicationKnowledgeRegulatoryMaxDispenseComponent(src.getMaxDispense()));
return tgt;
@ -496,26 +517,26 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent convertMedicationKnowledgeRegulatoryScheduleComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent();
copyElement(src, tgt);
if (src.hasSchedule())
tgt.setSchedule(convertCodeableConcept(src.getSchedule()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent convertMedicationKnowledgeRegulatoryScheduleComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent();
copyElement(src, tgt);
if (src.hasSchedule())
tgt.setSchedule(convertCodeableConcept(src.getSchedule()));
return tgt;
}
// public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent convertMedicationKnowledgeRegulatoryScheduleComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent();
// copyElement(src, tgt);
// if (src.hasSchedule())
// tgt.setSchedule(convertCodeableConcept(src.getSchedule()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent convertMedicationKnowledgeRegulatoryScheduleComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryScheduleComponent();
// copyElement(src, tgt);
// if (src.hasSchedule())
// tgt.setSchedule(convertCodeableConcept(src.getSchedule()));
// return tgt;
// }
//
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent convertMedicationKnowledgeRegulatoryMaxDispenseComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeRegulatoryMaxDispenseComponent src) throws FHIRException {
if (src == null)
return null;
@ -540,33 +561,33 @@ public class MedicationKnowledge extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent convertMedicationKnowledgeKineticsComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.Quantity t : src.getAreaUnderCurve())
tgt.addAreaUnderCurve(convertSimpleQuantity(t));
for (org.hl7.fhir.r4.model.Quantity t : src.getLethalDose50())
tgt.addLethalDose50(convertSimpleQuantity(t));
if (src.hasHalfLifePeriod())
tgt.setHalfLifePeriod(convertDuration(src.getHalfLifePeriod()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent convertMedicationKnowledgeKineticsComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Quantity t : src.getAreaUnderCurve())
tgt.addAreaUnderCurve(convertSimpleQuantity(t));
for (org.hl7.fhir.r5.model.Quantity t : src.getLethalDose50())
tgt.addLethalDose50(convertSimpleQuantity(t));
if (src.hasHalfLifePeriod())
tgt.setHalfLifePeriod(convertDuration(src.getHalfLifePeriod()));
return tgt;
}
// public static org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent convertMedicationKnowledgeKineticsComponent(org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent tgt = new org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent();
// copyElement(src, tgt);
// for (org.hl7.fhir.r4.model.Quantity t : src.getAreaUnderCurve())
// tgt.addAreaUnderCurve(convertSimpleQuantity(t));
// for (org.hl7.fhir.r4.model.Quantity t : src.getLethalDose50())
// tgt.addLethalDose50(convertSimpleQuantity(t));
// if (src.hasHalfLifePeriod())
// tgt.setHalfLifePeriod(convertDuration(src.getHalfLifePeriod()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent convertMedicationKnowledgeKineticsComponent(org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent tgt = new org.hl7.fhir.r4.model.MedicationKnowledge.MedicationKnowledgeKineticsComponent();
// copyElement(src, tgt);
// for (org.hl7.fhir.r5.model.Quantity t : src.getAreaUnderCurve())
// tgt.addAreaUnderCurve(convertSimpleQuantity(t));
// for (org.hl7.fhir.r5.model.Quantity t : src.getLethalDose50())
// tgt.addLethalDose50(convertSimpleQuantity(t));
// if (src.hasHalfLifePeriod())
// tgt.setHalfLifePeriod(convertDuration(src.getHalfLifePeriod()));
// return tgt;
// }
}

View File

@ -79,8 +79,10 @@ public class MedicationRequest extends VersionConvertor_40_50 {
tgt.setPriority(convertMedicationRequestPriority(src.getPriority()));
if (src.hasDoNotPerform())
tgt.setDoNotPerformElement(convertBoolean(src.getDoNotPerformElement()));
if (src.hasReported())
tgt.setReported(convertType(src.getReported()));
if (src.hasReportedBooleanType())
tgt.setReportedElement(convertBoolean(src.getReportedBooleanType()));
if (src.hasReportedReference())
tgt.setInformationSource(convertReference(src.getReportedReference()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
@ -152,7 +154,9 @@ public class MedicationRequest extends VersionConvertor_40_50 {
if (src.hasDoNotPerform())
tgt.setDoNotPerformElement(convertBoolean(src.getDoNotPerformElement()));
if (src.hasReported())
tgt.setReported(convertType(src.getReported()));
tgt.setReported(convertBoolean(src.getReportedElement()));
if (src.hasInformationSource())
tgt.setReported(convertReference(src.getInformationSource()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())

View File

@ -60,10 +60,10 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50;
public class MedicationStatement extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException {
public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement();
org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
@ -76,13 +76,13 @@ public class MedicationStatement extends VersionConvertor_40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(convertCodeableConcept(t));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.addCategory(convertCodeableConcept(src.getCategory()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
tgt.setEncounter(convertReference(src.getContext()));
if (src.hasEffective())
tgt.setEffective(convertType(src.getEffective()));
if (src.hasDateAsserted())
@ -102,7 +102,7 @@ public class MedicationStatement extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException {
public static org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicationStatement tgt = new org.hl7.fhir.r4.model.MedicationStatement();
@ -118,13 +118,13 @@ public class MedicationStatement extends VersionConvertor_40_50 {
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(convertCodeableConcept(t));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasContext())
tgt.setContext(convertReference(src.getContext()));
if (src.hasEncounter())
tgt.setContext(convertReference(src.getEncounter()));
if (src.hasEffective())
tgt.setEffective(convertType(src.getEffective()));
if (src.hasDateAsserted())
@ -144,23 +144,23 @@ public class MedicationStatement extends VersionConvertor_40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
public static org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus convertMedicationStatementStatus(org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case ACTIVE: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.ACTIVE;
case COMPLETED: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.ENTEREDINERROR;
case INTENDED: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.INTENDED;
case STOPPED: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.STOPPED;
case ONHOLD: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.ONHOLD;
case UNKNOWN: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.UNKNOWN;
case NOTTAKEN: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.NOTTAKEN;
default: return org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus.NULL;
case ACTIVE: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.ACTIVE;
case COMPLETED: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.COMPLETED;
case ENTEREDINERROR: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.ENTEREDINERROR;
case INTENDED: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.INTENDED;
case STOPPED: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.STOPPED;
case ONHOLD: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.ONHOLD;
case UNKNOWN: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.UNKNOWN;
case NOTTAKEN: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.NOTTAKEN;
default: return org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus.NULL;
}
}
public static org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatus src) throws FHIRException {
public static org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus convertMedicationStatementStatus(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {

View File

@ -1,324 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProduct extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProduct convertMedicinalProduct(org.hl7.fhir.r4.model.MedicinalProduct src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct tgt = new org.hl7.fhir.r5.model.MedicinalProduct();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasDomain())
tgt.setDomain(convertCoding(src.getDomain()));
if (src.hasCombinedPharmaceuticalDoseForm())
tgt.setCombinedPharmaceuticalDoseForm(convertCodeableConcept(src.getCombinedPharmaceuticalDoseForm()));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
if (src.hasAdditionalMonitoringIndicator())
tgt.setAdditionalMonitoringIndicator(convertCodeableConcept(src.getAdditionalMonitoringIndicator()));
for (org.hl7.fhir.r4.model.StringType t : src.getSpecialMeasures())
tgt.getSpecialMeasures().add(convertString(t));
if (src.hasPaediatricUseIndicator())
tgt.setPaediatricUseIndicator(convertCodeableConcept(src.getPaediatricUseIndicator()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getProductClassification())
tgt.addProductClassification(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.MarketingStatus t : src.getMarketingStatus())
tgt.addMarketingStatus(convertMarketingStatus(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPharmaceuticalProduct())
tgt.addPharmaceuticalProduct(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPackagedMedicinalProduct())
tgt.addPackagedMedicinalProduct(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getAttachedDocument())
tgt.addAttachedDocument(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getMasterFile())
tgt.addMasterFile(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getContact())
tgt.addContact(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getClinicalTrial())
tgt.addClinicalTrial(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameComponent t : src.getName())
tgt.addName(convertMedicinalProductNameComponent(t));
for (org.hl7.fhir.r4.model.Identifier t : src.getCrossReference())
tgt.addCrossReference(convertIdentifier(t));
for (org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent t : src.getManufacturingBusinessOperation())
tgt.addManufacturingBusinessOperation(convertMedicinalProductManufacturingBusinessOperationComponent(t));
for (org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent t : src.getSpecialDesignation())
tgt.addSpecialDesignation(convertMedicinalProductSpecialDesignationComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct convertMedicinalProduct(org.hl7.fhir.r5.model.MedicinalProduct src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct tgt = new org.hl7.fhir.r4.model.MedicinalProduct();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasDomain())
tgt.setDomain(convertCoding(src.getDomain()));
if (src.hasCombinedPharmaceuticalDoseForm())
tgt.setCombinedPharmaceuticalDoseForm(convertCodeableConcept(src.getCombinedPharmaceuticalDoseForm()));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
if (src.hasAdditionalMonitoringIndicator())
tgt.setAdditionalMonitoringIndicator(convertCodeableConcept(src.getAdditionalMonitoringIndicator()));
for (org.hl7.fhir.r5.model.StringType t : src.getSpecialMeasures())
tgt.getSpecialMeasures().add(convertString(t));
if (src.hasPaediatricUseIndicator())
tgt.setPaediatricUseIndicator(convertCodeableConcept(src.getPaediatricUseIndicator()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getProductClassification())
tgt.addProductClassification(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.MarketingStatus t : src.getMarketingStatus())
tgt.addMarketingStatus(convertMarketingStatus(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPharmaceuticalProduct())
tgt.addPharmaceuticalProduct(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPackagedMedicinalProduct())
tgt.addPackagedMedicinalProduct(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getAttachedDocument())
tgt.addAttachedDocument(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getMasterFile())
tgt.addMasterFile(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getContact())
tgt.addContact(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getClinicalTrial())
tgt.addClinicalTrial(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameComponent t : src.getName())
tgt.addName(convertMedicinalProductNameComponent(t));
for (org.hl7.fhir.r5.model.Identifier t : src.getCrossReference())
tgt.addCrossReference(convertIdentifier(t));
for (org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent t : src.getManufacturingBusinessOperation())
tgt.addManufacturingBusinessOperation(convertMedicinalProductManufacturingBusinessOperationComponent(t));
for (org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent t : src.getSpecialDesignation())
tgt.addSpecialDesignation(convertMedicinalProductSpecialDesignationComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameComponent convertMedicinalProductNameComponent(org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameComponent tgt = new org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameComponent();
copyElement(src, tgt);
if (src.hasProductName())
tgt.setProductNameElement(convertString(src.getProductNameElement()));
for (org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameNamePartComponent t : src.getNamePart())
tgt.addNamePart(convertMedicinalProductNameNamePartComponent(t));
for (org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent t : src.getCountryLanguage())
tgt.addCountryLanguage(convertMedicinalProductNameCountryLanguageComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameComponent convertMedicinalProductNameComponent(org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameComponent tgt = new org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameComponent();
copyElement(src, tgt);
if (src.hasProductName())
tgt.setProductNameElement(convertString(src.getProductNameElement()));
for (org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameNamePartComponent t : src.getNamePart())
tgt.addNamePart(convertMedicinalProductNameNamePartComponent(t));
for (org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent t : src.getCountryLanguage())
tgt.addCountryLanguage(convertMedicinalProductNameCountryLanguageComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameNamePartComponent convertMedicinalProductNameNamePartComponent(org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameNamePartComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameNamePartComponent tgt = new org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameNamePartComponent();
copyElement(src, tgt);
if (src.hasPart())
tgt.setPartElement(convertString(src.getPartElement()));
if (src.hasType())
tgt.setType(convertCoding(src.getType()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameNamePartComponent convertMedicinalProductNameNamePartComponent(org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameNamePartComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameNamePartComponent tgt = new org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameNamePartComponent();
copyElement(src, tgt);
if (src.hasPart())
tgt.setPartElement(convertString(src.getPartElement()));
if (src.hasType())
tgt.setType(convertCoding(src.getType()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent convertMedicinalProductNameCountryLanguageComponent(org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent tgt = new org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent();
copyElement(src, tgt);
if (src.hasCountry())
tgt.setCountry(convertCodeableConcept(src.getCountry()));
if (src.hasJurisdiction())
tgt.setJurisdiction(convertCodeableConcept(src.getJurisdiction()));
if (src.hasLanguage())
tgt.setLanguage(convertCodeableConcept(src.getLanguage()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent convertMedicinalProductNameCountryLanguageComponent(org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent tgt = new org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductNameCountryLanguageComponent();
copyElement(src, tgt);
if (src.hasCountry())
tgt.setCountry(convertCodeableConcept(src.getCountry()));
if (src.hasJurisdiction())
tgt.setJurisdiction(convertCodeableConcept(src.getJurisdiction()));
if (src.hasLanguage())
tgt.setLanguage(convertCodeableConcept(src.getLanguage()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent convertMedicinalProductManufacturingBusinessOperationComponent(org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent tgt = new org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent();
copyElement(src, tgt);
if (src.hasOperationType())
tgt.setOperationType(convertCodeableConcept(src.getOperationType()));
if (src.hasAuthorisationReferenceNumber())
tgt.setAuthorisationReferenceNumber(convertIdentifier(src.getAuthorisationReferenceNumber()));
if (src.hasEffectiveDate())
tgt.setEffectiveDateElement(convertDateTime(src.getEffectiveDateElement()));
if (src.hasConfidentialityIndicator())
tgt.setConfidentialityIndicator(convertCodeableConcept(src.getConfidentialityIndicator()));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
if (src.hasRegulator())
tgt.setRegulator(convertReference(src.getRegulator()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent convertMedicinalProductManufacturingBusinessOperationComponent(org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent tgt = new org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductManufacturingBusinessOperationComponent();
copyElement(src, tgt);
if (src.hasOperationType())
tgt.setOperationType(convertCodeableConcept(src.getOperationType()));
if (src.hasAuthorisationReferenceNumber())
tgt.setAuthorisationReferenceNumber(convertIdentifier(src.getAuthorisationReferenceNumber()));
if (src.hasEffectiveDate())
tgt.setEffectiveDateElement(convertDateTime(src.getEffectiveDateElement()));
if (src.hasConfidentialityIndicator())
tgt.setConfidentialityIndicator(convertCodeableConcept(src.getConfidentialityIndicator()));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
if (src.hasRegulator())
tgt.setRegulator(convertReference(src.getRegulator()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent convertMedicinalProductSpecialDesignationComponent(org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent tgt = new org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasIntendedUse())
tgt.setIntendedUse(convertCodeableConcept(src.getIntendedUse()));
if (src.hasIndication())
tgt.setIndication(convertType(src.getIndication()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasSpecies())
tgt.setSpecies(convertCodeableConcept(src.getSpecies()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent convertMedicinalProductSpecialDesignationComponent(org.hl7.fhir.r5.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent tgt = new org.hl7.fhir.r4.model.MedicinalProduct.MedicinalProductSpecialDesignationComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasIntendedUse())
tgt.setIntendedUse(convertCodeableConcept(src.getIntendedUse()));
if (src.hasIndication())
tgt.setIndication(convertType(src.getIndication()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasSpecies())
tgt.setSpecies(convertCodeableConcept(src.getSpecies()));
return tgt;
}
}

View File

@ -1,212 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductAuthorization extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductAuthorization convertMedicinalProductAuthorization(org.hl7.fhir.r4.model.MedicinalProductAuthorization src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductAuthorization tgt = new org.hl7.fhir.r5.model.MedicinalProductAuthorization();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasStatusDate())
tgt.setStatusDateElement(convertDateTime(src.getStatusDateElement()));
if (src.hasRestoreDate())
tgt.setRestoreDateElement(convertDateTime(src.getRestoreDateElement()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
if (src.hasDataExclusivityPeriod())
tgt.setDataExclusivityPeriod(convertPeriod(src.getDataExclusivityPeriod()));
if (src.hasDateOfFirstAuthorization())
tgt.setDateOfFirstAuthorizationElement(convertDateTime(src.getDateOfFirstAuthorizationElement()));
if (src.hasInternationalBirthDate())
tgt.setInternationalBirthDateElement(convertDateTime(src.getInternationalBirthDateElement()));
if (src.hasLegalBasis())
tgt.setLegalBasis(convertCodeableConcept(src.getLegalBasis()));
for (org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent t : src.getJurisdictionalAuthorization())
tgt.addJurisdictionalAuthorization(convertMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(t));
if (src.hasHolder())
tgt.setHolder(convertReference(src.getHolder()));
if (src.hasRegulator())
tgt.setRegulator(convertReference(src.getRegulator()));
if (src.hasProcedure())
tgt.setProcedure(convertMedicinalProductAuthorizationProcedureComponent(src.getProcedure()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductAuthorization convertMedicinalProductAuthorization(org.hl7.fhir.r5.model.MedicinalProductAuthorization src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductAuthorization tgt = new org.hl7.fhir.r4.model.MedicinalProductAuthorization();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasStatusDate())
tgt.setStatusDateElement(convertDateTime(src.getStatusDateElement()));
if (src.hasRestoreDate())
tgt.setRestoreDateElement(convertDateTime(src.getRestoreDateElement()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
if (src.hasDataExclusivityPeriod())
tgt.setDataExclusivityPeriod(convertPeriod(src.getDataExclusivityPeriod()));
if (src.hasDateOfFirstAuthorization())
tgt.setDateOfFirstAuthorizationElement(convertDateTime(src.getDateOfFirstAuthorizationElement()));
if (src.hasInternationalBirthDate())
tgt.setInternationalBirthDateElement(convertDateTime(src.getInternationalBirthDateElement()));
if (src.hasLegalBasis())
tgt.setLegalBasis(convertCodeableConcept(src.getLegalBasis()));
for (org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent t : src.getJurisdictionalAuthorization())
tgt.addJurisdictionalAuthorization(convertMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(t));
if (src.hasHolder())
tgt.setHolder(convertReference(src.getHolder()));
if (src.hasRegulator())
tgt.setRegulator(convertReference(src.getRegulator()));
if (src.hasProcedure())
tgt.setProcedure(convertMedicinalProductAuthorizationProcedureComponent(src.getProcedure()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent convertMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasCountry())
tgt.setCountry(convertCodeableConcept(src.getCountry()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent convertMedicinalProductAuthorizationJurisdictionalAuthorizationComponent(org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationJurisdictionalAuthorizationComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasCountry())
tgt.setCountry(convertCodeableConcept(src.getCountry()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
if (src.hasValidityPeriod())
tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent convertMedicinalProductAuthorizationProcedureComponent(org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent();
copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasDate())
tgt.setDate(convertType(src.getDate()));
for (org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent t : src.getApplication())
tgt.addApplication(convertMedicinalProductAuthorizationProcedureComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent convertMedicinalProductAuthorizationProcedureComponent(org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent();
copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasDate())
tgt.setDate(convertType(src.getDate()));
for (org.hl7.fhir.r5.model.MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent t : src.getApplication())
tgt.addApplication(convertMedicinalProductAuthorizationProcedureComponent(t));
return tgt;
}
}

View File

@ -1,132 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductContraindication extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductContraindication convertMedicinalProductContraindication(org.hl7.fhir.r4.model.MedicinalProductContraindication src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductContraindication tgt = new org.hl7.fhir.r5.model.MedicinalProductContraindication();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDisease())
tgt.setDisease(convertCodeableConcept(src.getDisease()));
if (src.hasDiseaseStatus())
tgt.setDiseaseStatus(convertCodeableConcept(src.getDiseaseStatus()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getComorbidity())
tgt.addComorbidity(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getTherapeuticIndication())
tgt.addTherapeuticIndication(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent t : src.getOtherTherapy())
tgt.addOtherTherapy(convertMedicinalProductContraindicationOtherTherapyComponent(t));
for (org.hl7.fhir.r4.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductContraindication convertMedicinalProductContraindication(org.hl7.fhir.r5.model.MedicinalProductContraindication src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductContraindication tgt = new org.hl7.fhir.r4.model.MedicinalProductContraindication();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDisease())
tgt.setDisease(convertCodeableConcept(src.getDisease()));
if (src.hasDiseaseStatus())
tgt.setDiseaseStatus(convertCodeableConcept(src.getDiseaseStatus()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getComorbidity())
tgt.addComorbidity(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getTherapeuticIndication())
tgt.addTherapeuticIndication(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent t : src.getOtherTherapy())
tgt.addOtherTherapy(convertMedicinalProductContraindicationOtherTherapyComponent(t));
for (org.hl7.fhir.r5.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent convertMedicinalProductContraindicationOtherTherapyComponent(org.hl7.fhir.r4.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent();
copyElement(src, tgt);
if (src.hasTherapyRelationshipType())
tgt.setTherapyRelationshipType(convertCodeableConcept(src.getTherapyRelationshipType()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent convertMedicinalProductContraindicationOtherTherapyComponent(org.hl7.fhir.r5.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductContraindication.MedicinalProductContraindicationOtherTherapyComponent();
copyElement(src, tgt);
if (src.hasTherapyRelationshipType())
tgt.setTherapyRelationshipType(convertCodeableConcept(src.getTherapyRelationshipType()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
return tgt;
}
}

View File

@ -1,140 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductIndication extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductIndication convertMedicinalProductIndication(org.hl7.fhir.r4.model.MedicinalProductIndication src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIndication tgt = new org.hl7.fhir.r5.model.MedicinalProductIndication();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDiseaseSymptomProcedure())
tgt.setDiseaseSymptomProcedure(convertCodeableConcept(src.getDiseaseSymptomProcedure()));
if (src.hasDiseaseStatus())
tgt.setDiseaseStatus(convertCodeableConcept(src.getDiseaseStatus()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getComorbidity())
tgt.addComorbidity(convertCodeableConcept(t));
if (src.hasIntendedEffect())
tgt.setIntendedEffect(convertCodeableConcept(src.getIntendedEffect()));
if (src.hasDuration())
tgt.setDuration(convertQuantity(src.getDuration()));
for (org.hl7.fhir.r4.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent t : src.getOtherTherapy())
tgt.addOtherTherapy(convertMedicinalProductIndicationOtherTherapyComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getUndesirableEffect())
tgt.addUndesirableEffect(convertReference(t));
for (org.hl7.fhir.r4.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIndication convertMedicinalProductIndication(org.hl7.fhir.r5.model.MedicinalProductIndication src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIndication tgt = new org.hl7.fhir.r4.model.MedicinalProductIndication();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDiseaseSymptomProcedure())
tgt.setDiseaseSymptomProcedure(convertCodeableConcept(src.getDiseaseSymptomProcedure()));
if (src.hasDiseaseStatus())
tgt.setDiseaseStatus(convertCodeableConcept(src.getDiseaseStatus()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getComorbidity())
tgt.addComorbidity(convertCodeableConcept(t));
if (src.hasIntendedEffect())
tgt.setIntendedEffect(convertCodeableConcept(src.getIntendedEffect()));
if (src.hasDuration())
tgt.setDuration(convertQuantity(src.getDuration()));
for (org.hl7.fhir.r5.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent t : src.getOtherTherapy())
tgt.addOtherTherapy(convertMedicinalProductIndicationOtherTherapyComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getUndesirableEffect())
tgt.addUndesirableEffect(convertReference(t));
for (org.hl7.fhir.r5.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent convertMedicinalProductIndicationOtherTherapyComponent(org.hl7.fhir.r4.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent();
copyElement(src, tgt);
if (src.hasTherapyRelationshipType())
tgt.setTherapyRelationshipType(convertCodeableConcept(src.getTherapyRelationshipType()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent convertMedicinalProductIndicationOtherTherapyComponent(org.hl7.fhir.r5.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductIndication.MedicinalProductIndicationOtherTherapyComponent();
copyElement(src, tgt);
if (src.hasTherapyRelationshipType())
tgt.setTherapyRelationshipType(convertCodeableConcept(src.getTherapyRelationshipType()));
if (src.hasMedication())
tgt.setMedication(convertType(src.getMedication()));
return tgt;
}
}

View File

@ -1,240 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductIngredient extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductIngredient convertMedicinalProductIngredient(org.hl7.fhir.r4.model.MedicinalProductIngredient src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIngredient tgt = new org.hl7.fhir.r5.model.MedicinalProductIngredient();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasRole())
tgt.setRole(convertCodeableConcept(src.getRole()));
if (src.hasAllergenicIndicator())
tgt.setAllergenicIndicatorElement(convertBoolean(src.getAllergenicIndicatorElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent t : src.getSpecifiedSubstance())
tgt.addSpecifiedSubstance(convertMedicinalProductIngredientSpecifiedSubstanceComponent(t));
if (src.hasSubstance())
tgt.setSubstance(convertMedicinalProductIngredientSubstanceComponent(src.getSubstance()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIngredient convertMedicinalProductIngredient(org.hl7.fhir.r5.model.MedicinalProductIngredient src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIngredient tgt = new org.hl7.fhir.r4.model.MedicinalProductIngredient();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasRole())
tgt.setRole(convertCodeableConcept(src.getRole()));
if (src.hasAllergenicIndicator())
tgt.setAllergenicIndicatorElement(convertBoolean(src.getAllergenicIndicatorElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent t : src.getSpecifiedSubstance())
tgt.addSpecifiedSubstance(convertMedicinalProductIngredientSpecifiedSubstanceComponent(t));
if (src.hasSubstance())
tgt.setSubstance(convertMedicinalProductIngredientSubstanceComponent(src.getSubstance()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent convertMedicinalProductIngredientSpecifiedSubstanceComponent(org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasGroup())
tgt.setGroup(convertCodeableConcept(src.getGroup()));
if (src.hasConfidentiality())
tgt.setConfidentiality(convertCodeableConcept(src.getConfidentiality()));
for (org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent t : src.getStrength())
tgt.addStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent convertMedicinalProductIngredientSpecifiedSubstanceComponent(org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasGroup())
tgt.setGroup(convertCodeableConcept(src.getGroup()));
if (src.hasConfidentiality())
tgt.setConfidentiality(convertCodeableConcept(src.getConfidentiality()));
for (org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent t : src.getStrength())
tgt.addStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent();
copyElement(src, tgt);
if (src.hasPresentation())
tgt.setPresentation(convertRatio(src.getPresentation()));
if (src.hasPresentationLowLimit())
tgt.setPresentationLowLimit(convertRatio(src.getPresentationLowLimit()));
if (src.hasConcentration())
tgt.setConcentration(convertRatio(src.getConcentration()));
if (src.hasConcentrationLowLimit())
tgt.setConcentrationLowLimit(convertRatio(src.getConcentrationLowLimit()));
if (src.hasMeasurementPoint())
tgt.setMeasurementPointElement(convertString(src.getMeasurementPointElement()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent t : src.getReferenceStrength())
tgt.addReferenceStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent();
copyElement(src, tgt);
if (src.hasPresentation())
tgt.setPresentation(convertRatio(src.getPresentation()));
if (src.hasPresentationLowLimit())
tgt.setPresentationLowLimit(convertRatio(src.getPresentationLowLimit()));
if (src.hasConcentration())
tgt.setConcentration(convertRatio(src.getConcentration()));
if (src.hasConcentrationLowLimit())
tgt.setConcentrationLowLimit(convertRatio(src.getConcentrationLowLimit()));
if (src.hasMeasurementPoint())
tgt.setMeasurementPointElement(convertString(src.getMeasurementPointElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent t : src.getReferenceStrength())
tgt.addReferenceStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent convertMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent();
copyElement(src, tgt);
if (src.hasSubstance())
tgt.setSubstance(convertCodeableConcept(src.getSubstance()));
if (src.hasStrength())
tgt.setStrength(convertRatio(src.getStrength()));
if (src.hasStrengthLowLimit())
tgt.setStrengthLowLimit(convertRatio(src.getStrengthLowLimit()));
if (src.hasMeasurementPoint())
tgt.setMeasurementPointElement(convertString(src.getMeasurementPointElement()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent convertMedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent(org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrengthComponent();
copyElement(src, tgt);
if (src.hasSubstance())
tgt.setSubstance(convertCodeableConcept(src.getSubstance()));
if (src.hasStrength())
tgt.setStrength(convertRatio(src.getStrength()));
if (src.hasStrengthLowLimit())
tgt.setStrengthLowLimit(convertRatio(src.getStrengthLowLimit()));
if (src.hasMeasurementPoint())
tgt.setMeasurementPointElement(convertString(src.getMeasurementPointElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCountry())
tgt.addCountry(convertCodeableConcept(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent convertMedicinalProductIngredientSubstanceComponent(org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent t : src.getStrength())
tgt.addStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent convertMedicinalProductIngredientSubstanceComponent(org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductIngredient.MedicinalProductIngredientSubstanceComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r5.model.MedicinalProductIngredient.MedicinalProductIngredientSpecifiedSubstanceStrengthComponent t : src.getStrength())
tgt.addStrength(convertMedicinalProductIngredientSpecifiedSubstanceStrengthComponent(t));
return tgt;
}
}

View File

@ -1,128 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductInteraction extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductInteraction convertMedicinalProductInteraction(org.hl7.fhir.r4.model.MedicinalProductInteraction src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductInteraction tgt = new org.hl7.fhir.r5.model.MedicinalProductInteraction();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent t : src.getInteractant())
tgt.addInteractant(convertMedicinalProductInteractionInteractantComponent(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasEffect())
tgt.setEffect(convertCodeableConcept(src.getEffect()));
if (src.hasIncidence())
tgt.setIncidence(convertCodeableConcept(src.getIncidence()));
if (src.hasManagement())
tgt.setManagement(convertCodeableConcept(src.getManagement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductInteraction convertMedicinalProductInteraction(org.hl7.fhir.r5.model.MedicinalProductInteraction src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductInteraction tgt = new org.hl7.fhir.r4.model.MedicinalProductInteraction();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent t : src.getInteractant())
tgt.addInteractant(convertMedicinalProductInteractionInteractantComponent(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasEffect())
tgt.setEffect(convertCodeableConcept(src.getEffect()));
if (src.hasIncidence())
tgt.setIncidence(convertCodeableConcept(src.getIncidence()));
if (src.hasManagement())
tgt.setManagement(convertCodeableConcept(src.getManagement()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent convertMedicinalProductInteractionInteractantComponent(org.hl7.fhir.r4.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent();
copyElement(src, tgt);
if (src.hasItem())
tgt.setItem(convertType(src.getItem()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent convertMedicinalProductInteractionInteractantComponent(org.hl7.fhir.r5.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductInteraction.MedicinalProductInteractionInteractantComponent();
copyElement(src, tgt);
if (src.hasItem())
tgt.setItem(convertType(src.getItem()));
return tgt;
}
}

View File

@ -1,108 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductManufactured extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductManufactured convertMedicinalProductManufactured(org.hl7.fhir.r4.model.MedicinalProductManufactured src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductManufactured tgt = new org.hl7.fhir.r5.model.MedicinalProductManufactured();
copyDomainResource(src, tgt);
if (src.hasManufacturedDoseForm())
tgt.setManufacturedDoseForm(convertCodeableConcept(src.getManufacturedDoseForm()));
if (src.hasUnitOfPresentation())
tgt.setUnitOfPresentation(convertCodeableConcept(src.getUnitOfPresentation()));
if (src.hasQuantity())
tgt.setQuantity(convertQuantity(src.getQuantity()));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getIngredient())
tgt.addIngredient(convertReference(t));
if (src.hasPhysicalCharacteristics())
tgt.setPhysicalCharacteristics(convertProdCharacteristic(src.getPhysicalCharacteristics()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOtherCharacteristics())
tgt.addOtherCharacteristics(convertCodeableConcept(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductManufactured convertMedicinalProductManufactured(org.hl7.fhir.r5.model.MedicinalProductManufactured src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductManufactured tgt = new org.hl7.fhir.r4.model.MedicinalProductManufactured();
copyDomainResource(src, tgt);
if (src.hasManufacturedDoseForm())
tgt.setManufacturedDoseForm(convertCodeableConcept(src.getManufacturedDoseForm()));
if (src.hasUnitOfPresentation())
tgt.setUnitOfPresentation(convertCodeableConcept(src.getUnitOfPresentation()));
if (src.hasQuantity())
tgt.setQuantity(convertQuantity(src.getQuantity()));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getIngredient())
tgt.addIngredient(convertReference(t));
if (src.hasPhysicalCharacteristics())
tgt.setPhysicalCharacteristics(convertProdCharacteristic(src.getPhysicalCharacteristics()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getOtherCharacteristics())
tgt.addOtherCharacteristics(convertCodeableConcept(t));
return tgt;
}
}

View File

@ -1,204 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductPackaged extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductPackaged convertMedicinalProductPackaged(org.hl7.fhir.r4.model.MedicinalProductPackaged src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPackaged tgt = new org.hl7.fhir.r5.model.MedicinalProductPackaged();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r4.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
for (org.hl7.fhir.r4.model.MarketingStatus t : src.getMarketingStatus())
tgt.addMarketingStatus(convertMarketingStatus(t));
if (src.hasMarketingAuthorization())
tgt.setMarketingAuthorization(convertReference(src.getMarketingAuthorization()));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent t : src.getBatchIdentifier())
tgt.addBatchIdentifier(convertMedicinalProductPackagedBatchIdentifierComponent(t));
for (org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent t : src.getPackageItem())
tgt.addPackageItem(convertMedicinalProductPackagedPackageItemComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPackaged convertMedicinalProductPackaged(org.hl7.fhir.r5.model.MedicinalProductPackaged src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPackaged tgt = new org.hl7.fhir.r4.model.MedicinalProductPackaged();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasLegalStatusOfSupply())
tgt.setLegalStatusOfSupply(convertCodeableConcept(src.getLegalStatusOfSupply()));
for (org.hl7.fhir.r5.model.MarketingStatus t : src.getMarketingStatus())
tgt.addMarketingStatus(convertMarketingStatus(t));
if (src.hasMarketingAuthorization())
tgt.setMarketingAuthorization(convertReference(src.getMarketingAuthorization()));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent t : src.getBatchIdentifier())
tgt.addBatchIdentifier(convertMedicinalProductPackagedBatchIdentifierComponent(t));
for (org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent t : src.getPackageItem())
tgt.addPackageItem(convertMedicinalProductPackagedPackageItemComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent convertMedicinalProductPackagedBatchIdentifierComponent(org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent();
copyElement(src, tgt);
if (src.hasOuterPackaging())
tgt.setOuterPackaging(convertIdentifier(src.getOuterPackaging()));
if (src.hasImmediatePackaging())
tgt.setImmediatePackaging(convertIdentifier(src.getImmediatePackaging()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent convertMedicinalProductPackagedBatchIdentifierComponent(org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedBatchIdentifierComponent();
copyElement(src, tgt);
if (src.hasOuterPackaging())
tgt.setOuterPackaging(convertIdentifier(src.getOuterPackaging()));
if (src.hasImmediatePackaging())
tgt.setImmediatePackaging(convertIdentifier(src.getImmediatePackaging()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent convertMedicinalProductPackagedPackageItemComponent(org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasQuantity())
tgt.setQuantity(convertQuantity(src.getQuantity()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getMaterial())
tgt.addMaterial(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAlternateMaterial())
tgt.addAlternateMaterial(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getDevice())
tgt.addDevice(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturedItem())
tgt.addManufacturedItem(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent t : src.getPackageItem())
tgt.addPackageItem(convertMedicinalProductPackagedPackageItemComponent(t));
if (src.hasPhysicalCharacteristics())
tgt.setPhysicalCharacteristics(convertProdCharacteristic(src.getPhysicalCharacteristics()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOtherCharacteristics())
tgt.addOtherCharacteristics(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ProductShelfLife t : src.getShelfLifeStorage())
tgt.addShelfLifeStorage(convertProductShelfLife(t));
for (org.hl7.fhir.r4.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent convertMedicinalProductPackagedPackageItemComponent(org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasQuantity())
tgt.setQuantity(convertQuantity(src.getQuantity()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getMaterial())
tgt.addMaterial(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getAlternateMaterial())
tgt.addAlternateMaterial(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getDevice())
tgt.addDevice(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturedItem())
tgt.addManufacturedItem(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent t : src.getPackageItem())
tgt.addPackageItem(convertMedicinalProductPackagedPackageItemComponent(t));
if (src.hasPhysicalCharacteristics())
tgt.setPhysicalCharacteristics(convertProdCharacteristic(src.getPhysicalCharacteristics()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getOtherCharacteristics())
tgt.addOtherCharacteristics(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ProductShelfLife t : src.getShelfLifeStorage())
tgt.addShelfLifeStorage(convertProductShelfLife(t));
for (org.hl7.fhir.r5.model.Reference t : src.getManufacturer())
tgt.addManufacturer(convertReference(t));
return tgt;
}
}

View File

@ -1,228 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductPharmaceutical extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductPharmaceutical convertMedicinalProductPharmaceutical(org.hl7.fhir.r4.model.MedicinalProductPharmaceutical src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPharmaceutical tgt = new org.hl7.fhir.r5.model.MedicinalProductPharmaceutical();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasAdministrableDoseForm())
tgt.setAdministrableDoseForm(convertCodeableConcept(src.getAdministrableDoseForm()));
if (src.hasUnitOfPresentation())
tgt.setUnitOfPresentation(convertCodeableConcept(src.getUnitOfPresentation()));
for (org.hl7.fhir.r4.model.Reference t : src.getIngredient())
tgt.addIngredient(convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getDevice())
tgt.addDevice(convertReference(t));
for (org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent t : src.getCharacteristics())
tgt.addCharacteristics(convertMedicinalProductPharmaceuticalCharacteristicsComponent(t));
for (org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent t : src.getRouteOfAdministration())
tgt.addRouteOfAdministration(convertMedicinalProductPharmaceuticalRouteOfAdministrationComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPharmaceutical convertMedicinalProductPharmaceutical(org.hl7.fhir.r5.model.MedicinalProductPharmaceutical src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPharmaceutical tgt = new org.hl7.fhir.r4.model.MedicinalProductPharmaceutical();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasAdministrableDoseForm())
tgt.setAdministrableDoseForm(convertCodeableConcept(src.getAdministrableDoseForm()));
if (src.hasUnitOfPresentation())
tgt.setUnitOfPresentation(convertCodeableConcept(src.getUnitOfPresentation()));
for (org.hl7.fhir.r5.model.Reference t : src.getIngredient())
tgt.addIngredient(convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getDevice())
tgt.addDevice(convertReference(t));
for (org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent t : src.getCharacteristics())
tgt.addCharacteristics(convertMedicinalProductPharmaceuticalCharacteristicsComponent(t));
for (org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent t : src.getRouteOfAdministration())
tgt.addRouteOfAdministration(convertMedicinalProductPharmaceuticalRouteOfAdministrationComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent convertMedicinalProductPharmaceuticalCharacteristicsComponent(org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent convertMedicinalProductPharmaceuticalCharacteristicsComponent(org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalCharacteristicsComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationComponent(org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasFirstDose())
tgt.setFirstDose(convertQuantity(src.getFirstDose()));
if (src.hasMaxSingleDose())
tgt.setMaxSingleDose(convertQuantity(src.getMaxSingleDose()));
if (src.hasMaxDosePerDay())
tgt.setMaxDosePerDay(convertQuantity(src.getMaxDosePerDay()));
if (src.hasMaxDosePerTreatmentPeriod())
tgt.setMaxDosePerTreatmentPeriod(convertRatio(src.getMaxDosePerTreatmentPeriod()));
if (src.hasMaxTreatmentPeriod())
tgt.setMaxTreatmentPeriod(convertDuration(src.getMaxTreatmentPeriod()));
for (org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent t : src.getTargetSpecies())
tgt.addTargetSpecies(convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationComponent(org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasFirstDose())
tgt.setFirstDose(convertQuantity(src.getFirstDose()));
if (src.hasMaxSingleDose())
tgt.setMaxSingleDose(convertQuantity(src.getMaxSingleDose()));
if (src.hasMaxDosePerDay())
tgt.setMaxDosePerDay(convertQuantity(src.getMaxDosePerDay()));
if (src.hasMaxDosePerTreatmentPeriod())
tgt.setMaxDosePerTreatmentPeriod(convertRatio(src.getMaxDosePerTreatmentPeriod()));
if (src.hasMaxTreatmentPeriod())
tgt.setMaxTreatmentPeriod(convertDuration(src.getMaxTreatmentPeriod()));
for (org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent t : src.getTargetSpecies())
tgt.addTargetSpecies(convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent t : src.getWithdrawalPeriod())
tgt.addWithdrawalPeriod(convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent(org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent t : src.getWithdrawalPeriod())
tgt.addWithdrawalPeriod(convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent tgt = new org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent();
copyElement(src, tgt);
if (src.hasTissue())
tgt.setTissue(convertCodeableConcept(src.getTissue()));
if (src.hasValue())
tgt.setValue(convertQuantity(src.getValue()));
if (src.hasSupportingInformation())
tgt.setSupportingInformationElement(convertString(src.getSupportingInformationElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent convertMedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent(org.hl7.fhir.r5.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent tgt = new org.hl7.fhir.r4.model.MedicinalProductPharmaceutical.MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpeciesWithdrawalPeriodComponent();
copyElement(src, tgt);
if (src.hasTissue())
tgt.setTissue(convertCodeableConcept(src.getTissue()));
if (src.hasValue())
tgt.setValue(convertQuantity(src.getValue()));
if (src.hasSupportingInformation())
tgt.setSupportingInformationElement(convertString(src.getSupportingInformationElement()));
return tgt;
}
}

View File

@ -1,100 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MedicinalProductUndesirableEffect extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect convertMedicinalProductUndesirableEffect(org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect tgt = new org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasSymptomConditionEffect())
tgt.setSymptomConditionEffect(convertCodeableConcept(src.getSymptomConditionEffect()));
if (src.hasClassification())
tgt.setClassification(convertCodeableConcept(src.getClassification()));
if (src.hasFrequencyOfOccurrence())
tgt.setFrequencyOfOccurrence(convertCodeableConcept(src.getFrequencyOfOccurrence()));
for (org.hl7.fhir.r4.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect convertMedicinalProductUndesirableEffect(org.hl7.fhir.r5.model.MedicinalProductUndesirableEffect src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect tgt = new org.hl7.fhir.r4.model.MedicinalProductUndesirableEffect();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Reference t : src.getSubject())
tgt.addSubject(convertReference(t));
if (src.hasSymptomConditionEffect())
tgt.setSymptomConditionEffect(convertCodeableConcept(src.getSymptomConditionEffect()));
if (src.hasClassification())
tgt.setClassification(convertCodeableConcept(src.getClassification()));
if (src.hasFrequencyOfOccurrence())
tgt.setFrequencyOfOccurrence(convertCodeableConcept(src.getFrequencyOfOccurrence()));
for (org.hl7.fhir.r5.model.Population t : src.getPopulation())
tgt.addPopulation(convertPopulation(t));
return tgt;
}
}

View File

@ -70,7 +70,7 @@ public class ObservationDefinition extends VersionConvertor_40_50 {
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
tgt.setIdentifier(convertIdentifier(t));
for (org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ObservationDefinition.ObservationDataType> t : src.getPermittedDataType())
copyElement(t, tgt.addPermittedDataTypeElement().setValue(convertObservationDataType(t.getValue())));
if (src.hasMultipleResultsAllowed())
@ -103,8 +103,8 @@ public class ObservationDefinition extends VersionConvertor_40_50 {
tgt.addCategory(convertCodeableConcept(t));
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasIdentifier())
tgt.addIdentifier(convertIdentifier(src.getIdentifier()));
for (org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ObservationDefinition.ObservationDataType> t : src.getPermittedDataType())
copyElement(t, tgt.addPermittedDataTypeElement().setValue(convertObservationDataType(t.getValue())));
if (src.hasMultipleResultsAllowed())

View File

@ -80,7 +80,7 @@ public class Procedure extends VersionConvertor_40_50 {
if (src.hasStatusReason())
tgt.setStatusReason(convertCodeableConcept(src.getStatusReason()));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.addCategory(convertCodeableConcept(src.getCategory()));
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasSubject())
@ -88,11 +88,11 @@ public class Procedure extends VersionConvertor_40_50 {
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasPerformed())
tgt.setPerformed(convertType(src.getPerformed()));
tgt.setOccurrence(convertType(src.getPerformed()));
if (src.hasRecorder())
tgt.setRecorder(convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(convertReference(src.getAsserter()));
tgt.setReported(convertReference(src.getAsserter()));
for (org.hl7.fhir.r4.model.Procedure.ProcedurePerformerComponent t : src.getPerformer())
tgt.addPerformer(convertProcedurePerformerComponent(t));
if (src.hasLocation())
@ -144,19 +144,19 @@ public class Procedure extends VersionConvertor_40_50 {
if (src.hasStatusReason())
tgt.setStatusReason(convertCodeableConcept(src.getStatusReason()));
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
tgt.setCategory(convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasSubject())
tgt.setSubject(convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(convertReference(src.getEncounter()));
if (src.hasPerformed())
tgt.setPerformed(convertType(src.getPerformed()));
if (src.hasOccurrence())
tgt.setPerformed(convertType(src.getOccurrence()));
if (src.hasRecorder())
tgt.setRecorder(convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(convertReference(src.getAsserter()));
if (src.hasReportedReference())
tgt.setAsserter(convertReference(src.getReportedReference()));
for (org.hl7.fhir.r5.model.Procedure.ProcedurePerformerComponent t : src.getPerformer())
tgt.addPerformer(convertProcedurePerformerComponent(t));
if (src.hasLocation())

View File

@ -1,216 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class ResearchDefinition extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.ResearchDefinition convertResearchDefinition(org.hl7.fhir.r4.model.ResearchDefinition src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.ResearchDefinition tgt = new org.hl7.fhir.r5.model.ResearchDefinition();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasExperimental())
tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement()));
if (src.hasSubject())
tgt.setSubject(convertType(src.getSubject()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.StringType t : src.getComment())
tgt.getComment().add(convertString(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasPurpose())
tgt.setPurposeElement(convertMarkdown(src.getPurposeElement()));
if (src.hasUsage())
tgt.setUsageElement(convertString(src.getUsageElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getLibrary())
tgt.getLibrary().add(convertCanonical(t));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasExposureAlternative())
tgt.setExposureAlternative(convertReference(src.getExposureAlternative()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
return tgt;
}
public static org.hl7.fhir.r4.model.ResearchDefinition convertResearchDefinition(org.hl7.fhir.r5.model.ResearchDefinition src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ResearchDefinition tgt = new org.hl7.fhir.r4.model.ResearchDefinition();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasExperimental())
tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement()));
if (src.hasSubject())
tgt.setSubject(convertType(src.getSubject()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getComment())
tgt.getComment().add(convertString(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasPurpose())
tgt.setPurposeElement(convertMarkdown(src.getPurposeElement()));
if (src.hasUsage())
tgt.setUsageElement(convertString(src.getUsageElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
for (org.hl7.fhir.r5.model.CanonicalType t : src.getLibrary())
tgt.getLibrary().add(convertCanonical(t));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasExposureAlternative())
tgt.setExposureAlternative(convertReference(src.getExposureAlternative()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
return tgt;
}
}

View File

@ -1,348 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class ResearchElementDefinition extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.ResearchElementDefinition convertResearchElementDefinition(org.hl7.fhir.r4.model.ResearchElementDefinition src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.ResearchElementDefinition tgt = new org.hl7.fhir.r5.model.ResearchElementDefinition();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasExperimental())
tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement()));
if (src.hasSubject())
tgt.setSubject(convertType(src.getSubject()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.StringType t : src.getComment())
tgt.getComment().add(convertString(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasPurpose())
tgt.setPurposeElement(convertMarkdown(src.getPurposeElement()));
if (src.hasUsage())
tgt.setUsageElement(convertString(src.getUsageElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getLibrary())
tgt.getLibrary().add(convertCanonical(t));
if (src.hasType())
tgt.setType(convertResearchElementType(src.getType()));
if (src.hasVariableType())
tgt.setVariableType(convertVariableType(src.getVariableType()));
for (org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent t : src.getCharacteristic())
tgt.addCharacteristic(convertResearchElementDefinitionCharacteristicComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.ResearchElementDefinition convertResearchElementDefinition(org.hl7.fhir.r5.model.ResearchElementDefinition src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ResearchElementDefinition tgt = new org.hl7.fhir.r4.model.ResearchElementDefinition();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasShortTitle())
tgt.setShortTitleElement(convertString(src.getShortTitleElement()));
if (src.hasSubtitle())
tgt.setSubtitleElement(convertString(src.getSubtitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasExperimental())
tgt.setExperimentalElement(convertBoolean(src.getExperimentalElement()));
if (src.hasSubject())
tgt.setSubject(convertType(src.getSubject()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getComment())
tgt.getComment().add(convertString(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasPurpose())
tgt.setPurposeElement(convertMarkdown(src.getPurposeElement()));
if (src.hasUsage())
tgt.setUsageElement(convertString(src.getUsageElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
for (org.hl7.fhir.r5.model.CanonicalType t : src.getLibrary())
tgt.getLibrary().add(convertCanonical(t));
if (src.hasType())
tgt.setType(convertResearchElementType(src.getType()));
if (src.hasVariableType())
tgt.setVariableType(convertVariableType(src.getVariableType()));
for (org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent t : src.getCharacteristic())
tgt.addCharacteristic(convertResearchElementDefinitionCharacteristicComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType convertResearchElementType(org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case POPULATION: return org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType.POPULATION;
case EXPOSURE: return org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType.EXPOSURE;
case OUTCOME: return org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType.OUTCOME;
default: return org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType.NULL;
}
}
public static org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType convertResearchElementType(org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case POPULATION: return org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType.POPULATION;
case EXPOSURE: return org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType.EXPOSURE;
case OUTCOME: return org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType.OUTCOME;
default: return org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementType.NULL;
}
}
public static org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType convertVariableType(org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case DICHOTOMOUS: return org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType.DICHOTOMOUS;
case CONTINUOUS: return org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType.CONTINUOUS;
case DESCRIPTIVE: return org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType.DESCRIPTIVE;
default: return org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType.NULL;
}
}
public static org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType convertVariableType(org.hl7.fhir.r5.model.ResearchElementDefinition.VariableType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case DICHOTOMOUS: return org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType.DICHOTOMOUS;
case CONTINUOUS: return org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType.CONTINUOUS;
case DESCRIPTIVE: return org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType.DESCRIPTIVE;
default: return org.hl7.fhir.r4.model.ResearchElementDefinition.VariableType.NULL;
}
}
public static org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent convertResearchElementDefinitionCharacteristicComponent(org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent tgt = new org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent();
copyElement(src, tgt);
if (src.hasDefinition())
tgt.setDefinition(convertType(src.getDefinition()));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUsageContext())
tgt.addUsageContext(convertUsageContext(t));
if (src.hasExclude())
tgt.setExcludeElement(convertBoolean(src.getExcludeElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
if (src.hasStudyEffectiveDescription())
tgt.setStudyEffectiveDescriptionElement(convertString(src.getStudyEffectiveDescriptionElement()));
if (src.hasStudyEffective())
tgt.setStudyEffective(convertType(src.getStudyEffective()));
if (src.hasStudyEffectiveTimeFromStart())
tgt.setStudyEffectiveTimeFromStart(convertDuration(src.getStudyEffectiveTimeFromStart()));
if (src.hasStudyEffectiveGroupMeasure())
tgt.setStudyEffectiveGroupMeasure(convertGroupMeasure(src.getStudyEffectiveGroupMeasure()));
if (src.hasParticipantEffectiveDescription())
tgt.setParticipantEffectiveDescriptionElement(convertString(src.getParticipantEffectiveDescriptionElement()));
if (src.hasParticipantEffective())
tgt.setParticipantEffective(convertType(src.getParticipantEffective()));
if (src.hasParticipantEffectiveTimeFromStart())
tgt.setParticipantEffectiveTimeFromStart(convertDuration(src.getParticipantEffectiveTimeFromStart()));
if (src.hasParticipantEffectiveGroupMeasure())
tgt.setParticipantEffectiveGroupMeasure(convertGroupMeasure(src.getParticipantEffectiveGroupMeasure()));
return tgt;
}
public static org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent convertResearchElementDefinitionCharacteristicComponent(org.hl7.fhir.r5.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent tgt = new org.hl7.fhir.r4.model.ResearchElementDefinition.ResearchElementDefinitionCharacteristicComponent();
copyElement(src, tgt);
if (src.hasDefinition())
tgt.setDefinition(convertType(src.getDefinition()));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUsageContext())
tgt.addUsageContext(convertUsageContext(t));
if (src.hasExclude())
tgt.setExcludeElement(convertBoolean(src.getExcludeElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
if (src.hasStudyEffectiveDescription())
tgt.setStudyEffectiveDescriptionElement(convertString(src.getStudyEffectiveDescriptionElement()));
if (src.hasStudyEffective())
tgt.setStudyEffective(convertType(src.getStudyEffective()));
if (src.hasStudyEffectiveTimeFromStart())
tgt.setStudyEffectiveTimeFromStart(convertDuration(src.getStudyEffectiveTimeFromStart()));
if (src.hasStudyEffectiveGroupMeasure())
tgt.setStudyEffectiveGroupMeasure(convertGroupMeasure(src.getStudyEffectiveGroupMeasure()));
if (src.hasParticipantEffectiveDescription())
tgt.setParticipantEffectiveDescriptionElement(convertString(src.getParticipantEffectiveDescriptionElement()));
if (src.hasParticipantEffective())
tgt.setParticipantEffective(convertType(src.getParticipantEffective()));
if (src.hasParticipantEffectiveTimeFromStart())
tgt.setParticipantEffectiveTimeFromStart(convertDuration(src.getParticipantEffectiveTimeFromStart()));
if (src.hasParticipantEffectiveGroupMeasure())
tgt.setParticipantEffectiveGroupMeasure(convertGroupMeasure(src.getParticipantEffectiveGroupMeasure()));
return tgt;
}
public static org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure convertGroupMeasure(org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case MEAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEAN;
case MEDIAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEDIAN;
case MEANOFMEAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEANOFMEAN;
case MEANOFMEDIAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEANOFMEDIAN;
case MEDIANOFMEAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEDIANOFMEAN;
case MEDIANOFMEDIAN: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.MEDIANOFMEDIAN;
default: return org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure.NULL;
}
}
public static org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure convertGroupMeasure(org.hl7.fhir.r5.model.ResearchElementDefinition.GroupMeasure src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case MEAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEAN;
case MEDIAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEDIAN;
case MEANOFMEAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEANOFMEAN;
case MEANOFMEDIAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEANOFMEDIAN;
case MEDIANOFMEAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEDIANOFMEAN;
case MEDIANOFMEDIAN: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.MEDIANOFMEDIAN;
default: return org.hl7.fhir.r4.model.ResearchElementDefinition.GroupMeasure.NULL;
}
}
}

View File

@ -1,364 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class RiskEvidenceSynthesis extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis convertRiskEvidenceSynthesis(org.hl7.fhir.r4.model.RiskEvidenceSynthesis src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasSynthesisType())
tgt.setSynthesisType(convertCodeableConcept(src.getSynthesisType()));
if (src.hasStudyType())
tgt.setStudyType(convertCodeableConcept(src.getStudyType()));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
if (src.hasSampleSize())
tgt.setSampleSize(convertRiskEvidenceSynthesisSampleSizeComponent(src.getSampleSize()));
if (src.hasRiskEstimate())
tgt.setRiskEstimate(convertRiskEvidenceSynthesisRiskEstimateComponent(src.getRiskEstimate()));
for (org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent t : src.getCertainty())
tgt.addCertainty(convertRiskEvidenceSynthesisCertaintyComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis convertRiskEvidenceSynthesis(org.hl7.fhir.r5.model.RiskEvidenceSynthesis src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis();
copyDomainResource(src, tgt);
if (src.hasUrl())
tgt.setUrlElement(convertUri(src.getUrlElement()));
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(convertIdentifier(t));
if (src.hasVersion())
tgt.setVersionElement(convertString(src.getVersionElement()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(convertString(src.getTitleElement()));
if (src.hasStatus())
tgt.setStatus(Enumerations.convertPublicationStatus(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
if (src.hasPublisher())
tgt.setPublisherElement(convertString(src.getPublisherElement()));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
tgt.addContact(convertContactDetail(t));
if (src.hasDescription())
tgt.setDescriptionElement(convertMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
tgt.addUseContext(convertUsageContext(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
if (src.hasCopyright())
tgt.setCopyrightElement(convertMarkdown(src.getCopyrightElement()));
if (src.hasApprovalDate())
tgt.setApprovalDateElement(convertDate(src.getApprovalDateElement()));
if (src.hasLastReviewDate())
tgt.setLastReviewDateElement(convertDate(src.getLastReviewDateElement()));
if (src.hasEffectivePeriod())
tgt.setEffectivePeriod(convertPeriod(src.getEffectivePeriod()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic())
tgt.addTopic(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor())
tgt.addAuthor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor())
tgt.addEditor(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer())
tgt.addReviewer(convertContactDetail(t));
for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser())
tgt.addEndorser(convertContactDetail(t));
for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact())
tgt.addRelatedArtifact(convertRelatedArtifact(t));
if (src.hasSynthesisType())
tgt.setSynthesisType(convertCodeableConcept(src.getSynthesisType()));
if (src.hasStudyType())
tgt.setStudyType(convertCodeableConcept(src.getStudyType()));
if (src.hasPopulation())
tgt.setPopulation(convertReference(src.getPopulation()));
if (src.hasExposure())
tgt.setExposure(convertReference(src.getExposure()));
if (src.hasOutcome())
tgt.setOutcome(convertReference(src.getOutcome()));
if (src.hasSampleSize())
tgt.setSampleSize(convertRiskEvidenceSynthesisSampleSizeComponent(src.getSampleSize()));
if (src.hasRiskEstimate())
tgt.setRiskEstimate(convertRiskEvidenceSynthesisRiskEstimateComponent(src.getRiskEstimate()));
for (org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent t : src.getCertainty())
tgt.addCertainty(convertRiskEvidenceSynthesisCertaintyComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent convertRiskEvidenceSynthesisSampleSizeComponent(org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasNumberOfStudies())
tgt.setNumberOfStudiesElement(convertInteger(src.getNumberOfStudiesElement()));
if (src.hasNumberOfParticipants())
tgt.setNumberOfParticipantsElement(convertInteger(src.getNumberOfParticipantsElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent convertRiskEvidenceSynthesisSampleSizeComponent(org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisSampleSizeComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasNumberOfStudies())
tgt.setNumberOfStudiesElement(convertInteger(src.getNumberOfStudiesElement()));
if (src.hasNumberOfParticipants())
tgt.setNumberOfParticipantsElement(convertInteger(src.getNumberOfParticipantsElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent convertRiskEvidenceSynthesisRiskEstimateComponent(org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasValue())
tgt.setValueElement(convertDecimal(src.getValueElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
if (src.hasDenominatorCount())
tgt.setDenominatorCountElement(convertInteger(src.getDenominatorCountElement()));
if (src.hasNumeratorCount())
tgt.setNumeratorCountElement(convertInteger(src.getNumeratorCountElement()));
for (org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent t : src.getPrecisionEstimate())
tgt.addPrecisionEstimate(convertRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent convertRiskEvidenceSynthesisRiskEstimateComponent(org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimateComponent();
copyElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasValue())
tgt.setValueElement(convertDecimal(src.getValueElement()));
if (src.hasUnitOfMeasure())
tgt.setUnitOfMeasure(convertCodeableConcept(src.getUnitOfMeasure()));
if (src.hasDenominatorCount())
tgt.setDenominatorCountElement(convertInteger(src.getDenominatorCountElement()));
if (src.hasNumeratorCount())
tgt.setNumeratorCountElement(convertInteger(src.getNumeratorCountElement()));
for (org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent t : src.getPrecisionEstimate())
tgt.addPrecisionEstimate(convertRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent convertRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasLevel())
tgt.setLevelElement(convertDecimal(src.getLevelElement()));
if (src.hasFrom())
tgt.setFromElement(convertDecimal(src.getFromElement()));
if (src.hasTo())
tgt.setToElement(convertDecimal(src.getToElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent convertRiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent(org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisRiskEstimatePrecisionEstimateComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasLevel())
tgt.setLevelElement(convertDecimal(src.getLevelElement()));
if (src.hasFrom())
tgt.setFromElement(convertDecimal(src.getFromElement()));
if (src.hasTo())
tgt.setToElement(convertDecimal(src.getToElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent convertRiskEvidenceSynthesisCertaintyComponent(org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent t : src.getCertaintySubcomponent())
tgt.addCertaintySubcomponent(convertRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent convertRiskEvidenceSynthesisCertaintyComponent(org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyComponent();
copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
for (org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent t : src.getCertaintySubcomponent())
tgt.addCertaintySubcomponent(convertRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent convertRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent tgt = new org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
return tgt;
}
public static org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent convertRiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent(org.hl7.fhir.r5.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent tgt = new org.hl7.fhir.r4.model.RiskEvidenceSynthesis.RiskEvidenceSynthesisCertaintyCertaintySubcomponentComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getRating())
tgt.addRating(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote())
tgt.addNote(convertAnnotation(t));
return tgt;
}
}

View File

@ -1,190 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class Subscription extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.Subscription convertSubscription(org.hl7.fhir.r4.model.Subscription src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Subscription tgt = new org.hl7.fhir.r5.model.Subscription();
copyDomainResource(src, tgt);
if (src.hasStatus())
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact())
tgt.addContact(convertContactPoint(t));
if (src.hasEnd())
tgt.setEndElement(convertInstant(src.getEndElement()));
if (src.hasReason())
tgt.setReasonElement(convertString(src.getReasonElement()));
if (src.hasCriteria())
tgt.setCriteriaElement(convertString(src.getCriteriaElement()));
if (src.hasError())
tgt.setErrorElement(convertString(src.getErrorElement()));
if (src.hasChannel())
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
return tgt;
}
public static org.hl7.fhir.r4.model.Subscription convertSubscription(org.hl7.fhir.r5.model.Subscription src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription();
copyDomainResource(src, tgt);
if (src.hasStatus())
tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact())
tgt.addContact(convertContactPoint(t));
if (src.hasEnd())
tgt.setEndElement(convertInstant(src.getEndElement()));
if (src.hasReason())
tgt.setReasonElement(convertString(src.getReasonElement()));
if (src.hasCriteria())
tgt.setCriteriaElement(convertString(src.getCriteriaElement()));
if (src.hasError())
tgt.setErrorElement(convertString(src.getErrorElement()));
if (src.hasChannel())
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
return tgt;
}
public static org.hl7.fhir.r5.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r4.model.Subscription.SubscriptionStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case REQUESTED: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.REQUESTED;
case ACTIVE: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ACTIVE;
case ERROR: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.ERROR;
case OFF: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.OFF;
default: return org.hl7.fhir.r5.model.Subscription.SubscriptionStatus.NULL;
}
}
public static org.hl7.fhir.r4.model.Subscription.SubscriptionStatus convertSubscriptionStatus(org.hl7.fhir.r5.model.Subscription.SubscriptionStatus src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case REQUESTED: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.REQUESTED;
case ACTIVE: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ACTIVE;
case ERROR: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.ERROR;
case OFF: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.OFF;
default: return org.hl7.fhir.r4.model.Subscription.SubscriptionStatus.NULL;
}
}
public static org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertSubscriptionChannelType(src.getType()));
if (src.hasEndpoint())
tgt.setEndpointElement(convertUrl(src.getEndpointElement()));
if (src.hasPayload())
tgt.setPayloadElement(convertCode(src.getPayloadElement()));
for (org.hl7.fhir.r4.model.StringType t : src.getHeader())
tgt.getHeader().add(convertString(t));
return tgt;
}
public static org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.r5.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.r4.model.Subscription.SubscriptionChannelComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertSubscriptionChannelType(src.getType()));
if (src.hasEndpoint())
tgt.setEndpointElement(convertUrl(src.getEndpointElement()));
if (src.hasPayload())
tgt.setPayloadElement(convertCode(src.getPayloadElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getHeader())
tgt.getHeader().add(convertString(t));
return tgt;
}
public static org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RESTHOOK: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.RESTHOOK;
case WEBSOCKET: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.WEBSOCKET;
case EMAIL: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.EMAIL;
case SMS: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.SMS;
case MESSAGE: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.MESSAGE;
default: return org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType.NULL;
}
}
public static org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType convertSubscriptionChannelType(org.hl7.fhir.r5.model.Subscription.SubscriptionChannelType src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RESTHOOK: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.RESTHOOK;
case WEBSOCKET: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.WEBSOCKET;
case EMAIL: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.EMAIL;
case SMS: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.SMS;
case MESSAGE: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.MESSAGE;
default: return org.hl7.fhir.r4.model.Subscription.SubscriptionChannelType.NULL;
}
}
}

View File

@ -1,544 +0,0 @@
package org.hl7.fhir.convertors.conv40_50;
/*-
* #%L
* org.hl7.fhir.convertors
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class SubstanceSpecification extends VersionConvertor_40_50 {
public static org.hl7.fhir.r5.model.SubstanceSpecification convertSubstanceSpecification(org.hl7.fhir.r4.model.SubstanceSpecification src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification tgt = new org.hl7.fhir.r5.model.SubstanceSpecification();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDomain())
tgt.setDomain(convertCodeableConcept(src.getDomain()));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent t : src.getMoiety())
tgt.addMoiety(convertSubstanceSpecificationMoietyComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent t : src.getProperty())
tgt.addProperty(convertSubstanceSpecificationPropertyComponent(t));
if (src.hasReferenceInformation())
tgt.setReferenceInformation(convertReference(src.getReferenceInformation()));
if (src.hasStructure())
tgt.setStructure(convertSubstanceSpecificationStructureComponent(src.getStructure()));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationCodeComponent t : src.getCode())
tgt.addCode(convertSubstanceSpecificationCodeComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getName())
tgt.addName(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent t : src.getMolecularWeight())
tgt.addMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent t : src.getRelationship())
tgt.addRelationship(convertSubstanceSpecificationRelationshipComponent(t));
if (src.hasNucleicAcid())
tgt.setNucleicAcid(convertReference(src.getNucleicAcid()));
if (src.hasPolymer())
tgt.setPolymer(convertReference(src.getPolymer()));
if (src.hasProtein())
tgt.setProtein(convertReference(src.getProtein()));
if (src.hasSourceMaterial())
tgt.setSourceMaterial(convertReference(src.getSourceMaterial()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification convertSubstanceSpecification(org.hl7.fhir.r5.model.SubstanceSpecification src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification tgt = new org.hl7.fhir.r4.model.SubstanceSpecification();
copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDomain())
tgt.setDomain(convertCodeableConcept(src.getDomain()));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent t : src.getMoiety())
tgt.addMoiety(convertSubstanceSpecificationMoietyComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent t : src.getProperty())
tgt.addProperty(convertSubstanceSpecificationPropertyComponent(t));
if (src.hasReferenceInformation())
tgt.setReferenceInformation(convertReference(src.getReferenceInformation()));
if (src.hasStructure())
tgt.setStructure(convertSubstanceSpecificationStructureComponent(src.getStructure()));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationCodeComponent t : src.getCode())
tgt.addCode(convertSubstanceSpecificationCodeComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getName())
tgt.addName(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent t : src.getMolecularWeight())
tgt.addMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent t : src.getRelationship())
tgt.addRelationship(convertSubstanceSpecificationRelationshipComponent(t));
if (src.hasNucleicAcid())
tgt.setNucleicAcid(convertReference(src.getNucleicAcid()));
if (src.hasPolymer())
tgt.setPolymer(convertReference(src.getPolymer()));
if (src.hasProtein())
tgt.setProtein(convertReference(src.getProtein()));
if (src.hasSourceMaterial())
tgt.setSourceMaterial(convertReference(src.getSourceMaterial()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent convertSubstanceSpecificationMoietyComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent();
copyElement(src, tgt);
if (src.hasRole())
tgt.setRole(convertCodeableConcept(src.getRole()));
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasStereochemistry())
tgt.setStereochemistry(convertCodeableConcept(src.getStereochemistry()));
if (src.hasOpticalActivity())
tgt.setOpticalActivity(convertCodeableConcept(src.getOpticalActivity()));
if (src.hasMolecularFormula())
tgt.setMolecularFormulaElement(convertString(src.getMolecularFormulaElement()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent convertSubstanceSpecificationMoietyComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationMoietyComponent();
copyElement(src, tgt);
if (src.hasRole())
tgt.setRole(convertCodeableConcept(src.getRole()));
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasStereochemistry())
tgt.setStereochemistry(convertCodeableConcept(src.getStereochemistry()));
if (src.hasOpticalActivity())
tgt.setOpticalActivity(convertCodeableConcept(src.getOpticalActivity()));
if (src.hasMolecularFormula())
tgt.setMolecularFormulaElement(convertString(src.getMolecularFormulaElement()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent convertSubstanceSpecificationPropertyComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent();
copyElement(src, tgt);
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasParameters())
tgt.setParametersElement(convertString(src.getParametersElement()));
if (src.hasDefiningSubstance())
tgt.setDefiningSubstance(convertType(src.getDefiningSubstance()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent convertSubstanceSpecificationPropertyComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationPropertyComponent();
copyElement(src, tgt);
if (src.hasCategory())
tgt.setCategory(convertCodeableConcept(src.getCategory()));
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasParameters())
tgt.setParametersElement(convertString(src.getParametersElement()));
if (src.hasDefiningSubstance())
tgt.setDefiningSubstance(convertType(src.getDefiningSubstance()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureComponent convertSubstanceSpecificationStructureComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureComponent();
copyElement(src, tgt);
if (src.hasStereochemistry())
tgt.setStereochemistry(convertCodeableConcept(src.getStereochemistry()));
if (src.hasOpticalActivity())
tgt.setOpticalActivity(convertCodeableConcept(src.getOpticalActivity()));
if (src.hasMolecularFormula())
tgt.setMolecularFormulaElement(convertString(src.getMolecularFormulaElement()));
if (src.hasMolecularFormulaByMoiety())
tgt.setMolecularFormulaByMoietyElement(convertString(src.getMolecularFormulaByMoietyElement()));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent t : src.getIsotope())
tgt.addIsotope(convertSubstanceSpecificationStructureIsotopeComponent(t));
if (src.hasMolecularWeight())
tgt.setMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(src.getMolecularWeight()));
for (org.hl7.fhir.r4.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent t : src.getRepresentation())
tgt.addRepresentation(convertSubstanceSpecificationStructureRepresentationComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureComponent convertSubstanceSpecificationStructureComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureComponent();
copyElement(src, tgt);
if (src.hasStereochemistry())
tgt.setStereochemistry(convertCodeableConcept(src.getStereochemistry()));
if (src.hasOpticalActivity())
tgt.setOpticalActivity(convertCodeableConcept(src.getOpticalActivity()));
if (src.hasMolecularFormula())
tgt.setMolecularFormulaElement(convertString(src.getMolecularFormulaElement()));
if (src.hasMolecularFormulaByMoiety())
tgt.setMolecularFormulaByMoietyElement(convertString(src.getMolecularFormulaByMoietyElement()));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent t : src.getIsotope())
tgt.addIsotope(convertSubstanceSpecificationStructureIsotopeComponent(t));
if (src.hasMolecularWeight())
tgt.setMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(src.getMolecularWeight()));
for (org.hl7.fhir.r5.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent t : src.getRepresentation())
tgt.addRepresentation(convertSubstanceSpecificationStructureRepresentationComponent(t));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent convertSubstanceSpecificationStructureIsotopeComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent();
copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasName())
tgt.setName(convertCodeableConcept(src.getName()));
if (src.hasSubstitution())
tgt.setSubstitution(convertCodeableConcept(src.getSubstitution()));
if (src.hasHalfLife())
tgt.setHalfLife(convertQuantity(src.getHalfLife()));
if (src.hasMolecularWeight())
tgt.setMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(src.getMolecularWeight()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent convertSubstanceSpecificationStructureIsotopeComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeComponent();
copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
if (src.hasName())
tgt.setName(convertCodeableConcept(src.getName()));
if (src.hasSubstitution())
tgt.setSubstitution(convertCodeableConcept(src.getSubstitution()));
if (src.hasHalfLife())
tgt.setHalfLife(convertQuantity(src.getHalfLife()));
if (src.hasMolecularWeight())
tgt.setMolecularWeight(convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(src.getMolecularWeight()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent();
copyElement(src, tgt);
if (src.hasMethod())
tgt.setMethod(convertCodeableConcept(src.getMethod()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasAmount())
tgt.setAmount(convertQuantity(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent convertSubstanceSpecificationStructureIsotopeMolecularWeightComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureIsotopeMolecularWeightComponent();
copyElement(src, tgt);
if (src.hasMethod())
tgt.setMethod(convertCodeableConcept(src.getMethod()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasAmount())
tgt.setAmount(convertQuantity(src.getAmount()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent convertSubstanceSpecificationStructureRepresentationComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasRepresentation())
tgt.setRepresentationElement(convertString(src.getRepresentationElement()));
if (src.hasAttachment())
tgt.setAttachment(convertAttachment(src.getAttachment()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent convertSubstanceSpecificationStructureRepresentationComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationStructureRepresentationComponent();
copyElement(src, tgt);
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasRepresentation())
tgt.setRepresentationElement(convertString(src.getRepresentationElement()));
if (src.hasAttachment())
tgt.setAttachment(convertAttachment(src.getAttachment()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationCodeComponent convertSubstanceSpecificationCodeComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationCodeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationCodeComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationCodeComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasStatusDate())
tgt.setStatusDateElement(convertDateTime(src.getStatusDateElement()));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationCodeComponent convertSubstanceSpecificationCodeComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationCodeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationCodeComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationCodeComponent();
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(convertCodeableConcept(src.getCode()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasStatusDate())
tgt.setStatusDateElement(convertDateTime(src.getStatusDateElement()));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent convertSubstanceSpecificationNameComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent();
copyElement(src, tgt);
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasPreferred())
tgt.setPreferredElement(convertBoolean(src.getPreferredElement()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getLanguage())
tgt.addLanguage(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDomain())
tgt.addDomain(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getSynonym())
tgt.addSynonym(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getTranslation())
tgt.addTranslation(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent t : src.getOfficial())
tgt.addOfficial(convertSubstanceSpecificationNameOfficialComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent convertSubstanceSpecificationNameComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameComponent();
copyElement(src, tgt);
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasPreferred())
tgt.setPreferredElement(convertBoolean(src.getPreferredElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getLanguage())
tgt.addLanguage(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDomain())
tgt.addDomain(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
tgt.addJurisdiction(convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getSynonym())
tgt.addSynonym(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameComponent t : src.getTranslation())
tgt.addTranslation(convertSubstanceSpecificationNameComponent(t));
for (org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent t : src.getOfficial())
tgt.addOfficial(convertSubstanceSpecificationNameOfficialComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent convertSubstanceSpecificationNameOfficialComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent();
copyElement(src, tgt);
if (src.hasAuthority())
tgt.setAuthority(convertCodeableConcept(src.getAuthority()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent convertSubstanceSpecificationNameOfficialComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationNameOfficialComponent();
copyElement(src, tgt);
if (src.hasAuthority())
tgt.setAuthority(convertCodeableConcept(src.getAuthority()));
if (src.hasStatus())
tgt.setStatus(convertCodeableConcept(src.getStatus()));
if (src.hasDate())
tgt.setDateElement(convertDateTime(src.getDateElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent convertSubstanceSpecificationRelationshipComponent(org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent tgt = new org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent();
copyElement(src, tgt);
if (src.hasSubstance())
tgt.setSubstance(convertType(src.getSubstance()));
if (src.hasRelationship())
tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
if (src.hasIsDefining())
tgt.setIsDefiningElement(convertBoolean(src.getIsDefiningElement()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
if (src.hasAmountRatioLowLimit())
tgt.setAmountRatioLowLimit(convertRatio(src.getAmountRatioLowLimit()));
if (src.hasAmountType())
tgt.setAmountType(convertCodeableConcept(src.getAmountType()));
for (org.hl7.fhir.r4.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent convertSubstanceSpecificationRelationshipComponent(org.hl7.fhir.r5.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent tgt = new org.hl7.fhir.r4.model.SubstanceSpecification.SubstanceSpecificationRelationshipComponent();
copyElement(src, tgt);
if (src.hasSubstance())
tgt.setSubstance(convertType(src.getSubstance()));
if (src.hasRelationship())
tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
if (src.hasIsDefining())
tgt.setIsDefiningElement(convertBoolean(src.getIsDefiningElement()));
if (src.hasAmount())
tgt.setAmount(convertType(src.getAmount()));
if (src.hasAmountRatioLowLimit())
tgt.setAmountRatioLowLimit(convertRatio(src.getAmountRatioLowLimit()));
if (src.hasAmountType())
tgt.setAmountType(convertCodeableConcept(src.getAmountType()));
for (org.hl7.fhir.r5.model.Reference t : src.getSource())
tgt.addSource(convertReference(t));
return tgt;
}
}

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.hl7.fhir.utilities.DateTimeUtil;
import java.text.ParseException;
import java.util.*;
@ -472,53 +473,29 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
return getValue().after(theDateTimeType.getValue());
}
/**
* Returns a human readable version of this date/time using the system local format.
* <p>
* <b>Note on time zones:</b> This method renders the value using the time zone
* that is contained within the value. For example, if this date object contains the
* value "2012-01-05T12:00:00-08:00", the human display will be rendered as "12:00:00"
* even if the application is being executed on a system in a different time zone. If
* this behaviour is not what you want, use {@link #toHumanDisplayLocalTimezone()}
* instead.
* </p>
*/
public String toHumanDisplay() {
TimeZone tz = getTimeZone();
Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance();
value.setTime(getValue());
/**
* Returns a human readable version of this date/time using the system local format.
* <p>
* <b>Note on time zones:</b> This method renders the value using the time zone that is contained within the value.
* For example, if this date object contains the value "2012-01-05T12:00:00-08:00",
* the human display will be rendered as "12:00:00" even if the application is being executed on a system in a
* different time zone. If this behaviour is not what you want, use
* {@link #toHumanDisplayLocalTimezone()} instead.
* </p>
*/
public String toHumanDisplay() {
return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());
}
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(value);
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(value);
}
}
/**
* Returns a human readable version of this date/time using the system local format,
* converted to the local timezone if neccesary.
*
* @see #toHumanDisplay() for a method which does not convert the time to the local
* timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(getValue());
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(getValue());
}
}
/**
* Returns a human readable version of this date/time using the system local format, converted to the local timezone
* if neccesary.
*
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());
}
/**

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -34,6 +34,7 @@ import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import ca.uhn.fhir.parser.DataFormatException;
import org.hl7.fhir.utilities.DateTimeUtil;
public abstract class BaseDateTimeType extends PrimitiveType<Date> {
@ -488,20 +489,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* </p>
*/
public String toHumanDisplay() {
TimeZone tz = getTimeZone();
Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance();
value.setTime(getValue());
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(value);
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(value);
}
return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());
}
/**
@ -511,16 +499,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(getValue());
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(getValue());
}
return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());
}
private void validateCharAtIndexIs(String theValue, int theIndex, char theChar) {

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -34,6 +34,7 @@ import org.apache.commons.lang3.time.FastDateFormat;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.parser.DataFormatException;
import org.hl7.fhir.utilities.DateTimeUtil;
public abstract class BaseDateTimeType extends PrimitiveType<Date> {
@ -781,20 +782,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* </p>
*/
public String toHumanDisplay() {
TimeZone tz = getTimeZone();
Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance();
value.setTime(getValue());
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(value);
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(value);
}
return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());
}
/**
@ -804,16 +792,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(getValue());
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(getValue());
}
return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());
}
private void validateBeforeOrAfter(DateTimeType theDateTimeType) {

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -34,6 +34,7 @@ import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import ca.uhn.fhir.parser.DataFormatException;
import org.hl7.fhir.utilities.DateTimeUtil;
public abstract class BaseDateTimeType extends PrimitiveType<Date> {
@ -771,51 +772,29 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
return retVal;
}
/**
* Returns a human readable version of this date/time using the system local format.
* <p>
* <b>Note on time zones:</b> This method renders the value using the time zone that is contained within the value.
* For example, if this date object contains the value "2012-01-05T12:00:00-08:00",
* the human display will be rendered as "12:00:00" even if the application is being executed on a system in a
* different time zone. If this behaviour is not what you want, use
* {@link #toHumanDisplayLocalTimezone()} instead.
* </p>
*/
public String toHumanDisplay() {
TimeZone tz = getTimeZone();
Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance();
value.setTime(getValue());
/**
* Returns a human readable version of this date/time using the system local format.
* <p>
* <b>Note on time zones:</b> This method renders the value using the time zone that is contained within the value.
* For example, if this date object contains the value "2012-01-05T12:00:00-08:00",
* the human display will be rendered as "12:00:00" even if the application is being executed on a system in a
* different time zone. If this behaviour is not what you want, use
* {@link #toHumanDisplayLocalTimezone()} instead.
* </p>
*/
public String toHumanDisplay() {
return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());
}
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(value);
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(value);
}
}
/**
* Returns a human readable version of this date/time using the system local format, converted to the local timezone
* if neccesary.
*
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(getValue());
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(getValue());
}
}
/**
* Returns a human readable version of this date/time using the system local format, converted to the local timezone
* if neccesary.
*
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());
}
private void validateBeforeOrAfter(DateTimeType theDateTimeType) {
if (getValue() == null) {

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId>
<version>4.0.23-SNAPSHOT</version>
<version>4.0.26-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -429,7 +429,7 @@ public class ProfileUtilities extends TranslatingUtilities {
throw new DefinitionException("Base profile "+base.getUrl()+" has no type");
if (!derived.hasType())
throw new DefinitionException("Derived profile "+derived.getUrl()+" has no type");
if (!base.getType().equals(derived.getType()))
if (!base.getType().equals(derived.getType()) && derived.getDerivation().equals(TypeDerivationRule.CONSTRAINT))
throw new DefinitionException("Base & Derived profiles have different types ("+base.getUrl()+" = "+base.getType()+" vs "+derived.getUrl()+" = "+derived.getType()+")");
if (snapshotStack.contains(derived.getUrl()))
@ -461,9 +461,22 @@ public class ProfileUtilities extends TranslatingUtilities {
// we actually delegate the work to a subroutine so we can re-enter it with a different cursors
StructureDefinitionDifferentialComponent diff = cloneDiff(derived.getDifferential()); // we make a copy here because we're sometimes going to hack the differential while processing it. Have to migrate user data back afterwards
processPaths("", derived.getSnapshot(), base.getSnapshot(), diff, baseCursor, diffCursor, base.getSnapshot().getElement().size()-1,
StructureDefinitionSnapshotComponent baseSnapshot = base.getSnapshot();
if (derived.getDerivation().equals(TypeDerivationRule.SPECIALIZATION)) {
baseSnapshot = cloneSnapshot(baseSnapshot, base.getType(), derived.getType());
}
processPaths("", derived.getSnapshot(), baseSnapshot, diff, baseCursor, diffCursor, baseSnapshot.getElement().size()-1,
derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, webUrl, derived.present(), null, null, false, base.getUrl(), null, false, new ArrayList<ElementRedirection>(), base);
if (derived.getDerivation().equals(TypeDerivationRule.SPECIALIZATION)) {
for (ElementDefinition e : diff.getElement()) {
if (!e.hasUserData(GENERATED_IN_SNAPSHOT)) {
ElementDefinition outcome = updateURLs(url, webUrl, e.copy());
e.setUserData(GENERATED_IN_SNAPSHOT, outcome);
derived.getSnapshot().addElement(outcome);
}
}
}
if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty())
throw new Error("type on first snapshot element for "+derived.getSnapshot().getElementFirstRep().getPath()+" in "+derived.getUrl()+" from "+base.getUrl());
updateMaps(base, derived);
@ -519,6 +532,16 @@ public class ProfileUtilities extends TranslatingUtilities {
return diff;
}
private StructureDefinitionSnapshotComponent cloneSnapshot(StructureDefinitionSnapshotComponent source, String baseType, String derivedType) {
StructureDefinitionSnapshotComponent diff = new StructureDefinitionSnapshotComponent();
for (ElementDefinition sed : source.getElement()) {
ElementDefinition ted = sed.copy();
ted.setId(ted.getId().replaceFirst(baseType,derivedType));
ted.setPath(ted.getPath().replaceFirst(baseType,derivedType));
diff.getElement().add(ted);
}
return diff;
}
private String constraintSummary(ElementDefinition ed) {
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();

View File

@ -273,7 +273,12 @@ public class JsonParser extends ParserBase {
context.getChildren().add(n);
if (main != null) {
JsonPrimitive p = (JsonPrimitive) main;
n.setValue(p.getAsString());
if (p.isNumber() && p.getAsNumber() instanceof JsonTrackingParser.PresentedBigDecimal) {
String rawValue = ((JsonTrackingParser.PresentedBigDecimal) p.getAsNumber()).getPresentation();
n.setValue(rawValue);
} else {
n.setValue(p.getAsString());
}
if (!n.getProperty().isChoice() && n.getType().equals("xhtml")) {
try {
n.setXhtml(new XhtmlParser().setValidatorMode(policy == ValidationPolicy.EVERYTHING).parse(n.getValue(), null).getDocumentElement());

View File

@ -40,6 +40,7 @@ import javax.xml.transform.sax.SAXSource;
import org.hl7.fhir.exceptions.DefinitionException;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r5.elementmodel.Element;
import org.hl7.fhir.r5.conformance.ProfileUtilities;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.elementmodel.Element.SpecialElement;
@ -244,8 +245,18 @@ public class XmlParser extends ParserBase {
if (!Utilities.noString(text)) {
Property property = getTextProp(properties);
if (property != null) {
context.getChildren().add(new Element(property.getName(), property, property.getType(), text).markLocation(line(node), col(node)));
} else {
if ("ED.data[x]".equals(property.getDefinition().getId())) {
if ("B64".equals(node.getAttribute("representation"))) {
context.getChildren().add(new Element("dataBase64Binary", property, "base64Binary", text).markLocation(line(node), col(node)));
} else {
context.getChildren().add(new Element("dataString", property, "string", text).markLocation(line(node), col(node)));
}
} else {
context.getChildren().add(
new Element(property.getName(), property, property.getType(), text).markLocation(line(node), col(node)));
}
}
else {
logError(line(node), col(node), path, IssueType.STRUCTURE, "Text should not be present", IssueSeverity.ERROR);
}
}

View File

@ -51,17 +51,20 @@ package org.hl7.fhir.r5.model;
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc.
*/
@ -219,13 +222,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="The party(s), such as insurances, that may contribute to the payment of this account", formalDefinition="The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing." )
protected Reference coverage;
/**
* The actual object that is the target of the reference (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.)
*/
protected Coverage coverageTarget;
/**
* The priority of the coverage in the context of this account.
*/
@ -233,7 +229,7 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="The priority of the coverage in the context of this account", formalDefinition="The priority of the coverage in the context of this account." )
protected PositiveIntType priority;
private static final long serialVersionUID = -1046265008L;
private static final long serialVersionUID = 1695665065L;
/**
* Constructor
@ -278,30 +274,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return this;
}
/**
* @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.)
*/
public Coverage getCoverageTarget() {
if (this.coverageTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CoverageComponent.coverage");
else if (Configuration.doAutoCreate())
this.coverageTarget = new Coverage(); // aa
return this.coverageTarget;
}
/**
* @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).
A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.)
*/
public CoverageComponent setCoverageTarget(Coverage value) {
this.coverageTarget = value;
return this;
}
/**
* @return {@link #priority} (The priority of the coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
*/
@ -434,9 +406,13 @@ A coverage may only be responsible for specific types of charges, and the sequen
public CoverageComponent copy() {
CoverageComponent dst = new CoverageComponent();
copyValues(dst);
return dst;
}
public void copyValues(CoverageComponent dst) {
super.copyValues(dst);
dst.coverage = coverage == null ? null : coverage.copy();
dst.priority = priority == null ? null : priority.copy();
return dst;
}
@Override
@ -479,11 +455,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="Responsible entity", formalDefinition="The entity who is responsible." )
protected Reference party;
/**
* The actual object that is the target of the reference (The entity who is responsible.)
*/
protected Resource partyTarget;
/**
* A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.
*/
@ -498,7 +469,7 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="Guarantee account during", formalDefinition="The timeframe during which the guarantor accepts responsibility for the account." )
protected Period period;
private static final long serialVersionUID = -1012345396L;
private static final long serialVersionUID = -523056773L;
/**
* Constructor
@ -539,21 +510,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return this;
}
/**
* @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity who is responsible.)
*/
public Resource getPartyTarget() {
return this.partyTarget;
}
/**
* @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity who is responsible.)
*/
public GuarantorComponent setPartyTarget(Resource value) {
this.partyTarget = value;
return this;
}
/**
* @return {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value
*/
@ -724,10 +680,14 @@ A coverage may only be responsible for specific types of charges, and the sequen
public GuarantorComponent copy() {
GuarantorComponent dst = new GuarantorComponent();
copyValues(dst);
return dst;
}
public void copyValues(GuarantorComponent dst) {
super.copyValues(dst);
dst.party = party == null ? null : party.copy();
dst.onHold = onHold == null ? null : onHold.copy();
dst.period = period == null ? null : period.copy();
return dst;
}
@Override
@ -798,11 +758,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Child(name = "subject", type = {Patient.class, Device.class, Practitioner.class, PractitionerRole.class, Location.class, HealthcareService.class, Organization.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="The entity that caused the expenses", formalDefinition="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account." )
protected List<Reference> subject;
/**
* The actual objects that are the target of the reference (Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.)
*/
protected List<Resource> subjectTarget;
/**
* The date range of services associated with this account.
@ -825,11 +780,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="Entity managing the Account", formalDefinition="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." )
protected Reference owner;
/**
* The actual object that is the target of the reference (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.)
*/
protected Organization ownerTarget;
/**
* Provides additional information about what the account tracks and how it is used.
*/
@ -851,12 +801,7 @@ A coverage may only be responsible for specific types of charges, and the sequen
@Description(shortDefinition="Reference to a parent Account", formalDefinition="Reference to a parent Account." )
protected Reference partOf;
/**
* The actual object that is the target of the reference (Reference to a parent Account.)
*/
protected Account partOfTarget;
private static final long serialVersionUID = 1211238069L;
private static final long serialVersionUID = 1572782679L;
/**
* Constructor
@ -1097,16 +1042,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return getSubject().get(0);
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public List<Resource> getSubjectTarget() {
if (this.subjectTarget == null)
this.subjectTarget = new ArrayList<Resource>();
return this.subjectTarget;
}
/**
* @return {@link #servicePeriod} (The date range of services associated with this account.)
*/
@ -1208,26 +1143,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return this;
}
/**
* @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.)
*/
public Organization getOwnerTarget() {
if (this.ownerTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Account.owner");
else if (Configuration.doAutoCreate())
this.ownerTarget = new Organization(); // aa
return this.ownerTarget;
}
/**
* @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.)
*/
public Account setOwnerTarget(Organization value) {
this.ownerTarget = value;
return this;
}
/**
* @return {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
@ -1354,26 +1269,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return this;
}
/**
* @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to a parent Account.)
*/
public Account getPartOfTarget() {
if (this.partOfTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Account.partOf");
else if (Configuration.doAutoCreate())
this.partOfTarget = new Account(); // aa
return this.partOfTarget;
}
/**
* @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to a parent Account.)
*/
public Account setPartOfTarget(Account value) {
this.partOfTarget = value;
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("identifier", "Identifier", "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier));
@ -1588,6 +1483,11 @@ A coverage may only be responsible for specific types of charges, and the sequen
public Account copy() {
Account dst = new Account();
copyValues(dst);
return dst;
}
public void copyValues(Account dst) {
super.copyValues(dst);
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
for (Identifier i : identifier)
@ -1615,7 +1515,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
dst.guarantor.add(i.copy());
};
dst.partOf = partOf == null ? null : partOf.copy();
return dst;
}
protected Account typedCopy() {

View File

@ -53,19 +53,19 @@ package org.hl7.fhir.r5.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatusEnumFactory;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.r5.model.Enumerations.*;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
*/
@ -1018,9 +1018,13 @@ public class ActivityDefinition extends MetadataResource {
public ActivityDefinitionParticipantComponent copy() {
ActivityDefinitionParticipantComponent dst = new ActivityDefinitionParticipantComponent();
copyValues(dst);
return dst;
}
public void copyValues(ActivityDefinitionParticipantComponent dst) {
super.copyValues(dst);
dst.type = type == null ? null : type.copy();
dst.role = role == null ? null : role.copy();
return dst;
}
@Override
@ -1244,9 +1248,13 @@ public class ActivityDefinition extends MetadataResource {
public ActivityDefinitionDynamicValueComponent copy() {
ActivityDefinitionDynamicValueComponent dst = new ActivityDefinitionDynamicValueComponent();
copyValues(dst);
return dst;
}
public void copyValues(ActivityDefinitionDynamicValueComponent dst) {
super.copyValues(dst);
dst.path = path == null ? null : path.copy();
dst.expression = expression == null ? null : expression.copy();
return dst;
}
@Override
@ -1421,7 +1429,7 @@ public class ActivityDefinition extends MetadataResource {
* Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.
*/
@Child(name = "intent", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="proposal | plan | order", formalDefinition="Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain." )
@Description(shortDefinition="proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition="Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent")
protected Enumeration<RequestIntent> intent;
@ -1454,11 +1462,6 @@ public class ActivityDefinition extends MetadataResource {
@Description(shortDefinition="Where it should happen", formalDefinition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." )
protected Reference location;
/**
* The actual object that is the target of the reference (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
*/
protected Location locationTarget;
/**
* Indicates who should participate in performing the action described.
*/
@ -1502,11 +1505,6 @@ public class ActivityDefinition extends MetadataResource {
@Child(name = "specimenRequirement", type = {SpecimenDefinition.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What specimens are required to perform this action", formalDefinition="Defines specimen requirements for the action to be performed, such as required specimens for a lab test." )
protected List<Reference> specimenRequirement;
/**
* The actual objects that are the target of the reference (Defines specimen requirements for the action to be performed, such as required specimens for a lab test.)
*/
protected List<SpecimenDefinition> specimenRequirementTarget;
/**
* Defines observation requirements for the action to be performed, such as body weight or surface area.
@ -1514,11 +1512,6 @@ public class ActivityDefinition extends MetadataResource {
@Child(name = "observationRequirement", type = {ObservationDefinition.class}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What observations are required to perform this action", formalDefinition="Defines observation requirements for the action to be performed, such as body weight or surface area." )
protected List<Reference> observationRequirement;
/**
* The actual objects that are the target of the reference (Defines observation requirements for the action to be performed, such as body weight or surface area.)
*/
protected List<ObservationDefinition> observationRequirementTarget;
/**
* Defines the observations that are expected to be produced by the action.
@ -1526,11 +1519,6 @@ public class ActivityDefinition extends MetadataResource {
@Child(name = "observationResultRequirement", type = {ObservationDefinition.class}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What observations must be produced by this action", formalDefinition="Defines the observations that are expected to be produced by the action." )
protected List<Reference> observationResultRequirement;
/**
* The actual objects that are the target of the reference (Defines the observations that are expected to be produced by the action.)
*/
protected List<ObservationDefinition> observationResultRequirementTarget;
/**
* A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.
@ -1546,7 +1534,7 @@ public class ActivityDefinition extends MetadataResource {
@Description(shortDefinition="Dynamic aspects of the definition", formalDefinition="Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result." )
protected List<ActivityDefinitionDynamicValueComponent> dynamicValue;
private static final long serialVersionUID = 1488459022L;
private static final long serialVersionUID = -2129841377L;
/**
* Constructor
@ -3356,26 +3344,6 @@ public class ActivityDefinition extends MetadataResource {
return this;
}
/**
* @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
*/
public Location getLocationTarget() {
if (this.locationTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ActivityDefinition.location");
else if (Configuration.doAutoCreate())
this.locationTarget = new Location(); // aa
return this.locationTarget;
}
/**
* @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
*/
public ActivityDefinition setLocationTarget(Location value) {
this.locationTarget = value;
return this;
}
/**
* @return {@link #participant} (Indicates who should participate in performing the action described.)
*/
@ -3663,28 +3631,6 @@ public class ActivityDefinition extends MetadataResource {
return getSpecimenRequirement().get(0);
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public List<SpecimenDefinition> getSpecimenRequirementTarget() {
if (this.specimenRequirementTarget == null)
this.specimenRequirementTarget = new ArrayList<SpecimenDefinition>();
return this.specimenRequirementTarget;
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public SpecimenDefinition addSpecimenRequirementTarget() {
SpecimenDefinition r = new SpecimenDefinition();
if (this.specimenRequirementTarget == null)
this.specimenRequirementTarget = new ArrayList<SpecimenDefinition>();
this.specimenRequirementTarget.add(r);
return r;
}
/**
* @return {@link #observationRequirement} (Defines observation requirements for the action to be performed, such as body weight or surface area.)
*/
@ -3738,28 +3684,6 @@ public class ActivityDefinition extends MetadataResource {
return getObservationRequirement().get(0);
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public List<ObservationDefinition> getObservationRequirementTarget() {
if (this.observationRequirementTarget == null)
this.observationRequirementTarget = new ArrayList<ObservationDefinition>();
return this.observationRequirementTarget;
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public ObservationDefinition addObservationRequirementTarget() {
ObservationDefinition r = new ObservationDefinition();
if (this.observationRequirementTarget == null)
this.observationRequirementTarget = new ArrayList<ObservationDefinition>();
this.observationRequirementTarget.add(r);
return r;
}
/**
* @return {@link #observationResultRequirement} (Defines the observations that are expected to be produced by the action.)
*/
@ -3813,28 +3737,6 @@ public class ActivityDefinition extends MetadataResource {
return getObservationResultRequirement().get(0);
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public List<ObservationDefinition> getObservationResultRequirementTarget() {
if (this.observationResultRequirementTarget == null)
this.observationResultRequirementTarget = new ArrayList<ObservationDefinition>();
return this.observationResultRequirementTarget;
}
/**
* @deprecated Use Reference#setResource(IBaseResource) instead
*/
@Deprecated
public ObservationDefinition addObservationResultRequirementTarget() {
ObservationDefinition r = new ObservationDefinition();
if (this.observationResultRequirementTarget == null)
this.observationResultRequirementTarget = new ArrayList<ObservationDefinition>();
this.observationResultRequirementTarget.add(r);
return r;
}
/**
* @return {@link #transform} (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value
*/
@ -4659,6 +4561,11 @@ public class ActivityDefinition extends MetadataResource {
public ActivityDefinition copy() {
ActivityDefinition dst = new ActivityDefinition();
copyValues(dst);
return dst;
}
public void copyValues(ActivityDefinition dst) {
super.copyValues(dst);
dst.url = url == null ? null : url.copy();
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
@ -4777,7 +4684,6 @@ public class ActivityDefinition extends MetadataResource {
for (ActivityDefinitionDynamicValueComponent i : dynamicValue)
dst.dynamicValue.add(i.copy());
};
return dst;
}
protected ActivityDefinition typedCopy() {

View File

@ -51,15 +51,19 @@ package org.hl7.fhir.r5.model;
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world.
*/
@ -1072,6 +1076,11 @@ public class Address extends Type implements ICompositeType {
public Address copy() {
Address dst = new Address();
copyValues(dst);
return dst;
}
public void copyValues(Address dst) {
super.copyValues(dst);
dst.use = use == null ? null : use.copy();
dst.type = type == null ? null : type.copy();
dst.text = text == null ? null : text.copy();
@ -1086,7 +1095,6 @@ public class Address extends Type implements ICompositeType {
dst.postalCode = postalCode == null ? null : postalCode.copy();
dst.country = country == null ? null : country.copy();
dst.period = period == null ? null : period.copy();
return dst;
}
protected Address typedCopy() {

View File

@ -1,169 +1,179 @@
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
/**
* A duration of time during which an organism (or a process) has existed.
*/
@DatatypeDef(name="Age")
public class Age extends Quantity implements ICompositeType {
private static final long serialVersionUID = 0L;
/**
* Constructor
*/
public Age() {
super();
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
return super.setProperty(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
return super.addChild(name);
}
public String fhirType() {
return "Age";
}
public Age copy() {
Age dst = new Age();
copyValues(dst);
return dst;
}
protected Age typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Age))
return false;
Age o = (Age) other_;
return true;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Age))
return false;
Age o = (Age) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
}
}
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A duration of time during which an organism (or a process) has existed.
*/
@DatatypeDef(name="Age")
public class Age extends Quantity implements ICompositeType {
private static final long serialVersionUID = 0L;
/**
* Constructor
*/
public Age() {
super();
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
return super.setProperty(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
return super.addChild(name);
}
public String fhirType() {
return "Age";
}
public Age copy() {
Age dst = new Age();
copyValues(dst);
return dst;
}
public void copyValues(Age dst) {
super.copyValues(dst);
}
protected Age typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Age))
return false;
Age o = (Age) other_;
return true;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Age))
return false;
Age o = (Age) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
}
}

View File

@ -1,401 +1,408 @@
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
/**
* A text note which also contains information about who made the statement and when.
*/
@DatatypeDef(name="Annotation")
public class Annotation extends Type implements ICompositeType {
/**
* The individual responsible for making the annotation.
*/
@Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class, Organization.class, StringType.class}, order=0, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Individual responsible for the annotation", formalDefinition="The individual responsible for making the annotation." )
protected Type author;
/**
* Indicates when this particular annotation was made.
*/
@Child(name = "time", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When the annotation was made", formalDefinition="Indicates when this particular annotation was made." )
protected DateTimeType time;
/**
* The text of the annotation in markdown format.
*/
@Child(name = "text", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="The annotation - text content (as markdown)", formalDefinition="The text of the annotation in markdown format." )
protected MarkdownType text;
private static final long serialVersionUID = 1324090545L;
/**
* Constructor
*/
public Annotation() {
super();
}
/**
* Constructor
*/
public Annotation(MarkdownType text) {
super();
this.text = text;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public Type getAuthor() {
return this.author;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public Reference getAuthorReference() throws FHIRException {
if (this.author == null)
this.author = new Reference();
if (!(this.author instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.author.getClass().getName()+" was encountered");
return (Reference) this.author;
}
public boolean hasAuthorReference() {
return this != null && this.author instanceof Reference;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public StringType getAuthorStringType() throws FHIRException {
if (this.author == null)
this.author = new StringType();
if (!(this.author instanceof StringType))
throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.author.getClass().getName()+" was encountered");
return (StringType) this.author;
}
public boolean hasAuthorStringType() {
return this != null && this.author instanceof StringType;
}
public boolean hasAuthor() {
return this.author != null && !this.author.isEmpty();
}
/**
* @param value {@link #author} (The individual responsible for making the annotation.)
*/
public Annotation setAuthor(Type value) {
if (value != null && !(value instanceof Reference || value instanceof StringType))
throw new Error("Not the right type for Annotation.author[x]: "+value.fhirType());
this.author = value;
return this;
}
/**
* @return {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
*/
public DateTimeType getTimeElement() {
if (this.time == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Annotation.time");
else if (Configuration.doAutoCreate())
this.time = new DateTimeType(); // bb
return this.time;
}
public boolean hasTimeElement() {
return this.time != null && !this.time.isEmpty();
}
public boolean hasTime() {
return this.time != null && !this.time.isEmpty();
}
/**
* @param value {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
*/
public Annotation setTimeElement(DateTimeType value) {
this.time = value;
return this;
}
/**
* @return Indicates when this particular annotation was made.
*/
public Date getTime() {
return this.time == null ? null : this.time.getValue();
}
/**
* @param value Indicates when this particular annotation was made.
*/
public Annotation setTime(Date value) {
if (value == null)
this.time = null;
else {
if (this.time == null)
this.time = new DateTimeType();
this.time.setValue(value);
}
return this;
}
/**
* @return {@link #text} (The text of the annotation in markdown format.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
*/
public MarkdownType getTextElement() {
if (this.text == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Annotation.text");
else if (Configuration.doAutoCreate())
this.text = new MarkdownType(); // bb
return this.text;
}
public boolean hasTextElement() {
return this.text != null && !this.text.isEmpty();
}
public boolean hasText() {
return this.text != null && !this.text.isEmpty();
}
/**
* @param value {@link #text} (The text of the annotation in markdown format.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
*/
public Annotation setTextElement(MarkdownType value) {
this.text = value;
return this;
}
/**
* @return The text of the annotation in markdown format.
*/
public String getText() {
return this.text == null ? null : this.text.getValue();
}
/**
* @param value The text of the annotation in markdown format.
*/
public Annotation setText(String value) {
if (this.text == null)
this.text = new MarkdownType();
this.text.setValue(value);
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author));
children.add(new Property("time", "dateTime", "Indicates when this particular annotation was made.", 0, 1, time));
children.add(new Property("text", "markdown", "The text of the annotation in markdown format.", 0, 1, text));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1475597077: /*author[x]*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case -1406328437: /*author*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 305515008: /*authorReference*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 290249084: /*authorString*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 3560141: /*time*/ return new Property("time", "dateTime", "Indicates when this particular annotation was made.", 0, 1, time);
case 3556653: /*text*/ return new Property("text", "markdown", "The text of the annotation in markdown format.", 0, 1, text);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Type
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1406328437: // author
this.author = castToType(value); // Type
return value;
case 3560141: // time
this.time = castToDateTime(value); // DateTimeType
return value;
case 3556653: // text
this.text = castToMarkdown(value); // MarkdownType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("author[x]")) {
this.author = castToType(value); // Type
} else if (name.equals("time")) {
this.time = castToDateTime(value); // DateTimeType
} else if (name.equals("text")) {
this.text = castToMarkdown(value); // MarkdownType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1475597077: return getAuthor();
case -1406328437: return getAuthor();
case 3560141: return getTimeElement();
case 3556653: return getTextElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return new String[] {"Reference", "string"};
case 3560141: /*time*/ return new String[] {"dateTime"};
case 3556653: /*text*/ return new String[] {"markdown"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("authorReference")) {
this.author = new Reference();
return this.author;
}
else if (name.equals("authorString")) {
this.author = new StringType();
return this.author;
}
else if (name.equals("time")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.time");
}
else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.text");
}
else
return super.addChild(name);
}
public String fhirType() {
return "Annotation";
}
public Annotation copy() {
Annotation dst = new Annotation();
copyValues(dst);
dst.author = author == null ? null : author.copy();
dst.time = time == null ? null : time.copy();
dst.text = text == null ? null : text.copy();
return dst;
}
protected Annotation typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Annotation))
return false;
Annotation o = (Annotation) other_;
return compareDeep(author, o.author, true) && compareDeep(time, o.time, true) && compareDeep(text, o.text, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Annotation))
return false;
Annotation o = (Annotation) other_;
return compareValues(time, o.time, true) && compareValues(text, o.text, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(author, time, text);
}
}
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A text note which also contains information about who made the statement and when.
*/
@DatatypeDef(name="Annotation")
public class Annotation extends Type implements ICompositeType {
/**
* The individual responsible for making the annotation.
*/
@Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class, Organization.class, StringType.class}, order=0, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Individual responsible for the annotation", formalDefinition="The individual responsible for making the annotation." )
protected Type author;
/**
* Indicates when this particular annotation was made.
*/
@Child(name = "time", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When the annotation was made", formalDefinition="Indicates when this particular annotation was made." )
protected DateTimeType time;
/**
* The text of the annotation in markdown format.
*/
@Child(name = "text", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="The annotation - text content (as markdown)", formalDefinition="The text of the annotation in markdown format." )
protected MarkdownType text;
private static final long serialVersionUID = 1324090545L;
/**
* Constructor
*/
public Annotation() {
super();
}
/**
* Constructor
*/
public Annotation(MarkdownType text) {
super();
this.text = text;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public Type getAuthor() {
return this.author;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public Reference getAuthorReference() throws FHIRException {
if (this.author == null)
this.author = new Reference();
if (!(this.author instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.author.getClass().getName()+" was encountered");
return (Reference) this.author;
}
public boolean hasAuthorReference() {
return this != null && this.author instanceof Reference;
}
/**
* @return {@link #author} (The individual responsible for making the annotation.)
*/
public StringType getAuthorStringType() throws FHIRException {
if (this.author == null)
this.author = new StringType();
if (!(this.author instanceof StringType))
throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.author.getClass().getName()+" was encountered");
return (StringType) this.author;
}
public boolean hasAuthorStringType() {
return this != null && this.author instanceof StringType;
}
public boolean hasAuthor() {
return this.author != null && !this.author.isEmpty();
}
/**
* @param value {@link #author} (The individual responsible for making the annotation.)
*/
public Annotation setAuthor(Type value) {
if (value != null && !(value instanceof Reference || value instanceof StringType))
throw new Error("Not the right type for Annotation.author[x]: "+value.fhirType());
this.author = value;
return this;
}
/**
* @return {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
*/
public DateTimeType getTimeElement() {
if (this.time == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Annotation.time");
else if (Configuration.doAutoCreate())
this.time = new DateTimeType(); // bb
return this.time;
}
public boolean hasTimeElement() {
return this.time != null && !this.time.isEmpty();
}
public boolean hasTime() {
return this.time != null && !this.time.isEmpty();
}
/**
* @param value {@link #time} (Indicates when this particular annotation was made.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
*/
public Annotation setTimeElement(DateTimeType value) {
this.time = value;
return this;
}
/**
* @return Indicates when this particular annotation was made.
*/
public Date getTime() {
return this.time == null ? null : this.time.getValue();
}
/**
* @param value Indicates when this particular annotation was made.
*/
public Annotation setTime(Date value) {
if (value == null)
this.time = null;
else {
if (this.time == null)
this.time = new DateTimeType();
this.time.setValue(value);
}
return this;
}
/**
* @return {@link #text} (The text of the annotation in markdown format.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
*/
public MarkdownType getTextElement() {
if (this.text == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Annotation.text");
else if (Configuration.doAutoCreate())
this.text = new MarkdownType(); // bb
return this.text;
}
public boolean hasTextElement() {
return this.text != null && !this.text.isEmpty();
}
public boolean hasText() {
return this.text != null && !this.text.isEmpty();
}
/**
* @param value {@link #text} (The text of the annotation in markdown format.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
*/
public Annotation setTextElement(MarkdownType value) {
this.text = value;
return this;
}
/**
* @return The text of the annotation in markdown format.
*/
public String getText() {
return this.text == null ? null : this.text.getValue();
}
/**
* @param value The text of the annotation in markdown format.
*/
public Annotation setText(String value) {
if (this.text == null)
this.text = new MarkdownType();
this.text.setValue(value);
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author));
children.add(new Property("time", "dateTime", "Indicates when this particular annotation was made.", 0, 1, time));
children.add(new Property("text", "markdown", "The text of the annotation in markdown format.", 0, 1, text));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1475597077: /*author[x]*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case -1406328437: /*author*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 305515008: /*authorReference*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 290249084: /*authorString*/ return new Property("author[x]", "Reference(Practitioner|Patient|RelatedPerson|Organization)|string", "The individual responsible for making the annotation.", 0, 1, author);
case 3560141: /*time*/ return new Property("time", "dateTime", "Indicates when this particular annotation was made.", 0, 1, time);
case 3556653: /*text*/ return new Property("text", "markdown", "The text of the annotation in markdown format.", 0, 1, text);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Type
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1406328437: // author
this.author = castToType(value); // Type
return value;
case 3560141: // time
this.time = castToDateTime(value); // DateTimeType
return value;
case 3556653: // text
this.text = castToMarkdown(value); // MarkdownType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("author[x]")) {
this.author = castToType(value); // Type
} else if (name.equals("time")) {
this.time = castToDateTime(value); // DateTimeType
} else if (name.equals("text")) {
this.text = castToMarkdown(value); // MarkdownType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1475597077: return getAuthor();
case -1406328437: return getAuthor();
case 3560141: return getTimeElement();
case 3556653: return getTextElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return new String[] {"Reference", "string"};
case 3560141: /*time*/ return new String[] {"dateTime"};
case 3556653: /*text*/ return new String[] {"markdown"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("authorReference")) {
this.author = new Reference();
return this.author;
}
else if (name.equals("authorString")) {
this.author = new StringType();
return this.author;
}
else if (name.equals("time")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.time");
}
else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.text");
}
else
return super.addChild(name);
}
public String fhirType() {
return "Annotation";
}
public Annotation copy() {
Annotation dst = new Annotation();
copyValues(dst);
return dst;
}
public void copyValues(Annotation dst) {
super.copyValues(dst);
dst.author = author == null ? null : author.copy();
dst.time = time == null ? null : time.copy();
dst.text = text == null ? null : text.copy();
}
protected Annotation typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Annotation))
return false;
Annotation o = (Annotation) other_;
return compareDeep(author, o.author, true) && compareDeep(time, o.time, true) && compareDeep(text, o.text, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Annotation))
return false;
Annotation o = (Annotation) other_;
return compareValues(time, o.time, true) && compareValues(text, o.text, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(author, time, text);
}
}

View File

@ -50,16 +50,22 @@ package org.hl7.fhir.r5.model;
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.utilities.Utilities;
import java.math.*;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.r5.model.Enumerations.*;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* For referring to data content defined in other formats.
*/
@ -124,7 +130,42 @@ public class Attachment extends Type implements ICompositeType {
@Description(shortDefinition="Date attachment was first created", formalDefinition="The date that the attachment was first created." )
protected DateTimeType creation;
private static final long serialVersionUID = -564352571L;
/**
* Height of the image in pixels (photo/video).
*/
@Child(name = "height", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Height of the image in pixels (photo/video)", formalDefinition="Height of the image in pixels (photo/video)." )
protected PositiveIntType height;
/**
* Width of the image in pixels (photo/video).
*/
@Child(name = "width", type = {PositiveIntType.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." )
protected PositiveIntType width;
/**
* The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.
*/
@Child(name = "frames", type = {PositiveIntType.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." )
protected PositiveIntType frames;
/**
* The duration of the recording in seconds - for audio and video.
*/
@Child(name = "duration", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." )
protected DecimalType duration;
/**
* The number of pages when printed.
*/
@Child(name = "pages", type = {PositiveIntType.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Number of printed pages", formalDefinition="The number of pages when printed." )
protected PositiveIntType pages;
private static final long serialVersionUID = -738137631L;
/**
* Constructor
@ -521,6 +562,253 @@ public class Attachment extends Type implements ICompositeType {
return this;
}
/**
* @return {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value
*/
public PositiveIntType getHeightElement() {
if (this.height == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Attachment.height");
else if (Configuration.doAutoCreate())
this.height = new PositiveIntType(); // bb
return this.height;
}
public boolean hasHeightElement() {
return this.height != null && !this.height.isEmpty();
}
public boolean hasHeight() {
return this.height != null && !this.height.isEmpty();
}
/**
* @param value {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value
*/
public Attachment setHeightElement(PositiveIntType value) {
this.height = value;
return this;
}
/**
* @return Height of the image in pixels (photo/video).
*/
public int getHeight() {
return this.height == null || this.height.isEmpty() ? 0 : this.height.getValue();
}
/**
* @param value Height of the image in pixels (photo/video).
*/
public Attachment setHeight(int value) {
if (this.height == null)
this.height = new PositiveIntType();
this.height.setValue(value);
return this;
}
/**
* @return {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value
*/
public PositiveIntType getWidthElement() {
if (this.width == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Attachment.width");
else if (Configuration.doAutoCreate())
this.width = new PositiveIntType(); // bb
return this.width;
}
public boolean hasWidthElement() {
return this.width != null && !this.width.isEmpty();
}
public boolean hasWidth() {
return this.width != null && !this.width.isEmpty();
}
/**
* @param value {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value
*/
public Attachment setWidthElement(PositiveIntType value) {
this.width = value;
return this;
}
/**
* @return Width of the image in pixels (photo/video).
*/
public int getWidth() {
return this.width == null || this.width.isEmpty() ? 0 : this.width.getValue();
}
/**
* @param value Width of the image in pixels (photo/video).
*/
public Attachment setWidth(int value) {
if (this.width == null)
this.width = new PositiveIntType();
this.width.setValue(value);
return this;
}
/**
* @return {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value
*/
public PositiveIntType getFramesElement() {
if (this.frames == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Attachment.frames");
else if (Configuration.doAutoCreate())
this.frames = new PositiveIntType(); // bb
return this.frames;
}
public boolean hasFramesElement() {
return this.frames != null && !this.frames.isEmpty();
}
public boolean hasFrames() {
return this.frames != null && !this.frames.isEmpty();
}
/**
* @param value {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value
*/
public Attachment setFramesElement(PositiveIntType value) {
this.frames = value;
return this;
}
/**
* @return The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.
*/
public int getFrames() {
return this.frames == null || this.frames.isEmpty() ? 0 : this.frames.getValue();
}
/**
* @param value The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.
*/
public Attachment setFrames(int value) {
if (this.frames == null)
this.frames = new PositiveIntType();
this.frames.setValue(value);
return this;
}
/**
* @return {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value
*/
public DecimalType getDurationElement() {
if (this.duration == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Attachment.duration");
else if (Configuration.doAutoCreate())
this.duration = new DecimalType(); // bb
return this.duration;
}
public boolean hasDurationElement() {
return this.duration != null && !this.duration.isEmpty();
}
public boolean hasDuration() {
return this.duration != null && !this.duration.isEmpty();
}
/**
* @param value {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value
*/
public Attachment setDurationElement(DecimalType value) {
this.duration = value;
return this;
}
/**
* @return The duration of the recording in seconds - for audio and video.
*/
public BigDecimal getDuration() {
return this.duration == null ? null : this.duration.getValue();
}
/**
* @param value The duration of the recording in seconds - for audio and video.
*/
public Attachment setDuration(BigDecimal value) {
if (value == null)
this.duration = null;
else {
if (this.duration == null)
this.duration = new DecimalType();
this.duration.setValue(value);
}
return this;
}
/**
* @param value The duration of the recording in seconds - for audio and video.
*/
public Attachment setDuration(long value) {
this.duration = new DecimalType();
this.duration.setValue(value);
return this;
}
/**
* @param value The duration of the recording in seconds - for audio and video.
*/
public Attachment setDuration(double value) {
this.duration = new DecimalType();
this.duration.setValue(value);
return this;
}
/**
* @return {@link #pages} (The number of pages when printed.). This is the underlying object with id, value and extensions. The accessor "getPages" gives direct access to the value
*/
public PositiveIntType getPagesElement() {
if (this.pages == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Attachment.pages");
else if (Configuration.doAutoCreate())
this.pages = new PositiveIntType(); // bb
return this.pages;
}
public boolean hasPagesElement() {
return this.pages != null && !this.pages.isEmpty();
}
public boolean hasPages() {
return this.pages != null && !this.pages.isEmpty();
}
/**
* @param value {@link #pages} (The number of pages when printed.). This is the underlying object with id, value and extensions. The accessor "getPages" gives direct access to the value
*/
public Attachment setPagesElement(PositiveIntType value) {
this.pages = value;
return this;
}
/**
* @return The number of pages when printed.
*/
public int getPages() {
return this.pages == null || this.pages.isEmpty() ? 0 : this.pages.getValue();
}
/**
* @param value The number of pages when printed.
*/
public Attachment setPages(int value) {
if (this.pages == null)
this.pages = new PositiveIntType();
this.pages.setValue(value);
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("contentType", "code", "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", 0, 1, contentType));
@ -531,6 +819,11 @@ public class Attachment extends Type implements ICompositeType {
children.add(new Property("hash", "base64Binary", "The calculated hash of the data using SHA-1. Represented using base64.", 0, 1, hash));
children.add(new Property("title", "string", "A label or set of text to display in place of the data.", 0, 1, title));
children.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, 1, creation));
children.add(new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, 1, height));
children.add(new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, 1, width));
children.add(new Property("frames", "positiveInt", "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.", 0, 1, frames));
children.add(new Property("duration", "decimal", "The duration of the recording in seconds - for audio and video.", 0, 1, duration));
children.add(new Property("pages", "positiveInt", "The number of pages when printed.", 0, 1, pages));
}
@Override
@ -544,6 +837,11 @@ public class Attachment extends Type implements ICompositeType {
case 3195150: /*hash*/ return new Property("hash", "base64Binary", "The calculated hash of the data using SHA-1. Represented using base64.", 0, 1, hash);
case 110371416: /*title*/ return new Property("title", "string", "A label or set of text to display in place of the data.", 0, 1, title);
case 1820421855: /*creation*/ return new Property("creation", "dateTime", "The date that the attachment was first created.", 0, 1, creation);
case -1221029593: /*height*/ return new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, 1, height);
case 113126854: /*width*/ return new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, 1, width);
case -1266514778: /*frames*/ return new Property("frames", "positiveInt", "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.", 0, 1, frames);
case -1992012396: /*duration*/ return new Property("duration", "decimal", "The duration of the recording in seconds - for audio and video.", 0, 1, duration);
case 106426308: /*pages*/ return new Property("pages", "positiveInt", "The number of pages when printed.", 0, 1, pages);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
@ -560,6 +858,11 @@ public class Attachment extends Type implements ICompositeType {
case 3195150: /*hash*/ return this.hash == null ? new Base[0] : new Base[] {this.hash}; // Base64BinaryType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case 1820421855: /*creation*/ return this.creation == null ? new Base[0] : new Base[] {this.creation}; // DateTimeType
case -1221029593: /*height*/ return this.height == null ? new Base[0] : new Base[] {this.height}; // PositiveIntType
case 113126854: /*width*/ return this.width == null ? new Base[0] : new Base[] {this.width}; // PositiveIntType
case -1266514778: /*frames*/ return this.frames == null ? new Base[0] : new Base[] {this.frames}; // PositiveIntType
case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // DecimalType
case 106426308: /*pages*/ return this.pages == null ? new Base[0] : new Base[] {this.pages}; // PositiveIntType
default: return super.getProperty(hash, name, checkValid);
}
@ -592,6 +895,21 @@ public class Attachment extends Type implements ICompositeType {
case 1820421855: // creation
this.creation = castToDateTime(value); // DateTimeType
return value;
case -1221029593: // height
this.height = castToPositiveInt(value); // PositiveIntType
return value;
case 113126854: // width
this.width = castToPositiveInt(value); // PositiveIntType
return value;
case -1266514778: // frames
this.frames = castToPositiveInt(value); // PositiveIntType
return value;
case -1992012396: // duration
this.duration = castToDecimal(value); // DecimalType
return value;
case 106426308: // pages
this.pages = castToPositiveInt(value); // PositiveIntType
return value;
default: return super.setProperty(hash, name, value);
}
@ -615,6 +933,16 @@ public class Attachment extends Type implements ICompositeType {
this.title = castToString(value); // StringType
} else if (name.equals("creation")) {
this.creation = castToDateTime(value); // DateTimeType
} else if (name.equals("height")) {
this.height = castToPositiveInt(value); // PositiveIntType
} else if (name.equals("width")) {
this.width = castToPositiveInt(value); // PositiveIntType
} else if (name.equals("frames")) {
this.frames = castToPositiveInt(value); // PositiveIntType
} else if (name.equals("duration")) {
this.duration = castToDecimal(value); // DecimalType
} else if (name.equals("pages")) {
this.pages = castToPositiveInt(value); // PositiveIntType
} else
return super.setProperty(name, value);
return value;
@ -631,6 +959,11 @@ public class Attachment extends Type implements ICompositeType {
case 3195150: return getHashElement();
case 110371416: return getTitleElement();
case 1820421855: return getCreationElement();
case -1221029593: return getHeightElement();
case 113126854: return getWidthElement();
case -1266514778: return getFramesElement();
case -1992012396: return getDurationElement();
case 106426308: return getPagesElement();
default: return super.makeProperty(hash, name);
}
@ -647,6 +980,11 @@ public class Attachment extends Type implements ICompositeType {
case 3195150: /*hash*/ return new String[] {"base64Binary"};
case 110371416: /*title*/ return new String[] {"string"};
case 1820421855: /*creation*/ return new String[] {"dateTime"};
case -1221029593: /*height*/ return new String[] {"positiveInt"};
case 113126854: /*width*/ return new String[] {"positiveInt"};
case -1266514778: /*frames*/ return new String[] {"positiveInt"};
case -1992012396: /*duration*/ return new String[] {"decimal"};
case 106426308: /*pages*/ return new String[] {"positiveInt"};
default: return super.getTypesForProperty(hash, name);
}
@ -678,6 +1016,21 @@ public class Attachment extends Type implements ICompositeType {
else if (name.equals("creation")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.creation");
}
else if (name.equals("height")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.height");
}
else if (name.equals("width")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.width");
}
else if (name.equals("frames")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.frames");
}
else if (name.equals("duration")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.duration");
}
else if (name.equals("pages")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.pages");
}
else
return super.addChild(name);
}
@ -690,6 +1043,11 @@ public class Attachment extends Type implements ICompositeType {
public Attachment copy() {
Attachment dst = new Attachment();
copyValues(dst);
return dst;
}
public void copyValues(Attachment dst) {
super.copyValues(dst);
dst.contentType = contentType == null ? null : contentType.copy();
dst.language = language == null ? null : language.copy();
dst.data = data == null ? null : data.copy();
@ -698,7 +1056,11 @@ public class Attachment extends Type implements ICompositeType {
dst.hash = hash == null ? null : hash.copy();
dst.title = title == null ? null : title.copy();
dst.creation = creation == null ? null : creation.copy();
return dst;
dst.height = height == null ? null : height.copy();
dst.width = width == null ? null : width.copy();
dst.frames = frames == null ? null : frames.copy();
dst.duration = duration == null ? null : duration.copy();
dst.pages = pages == null ? null : pages.copy();
}
protected Attachment typedCopy() {
@ -715,7 +1077,8 @@ public class Attachment extends Type implements ICompositeType {
return compareDeep(contentType, o.contentType, true) && compareDeep(language, o.language, true)
&& compareDeep(data, o.data, true) && compareDeep(url, o.url, true) && compareDeep(size, o.size, true)
&& compareDeep(hash, o.hash, true) && compareDeep(title, o.title, true) && compareDeep(creation, o.creation, true)
;
&& compareDeep(height, o.height, true) && compareDeep(width, o.width, true) && compareDeep(frames, o.frames, true)
&& compareDeep(duration, o.duration, true) && compareDeep(pages, o.pages, true);
}
@Override
@ -728,12 +1091,14 @@ public class Attachment extends Type implements ICompositeType {
return compareValues(contentType, o.contentType, true) && compareValues(language, o.language, true)
&& compareValues(data, o.data, true) && compareValues(url, o.url, true) && compareValues(size, o.size, true)
&& compareValues(hash, o.hash, true) && compareValues(title, o.title, true) && compareValues(creation, o.creation, true)
;
&& compareValues(height, o.height, true) && compareValues(width, o.width, true) && compareValues(frames, o.frames, true)
&& compareValues(duration, o.duration, true) && compareValues(pages, o.pages, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, language, data
, url, size, hash, title, creation);
, url, size, hash, title, creation, height, width, frames, duration, pages
);
}

View File

@ -51,14 +51,18 @@ package org.hl7.fhir.r5.model;
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* Base definition for all elements that are defined inside a resource - but not those in a data type.
*/

View File

@ -685,6 +685,21 @@ private Map<String, Object> userData;
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a MarketingStatus");
}
public Statistic castToStatistic(Base b) throws FHIRException {
if (b instanceof Statistic)
return (Statistic) b;
else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Statistic");
}
public OrderedDistribution castToOrderedDistribution(Base b) throws FHIRException {
if (b instanceof OrderedDistribution)
return (OrderedDistribution) b;
else
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a OrderedDistribution");
}
public ProductShelfLife castToProductShelfLife(Base b) throws FHIRException {
if (b instanceof ProductShelfLife)
return (ProductShelfLife) b;

View File

@ -26,6 +26,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.hl7.fhir.utilities.DateTimeUtil;
import java.util.Calendar;
import java.util.Date;
@ -781,20 +782,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* </p>
*/
public String toHumanDisplay() {
TimeZone tz = getTimeZone();
Calendar value = tz != null ? Calendar.getInstance(tz) : Calendar.getInstance();
value.setTime(getValue());
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(value);
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(value);
}
return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());
}
/**
@ -804,16 +792,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
* @see #toHumanDisplay() for a method which does not convert the time to the local timezone before rendering it.
*/
public String toHumanDisplayLocalTimezone() {
switch (getPrecision()) {
case YEAR:
case MONTH:
case DAY:
return ourHumanDateFormat.format(getValue());
case MILLI:
case SECOND:
default:
return ourHumanDateTimeFormat.format(getValue());
}
return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());
}
private void validateBeforeOrAfter(DateTimeType theDateTimeType) {

File diff suppressed because it is too large Load Diff

View File

@ -1,412 +1,404 @@
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBinary;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
/**
* A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
*/
@ResourceDef(name="Binary", profile="http://hl7.org/fhir/StructureDefinition/Binary")
public class Binary extends BaseBinary implements IBaseBinary {
/**
* MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
@Child(name = "contentType", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
protected CodeType contentType;
/**
* This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.
*/
@Child(name = "securityContext", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Identifies another resource to use as proxy when enforcing access control", formalDefinition="This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient." )
protected Reference securityContext;
/**
* The actual object that is the target of the reference (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
protected Resource securityContextTarget;
/**
* The actual content, base64 encoded.
*/
@Child(name = "data", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." )
protected Base64BinaryType data;
private static final long serialVersionUID = 1353224198L;
/**
* Constructor
*/
public Binary() {
super();
}
/**
* Constructor
*/
public Binary(CodeType contentType) {
super();
this.contentType = contentType;
}
/**
* @return {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
*/
public CodeType getContentTypeElement() {
if (this.contentType == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.contentType");
else if (Configuration.doAutoCreate())
this.contentType = new CodeType(); // bb
return this.contentType;
}
public boolean hasContentTypeElement() {
return this.contentType != null && !this.contentType.isEmpty();
}
public boolean hasContentType() {
return this.contentType != null && !this.contentType.isEmpty();
}
/**
* @param value {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
*/
public Binary setContentTypeElement(CodeType value) {
this.contentType = value;
return this;
}
/**
* @return MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
public String getContentType() {
return this.contentType == null ? null : this.contentType.getValue();
}
/**
* @param value MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
public Binary setContentType(String value) {
if (this.contentType == null)
this.contentType = new CodeType();
this.contentType.setValue(value);
return this;
}
/**
* @return {@link #securityContext} (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Reference getSecurityContext() {
if (this.securityContext == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.securityContext");
else if (Configuration.doAutoCreate())
this.securityContext = new Reference(); // cc
return this.securityContext;
}
public boolean hasSecurityContext() {
return this.securityContext != null && !this.securityContext.isEmpty();
}
/**
* @param value {@link #securityContext} (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Binary setSecurityContext(Reference value) {
this.securityContext = value;
return this;
}
/**
* @return {@link #securityContext} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Resource getSecurityContextTarget() {
return this.securityContextTarget;
}
/**
* @param value {@link #securityContext} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Binary setSecurityContextTarget(Resource value) {
this.securityContextTarget = value;
return this;
}
/**
* @return {@link #data} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
*/
public Base64BinaryType getDataElement() {
if (this.data == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.data");
else if (Configuration.doAutoCreate())
this.data = new Base64BinaryType(); // bb
return this.data;
}
public boolean hasDataElement() {
return this.data != null && !this.data.isEmpty();
}
public boolean hasData() {
return this.data != null && !this.data.isEmpty();
}
/**
* @param value {@link #data} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
*/
public Binary setDataElement(Base64BinaryType value) {
this.data = value;
return this;
}
/**
* @return The actual content, base64 encoded.
*/
public byte[] getData() {
return this.data == null ? null : this.data.getValue();
}
/**
* @param value The actual content, base64 encoded.
*/
public Binary setData(byte[] value) {
if (value == null)
this.data = null;
else {
if (this.data == null)
this.data = new Base64BinaryType();
this.data.setValue(value);
}
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("contentType", "code", "MimeType of the binary content represented as a standard MimeType (BCP 13).", 0, 1, contentType));
children.add(new Property("securityContext", "Reference(Any)", "This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.", 0, 1, securityContext));
children.add(new Property("data", "base64Binary", "The actual content, base64 encoded.", 0, 1, data));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -389131437: /*contentType*/ return new Property("contentType", "code", "MimeType of the binary content represented as a standard MimeType (BCP 13).", 0, 1, contentType);
case -1622888881: /*securityContext*/ return new Property("securityContext", "Reference(Any)", "This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.", 0, 1, securityContext);
case 3076010: /*data*/ return new Property("data", "base64Binary", "The actual content, base64 encoded.", 0, 1, data);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case -1622888881: /*securityContext*/ return this.securityContext == null ? new Base[0] : new Base[] {this.securityContext}; // Reference
case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // Base64BinaryType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
return value;
case -1622888881: // securityContext
this.securityContext = castToReference(value); // Reference
return value;
case 3076010: // data
this.data = castToBase64Binary(value); // Base64BinaryType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("contentType")) {
this.contentType = castToCode(value); // CodeType
} else if (name.equals("securityContext")) {
this.securityContext = castToReference(value); // Reference
} else if (name.equals("data")) {
this.data = castToBase64Binary(value); // Base64BinaryType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: return getContentTypeElement();
case -1622888881: return getSecurityContext();
case 3076010: return getDataElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return new String[] {"code"};
case -1622888881: /*securityContext*/ return new String[] {"Reference"};
case 3076010: /*data*/ return new String[] {"base64Binary"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) {
throw new FHIRException("Cannot call addChild on a primitive type Binary.contentType");
}
else if (name.equals("securityContext")) {
this.securityContext = new Reference();
return this.securityContext;
}
else if (name.equals("data")) {
throw new FHIRException("Cannot call addChild on a primitive type Binary.data");
}
else
return super.addChild(name);
}
public String fhirType() {
return "Binary";
}
public Binary copy() {
Binary dst = new Binary();
copyValues(dst);
dst.contentType = contentType == null ? null : contentType.copy();
dst.securityContext = securityContext == null ? null : securityContext.copy();
dst.data = data == null ? null : data.copy();
return dst;
}
protected Binary typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Binary))
return false;
Binary o = (Binary) other_;
return compareDeep(contentType, o.contentType, true) && compareDeep(securityContext, o.securityContext, true)
&& compareDeep(data, o.data, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Binary))
return false;
Binary o = (Binary) other_;
return compareValues(contentType, o.contentType, true) && compareValues(data, o.data, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, securityContext
, data);
}
@Override
public ResourceType getResourceType() {
return ResourceType.Binary;
}
// added from java-adornments.txt:
@Override
public byte[] getContent() {
return getData();
}
@Override
public IBaseBinary setContent(byte[] arg0) {
return setData(arg0);
}
@Override
Base64BinaryType getContentElement() {
return getDataElement();
}
// end addition
}
package org.hl7.fhir.r5.model;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IBaseBinary;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.r5.model.Enumerations.*;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
*/
@ResourceDef(name="Binary", profile="http://hl7.org/fhir/StructureDefinition/Binary")
public class Binary extends BaseBinary implements IBaseBinary {
/**
* MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
@Child(name = "contentType", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
protected CodeType contentType;
/**
* This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.
*/
@Child(name = "securityContext", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Identifies another resource to use as proxy when enforcing access control", formalDefinition="This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient." )
protected Reference securityContext;
/**
* The actual content, base64 encoded.
*/
@Child(name = "data", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." )
protected Base64BinaryType data;
private static final long serialVersionUID = 65831526L;
/**
* Constructor
*/
public Binary() {
super();
}
/**
* Constructor
*/
public Binary(CodeType contentType) {
super();
this.contentType = contentType;
}
/**
* @return {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
*/
public CodeType getContentTypeElement() {
if (this.contentType == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.contentType");
else if (Configuration.doAutoCreate())
this.contentType = new CodeType(); // bb
return this.contentType;
}
public boolean hasContentTypeElement() {
return this.contentType != null && !this.contentType.isEmpty();
}
public boolean hasContentType() {
return this.contentType != null && !this.contentType.isEmpty();
}
/**
* @param value {@link #contentType} (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
*/
public Binary setContentTypeElement(CodeType value) {
this.contentType = value;
return this;
}
/**
* @return MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
public String getContentType() {
return this.contentType == null ? null : this.contentType.getValue();
}
/**
* @param value MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
public Binary setContentType(String value) {
if (this.contentType == null)
this.contentType = new CodeType();
this.contentType.setValue(value);
return this;
}
/**
* @return {@link #securityContext} (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Reference getSecurityContext() {
if (this.securityContext == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.securityContext");
else if (Configuration.doAutoCreate())
this.securityContext = new Reference(); // cc
return this.securityContext;
}
public boolean hasSecurityContext() {
return this.securityContext != null && !this.securityContext.isEmpty();
}
/**
* @param value {@link #securityContext} (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
*/
public Binary setSecurityContext(Reference value) {
this.securityContext = value;
return this;
}
/**
* @return {@link #data} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
*/
public Base64BinaryType getDataElement() {
if (this.data == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Binary.data");
else if (Configuration.doAutoCreate())
this.data = new Base64BinaryType(); // bb
return this.data;
}
public boolean hasDataElement() {
return this.data != null && !this.data.isEmpty();
}
public boolean hasData() {
return this.data != null && !this.data.isEmpty();
}
/**
* @param value {@link #data} (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
*/
public Binary setDataElement(Base64BinaryType value) {
this.data = value;
return this;
}
/**
* @return The actual content, base64 encoded.
*/
public byte[] getData() {
return this.data == null ? null : this.data.getValue();
}
/**
* @param value The actual content, base64 encoded.
*/
public Binary setData(byte[] value) {
if (value == null)
this.data = null;
else {
if (this.data == null)
this.data = new Base64BinaryType();
this.data.setValue(value);
}
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("contentType", "code", "MimeType of the binary content represented as a standard MimeType (BCP 13).", 0, 1, contentType));
children.add(new Property("securityContext", "Reference(Any)", "This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.", 0, 1, securityContext));
children.add(new Property("data", "base64Binary", "The actual content, base64 encoded.", 0, 1, data));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -389131437: /*contentType*/ return new Property("contentType", "code", "MimeType of the binary content represented as a standard MimeType (BCP 13).", 0, 1, contentType);
case -1622888881: /*securityContext*/ return new Property("securityContext", "Reference(Any)", "This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.", 0, 1, securityContext);
case 3076010: /*data*/ return new Property("data", "base64Binary", "The actual content, base64 encoded.", 0, 1, data);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case -1622888881: /*securityContext*/ return this.securityContext == null ? new Base[0] : new Base[] {this.securityContext}; // Reference
case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // Base64BinaryType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
return value;
case -1622888881: // securityContext
this.securityContext = castToReference(value); // Reference
return value;
case 3076010: // data
this.data = castToBase64Binary(value); // Base64BinaryType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("contentType")) {
this.contentType = castToCode(value); // CodeType
} else if (name.equals("securityContext")) {
this.securityContext = castToReference(value); // Reference
} else if (name.equals("data")) {
this.data = castToBase64Binary(value); // Base64BinaryType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: return getContentTypeElement();
case -1622888881: return getSecurityContext();
case 3076010: return getDataElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return new String[] {"code"};
case -1622888881: /*securityContext*/ return new String[] {"Reference"};
case 3076010: /*data*/ return new String[] {"base64Binary"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) {
throw new FHIRException("Cannot call addChild on a primitive type Binary.contentType");
}
else if (name.equals("securityContext")) {
this.securityContext = new Reference();
return this.securityContext;
}
else if (name.equals("data")) {
throw new FHIRException("Cannot call addChild on a primitive type Binary.data");
}
else
return super.addChild(name);
}
public String fhirType() {
return "Binary";
}
public Binary copy() {
Binary dst = new Binary();
copyValues(dst);
return dst;
}
public void copyValues(Binary dst) {
super.copyValues(dst);
dst.contentType = contentType == null ? null : contentType.copy();
dst.securityContext = securityContext == null ? null : securityContext.copy();
dst.data = data == null ? null : data.copy();
}
protected Binary typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Binary))
return false;
Binary o = (Binary) other_;
return compareDeep(contentType, o.contentType, true) && compareDeep(securityContext, o.securityContext, true)
&& compareDeep(data, o.data, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Binary))
return false;
Binary o = (Binary) other_;
return compareValues(contentType, o.contentType, true) && compareValues(data, o.data, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(contentType, securityContext
, data);
}
@Override
public ResourceType getResourceType() {
return ResourceType.Binary;
}
// added from java-adornments.txt:
@Override
public byte[] getContent() {
return getData();
}
@Override
public IBaseBinary setContent(byte[] arg0) {
return setData(arg0);
}
@Override
Base64BinaryType getContentElement() {
return getDataElement();
}
// end addition
}

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

View File

@ -53,19 +53,19 @@ package org.hl7.fhir.r5.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatusEnumFactory;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.r5.model.Enumerations.*;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.
*/
@ -733,7 +733,7 @@ public class CodeSystem extends MetadataResource {
* A list of operators that can be used with the filter.
*/
@Child(name = "operator", type = {CodeType.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Operators that can be used with filter", formalDefinition="A list of operators that can be used with the filter." )
@Description(shortDefinition="= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists", formalDefinition="A list of operators that can be used with the filter." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/filter-operator")
protected List<Enumeration<FilterOperator>> operator;
@ -1076,6 +1076,11 @@ public class CodeSystem extends MetadataResource {
public CodeSystemFilterComponent copy() {
CodeSystemFilterComponent dst = new CodeSystemFilterComponent();
copyValues(dst);
return dst;
}
public void copyValues(CodeSystemFilterComponent dst) {
super.copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.description = description == null ? null : description.copy();
if (operator != null) {
@ -1084,7 +1089,6 @@ public class CodeSystem extends MetadataResource {
dst.operator.add(i.copy());
};
dst.value = value == null ? null : value.copy();
return dst;
}
@Override
@ -1472,11 +1476,15 @@ public class CodeSystem extends MetadataResource {
public PropertyComponent copy() {
PropertyComponent dst = new PropertyComponent();
copyValues(dst);
return dst;
}
public void copyValues(PropertyComponent dst) {
super.copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.uri = uri == null ? null : uri.copy();
dst.description = description == null ? null : description.copy();
dst.type = type == null ? null : type.copy();
return dst;
}
@Override
@ -2014,6 +2022,11 @@ public class CodeSystem extends MetadataResource {
public ConceptDefinitionComponent copy() {
ConceptDefinitionComponent dst = new ConceptDefinitionComponent();
copyValues(dst);
return dst;
}
public void copyValues(ConceptDefinitionComponent dst) {
super.copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.display = display == null ? null : display.copy();
dst.definition = definition == null ? null : definition.copy();
@ -2032,7 +2045,6 @@ public class CodeSystem extends MetadataResource {
for (ConceptDefinitionComponent i : concept)
dst.concept.add(i.copy());
};
return dst;
}
@Override
@ -2330,10 +2342,14 @@ public class CodeSystem extends MetadataResource {
public ConceptDefinitionDesignationComponent copy() {
ConceptDefinitionDesignationComponent dst = new ConceptDefinitionDesignationComponent();
copyValues(dst);
return dst;
}
public void copyValues(ConceptDefinitionDesignationComponent dst) {
super.copyValues(dst);
dst.language = language == null ? null : language.copy();
dst.use = use == null ? null : use.copy();
dst.value = value == null ? null : value.copy();
return dst;
}
@Override
@ -2693,9 +2709,13 @@ public class CodeSystem extends MetadataResource {
public ConceptPropertyComponent copy() {
ConceptPropertyComponent dst = new ConceptPropertyComponent();
copyValues(dst);
return dst;
}
public void copyValues(ConceptPropertyComponent dst) {
super.copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.value = value == null ? null : value.copy();
return dst;
}
@Override
@ -2765,10 +2785,10 @@ public class CodeSystem extends MetadataResource {
protected CanonicalType valueSet;
/**
* The meaning of the hierarchy of concepts as represnted in this resource.
* The meaning of the hierarchy of concepts as represented in this resource.
*/
@Child(name = "hierarchyMeaning", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="grouped-by | is-a | part-of | classified-with", formalDefinition="The meaning of the hierarchy of concepts as represnted in this resource." )
@Description(shortDefinition="grouped-by | is-a | part-of | classified-with", formalDefinition="The meaning of the hierarchy of concepts as represented in this resource." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning")
protected Enumeration<CodeSystemHierarchyMeaning> hierarchyMeaning;
@ -2823,10 +2843,10 @@ public class CodeSystem extends MetadataResource {
protected List<PropertyComponent> property;
/**
* Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.
* Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.
*/
@Child(name = "concept", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Concepts in the code system", formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are." )
@Description(shortDefinition="Concepts in the code system", formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are." )
protected List<ConceptDefinitionComponent> concept;
private static final long serialVersionUID = -1735124584L;
@ -3685,7 +3705,7 @@ public class CodeSystem extends MetadataResource {
}
/**
* @return {@link #hierarchyMeaning} (The meaning of the hierarchy of concepts as represnted in this resource.). This is the underlying object with id, value and extensions. The accessor "getHierarchyMeaning" gives direct access to the value
* @return {@link #hierarchyMeaning} (The meaning of the hierarchy of concepts as represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getHierarchyMeaning" gives direct access to the value
*/
public Enumeration<CodeSystemHierarchyMeaning> getHierarchyMeaningElement() {
if (this.hierarchyMeaning == null)
@ -3705,7 +3725,7 @@ public class CodeSystem extends MetadataResource {
}
/**
* @param value {@link #hierarchyMeaning} (The meaning of the hierarchy of concepts as represnted in this resource.). This is the underlying object with id, value and extensions. The accessor "getHierarchyMeaning" gives direct access to the value
* @param value {@link #hierarchyMeaning} (The meaning of the hierarchy of concepts as represented in this resource.). This is the underlying object with id, value and extensions. The accessor "getHierarchyMeaning" gives direct access to the value
*/
public CodeSystem setHierarchyMeaningElement(Enumeration<CodeSystemHierarchyMeaning> value) {
this.hierarchyMeaning = value;
@ -3713,14 +3733,14 @@ public class CodeSystem extends MetadataResource {
}
/**
* @return The meaning of the hierarchy of concepts as represnted in this resource.
* @return The meaning of the hierarchy of concepts as represented in this resource.
*/
public CodeSystemHierarchyMeaning getHierarchyMeaning() {
return this.hierarchyMeaning == null ? null : this.hierarchyMeaning.getValue();
}
/**
* @param value The meaning of the hierarchy of concepts as represnted in this resource.
* @param value The meaning of the hierarchy of concepts as represented in this resource.
*/
public CodeSystem setHierarchyMeaning(CodeSystemHierarchyMeaning value) {
if (value == null)
@ -4069,7 +4089,7 @@ public class CodeSystem extends MetadataResource {
}
/**
* @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.)
* @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.)
*/
public List<ConceptDefinitionComponent> getConcept() {
if (this.concept == null)
@ -4140,7 +4160,7 @@ public class CodeSystem extends MetadataResource {
children.add(new Property("copyright", "markdown", "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", 0, 1, copyright));
children.add(new Property("caseSensitive", "boolean", "If code comparison is case sensitive when codes within this system are compared to each other.", 0, 1, caseSensitive));
children.add(new Property("valueSet", "canonical(ValueSet)", "Canonical reference to the value set that contains the entire code system.", 0, 1, valueSet));
children.add(new Property("hierarchyMeaning", "code", "The meaning of the hierarchy of concepts as represnted in this resource.", 0, 1, hierarchyMeaning));
children.add(new Property("hierarchyMeaning", "code", "The meaning of the hierarchy of concepts as represented in this resource.", 0, 1, hierarchyMeaning));
children.add(new Property("compositional", "boolean", "The code system defines a compositional (post-coordination) grammar.", 0, 1, compositional));
children.add(new Property("versionNeeded", "boolean", "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.", 0, 1, versionNeeded));
children.add(new Property("content", "code", "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.", 0, 1, content));
@ -4148,7 +4168,7 @@ public class CodeSystem extends MetadataResource {
children.add(new Property("count", "unsignedInt", "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.", 0, 1, count));
children.add(new Property("filter", "", "A filter that can be used in a value set compose statement when selecting concepts using a filter.", 0, java.lang.Integer.MAX_VALUE, filter));
children.add(new Property("property", "", "A property defines an additional slot through which additional information can be provided about a concept.", 0, java.lang.Integer.MAX_VALUE, property));
children.add(new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept));
children.add(new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept));
}
@Override
@ -4171,7 +4191,7 @@ public class CodeSystem extends MetadataResource {
case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", 0, 1, copyright);
case -35616442: /*caseSensitive*/ return new Property("caseSensitive", "boolean", "If code comparison is case sensitive when codes within this system are compared to each other.", 0, 1, caseSensitive);
case -1410174671: /*valueSet*/ return new Property("valueSet", "canonical(ValueSet)", "Canonical reference to the value set that contains the entire code system.", 0, 1, valueSet);
case 1913078280: /*hierarchyMeaning*/ return new Property("hierarchyMeaning", "code", "The meaning of the hierarchy of concepts as represnted in this resource.", 0, 1, hierarchyMeaning);
case 1913078280: /*hierarchyMeaning*/ return new Property("hierarchyMeaning", "code", "The meaning of the hierarchy of concepts as represented in this resource.", 0, 1, hierarchyMeaning);
case 1248023381: /*compositional*/ return new Property("compositional", "boolean", "The code system defines a compositional (post-coordination) grammar.", 0, 1, compositional);
case 617270957: /*versionNeeded*/ return new Property("versionNeeded", "boolean", "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.", 0, 1, versionNeeded);
case 951530617: /*content*/ return new Property("content", "code", "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.", 0, 1, content);
@ -4179,7 +4199,7 @@ public class CodeSystem extends MetadataResource {
case 94851343: /*count*/ return new Property("count", "unsignedInt", "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.", 0, 1, count);
case -1274492040: /*filter*/ return new Property("filter", "", "A filter that can be used in a value set compose statement when selecting concepts using a filter.", 0, java.lang.Integer.MAX_VALUE, filter);
case -993141291: /*property*/ return new Property("property", "", "A property defines an additional slot through which additional information can be provided about a concept.", 0, java.lang.Integer.MAX_VALUE, property);
case 951024232: /*concept*/ return new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept);
case 951024232: /*concept*/ return new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
@ -4530,6 +4550,11 @@ public class CodeSystem extends MetadataResource {
public CodeSystem copy() {
CodeSystem dst = new CodeSystem();
copyValues(dst);
return dst;
}
public void copyValues(CodeSystem dst) {
super.copyValues(dst);
dst.url = url == null ? null : url.copy();
if (identifier != null) {
dst.identifier = new ArrayList<Identifier>();
@ -4584,7 +4609,6 @@ public class CodeSystem extends MetadataResource {
for (ConceptDefinitionComponent i : concept)
dst.concept.add(i.copy());
};
return dst;
}
protected CodeSystem typedCopy() {

View File

@ -51,15 +51,19 @@ package org.hl7.fhir.r5.model;
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
*/
@ -282,13 +286,17 @@ public class CodeableConcept extends Type implements ICompositeType {
public CodeableConcept copy() {
CodeableConcept dst = new CodeableConcept();
copyValues(dst);
return dst;
}
public void copyValues(CodeableConcept dst) {
super.copyValues(dst);
if (coding != null) {
dst.coding = new ArrayList<Coding>();
for (Coding i : coding)
dst.coding.add(i.copy());
};
dst.text = text == null ? null : text.copy();
return dst;
}
protected CodeableConcept typedCopy() {

View File

@ -50,16 +50,20 @@ package org.hl7.fhir.r5.model;
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* A reference to a code defined by a terminology system.
*/
@ -493,12 +497,16 @@ public class Coding extends Type implements IBaseCoding, ICompositeType, ICoding
public Coding copy() {
Coding dst = new Coding();
copyValues(dst);
return dst;
}
public void copyValues(Coding dst) {
super.copyValues(dst);
dst.system = system == null ? null : system.copy();
dst.version = version == null ? null : version.copy();
dst.code = code == null ? null : code.copy();
dst.display = display == null ? null : display.copy();
dst.userSelected = userSelected == null ? null : userSelected.copy();
return dst;
}
protected Coding typedCopy() {

Some files were not shown because too many files have changed in this diff Show More