Regenerate R5

This commit is contained in:
Grahame Grieve 2022-09-05 23:22:19 +10:00
parent f346a94c59
commit 619b60fdcf
318 changed files with 85640 additions and 42720 deletions

View File

@ -130,12 +130,12 @@ public class SearchParameterAnalysis implements IPackageVisitorProcessor {
for (org.hl7.fhir.r5.model.Bundle.BundleEntryComponent bnd : ((org.hl7.fhir.r5.model.Bundle) res).getEntry()) {
if (bnd.getResource() != null && bnd.getResource() instanceof org.hl7.fhir.r5.model.SearchParameter) {
org.hl7.fhir.r5.model.SearchParameter sp = (org.hl7.fhir.r5.model.SearchParameter) bnd.getResource();
analysis.seeUsage(core, sp.getTypeElement().primitiveValue(), sp.getXpathUsageElement().primitiveValue(), sp.getUrl());
analysis.seeUsage(core, sp.getTypeElement().primitiveValue(), sp.getProcessingModeElement().primitiveValue(), sp.getUrl());
}
}
} else {
org.hl7.fhir.r5.model.SearchParameter sp = (org.hl7.fhir.r5.model.SearchParameter) res;
analysis.seeUsage(core, sp.getTypeElement().primitiveValue(), sp.getXpathUsageElement().primitiveValue(), sp.getUrl());
analysis.seeUsage(core, sp.getTypeElement().primitiveValue(), sp.getProcessingModeElement().primitiveValue(), sp.getUrl());
}
}

View File

@ -372,7 +372,7 @@ public class ElementDefinition10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasKeyElement()) tgt.setKeyElement(Id10_50.convertId(src.getKeyElement()));
if (src.hasRequirementsElement())
tgt.setRequirementsElement(String10_50.convertString(src.getRequirementsElement()));
tgt.setRequirementsElement(String10_50.convertStringToMarkdown(src.getRequirementsElement()));
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
if (src.hasHumanElement()) tgt.setHumanElement(String10_50.convertString(src.getHumanElement()));
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
@ -444,7 +444,7 @@ public class ElementDefinition10_50 {
ElementDefinition.ElementDefinitionBindingComponent tgt = new ElementDefinition.ElementDefinitionBindingComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasStrength()) tgt.setStrengthElement(Enumerations10_50.convertBindingStrength(src.getStrengthElement()));
if (src.hasDescriptionElement()) tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
if (src.hasDescriptionElement()) tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasValueSet()) {
org.hl7.fhir.r5.model.DataType vs = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getValueSet());
if (vs != null) {

View File

@ -12,7 +12,7 @@ public class SampledData10_50 {
org.hl7.fhir.r5.model.SampledData tgt = new org.hl7.fhir.r5.model.SampledData();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity10_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriodElement()) tgt.setPeriodElement(Decimal10_50.convertDecimal(src.getPeriodElement()));
if (src.hasPeriodElement()) tgt.setIntervalElement(Decimal10_50.convertDecimal(src.getPeriodElement()));
if (src.hasFactorElement()) tgt.setFactorElement(Decimal10_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimitElement()) tgt.setLowerLimitElement(Decimal10_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimitElement()) tgt.setUpperLimitElement(Decimal10_50.convertDecimal(src.getUpperLimitElement()));
@ -27,7 +27,7 @@ public class SampledData10_50 {
org.hl7.fhir.dstu2.model.SampledData tgt = new org.hl7.fhir.dstu2.model.SampledData();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity10_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriodElement()) tgt.setPeriodElement(Decimal10_50.convertDecimal(src.getPeriodElement()));
if (src.hasIntervalElement()) tgt.setPeriodElement(Decimal10_50.convertDecimal(src.getIntervalElement()));
if (src.hasFactorElement()) tgt.setFactorElement(Decimal10_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimitElement()) tgt.setLowerLimitElement(Decimal10_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimitElement()) tgt.setUpperLimitElement(Decimal10_50.convertDecimal(src.getUpperLimitElement()));

View File

@ -5,6 +5,7 @@ import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Signature10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
import org.hl7.fhir.utilities.FhirPublication;
public class Bundle10_50 {
@ -195,7 +196,7 @@ public class Bundle10_50 {
org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasRelationElement())
tgt.setRelationElement(String10_50.convertString(src.getRelationElement()));
tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation()));
if (src.hasUrlElement())
tgt.setUrlElement(Uri10_50.convertUri(src.getUrlElement()));
return tgt;
@ -207,7 +208,7 @@ public class Bundle10_50 {
org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasRelationElement())
tgt.setRelationElement(String10_50.convertString(src.getRelationElement()));
tgt.setRelation((src.getRelation().toCode()));
if (src.hasUrlElement())
tgt.setUrlElement(Uri10_50.convertUri(src.getUrlElement()));
return tgt;

View File

@ -9,6 +9,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identi
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Period10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.DateTime10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
@ -21,7 +22,7 @@ public class Composition10_50 {
org.hl7.fhir.r5.model.Composition tgt = new org.hl7.fhir.r5.model.Composition();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier()));
tgt.addIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier()));
if (src.hasDate())
tgt.setDateElement(DateTime10_50.convertDateTime(src.getDateElement()));
if (src.hasType())
@ -34,12 +35,12 @@ public class Composition10_50 {
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
try {
if (src.hasConfidentiality())
tgt.setConfidentiality(src.getConfidentiality());
tgt.getMeta().addSecurity().setCodeElement(Code43_50.convertCode(src.getConfidentialityElement()));
} catch (org.hl7.fhir.exceptions.FHIRException e) {
throw new FHIRException(e);
}
if (src.hasSubject())
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
tgt.addSubject(Reference10_50.convertReference(src.getSubject()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));
@ -60,7 +61,7 @@ public class Composition10_50 {
org.hl7.fhir.dstu2.model.Composition tgt = new org.hl7.fhir.dstu2.model.Composition();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier()));
tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifierFirstRep()));
if (src.hasDate())
tgt.setDateElement(DateTime10_50.convertDateTime(src.getDateElement()));
if (src.hasType())
@ -71,9 +72,9 @@ public class Composition10_50 {
tgt.setTitleElement(String10_50.convertString(src.getTitleElement()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
tgt.setConfidentiality(src.getConfidentiality());
tgt.setConfidentiality(src.getMeta().getSecurityFirstRep().getCode());
if (src.hasSubject())
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
tgt.setSubject(Reference10_50.convertReference(src.getSubjectFirstRep()));
for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference10_50.convertReference(t));
for (org.hl7.fhir.r5.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));

View File

@ -713,26 +713,26 @@ public class Conformance10_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
switch (src.getValue()) {
case CLIENT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.CLIENT);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
break;
case SERVER:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.SERVER);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceModeEnumFactory());

View File

@ -16,8 +16,8 @@ public class DetectedIssue10_50 {
return null;
org.hl7.fhir.dstu2.model.DetectedIssue tgt = new org.hl7.fhir.dstu2.model.DetectedIssue();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
if (src.hasPatient())
tgt.setPatient(Reference10_50.convertReference(src.getPatient()));
if (src.hasSubject())
tgt.setPatient(Reference10_50.convertReference(src.getSubject()));
if (src.hasCode())
tgt.setCategory(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
if (src.hasSeverity())
@ -44,7 +44,7 @@ public class DetectedIssue10_50 {
org.hl7.fhir.r5.model.DetectedIssue tgt = new org.hl7.fhir.r5.model.DetectedIssue();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
if (src.hasPatient())
tgt.setPatient(Reference10_50.convertReference(src.getPatient()));
tgt.setSubject(Reference10_50.convertReference(src.getPatient()));
if (src.hasCategory())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCategory()));
if (src.hasSeverity())

View File

@ -34,8 +34,6 @@ public class DiagnosticReport10_50 {
tgt.setIssuedElement(Instant10_50.convertInstant(src.getIssuedElement()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.Reference t : src.getResult()) tgt.addResult(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())
tgt.addMedia(convertDiagnosticReportImageComponent(t));
if (src.hasConclusionElement())
@ -70,8 +68,6 @@ public class DiagnosticReport10_50 {
tgt.setIssuedElement(Instant10_50.convertInstant(src.getIssuedElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference10_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResult()) tgt.addResult(Reference10_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference10_50.convertReference(t));
for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addImage(convertDiagnosticReportImageComponent(t));
if (src.hasConclusionElement())

View File

@ -155,8 +155,8 @@ public class DocumentReference10_50 {
tgt.setFacilityType(CodeableConcept10_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept10_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference10_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference10_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
@ -172,8 +172,8 @@ public class DocumentReference10_50 {
tgt.setFacilityType(CodeableConcept10_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept10_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference10_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference10_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}

View File

@ -21,7 +21,7 @@ public class Encounter10_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEncounterState(src.getStatusElement()));
if (src.hasClass_())
tgt.setClass_( convertEncounterClass(src.getClass_().getCodingFirstRep()));
tgt.setClass_( convertEncounterClass(src.getClass_FirstRep().getCodingFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasPriority())
@ -43,8 +43,8 @@ public class Encounter10_50 {
for (CodeableReference t : src.getReason())
if (t.hasConcept())
tgt.addReason(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
if (src.hasAdmission())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -64,7 +64,7 @@ public class Encounter10_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEncounterState(src.getStatusElement()));
if (src.hasClass_())
tgt.setClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(convertEncounterClass(src.getClass_())));
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(convertEncounterClass(src.getClass_())));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasPriority())
@ -86,7 +86,7 @@ public class Encounter10_50 {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason())
tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
for (org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -143,10 +143,10 @@ public class Encounter10_50 {
}
}
public static org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent();
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasPreAdmissionIdentifier())
tgt.setPreAdmissionIdentifier(Identifier10_50.convertIdentifier(src.getPreAdmissionIdentifier()));
@ -169,7 +169,7 @@ public class Encounter10_50 {
return tgt;
}
public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent();

View File

@ -9,6 +9,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Bool
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.UnsignedInt10_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Group.GroupMembershipBasis;
public class Group10_50 {
@ -21,8 +22,8 @@ public class Group10_50 {
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActualElement())
tgt.setActualElement(Boolean10_50.convertBoolean(src.getActualElement()));
if (src.hasMembership())
tgt.setActual(src.getMembership() == GroupMembershipBasis.ENUMERATED);
if (src.hasCode())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
if (src.hasNameElement())
@ -46,7 +47,7 @@ public class Group10_50 {
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActualElement())
tgt.setActualElement(Boolean10_50.convertBoolean(src.getActualElement()));
tgt.setMembership(src.getActual() ? GroupMembershipBasis.ENUMERATED : GroupMembershipBasis.DEFINITIONAL);
if (src.hasCode())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
if (src.hasNameElement())
@ -138,12 +139,6 @@ public class Group10_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.NULL);
break;
@ -169,12 +164,6 @@ public class Group10_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.dstu2.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.dstu2.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.dstu2.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.dstu2.model.Group.GroupType.NULL);
break;

View File

@ -7,6 +7,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Bool
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Time10_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import java.util.stream.Collectors;
@ -101,7 +102,8 @@ public class HealthcareService10_50 {
tgt.setExtraDetails(src.getExtraDetails());
if (src.hasPhoto())
tgt.setPhoto(Attachment10_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference10_50.convertReference(t));
@ -119,12 +121,12 @@ public class HealthcareService10_50 {
tgt.addReferralMethod(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasAppointmentRequiredElement())
tgt.setAppointmentRequiredElement(Boolean10_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptionsElement())
tgt.setAvailabilityExceptionsElement(String10_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptionsElement())
// tgt.setAvailabilityExceptionsElement(String10_50.convertString(src.getAvailabilityExceptionsElement()));
return tgt;
}
@ -150,7 +152,7 @@ public class HealthcareService10_50 {
if (src.hasPhoto())
tgt.setPhoto(Attachment10_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint10_50.convertContactPoint(t));
for (org.hl7.fhir.dstu2.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getServiceProvisionCode())
@ -166,70 +168,70 @@ public class HealthcareService10_50 {
tgt.addReferralMethod(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasAppointmentRequiredElement())
tgt.setAppointmentRequiredElement(Boolean10_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptionsElement())
tgt.setAvailabilityExceptionsElement(String10_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptionsElement())
// tgt.setAvailabilityExceptionsElement(String10_50.convertString(src.getAvailabilityExceptionsElement()));
return tgt;
}
public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService10_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDayElement())
tgt.setAllDayElement(Boolean10_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTimeElement())
tgt.setAvailableStartTimeElement(Time10_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTimeElement())
tgt.setAvailableEndTimeElement(Time10_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService10_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDayElement())
tgt.setAllDayElement(Boolean10_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTimeElement())
tgt.setAvailableStartTimeElement(Time10_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTimeElement())
tgt.setAvailableEndTimeElement(Time10_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasDescriptionElement())
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period10_50.convertPeriod(src.getDuring()));
return tgt;
}
public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasDescriptionElement())
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period10_50.convertPeriod(src.getDuring()));
return tgt;
}
// public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService10_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDayElement())
// tgt.setAllDayElement(Boolean10_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTimeElement())
// tgt.setAvailableStartTimeElement(Time10_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTimeElement())
// tgt.setAvailableEndTimeElement(Time10_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService10_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDayElement())
// tgt.setAllDayElement(Boolean10_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTimeElement())
// tgt.setAvailableStartTimeElement(Time10_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTimeElement())
// tgt.setAvailableEndTimeElement(Time10_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
// if (src.hasDescriptionElement())
// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period10_50.convertPeriod(src.getDuring()));
// return tgt;
// }
//
// public static org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
// if (src.hasDescriptionElement())
// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period10_50.convertPeriod(src.getDuring()));
// return tgt;
// }
}

View File

@ -212,8 +212,8 @@ public class ImplementationGuide10_50 {
return null;
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasExampleCanonicalType())
tgt.setExampleFor(Reference10_50.convertCanonicalToReference(src.getExampleCanonicalType()));
if (src.hasProfile())
tgt.setExampleFor(Reference10_50.convertCanonicalToReference(src.getProfile().get(0)));
if (src.hasName())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
if (src.hasDescription())
@ -229,7 +229,7 @@ public class ImplementationGuide10_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasExampleFor())
tgt.setExample(Reference10_50.convertReferenceToCanonical(src.getExampleFor()));
tgt.getProfile().add(Reference10_50.convertReferenceToCanonical(src.getExampleFor()));
if (src.hasName())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
if (src.hasDescription())
@ -248,7 +248,7 @@ public class ImplementationGuide10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasSource()) {
if (src.hasSourceElement())
tgt.setName(convertUriToUrl(src.getSourceElement()));
tgt.setName(src.getSource());
}
if (src.hasNameElement())
tgt.setTitleElement(String10_50.convertString(src.getNameElement()));
@ -264,8 +264,8 @@ public class ImplementationGuide10_50 {
return null;
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
if (src.hasNameUrlType())
tgt.setSource(src.getNameUrlType().getValue());
if (src.hasName())
tgt.setSource(src.getName());
if (src.hasTitleElement())
tgt.setNameElement(String10_50.convertString(src.getTitleElement()));
if (src.hasGeneration())

View File

@ -9,6 +9,8 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identi
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Decimal10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ContactPoint;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
public class Location10_50 {
@ -29,12 +31,13 @@ public class Location10_50 {
tgt.setModeElement(convertLocationMode(src.getModeElement()));
if (src.hasType())
tgt.setType(CodeableConcept10_50.convertCodeableConcept(src.getTypeFirstRep()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address10_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept10_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept10_50.convertCodeableConcept(src.getForm()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
@ -62,11 +65,11 @@ public class Location10_50 {
if (src.hasType())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(src.getType()));
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint10_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address10_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept10_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept10_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())

View File

@ -10,7 +10,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.DataType;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes;
import org.hl7.fhir.r5.model.Enumerations.FHIRTypes;
import org.hl7.fhir.r5.model.Enumerations.SearchParamType;
import org.hl7.fhir.utilities.Utilities;
@ -180,14 +180,14 @@ public class OperationDefinition10_50 {
if (src.hasMaxElement())
tgt.setMaxElement(String10_50.convertString(src.getMaxElement()));
if (src.hasDocumentationElement())
tgt.setDocumentationElement(String10_50.convertString(src.getDocumentationElement()));
tgt.setDocumentationElement(String10_50.convertStringToMarkdown(src.getDocumentationElement()));
if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) {
tgt.setType(FHIRAllTypes.STRING);
tgt.setType(Enumerations.FHIRTypes.STRING);
if (src.hasType())
tgt.setSearchType(SearchParamType.fromCode(src.getType()));
} else {
if (src.hasType())
tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType()));
tgt.setType(Enumerations.FHIRTypes.fromCode(src.getType()));
}
tgt.addTargetProfile(src.getProfile().getReference());
if (src.hasBinding())

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.*;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Boolean10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
public class Organization10_50 {
@ -23,7 +24,7 @@ public class Organization10_50 {
if (src.hasNameElement())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint10_50.convertContactPoint(t));
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(Address10_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference10_50.convertReference(src.getPartOf()));
@ -45,8 +46,9 @@ public class Organization10_50 {
tgt.setType(CodeableConcept10_50.convertCodeableConcept(src.getTypeFirstRep()));
if (src.hasNameElement())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint10_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(Address10_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference10_50.convertReference(src.getPartOf()));

View File

@ -6,6 +6,9 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.*;
import org.hl7.fhir.dstu2.utils.ToolingExtensions;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class SearchParameter10_50 {
@ -32,16 +35,16 @@ public class SearchParameter10_50 {
tgt.setRequirements(src.getPurpose());
if (src.hasCodeElement())
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.setBase(t.asStringValue());
if (src.hasType())
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription())
tgt.setDescription(src.getDescription());
org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression());
if (src.hasXpathElement())
tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
// if (src.hasXpathElement())
// tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
if (src.hasProcessingMode())
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
return tgt;
}
@ -69,16 +72,16 @@ public class SearchParameter10_50 {
tgt.setPurpose(src.getRequirements());
if (src.hasCodeElement())
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
tgt.addBase(src.getBase());
tgt.addBase(Enumerations.AllResourceTypes.fromCode(src.getBase()));
if (src.hasType())
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription())
tgt.setDescription(src.getDescription());
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
if (src.hasXpathElement())
tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
// if (src.hasXpathElement())
// tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
return tgt;
}
@ -107,35 +110,35 @@ public class SearchParameter10_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> convertXPathUsageType(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.XPathUsageTypeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeTypeEnumFactory());
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
switch (src.getValue()) {
case NORMAL:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NORMAL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NORMAL);
break;
case PHONETIC:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NULL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageTypeEnumFactory());

View File

@ -286,7 +286,7 @@ public class TestScript10_50 {
if (src.hasPathElement())
tgt.setPathElement(String10_50.convertString(src.getPathElement()));
if (src.hasResource())
tgt.setResource(TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCodeElement())
@ -329,7 +329,7 @@ public class TestScript10_50 {
tgt.setOperatorElement(convertAssertionOperatorType(src.getOperatorElement()));
if (src.hasPathElement())
tgt.setPathElement(String10_50.convertString(src.getPathElement()));
tgt.setResource(src.getResource().toCode());
tgt.setResource(src.getResource());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCodeElement())

View File

@ -486,7 +486,7 @@ public class ElementDefinition14_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasKeyElement()) tgt.setKeyElement(Id14_50.convertId(src.getKeyElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String14_50.convertString(src.getRequirementsElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String14_50.convertStringToMarkdown(src.getRequirementsElement()));
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
if (src.hasHumanElement()) tgt.setHumanElement(String14_50.convertString(src.getHumanElement()));
if (src.hasExpression()) tgt.setExpression(convertToR4Expression(src.getExpression()));
@ -556,7 +556,7 @@ public class ElementDefinition14_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasStrength()) tgt.setStrengthElement(Enumerations14_50.convertBindingStrength(src.getStrengthElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String14_50.convertString(src.getDescriptionElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String14_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasValueSet()) {
org.hl7.fhir.r5.model.DataType t = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getValueSet());
if (t instanceof org.hl7.fhir.r5.model.Reference)

View File

@ -12,7 +12,7 @@ public class SampledData14_50 {
org.hl7.fhir.r5.model.SampledData tgt = new org.hl7.fhir.r5.model.SampledData();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity14_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriodElement()) tgt.setPeriodElement(Decimal14_50.convertDecimal(src.getPeriodElement()));
if (src.hasPeriodElement()) tgt.setIntervalElement(Decimal14_50.convertDecimal(src.getPeriodElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal14_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal14_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal14_50.convertDecimal(src.getUpperLimitElement()));
@ -27,7 +27,7 @@ public class SampledData14_50 {
org.hl7.fhir.dstu2016may.model.SampledData tgt = new org.hl7.fhir.dstu2016may.model.SampledData();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity14_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriodElement()) tgt.setPeriodElement(Decimal14_50.convertDecimal(src.getPeriodElement()));
if (src.hasIntervalElement()) tgt.setPeriodElement(Decimal14_50.convertDecimal(src.getIntervalElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal14_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal14_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal14_50.convertDecimal(src.getUpperLimitElement()));

View File

@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.context.ConversionContext14_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.complextypes14_50.Signature14_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
public class Bundle14_50 {
@ -183,7 +184,7 @@ public class Bundle14_50 {
org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasRelationElement())
tgt.setRelationElement(String14_50.convertString(src.getRelationElement()));
tgt.setRelation((src.getRelation().toCode()));
if (src.hasUrlElement())
tgt.setUrlElement(Uri14_50.convertUri(src.getUrlElement()));
return tgt;
@ -195,7 +196,7 @@ public class Bundle14_50 {
org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasRelationElement())
tgt.setRelationElement(String14_50.convertString(src.getRelationElement()));
tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation()));
if (src.hasUrlElement())
tgt.setUrlElement(Uri14_50.convertUri(src.getUrlElement()));
return tgt;

View File

@ -701,26 +701,26 @@ public class Conformance14_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
switch (src.getValue()) {
case CLIENT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.CLIENT);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
break;
case SERVER:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.SERVER);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceModeEnumFactory());

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.Reference14_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.complextypes14_50.CodeableConcept14_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.complextypes14_50.ContactPoint14_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.*;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.dstu2016may.model.ImplementationGuide;
import org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind;
import org.hl7.fhir.exceptions.FHIRException;
@ -223,12 +224,11 @@ public class ImplementationGuide14_50 {
return null;
org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasExampleCanonicalType()) {
if (src.hasExampleCanonicalType())
tgt.setExampleFor(Reference14_50.convertCanonicalToReference(src.getExampleCanonicalType()));
if (src.hasProfile()) {
tgt.setExampleFor(Reference14_50.convertCanonicalToReference(src.getProfile().get(0)));
tgt.setExample(true);
} else if (src.hasExampleBooleanType())
tgt.setExample(src.getExampleBooleanType().getValue());
} else if (src.hasIsExample())
tgt.setExample(src.getIsExample());
else
tgt.setExample(false);
if (src.hasName())
@ -246,10 +246,9 @@ public class ImplementationGuide14_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasExampleFor()) {
DataType t = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getExampleFor());
tgt.setExample(t instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t);
tgt.getProfile().add(Reference14_50.convertReferenceToCanonical(src.getExampleFor()));
} else if (src.hasExample())
tgt.setExample(new org.hl7.fhir.r5.model.BooleanType(src.getExample()));
tgt.setIsExampleElement(new org.hl7.fhir.r5.model.BooleanType(src.getExample()));
if (src.hasName())
tgt.setNameElement(String14_50.convertString(src.getNameElement()));
if (src.hasDescription())
@ -266,8 +265,8 @@ public class ImplementationGuide14_50 {
return null;
org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasNameUrlType())
tgt.setSource(src.getNameUrlType().getValue());
if (src.hasName())
tgt.setSource(src.getName());
if (src.hasTitleElement())
tgt.setNameElement(String14_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -283,7 +282,7 @@ public class ImplementationGuide14_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
if (src.hasSource())
tgt.setName(convertUriToUrl(src.getSourceElement()));
tgt.setNameElement(convertUriToUrl(src.getSourceElement()));
if (src.hasNameElement())
tgt.setTitleElement(String14_50.convertString(src.getNameElement()));
if (src.hasKind())

View File

@ -217,9 +217,9 @@ public class OperationDefinition14_50 {
if (src.hasMaxElement())
tgt.setMaxElement(String14_50.convertString(src.getMaxElement()));
if (src.hasDocumentation())
tgt.setDocumentationElement(String14_50.convertString(src.getDocumentationElement()));
tgt.setDocumentationElement(String14_50.convertStringToMarkdown(src.getDocumentationElement()));
if (src.hasType())
tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType()));
tgt.setType(Enumerations.FHIRTypes.fromCode(src.getType()));
if (src.hasSearchType())
tgt.setSearchTypeElement(Enumerations14_50.convertSearchParamType(src.getSearchTypeElement()));
tgt.addTargetProfile(src.getProfile().getReference());

View File

@ -7,6 +7,9 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.complextypes14_50.Contac
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class SearchParameter14_50 {
@ -38,17 +41,17 @@ public class SearchParameter14_50 {
tgt.setRequirements(src.getPurpose());
if (src.hasCodeElement())
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.setBase(t.asStringValue());
if (src.hasType())
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription())
tgt.setDescription(src.getDescription());
if (src.hasExpression())
tgt.setExpression(ElementDefinition14_50.convertTo2016MayExpression(src.getExpression()));
if (src.hasXpath())
tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
if (src.hasProcessingMode())
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
return tgt;
}
@ -81,17 +84,17 @@ public class SearchParameter14_50 {
tgt.setPurpose(src.getRequirements());
if (src.hasCodeElement())
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
tgt.addBase(src.getBase());
tgt.addBase(Enumerations.AllResourceTypes.fromCode(src.getBase()));
if (src.hasType())
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDescription())
tgt.setDescription(src.getDescription());
if (src.hasExpression())
tgt.setExpression(ElementDefinition14_50.convertToR4Expression(src.getExpression()));
if (src.hasXpath())
tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
return tgt;
}
@ -120,7 +123,7 @@ public class SearchParameter14_50 {
return tgt;
}
static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageTypeEnumFactory());
@ -143,29 +146,29 @@ public class SearchParameter14_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> convertXPathUsageType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.XPathUsageTypeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeTypeEnumFactory());
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
switch (src.getValue()) {
case NORMAL:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NORMAL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NORMAL);
break;
case PHONETIC:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NULL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NULL);
break;
}
return tgt;

View File

@ -16,11 +16,11 @@ public class DataRequirement30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt, VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME);
if (src.hasType()) {
if (src.hasExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME)) {
tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getExtensionString(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME)));
tgt.setType(Enumerations.FHIRTypes.fromCode(src.getExtensionString(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME)));
} else {
String n = VersionConvertorResourceNameMapper.mapName3to5(src.getType());
if (n != null) {
tgt.setType(Enumerations.FHIRAllTypes.fromCode(n));
tgt.setType(Enumerations.FHIRTypes.fromCode(n));
}
tgt.addExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME, new org.hl7.fhir.r5.model.CodeType(src.getType()));
}

View File

@ -548,7 +548,7 @@ public class ElementDefinition30_50 {
ElementDefinition.ElementDefinitionConstraintComponent tgt = new ElementDefinition.ElementDefinitionConstraintComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasKey()) tgt.setKeyElement(Id30_50.convertId(src.getKeyElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String30_50.convertString(src.getRequirementsElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String30_50.convertStringToMarkdown(src.getRequirementsElement()));
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
if (src.hasHuman()) tgt.setHumanElement(String30_50.convertString(src.getHumanElement()));
if (src.hasExpression()) tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement()));
@ -620,7 +620,7 @@ public class ElementDefinition30_50 {
ElementDefinition.ElementDefinitionBindingComponent tgt = new ElementDefinition.ElementDefinitionBindingComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt, VersionConvertor_30_50.EXT_SRC_TYPE);
if (src.hasStrength()) tgt.setStrengthElement(Enumerations30_50.convertBindingStrength(src.getStrengthElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasValueSet()) {
DataType t = ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValueSet());
if (t instanceof org.hl7.fhir.r5.model.Reference) {
@ -665,7 +665,7 @@ public class ElementDefinition30_50 {
if (src.hasIdentity()) tgt.setIdentityElement(Id30_50.convertId(src.getIdentityElement()));
if (src.hasLanguage()) tgt.setLanguageElement(Code30_50.convertCode(src.getLanguageElement()));
if (src.hasMap()) tgt.setMapElement(String30_50.convertString(src.getMapElement()));
if (src.hasComment()) tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
if (src.hasComment()) tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement()));
return tgt;
}

View File

@ -16,7 +16,7 @@ public class ParameterDefinition30_50 {
if (src.hasMin()) tgt.setMinElement(Integer30_50.convertInteger(src.getMinElement()));
if (src.hasMax()) tgt.setMaxElement(String30_50.convertString(src.getMaxElement()));
if (src.hasDocumentation()) tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(src.getType()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(src.getType()));
if (src.hasProfile()) {
tgt.setProfile(Reference30_50.convertReference(src.getProfile()).getReference());
}

View File

@ -12,7 +12,7 @@ public class SampledData30_50 {
org.hl7.fhir.r5.model.SampledData tgt = new org.hl7.fhir.r5.model.SampledData();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity30_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal30_50.convertDecimal(src.getPeriodElement()));
if (src.hasPeriod()) tgt.setIntervalElement(Decimal30_50.convertDecimal(src.getPeriodElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal30_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal30_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal30_50.convertDecimal(src.getUpperLimitElement()));
@ -26,7 +26,7 @@ public class SampledData30_50 {
org.hl7.fhir.dstu3.model.SampledData tgt = new org.hl7.fhir.dstu3.model.SampledData();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity30_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal30_50.convertDecimal(src.getPeriodElement()));
if (src.hasInterval()) tgt.setPeriodElement(Decimal30_50.convertDecimal(src.getIntervalElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal30_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal30_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal30_50.convertDecimal(src.getUpperLimitElement()));

View File

@ -2,6 +2,8 @@ package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class Code30_50 {
public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException {
@ -39,4 +41,14 @@ public class Code30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.dstu3.model.CodeType src) {
return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getValue());
}
public static org.hl7.fhir.dstu3.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
return new org.hl7.fhir.dstu3.model.CodeType(src.getCode());
}
}

View File

@ -5,6 +5,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identi
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Signature30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
public class Bundle30_50 {
@ -192,7 +193,7 @@ public class Bundle30_50 {
org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasRelation())
tgt.setRelationElement(String30_50.convertString(src.getRelationElement()));
tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation()));
if (src.hasUrl())
tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
return tgt;
@ -204,7 +205,7 @@ public class Bundle30_50 {
org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasRelation())
tgt.setRelationElement(String30_50.convertString(src.getRelationElement()));
tgt.setRelation((src.getRelation().toCode()));
if (src.hasUrl())
tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
return tgt;

View File

@ -878,7 +878,7 @@ public class CapabilityStatement30_50 {
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
@ -897,20 +897,20 @@ public class CapabilityStatement30_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case CLIENT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.CLIENT);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
break;
case SERVER:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.SERVER);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.NULL);
break;
}
return tgt;

View File

@ -10,6 +10,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identi
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.RelatedArtifact;
@ -23,7 +24,7 @@ public class Composition30_50 {
org.hl7.fhir.r5.model.Composition tgt = new org.hl7.fhir.r5.model.Composition();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier()));
tgt.addIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -31,7 +32,7 @@ public class Composition30_50 {
if (src.hasClass_())
tgt.addCategory(CodeableConcept30_50.convertCodeableConcept(src.getClass_()));
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
tgt.addSubject(Reference30_50.convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(Reference30_50.convertReference(src.getEncounter()));
if (src.hasDate())
@ -40,7 +41,7 @@ public class Composition30_50 {
if (src.hasTitle())
tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
if (src.hasConfidentiality())
tgt.setConfidentialityElement(convertDocumentConfidentiality(src.getConfidentialityElement()));
tgt.getMeta().addSecurity().setCodeElement(Code30_50.convertCode(src.getConfidentialityElement()));
for (org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));
if (src.hasCustodian())
@ -60,7 +61,7 @@ public class Composition30_50 {
org.hl7.fhir.dstu3.model.Composition tgt = new org.hl7.fhir.dstu3.model.Composition();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier()));
tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifierFirstRep()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -68,7 +69,7 @@ public class Composition30_50 {
if (src.hasCategory())
tgt.setClass_(CodeableConcept30_50.convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
tgt.setSubject(Reference30_50.convertReference(src.getSubjectFirstRep()));
if (src.hasEncounter())
tgt.setEncounter(Reference30_50.convertReference(src.getEncounter()));
if (src.hasDate())
@ -77,6 +78,8 @@ public class Composition30_50 {
if (src.hasTitle())
tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
if (src.hasConfidentiality())
tgt.setConfidentiality(src.getMeta().getSecurityFirstRep().getCode());
tgt.setConfidentialityElement(convertDocumentConfidentiality(src.getConfidentialityElement()));
for (org.hl7.fhir.r5.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));

View File

@ -24,8 +24,8 @@ public class DetectedIssue30_50 {
tgt.setCategory(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference30_50.convertReference(src.getPatient()));
if (src.hasSubject())
tgt.setPatient(Reference30_50.convertReference(src.getSubject()));
if (src.hasIdentifiedDateTimeType())
tgt.setDateElement(DateTime30_50.convertDateTime(src.getIdentifiedDateTimeType()));
if (src.hasAuthor())
@ -54,7 +54,7 @@ public class DetectedIssue30_50 {
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference30_50.convertReference(src.getPatient()));
tgt.setSubject(Reference30_50.convertReference(src.getPatient()));
if (src.hasDate())
tgt.setIdentified(DateTime30_50.convertDateTime(src.getDateElement()));
if (src.hasAuthor())
@ -142,73 +142,61 @@ public class DetectedIssue30_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> convertDetectedIssueStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ObservationStatusEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatusEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.REGISTERED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.PRELIMINARY);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.FINAL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.AMENDED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case CORRECTED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CORRECTED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CANCELLED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.ENTEREDINERROR);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.UNKNOWN);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.NULL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> src) throws FHIRException {
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatusEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.REGISTERED);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.AMENDED);
break;
case CORRECTED:
case MITIGATED:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CORRECTED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.CANCELLED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueStatus.NULL);
break;

View File

@ -35,8 +35,6 @@ public class DiagnosticReport30_50 {
tgt.setIssuedElement(Instant30_50.convertInstant(src.getIssuedElement()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getResult()) tgt.addResult(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())
tgt.addMedia(convertDiagnosticReportImageComponent(t));
if (src.hasConclusion())
@ -72,8 +70,6 @@ public class DiagnosticReport30_50 {
tgt.setIssuedElement(Instant30_50.convertInstant(src.getIssuedElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResult()) tgt.addResult(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addImage(convertDiagnosticReportImageComponent(t));
if (src.hasConclusion())

View File

@ -120,8 +120,8 @@ public class DocumentReference30_50 {
tgt.setFacilityType(CodeableConcept30_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept30_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference30_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference30_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
@ -137,8 +137,8 @@ public class DocumentReference30_50 {
tgt.setFacilityType(CodeableConcept30_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept30_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference30_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference30_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}

View File

@ -45,7 +45,7 @@ public class Encounter30_50 {
for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding30_50.convertCoding(src.getClass_())));
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding30_50.convertCoding(src.getClass_())));
for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())
@ -72,7 +72,7 @@ public class Encounter30_50 {
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -94,7 +94,7 @@ public class Encounter30_50 {
for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(Coding30_50.convertCoding(src.getClass_()));
tgt.setClass_(Coding30_50.convertCoding(src.getClass_FirstRep()));
for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
@ -121,8 +121,8 @@ public class Encounter30_50 {
for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
if (src.hasAdmission())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -132,7 +132,7 @@ public class Encounter30_50 {
return tgt;
}
public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent();
@ -158,10 +158,10 @@ public class Encounter30_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent();
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasPreAdmissionIdentifier())
tgt.setPreAdmissionIdentifier(Identifier30_50.convertIdentifier(src.getPreAdmissionIdentifier()));

View File

@ -269,7 +269,7 @@ public class GraphDefinition30_50 {
org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasType())
tgt.setTypeElement(Code30_50.convertCode(src.getTypeElement()));
tgt.setTypeElement(Code30_50.convertResourceEnum(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfile(src.getProfile());
for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment())
@ -285,7 +285,7 @@ public class GraphDefinition30_50 {
org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasType())
tgt.setTypeElement(Code30_50.convertCode(src.getTypeElement()));
tgt.setTypeElement(Code30_50.convertResourceEnum(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfile(src.getProfile());
for (org.hl7.fhir.dstu3.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment())

View File

@ -9,6 +9,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Bool
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.UnsignedInt30_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Group.GroupMembershipBasis;
public class Group30_50 {
@ -24,7 +25,7 @@ public class Group30_50 {
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean30_50.convertBoolean(src.getActualElement()));
tgt.setMembership(src.getActual() ? GroupMembershipBasis.ENUMERATED : GroupMembershipBasis.DEFINITIONAL);
if (src.hasCode())
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -49,8 +50,8 @@ public class Group30_50 {
tgt.setActiveElement(Boolean30_50.convertBoolean(src.getActiveElement()));
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean30_50.convertBoolean(src.getActualElement()));
if (src.hasMembership())
tgt.setActual(src.getMembership() == GroupMembershipBasis.ENUMERATED);
if (src.hasCode())
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -142,12 +143,6 @@ public class Group30_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.dstu3.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.dstu3.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.dstu3.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Group.GroupType.NULL);
break;
@ -173,12 +168,6 @@ public class Group30_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.NULL);
break;

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Stri
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Time30_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceEligibilityComponent;
import java.util.stream.Collectors;
@ -41,7 +42,7 @@ public class HealthcareService30_50 {
if (src.hasPhoto())
tgt.setPhoto(Attachment30_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint30_50.convertContactPoint(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceProvisionCode())
@ -59,12 +60,12 @@ public class HealthcareService30_50 {
tgt.addReferralMethod(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean30_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String30_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String30_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference30_50.convertReference(t));
return tgt;
}
@ -95,8 +96,9 @@ public class HealthcareService30_50 {
tgt.setExtraDetails(src.getExtraDetails());
if (src.hasPhoto())
tgt.setPhoto(Attachment30_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceProvisionCode())
@ -113,49 +115,49 @@ public class HealthcareService30_50 {
tgt.addReferralMethod(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean30_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String30_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String30_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference30_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService30_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean30_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time30_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time30_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService30_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean30_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time30_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time30_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService30_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean30_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time30_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time30_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService30_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean30_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time30_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time30_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek> convertDaysOfWeek(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DaysOfWeek> src) throws FHIRException {
if (src == null || src.isEmpty())
@ -224,28 +226,28 @@ public class HealthcareService30_50 {
}
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period30_50.convertPeriod(src.getDuring()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period30_50.convertPeriod(src.getDuring()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period30_50.convertPeriod(src.getDuring()));
// return tgt;
// }
//
// public static org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period30_50.convertPeriod(src.getDuring()));
// return tgt;
// }
}

View File

@ -196,12 +196,11 @@ public class ImplementationGuide30_50 {
return null;
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasExampleCanonicalType()) {
if (src.hasExampleCanonicalType())
tgt.setExampleFor(Reference30_50.convertCanonicalToReference(src.getExampleCanonicalType()));
if (src.hasProfile()) {
tgt.setExampleFor(Reference30_50.convertCanonicalToReference(src.getProfile().get(0)));
tgt.setExample(true);
} else if (src.hasExampleBooleanType())
tgt.setExample(src.getExampleBooleanType().getValue());
} else if (src.hasIsExample())
tgt.setExample(src.getIsExample());
else
tgt.setExample(false);
if (src.hasName())
@ -219,10 +218,9 @@ public class ImplementationGuide30_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasExampleFor()) {
org.hl7.fhir.r5.model.DataType t = ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getExampleFor());
tgt.setExample(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t);
tgt.getProfile().add(Reference30_50.convertReferenceToCanonical(src.getExampleFor()));
} else if (src.hasExample())
tgt.setExample(new org.hl7.fhir.r5.model.BooleanType(src.getExample()));
tgt.setIsExampleElement(new org.hl7.fhir.r5.model.BooleanType(src.getExample()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasDescription())
@ -239,8 +237,8 @@ public class ImplementationGuide30_50 {
return null;
org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasNameUrlType())
tgt.setSource(src.getNameUrlType().getValue());
if (src.hasName())
tgt.setSource(src.getName());
if (src.hasTitle())
tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -256,7 +254,7 @@ public class ImplementationGuide30_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
if (src.hasSource())
tgt.setName(convertUriToUrl(src.getSourceElement()));
tgt.setNameElement(convertUriToUrl(src.getSourceElement()));
if (src.hasTitle())
tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
if (src.hasKind())

View File

@ -6,6 +6,8 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.*;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Decimal30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ContactPoint;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
public class Location30_50 {
@ -30,11 +32,11 @@ public class Location30_50 {
if (src.hasType())
tgt.addType(CodeableConcept30_50.convertCodeableConcept(src.getType()));
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint30_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address30_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept30_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept30_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
@ -65,12 +67,13 @@ public class Location30_50 {
tgt.setModeElement(convertLocationMode(src.getModeElement()));
if (src.hasType())
tgt.setType(CodeableConcept30_50.convertCodeableConcept(src.getTypeFirstRep()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address30_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept30_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept30_50.convertCodeableConcept(src.getForm()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())

View File

@ -190,9 +190,9 @@ public class OperationDefinition30_50 {
if (src.hasMax())
tgt.setMaxElement(String30_50.convertString(src.getMaxElement()));
if (src.hasDocumentation())
tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
tgt.setDocumentationElement(String30_50.convertStringToMarkdown(src.getDocumentationElement()));
if (src.hasType())
tgt.setType(Enumerations.FHIRAllTypes.fromCode(src.getType()));
tgt.setType(Enumerations.FHIRTypes.fromCode(src.getType()));
if (src.hasSearchType())
tgt.setSearchTypeElement(Enumerations30_50.convertSearchParamType(src.getSearchTypeElement()));
if (src.hasProfile())

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.*;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
public class Organization30_50 {
@ -24,7 +25,7 @@ public class Organization30_50 {
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue());
for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint30_50.convertContactPoint(t));
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) tgt.addAddress(Address30_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference30_50.convertReference(src.getPartOf()));
@ -48,8 +49,9 @@ public class Organization30_50 {
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue());
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint30_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(Address30_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference30_50.convertReference(src.getPartOf()));

View File

@ -7,6 +7,9 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
import java.util.stream.Collectors;
@ -207,7 +210,7 @@ public class SearchParameter30_50 {
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.addBase(t.getValue());
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.addBase(Enumerations.AllResourceTypes.fromCode(t.getValue()));
if (src.hasType())
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDerivedFrom())
@ -216,10 +219,10 @@ public class SearchParameter30_50 {
tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
if (src.hasExpression())
tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
tgt.setComparator(src.getComparator().stream()
.map(SearchParameter30_50::convertSearchComparator)
@ -262,7 +265,7 @@ public class SearchParameter30_50 {
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r5.model.CodeType t : src.getBase()) tgt.addBase(t.getValue());
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.addBase(t.getValue().toCode());
if (src.hasType())
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
if (src.hasDerivedFrom())
@ -271,10 +274,10 @@ public class SearchParameter30_50 {
tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
if (src.hasExpression())
tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
if (src.hasProcessingMode())
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
for (org.hl7.fhir.r5.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
tgt.setComparator(src.getComparator().stream()
.map(SearchParameter30_50::convertSearchComparator)
@ -312,35 +315,35 @@ public class SearchParameter30_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> convertXPathUsageType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.XPathUsageTypeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case NORMAL:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NORMAL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NORMAL);
break;
case PHONETIC:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NULL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageTypeEnumFactory());

View File

@ -538,7 +538,7 @@ public class TestScript30_50 {
tgt.setRequestMethodElement(convertTestScriptRequestMethodCode(src.getRequestMethodElement()));
if (src.hasRequestURL()) tgt.setRequestURLElement(String30_50.convertString(src.getRequestURLElement()));
if (src.hasResource())
tgt.setResource(org.hl7.fhir.r5.model.TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasResponse()) tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode()) tgt.setResponseCodeElement(String30_50.convertString(src.getResponseCodeElement()));
if (src.hasSourceId()) tgt.setSourceIdElement(Id30_50.convertId(src.getSourceIdElement()));
@ -573,7 +573,7 @@ public class TestScript30_50 {
if (src.hasRequestMethod())
tgt.setRequestMethodElement(convertTestScriptRequestMethodCode(src.getRequestMethodElement()));
if (src.hasRequestURL()) tgt.setRequestURLElement(String30_50.convertString(src.getRequestURLElement()));
if (src.hasResource()) tgt.setResource(src.getResource().toCode());
if (src.hasResource()) tgt.setResource(src.getResource());
if (src.hasResponse()) tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode()) tgt.setResponseCodeElement(String30_50.convertString(src.getResponseCodeElement()));
if (src.hasSourceId()) tgt.setSourceIdElement(Id30_50.convertId(src.getSourceIdElement()));

View File

@ -12,7 +12,7 @@ public class SampledData40_50 {
org.hl7.fhir.r5.model.SampledData tgt = new org.hl7.fhir.r5.model.SampledData();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity40_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal40_50.convertDecimal(src.getPeriodElement()));
if (src.hasPeriod()) tgt.setIntervalElement(Decimal40_50.convertDecimal(src.getPeriodElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal40_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal40_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal40_50.convertDecimal(src.getUpperLimitElement()));
@ -26,7 +26,7 @@ public class SampledData40_50 {
org.hl7.fhir.r4.model.SampledData tgt = new org.hl7.fhir.r4.model.SampledData();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity40_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal40_50.convertDecimal(src.getPeriodElement()));
if (src.hasInterval()) tgt.setPeriodElement(Decimal40_50.convertDecimal(src.getIntervalElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal40_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal40_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal40_50.convertDecimal(src.getUpperLimitElement()));

View File

@ -13,7 +13,7 @@ public class DataRequirement40_50 {
org.hl7.fhir.r5.model.DataRequirement tgt = new org.hl7.fhir.r5.model.DataRequirement();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasType())
tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(convertResourceName4to5(src.getType())));
tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(convertResourceName4to5(src.getType())));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getProfile())
tgt.getProfile().add(Canonical40_50.convertCanonical(t));
if (src.hasSubject())

View File

@ -17,7 +17,7 @@ public class ParameterDefinition40_50 {
if (src.hasMin()) tgt.setMinElement(Integer40_50.convertInteger(src.getMinElement()));
if (src.hasMax()) tgt.setMaxElement(String40_50.convertString(src.getMaxElement()));
if (src.hasDocumentation()) tgt.setDocumentationElement(String40_50.convertString(src.getDocumentationElement()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(src.getType()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(src.getType()));
if (src.hasProfile()) tgt.setProfileElement(Canonical40_50.convertCanonical(src.getProfileElement()));
return tgt;
}

View File

@ -2,6 +2,8 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class Code40_50 {
public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException {
@ -16,11 +18,13 @@ public class Code40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.CodeType convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) {
return Code40_50.convertCode(src);
public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) {
return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode());
}
public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.CodeType src) {
return Code40_50.convertCode(src);
public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
return new org.hl7.fhir.r4.model.CodeType(src.getCode());
}
}

View File

@ -507,7 +507,7 @@ public class ElementDefinition40_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasKey()) tgt.setKeyElement(Id40_50.convertId(src.getKeyElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String40_50.convertString(src.getRequirementsElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String40_50.convertStringToMarkdown(src.getRequirementsElement()));
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
if (src.hasHuman()) tgt.setHumanElement(String40_50.convertString(src.getHumanElement()));
if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
@ -579,7 +579,7 @@ public class ElementDefinition40_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStrength()) tgt.setStrengthElement(Enumerations40_50.convertBindingStrength(src.getStrengthElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasValueSet()) tgt.setValueSetElement(Canonical40_50.convertCanonical(src.getValueSetElement()));
return tgt;
}
@ -601,7 +601,7 @@ public class ElementDefinition40_50 {
if (src.hasIdentity()) tgt.setIdentityElement(Id40_50.convertId(src.getIdentityElement()));
if (src.hasLanguage()) tgt.setLanguageElement(Code40_50.convertCode(src.getLanguageElement()));
if (src.hasMap()) tgt.setMapElement(String40_50.convertString(src.getMapElement()));
if (src.hasComment()) tgt.setCommentElement(String40_50.convertString(src.getCommentElement()));
if (src.hasComment()) tgt.setCommentElement(String40_50.convertStringToMarkdown(src.getCommentElement()));
return tgt;
}

View File

@ -5,6 +5,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier4
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Signature40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
/*
Copyright (c) 2011+, HL7, Inc.
@ -165,7 +166,7 @@ public class Bundle40_50 {
org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasRelation())
tgt.setRelationElement(String40_50.convertString(src.getRelationElement()));
tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation()));
if (src.hasUrl())
tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement()));
return tgt;
@ -177,7 +178,7 @@ public class Bundle40_50 {
org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasRelation())
tgt.setRelationElement(String40_50.convertString(src.getRelationElement()));
tgt.setRelation((src.getRelation().toCode()));
if (src.hasUrl())
tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement()));
return tgt;

View File

@ -306,26 +306,26 @@ public class CapabilityStatement40_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case CLIENT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.CLIENT);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
break;
case SERVER:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.SERVER);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
@ -378,7 +378,7 @@ public class CapabilityStatement40_50 {
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(Code40_50.convertResourceEnum(src.getTypeElement()));
tgt.setTypeElement(Code40_50.convertCode(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical40_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getSupportedProfile())
@ -421,7 +421,7 @@ public class CapabilityStatement40_50 {
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(Code40_50.convertResourceEnum(src.getTypeElement()));
tgt.setTypeElement(Code40_50.convertCode(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical40_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r5.model.CanonicalType t : src.getSupportedProfile())

View File

@ -171,7 +171,7 @@ public class CompartmentDefinition40_50 {
org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(Code40_50.convertResourceEnum(src.getCodeElement()));
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4.model.StringType t : src.getParam()) tgt.getParam().add(String40_50.convertString(t));
if (src.hasDocumentation())
tgt.setDocumentationElement(String40_50.convertString(src.getDocumentationElement()));
@ -184,7 +184,7 @@ public class CompartmentDefinition40_50 {
org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r4.model.CompartmentDefinition.CompartmentDefinitionResourceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(Code40_50.convertResourceEnum(src.getCodeElement()));
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getParam()) tgt.getParam().add(String40_50.convertString(t));
if (src.hasDocumentation())
tgt.setDocumentationElement(String40_50.convertString(src.getDocumentationElement()));

View File

@ -6,10 +6,12 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Period40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Code40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Narrative40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.RelatedArtifact;
@ -50,7 +52,7 @@ public class Composition40_50 {
org.hl7.fhir.r5.model.Composition tgt = new org.hl7.fhir.r5.model.Composition();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier()));
tgt.addIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -58,7 +60,7 @@ public class Composition40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory())
tgt.addCategory(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
tgt.addSubject(Reference40_50.convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(Reference40_50.convertReference(src.getEncounter()));
if (src.hasDate())
@ -67,7 +69,7 @@ public class Composition40_50 {
if (src.hasTitle())
tgt.setTitleElement(String40_50.convertString(src.getTitleElement()));
if (src.hasConfidentiality())
tgt.setConfidentialityElement(convertDocumentConfidentiality(src.getConfidentialityElement()));
tgt.getMeta().addSecurity().setCodeElement(Code40_50.convertCode(src.getConfidentialityElement()));
for (org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));
if (src.hasCustodian())
@ -87,7 +89,7 @@ public class Composition40_50 {
org.hl7.fhir.r4.model.Composition tgt = new org.hl7.fhir.r4.model.Composition();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier()));
tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifierFirstRep()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -95,7 +97,7 @@ public class Composition40_50 {
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory())
tgt.addCategory(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
tgt.setSubject(Reference40_50.convertReference(src.getSubjectFirstRep()));
if (src.hasEncounter())
tgt.setEncounter(Reference40_50.convertReference(src.getEncounter()));
if (src.hasDate())

View File

@ -54,7 +54,7 @@ public class DetectedIssue40_50 {
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference40_50.convertReference(src.getPatient()));
tgt.setSubject(Reference40_50.convertReference(src.getPatient()));
if (src.hasIdentified())
tgt.setIdentified(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getIdentified()));
if (src.hasAuthor())
@ -84,8 +84,8 @@ public class DetectedIssue40_50 {
tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference40_50.convertReference(src.getPatient()));
if (src.hasSubject())
tgt.setPatient(Reference40_50.convertReference(src.getSubject()));
if (src.hasIdentified())
tgt.setIdentified(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getIdentified()));
if (src.hasAuthor())
@ -102,73 +102,61 @@ public class DetectedIssue40_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> convertDetectedIssueStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ObservationStatusEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatusEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.REGISTERED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.PRELIMINARY);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.FINAL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.AMENDED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case CORRECTED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CORRECTED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CANCELLED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.ENTEREDINERROR);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.UNKNOWN);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.NULL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> src) throws FHIRException {
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatusEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.REGISTERED);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.AMENDED);
break;
case CORRECTED:
case MITIGATED:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CORRECTED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.CANCELLED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.NULL);
break;

View File

@ -67,8 +67,6 @@ public class DiagnosticReport40_50 {
tgt.addResultsInterpreter(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getResult()) tgt.addResult(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addMedia(convertDiagnosticReportMediaComponent(t));
if (src.hasConclusion())
@ -107,8 +105,6 @@ public class DiagnosticReport40_50 {
tgt.addResultsInterpreter(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResult()) tgt.addResult(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addMedia(convertDiagnosticReportMediaComponent(t));
if (src.hasConclusion())

View File

@ -274,8 +274,8 @@ public class DocumentReference40_50 {
tgt.setFacilityType(CodeableConcept40_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept40_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference40_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference40_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r4.model.Reference t : src.getRelated()) tgt.addRelated(Reference40_50.convertReference(t));
}
@ -290,8 +290,8 @@ public class DocumentReference40_50 {
tgt.setFacilityType(CodeableConcept40_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept40_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference40_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference40_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated()) tgt.addRelated(Reference40_50.convertReference(t));
}
}

View File

@ -50,13 +50,13 @@ public class Encounter40_50 {
for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding40_50.convertCoding(src.getClass_())));
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding40_50.convertCoding(src.getClass_())));
for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasServiceType())
tgt.setServiceType(new CodeableReference(CodeableConcept40_50.convertCodeableConcept(src.getServiceType())));
tgt.addServiceType(new CodeableReference(CodeableConcept40_50.convertCodeableConcept(src.getServiceType())));
if (src.hasPriority())
tgt.setPriority(CodeableConcept40_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())
@ -80,7 +80,7 @@ public class Encounter40_50 {
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
for (org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -102,13 +102,13 @@ public class Encounter40_50 {
for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(Coding40_50.convertCoding(src.getClass_().getCodingFirstRep()));
tgt.setClass_(Coding40_50.convertCoding(src.getClass_FirstRep().getCodingFirstRep()));
for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept40_50.convertCodeableConcept(t));
if (src.getServiceType().hasConcept())
tgt.setServiceType(CodeableConcept40_50.convertCodeableConcept(src.getServiceType().getConcept()));
if (src.getServiceTypeFirstRep().hasConcept())
tgt.setServiceType(CodeableConcept40_50.convertCodeableConcept(src.getServiceTypeFirstRep().getConcept()));
if (src.hasPriority())
tgt.setPriority(CodeableConcept40_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())
@ -133,8 +133,8 @@ public class Encounter40_50 {
for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
if (src.hasAdmission())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -319,10 +319,10 @@ public class Encounter40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent();
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasPreAdmissionIdentifier())
tgt.setPreAdmissionIdentifier(Identifier40_50.convertIdentifier(src.getPreAdmissionIdentifier()));
@ -345,7 +345,7 @@ public class Encounter40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent();
@ -381,7 +381,7 @@ public class Encounter40_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEncounterLocationStatus(src.getStatusElement()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPeriod())
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
return tgt;
@ -396,8 +396,8 @@ public class Encounter40_50 {
tgt.setLocation(Reference40_50.convertReference(src.getLocation()));
if (src.hasStatus())
tgt.setStatusElement(convertEncounterLocationStatus(src.getStatusElement()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getForm()));
if (src.hasPeriod())
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
return tgt;

View File

@ -68,7 +68,7 @@ public class GraphDefinition40_50 {
if (src.hasPurpose())
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasStart())
tgt.setStartElement(Code40_50.convertResourceEnum(src.getStartElement()));
tgt.setStartElement(Code40_50.convertCode(src.getStartElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical40_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r4.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink())
@ -106,7 +106,7 @@ public class GraphDefinition40_50 {
if (src.hasPurpose())
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasStart())
tgt.setStartElement(Code40_50.convertResourceEnum(src.getStartElement()));
tgt.setStartElement(Code40_50.convertCode(src.getStartElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical40_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink())

View File

@ -9,6 +9,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.UnsignedInt40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Group.GroupMembershipBasis;
/*
Copyright (c) 2011+, HL7, Inc.
@ -53,7 +54,7 @@ public class Group40_50 {
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean40_50.convertBoolean(src.getActualElement()));
tgt.setMembership(src.getActual() ? GroupMembershipBasis.ENUMERATED : GroupMembershipBasis.DEFINITIONAL);
if (src.hasCode())
tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -80,8 +81,8 @@ public class Group40_50 {
tgt.setActiveElement(Boolean40_50.convertBoolean(src.getActiveElement()));
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean40_50.convertBoolean(src.getActualElement()));
if (src.hasMembership())
tgt.setActual(src.getMembership() == GroupMembershipBasis.ENUMERATED);
if (src.hasCode())
tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -115,12 +116,6 @@ public class Group40_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.NULL);
break;
@ -146,12 +141,6 @@ public class Group40_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r4.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r4.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r4.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.Group.GroupType.NULL);
break;

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Time40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import java.util.stream.Collectors;
@ -69,7 +70,7 @@ public class HealthcareService40_50 {
if (src.hasPhoto())
tgt.setPhoto(Attachment40_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint40_50.convertContactPoint(t));
for (org.hl7.fhir.r4.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceProvisionCode())
@ -86,12 +87,12 @@ public class HealthcareService40_50 {
tgt.addReferralMethod(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean40_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
return tgt;
}
@ -122,8 +123,9 @@ public class HealthcareService40_50 {
tgt.setExtraDetailsElement(MarkDown40_50.convertMarkdown(src.getExtraDetailsElement()));
if (src.hasPhoto())
tgt.setPhoto(Attachment40_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceProvisionCode())
@ -140,12 +142,12 @@ public class HealthcareService40_50 {
tgt.addReferralMethod(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean40_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
return tgt;
}
@ -174,39 +176,39 @@ public class HealthcareService40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService40_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time40_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time40_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService40_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time40_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time40_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
public static org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService40_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time40_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time40_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
// public static org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService40_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time40_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time40_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DaysOfWeek> convertDaysOfWeek(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek> src) throws FHIRException {
if (src == null || src.isEmpty())
@ -275,28 +277,28 @@ public class HealthcareService40_50 {
}
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period40_50.convertPeriod(src.getDuring()));
return tgt;
}
public static org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period40_50.convertPeriod(src.getDuring()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period40_50.convertPeriod(src.getDuring()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period40_50.convertPeriod(src.getDuring()));
// return tgt;
// }
}

View File

@ -6,6 +6,8 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.ContactDet
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.*;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Canonical43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.utilities.Utilities;
@ -2311,7 +2313,7 @@ public class ImplementationGuide40_50 {
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
for (org.hl7.fhir.r4.model.Extension e : org.hl7.fhir.r4.utils.ToolingExtensions.getExtensions(src, EXT_IG_DEFINITION_PARAMETER)) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent p = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
p.setCode(org.hl7.fhir.r4.utils.ToolingExtensions.readStringExtension(e, "code"));
p.getCode().setCode(org.hl7.fhir.r4.utils.ToolingExtensions.readStringExtension(e, "code"));
p.setValue(org.hl7.fhir.r4.utils.ToolingExtensions.readStringExtension(e, "Value"));
tgt.addParameter(p);
}
@ -2332,11 +2334,11 @@ public class ImplementationGuide40_50 {
if (src.hasPage())
tgt.setPage(convertImplementationGuideDefinitionPageComponent(src.getPage()));
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent t : src.getParameter()) {
if (Utilities.existsInList(t.getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template"))
if (Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template"))
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
else {
org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER);
org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode()));
org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode().getCode()));
org.hl7.fhir.r4.model.Extension eValue = new org.hl7.fhir.r4.model.Extension("value", new org.hl7.fhir.r4.model.StringType(t.getValue()));
e.addExtension(eCode);
e.addExtension(eValue);
@ -2386,8 +2388,10 @@ public class ImplementationGuide40_50 {
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getExample()));
if (src.hasExampleBooleanType())
tgt.setIsExampleElement(Boolean40_50.convertBoolean(src.getExampleBooleanType()));
if (src.hasExampleCanonicalType())
tgt.getProfile().add(Canonical40_50.convertCanonical(src.getExampleCanonicalType()));
if (src.hasGroupingId())
tgt.setGroupingIdElement(Id40_50.convertId(src.getGroupingIdElement()));
return tgt;
@ -2400,15 +2404,14 @@ public class ImplementationGuide40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasReference())
tgt.setReference(Reference40_50.convertReference(src.getReference()));
tgt.setFhirVersion(src.getFhirVersion().stream()
.map(Enumerations40_50::convertFHIRVersion)
.collect(Collectors.toList()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getExample()));
if (src.hasIsExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getIsExampleElement()));
if (src.hasProfile())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProfile().get(0)));
if (src.hasGroupingId())
tgt.setGroupingIdElement(Id40_50.convertId(src.getGroupingIdElement()));
return tgt;
@ -2419,8 +2422,10 @@ public class ImplementationGuide40_50 {
return null;
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasName())
tgt.setName(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getName()));
if (src.hasNameReference())
tgt.setName(src.getNameReference().getReference());
if (src.hasNameUrlType())
tgt.setName(src.getNameUrlType().getValue());
if (src.hasTitle())
tgt.setTitleElement(String40_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2436,7 +2441,7 @@ public class ImplementationGuide40_50 {
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasName())
tgt.setName(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getName()));
tgt.setName(new org.hl7.fhir.r4.model.UrlType(src.getName()));
if (src.hasTitle())
tgt.setTitleElement(String40_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2502,7 +2507,7 @@ public class ImplementationGuide40_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(String40_50.convertString(src.getCodeElement()));
tgt.getCode().setCode(src.getCode());
if (src.hasValue())
tgt.setValueElement(String40_50.convertString(src.getValueElement()));
return tgt;
@ -2514,7 +2519,7 @@ public class ImplementationGuide40_50 {
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(String40_50.convertString(src.getCodeElement()));
tgt.setCode(src.getCode().getCode());
if (src.hasValue())
tgt.setValueElement(String40_50.convertString(src.getValueElement()));
return tgt;
@ -2645,8 +2650,10 @@ public class ImplementationGuide40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasReference())
tgt.setReference(Reference40_50.convertReference(src.getReference()));
if (src.hasExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getExample()));
if (src.hasExampleBooleanType())
tgt.setIsExampleElement(Boolean40_50.convertBoolean(src.getExampleBooleanType()));
if (src.hasExampleCanonicalType())
tgt.getProfile().add((Canonical40_50.convertCanonical(src.getExampleCanonicalType())));
if (src.hasRelativePath())
tgt.setRelativePathElement(Url40_50.convertUrl(src.getRelativePathElement()));
return tgt;
@ -2659,8 +2666,10 @@ public class ImplementationGuide40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
if (src.hasReference())
tgt.setReference(Reference40_50.convertReference(src.getReference()));
if (src.hasExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getExample()));
if (src.hasIsExample())
tgt.setExample(Boolean40_50.convertBoolean(src.getIsExampleElement()));
if (src.hasProfile())
tgt.setExample(Canonical40_50.convertCanonical(src.getProfile().get(0)));
if (src.hasRelativePath())
tgt.setRelativePathElement(Url40_50.convertUrl(src.getRelativePathElement()));
return tgt;

View File

@ -8,6 +8,8 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Time40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ContactPoint;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import java.util.stream.Collectors;
@ -63,21 +65,21 @@ public class Location40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint40_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address40_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
tgt.setManagingOrganization(Reference40_50.convertReference(src.getManagingOrganization()));
if (src.hasPartOf())
tgt.setPartOf(Reference40_50.convertReference(src.getPartOf()));
for (org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
// tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
return tgt;
}
@ -102,22 +104,23 @@ public class Location40_50 {
tgt.setModeElement(convertLocationMode(src.getModeElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address40_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept40_50.convertCodeableConcept(src.getForm()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
tgt.setManagingOrganization(Reference40_50.convertReference(src.getManagingOrganization()));
if (src.hasPartOf())
tgt.setPartOf(Reference40_50.convertReference(src.getPartOf()));
for (org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
// tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String40_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
return tgt;
}
@ -231,40 +234,40 @@ public class Location40_50 {
tgt.setAltitudeElement(Decimal40_50.convertDecimal(src.getAltitudeElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(Location40_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
if (src.hasOpeningTime())
tgt.setOpeningTimeElement(Time40_50.convertTime(src.getOpeningTimeElement()));
if (src.hasClosingTime())
tgt.setClosingTimeElement(Time40_50.convertTime(src.getClosingTimeElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(Location40_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
if (src.hasOpeningTime())
tgt.setOpeningTimeElement(Time40_50.convertTime(src.getOpeningTimeElement()));
if (src.hasClosingTime())
tgt.setClosingTimeElement(Time40_50.convertTime(src.getClosingTimeElement()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(Location40_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
// if (src.hasOpeningTime())
// tgt.setOpeningTimeElement(Time40_50.convertTime(src.getOpeningTimeElement()));
// if (src.hasClosingTime())
// tgt.setClosingTimeElement(Time40_50.convertTime(src.getClosingTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r4.model.Location.LocationHoursOfOperationComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(Location40_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean40_50.convertBoolean(src.getAllDayElement()));
// if (src.hasOpeningTime())
// tgt.setOpeningTimeElement(Time40_50.convertTime(src.getOpeningTimeElement()));
// if (src.hasClosingTime())
// tgt.setClosingTimeElement(Time40_50.convertTime(src.getClosingTimeElement()));
// return tgt;
// }
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DaysOfWeek> convertDaysOfWeek(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Location.DaysOfWeek> src) throws FHIRException {
if (src == null || src.isEmpty())

View File

@ -209,9 +209,9 @@ public class OperationDefinition40_50 {
if (src.hasMax())
tgt.setMaxElement(String40_50.convertString(src.getMaxElement()));
if (src.hasDocumentation())
tgt.setDocumentationElement(String40_50.convertString(src.getDocumentationElement()));
tgt.setDocumentationElement(String40_50.convertStringToMarkdown(src.getDocumentationElement()));
if (src.hasType())
tgt.getTypeElement().setValue(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(src.getType()));
tgt.getTypeElement().setValue(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(src.getType()));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getTargetProfile())
tgt.getTargetProfile().add(Canonical40_50.convertCanonical(t));
if (src.hasSearchType())

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
/*
Copyright (c) 2011+, HL7, Inc.
@ -53,7 +54,7 @@ public class Organization40_50 {
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) tgt.getAlias().add(String40_50.convertString(t));
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint40_50.convertContactPoint(t));
for (org.hl7.fhir.r4.model.Address t : src.getAddress()) tgt.addAddress(Address40_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference40_50.convertReference(src.getPartOf()));
@ -77,8 +78,9 @@ public class Organization40_50 {
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getAlias()) tgt.getAlias().add(String40_50.convertString(t));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint40_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(Address40_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference40_50.convertReference(src.getPartOf()));

View File

@ -7,6 +7,9 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageConte
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
import java.util.stream.Collectors;
@ -74,15 +77,15 @@ public class SearchParameter40_50 {
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertResourceEnum(t));
for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration<AllResourceTypes>(new Enumerations.AllResourceTypesEnumFactory(), t.getCode()));
if (src.hasType())
tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression())
tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
for (org.hl7.fhir.r4.model.CodeType t : src.getTarget()) tgt.getTarget().add(Code40_50.convertResourceEnum(t));
if (src.hasMultipleOr())
tgt.setMultipleOrElement(Boolean40_50.convertBoolean(src.getMultipleOrElement()));
@ -133,15 +136,15 @@ public class SearchParameter40_50 {
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
for (CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertResourceEnum(t));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.getBase().add(new org.hl7.fhir.r4.model.CodeType(t.getCode()));
if (src.hasType())
tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression())
tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
if (src.hasProcessingMode())
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
for (CodeType t : src.getTarget()) tgt.getTarget().add(Code40_50.convertResourceEnum(t));
if (src.hasMultipleOr())
tgt.setMultipleOrElement(Boolean40_50.convertBoolean(src.getMultipleOrElement()));
@ -159,35 +162,35 @@ public class SearchParameter40_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> convertXPathUsageType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.SearchParameter.XPathUsageType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.XPathUsageTypeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case NORMAL:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NORMAL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NORMAL);
break;
case PHONETIC:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NULL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.SearchParameter.XPathUsageTypeEnumFactory());

View File

@ -6,6 +6,10 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.ContactDet
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_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.TerminologyCapabilities.CommonLanguages;
import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguagesEnumFactory;
/*
Copyright (c) 2011+, HL7, Inc.
@ -201,10 +205,10 @@ public class TerminologyCapabilities40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case EXPLICIT:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.EXPLICIT);
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.INCOMPOSE);
break;
case ALL:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.ALL);
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.INCOMPOSEOREXPANSION);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.NULL);
@ -219,10 +223,10 @@ public class TerminologyCapabilities40_50 {
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.TerminologyCapabilities.CodeSearchSupport> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.TerminologyCapabilities.CodeSearchSupportEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case EXPLICIT:
case INCOMPOSE:
tgt.setValue(org.hl7.fhir.r4.model.TerminologyCapabilities.CodeSearchSupport.EXPLICIT);
break;
case ALL:
case INCOMPOSEOREXPANSION:
tgt.setValue(org.hl7.fhir.r4.model.TerminologyCapabilities.CodeSearchSupport.ALL);
break;
default:
@ -319,7 +323,7 @@ public class TerminologyCapabilities40_50 {
tgt.setIsDefaultElement(Boolean40_50.convertBoolean(src.getIsDefaultElement()));
if (src.hasCompositional())
tgt.setCompositionalElement(Boolean40_50.convertBoolean(src.getCompositionalElement()));
for (org.hl7.fhir.r4.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(Code40_50.convertCode(t));
for (org.hl7.fhir.r4.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(new Enumeration<CommonLanguages>(new CommonLanguagesEnumFactory(), t.getCode()));
for (org.hl7.fhir.r4.model.TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent t : src.getFilter())
tgt.addFilter(convertTerminologyCapabilitiesCodeSystemVersionFilterComponent(t));
for (org.hl7.fhir.r4.model.CodeType t : src.getProperty()) tgt.getProperty().add(Code40_50.convertCode(t));
@ -337,7 +341,7 @@ public class TerminologyCapabilities40_50 {
tgt.setIsDefaultElement(Boolean40_50.convertBoolean(src.getIsDefaultElement()));
if (src.hasCompositional())
tgt.setCompositionalElement(Boolean40_50.convertBoolean(src.getCompositionalElement()));
for (org.hl7.fhir.r5.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(Code40_50.convertCode(t));
for (Enumeration<CommonLanguages> t : src.getLanguage()) tgt.getLanguage().add(new CodeType(t.getCode()));
for (org.hl7.fhir.r5.model.TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent t : src.getFilter())
tgt.addFilter(convertTerminologyCapabilitiesCodeSystemVersionFilterComponent(t));
for (org.hl7.fhir.r5.model.CodeType t : src.getProperty()) tgt.getProperty().add(Code40_50.convertCode(t));

View File

@ -653,7 +653,7 @@ public class TestScript40_50 {
if (src.hasRequestURL())
tgt.setRequestURLElement(String40_50.convertString(src.getRequestURLElement()));
if (src.hasResource())
tgt.setResource(org.hl7.fhir.r5.model.TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode())
@ -705,7 +705,7 @@ public class TestScript40_50 {
if (src.hasRequestURL())
tgt.setRequestURLElement(String40_50.convertString(src.getRequestURLElement()));
if (src.hasResource())
tgt.setResource(src.getResource().toCode());
tgt.setResource(src.getResource());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode())

View File

@ -12,7 +12,7 @@ public class SampledData43_50 {
org.hl7.fhir.r5.model.SampledData tgt = new org.hl7.fhir.r5.model.SampledData();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity43_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal43_50.convertDecimal(src.getPeriodElement()));
if (src.hasPeriod()) tgt.setIntervalElement(Decimal43_50.convertDecimal(src.getPeriodElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal43_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal43_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal43_50.convertDecimal(src.getUpperLimitElement()));
@ -26,7 +26,7 @@ public class SampledData43_50 {
org.hl7.fhir.r4b.model.SampledData tgt = new org.hl7.fhir.r4b.model.SampledData();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
if (src.hasOrigin()) tgt.setOrigin(SimpleQuantity43_50.convertSimpleQuantity(src.getOrigin()));
if (src.hasPeriod()) tgt.setPeriodElement(Decimal43_50.convertDecimal(src.getPeriodElement()));
if (src.hasInterval()) tgt.setPeriodElement(Decimal43_50.convertDecimal(src.getIntervalElement()));
if (src.hasFactor()) tgt.setFactorElement(Decimal43_50.convertDecimal(src.getFactorElement()));
if (src.hasLowerLimit()) tgt.setLowerLimitElement(Decimal43_50.convertDecimal(src.getLowerLimitElement()));
if (src.hasUpperLimit()) tgt.setUpperLimitElement(Decimal43_50.convertDecimal(src.getUpperLimitElement()));

View File

@ -13,7 +13,7 @@ public class DataRequirement43_50 {
org.hl7.fhir.r5.model.DataRequirement tgt = new org.hl7.fhir.r5.model.DataRequirement();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
if (src.hasType())
tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(convertResourceName4to5(src.getType().toCode())));
tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(convertResourceName4to5(src.getType().toCode())));
for (org.hl7.fhir.r4b.model.CanonicalType t : src.getProfile())
tgt.getProfile().add(Canonical43_50.convertCanonical(t));
if (src.hasSubject())

View File

@ -17,7 +17,7 @@ public class ParameterDefinition43_50 {
if (src.hasMin()) tgt.setMinElement(Integer43_50.convertInteger(src.getMinElement()));
if (src.hasMax()) tgt.setMaxElement(String43_50.convertString(src.getMaxElement()));
if (src.hasDocumentation()) tgt.setDocumentationElement(String43_50.convertString(src.getDocumentationElement()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(src.getType().toCode()));
if (src.hasType()) tgt.setType(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(src.getType().toCode()));
if (src.hasProfile()) tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement()));
return tgt;
}

View File

@ -2,6 +2,8 @@ package org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50;
import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
public class Code43_50 {
public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4b.model.CodeType src) throws FHIRException {
@ -16,11 +18,11 @@ public class Code43_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.CodeType convertResourceEnum(org.hl7.fhir.r4b.model.CodeType src) {
return Code43_50.convertCode(src);
public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.r4b.model.CodeType src) {
return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode());
}
public static org.hl7.fhir.r4b.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.CodeType src) {
return Code43_50.convertCode(src);
public static org.hl7.fhir.r4b.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
return new org.hl7.fhir.r4b.model.CodeType(src.getCode());
}
}

View File

@ -507,7 +507,7 @@ public class ElementDefinition43_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
if (src.hasKey()) tgt.setKeyElement(Id43_50.convertId(src.getKeyElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String43_50.convertString(src.getRequirementsElement()));
if (src.hasRequirements()) tgt.setRequirementsElement(String43_50.convertStringToMarkdown(src.getRequirementsElement()));
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
if (src.hasHuman()) tgt.setHumanElement(String43_50.convertString(src.getHumanElement()));
if (src.hasExpression()) tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement()));
@ -579,7 +579,7 @@ public class ElementDefinition43_50 {
org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent tgt = new org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
if (src.hasStrength()) tgt.setStrengthElement(Enumerations43_50.convertBindingStrength(src.getStrengthElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasValueSet()) tgt.setValueSetElement(Canonical43_50.convertCanonical(src.getValueSetElement()));
return tgt;
}
@ -601,7 +601,7 @@ public class ElementDefinition43_50 {
if (src.hasIdentity()) tgt.setIdentityElement(Id43_50.convertId(src.getIdentityElement()));
if (src.hasLanguage()) tgt.setLanguageElement(Code43_50.convertCode(src.getLanguageElement()));
if (src.hasMap()) tgt.setMapElement(String43_50.convertString(src.getMapElement()));
if (src.hasComment()) tgt.setCommentElement(String43_50.convertString(src.getCommentElement()));
if (src.hasComment()) tgt.setCommentElement(String43_50.convertStringToMarkdown(src.getCommentElement()));
return tgt;
}

View File

@ -5,6 +5,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier4
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Signature43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes;
/*
Copyright (c) 2011+, HL7, Inc.
@ -165,7 +166,7 @@ public class Bundle43_50 {
org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasRelation())
tgt.setRelationElement(String43_50.convertString(src.getRelationElement()));
tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation()));
if (src.hasUrl())
tgt.setUrlElement(Uri43_50.convertUri(src.getUrlElement()));
return tgt;
@ -177,7 +178,7 @@ public class Bundle43_50 {
org.hl7.fhir.r4b.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4b.model.Bundle.BundleLinkComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasRelation())
tgt.setRelationElement(String43_50.convertString(src.getRelationElement()));
tgt.setRelation((src.getRelation().toCode()));
if (src.hasUrl())
tgt.setUrlElement(Uri43_50.convertUri(src.getUrlElement()));
return tgt;

View File

@ -306,26 +306,26 @@ public class CapabilityStatement43_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case CLIENT:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.CLIENT);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
break;
case SERVER:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.SERVER);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RestfulCapabilityMode> src) throws FHIRException {
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulCapabilityMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
@ -378,7 +378,7 @@ public class CapabilityStatement43_50 {
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(Code43_50.convertResourceEnum(src.getTypeElement()));
tgt.setTypeElement(Code43_50.convertCode(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r4b.model.CanonicalType t : src.getSupportedProfile())
@ -421,7 +421,7 @@ public class CapabilityStatement43_50 {
org.hl7.fhir.r4b.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4b.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(Code43_50.convertResourceEnum(src.getTypeElement()));
tgt.setTypeElement(Code43_50.convertCode(src.getTypeElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r5.model.CanonicalType t : src.getSupportedProfile())

View File

@ -171,7 +171,7 @@ public class CompartmentDefinition43_50 {
org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r5.model.CompartmentDefinition.CompartmentDefinitionResourceComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(Code43_50.convertResourceEnum(src.getCodeElement()));
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4b.model.StringType t : src.getParam()) tgt.getParam().add(String43_50.convertString(t));
if (src.hasDocumentation())
tgt.setDocumentationElement(String43_50.convertString(src.getDocumentationElement()));
@ -184,7 +184,7 @@ public class CompartmentDefinition43_50 {
org.hl7.fhir.r4b.model.CompartmentDefinition.CompartmentDefinitionResourceComponent tgt = new org.hl7.fhir.r4b.model.CompartmentDefinition.CompartmentDefinitionResourceComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.setCodeElement(Code43_50.convertResourceEnum(src.getCodeElement()));
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getParam()) tgt.getParam().add(String43_50.convertString(t));
if (src.hasDocumentation())
tgt.setDocumentationElement(String43_50.convertString(src.getDocumentationElement()));

View File

@ -51,7 +51,7 @@ public class Composition43_50 {
org.hl7.fhir.r5.model.Composition tgt = new org.hl7.fhir.r5.model.Composition();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier43_50.convertIdentifier(src.getIdentifier()));
tgt.addIdentifier(Identifier43_50.convertIdentifier(src.getIdentifier()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -59,7 +59,7 @@ public class Composition43_50 {
for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getCategory())
tgt.addCategory(CodeableConcept43_50.convertCodeableConcept(t));
if (src.hasSubject())
tgt.setSubject(Reference43_50.convertReference(src.getSubject()));
tgt.addSubject(Reference43_50.convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(Reference43_50.convertReference(src.getEncounter()));
if (src.hasDate())
@ -68,7 +68,7 @@ public class Composition43_50 {
if (src.hasTitle())
tgt.setTitleElement(String43_50.convertString(src.getTitleElement()));
if (src.hasConfidentiality())
tgt.setConfidentialityElement(Code43_50.convertCode(src.getConfidentialityElement()));
tgt.getMeta().addSecurity().setCodeElement(Code43_50.convertCode(src.getConfidentialityElement()));
for (org.hl7.fhir.r4b.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));
if (src.hasCustodian())
@ -88,7 +88,7 @@ public class Composition43_50 {
org.hl7.fhir.r4b.model.Composition tgt = new org.hl7.fhir.r4b.model.Composition();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifier(Identifier43_50.convertIdentifier(src.getIdentifier()));
tgt.setIdentifier(Identifier43_50.convertIdentifier(src.getIdentifierFirstRep()));
if (src.hasStatus())
tgt.setStatusElement(convertCompositionStatus(src.getStatusElement()));
if (src.hasType())
@ -96,7 +96,7 @@ public class Composition43_50 {
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory())
tgt.addCategory(CodeableConcept43_50.convertCodeableConcept(t));
if (src.hasSubject())
tgt.setSubject(Reference43_50.convertReference(src.getSubject()));
tgt.setSubject(Reference43_50.convertReference(src.getSubjectFirstRep()));
if (src.hasEncounter())
tgt.setEncounter(Reference43_50.convertReference(src.getEncounter()));
if (src.hasDate())
@ -104,8 +104,8 @@ public class Composition43_50 {
for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference43_50.convertReference(t));
if (src.hasTitle())
tgt.setTitleElement(String43_50.convertString(src.getTitleElement()));
if (src.hasConfidentiality())
tgt.setConfidentialityElement(Code43_50.convertCode(src.getConfidentialityElement()));
if (src.getMeta().hasSecurity())
tgt.setConfidentialityElement(Code43_50.convertCode(src.getMeta().getSecurityFirstRep().getCodeElement()));
for (org.hl7.fhir.r5.model.Composition.CompositionAttesterComponent t : src.getAttester())
tgt.addAttester(convertCompositionAttesterComponent(t));
if (src.hasCustodian())

View File

@ -54,7 +54,7 @@ public class DetectedIssue43_50 {
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference43_50.convertReference(src.getPatient()));
tgt.setSubject(Reference43_50.convertReference(src.getPatient()));
if (src.hasIdentified())
tgt.setIdentified(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getIdentified()));
if (src.hasAuthor())
@ -84,8 +84,8 @@ public class DetectedIssue43_50 {
tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode()));
if (src.hasSeverity())
tgt.setSeverityElement(convertDetectedIssueSeverity(src.getSeverityElement()));
if (src.hasPatient())
tgt.setPatient(Reference43_50.convertReference(src.getPatient()));
if (src.hasSubject())
tgt.setPatient(Reference43_50.convertReference(src.getSubject()));
if (src.hasIdentified())
tgt.setIdentified(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getIdentified()));
if (src.hasAuthor())
@ -102,73 +102,61 @@ public class DetectedIssue43_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> convertDetectedIssueStatus(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.ObservationStatus> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> convertDetectedIssueStatus(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.ObservationStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ObservationStatusEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatusEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.REGISTERED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.PRELIMINARY);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.FINAL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.AMENDED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.FINAL);
break;
case CORRECTED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CORRECTED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.CANCELLED);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.MITIGATED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.ENTEREDINERROR);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.UNKNOWN);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ObservationStatus.NULL);
tgt.setValue(org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.ObservationStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ObservationStatus> src) throws FHIRException {
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.ObservationStatus> convertDetectedIssueStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DetectedIssue.DetectedIssueStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.ObservationStatus> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.ObservationStatusEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case REGISTERED:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.REGISTERED);
break;
case PRELIMINARY:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.PRELIMINARY);
break;
case FINAL:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.FINAL);
break;
case AMENDED:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.AMENDED);
break;
case CORRECTED:
case MITIGATED:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.CORRECTED);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.CANCELLED);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.ENTEREDINERROR);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.ObservationStatus.NULL);
break;

View File

@ -67,8 +67,6 @@ public class DiagnosticReport43_50 {
tgt.addResultsInterpreter(Reference43_50.convertReference(t));
for (org.hl7.fhir.r4b.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference43_50.convertReference(t));
for (org.hl7.fhir.r4b.model.Reference t : src.getResult()) tgt.addResult(Reference43_50.convertReference(t));
for (org.hl7.fhir.r4b.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference43_50.convertReference(t));
for (org.hl7.fhir.r4b.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addMedia(convertDiagnosticReportMediaComponent(t));
if (src.hasConclusion())
@ -107,8 +105,6 @@ public class DiagnosticReport43_50 {
tgt.addResultsInterpreter(Reference43_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference43_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getResult()) tgt.addResult(Reference43_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getImagingStudy())
tgt.addImagingStudy(Reference43_50.convertReference(t));
for (org.hl7.fhir.r5.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
tgt.addMedia(convertDiagnosticReportMediaComponent(t));
if (src.hasConclusion())

View File

@ -274,8 +274,8 @@ public class DocumentReference43_50 {
tgt.setFacilityType(CodeableConcept43_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept43_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference43_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference43_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r4b.model.Reference t : src.getRelated()) tgt.addRelated(Reference43_50.convertReference(t));
}
@ -290,8 +290,8 @@ public class DocumentReference43_50 {
tgt.setFacilityType(CodeableConcept43_50.convertCodeableConcept(src.getFacilityType()));
if (src.hasPracticeSetting())
tgt.setPracticeSetting(CodeableConcept43_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference43_50.convertReference(src.getSourcePatientInfo()));
// if (src.hasSourcePatientInfo())
// tgt.setSourcePatientInfo(Reference43_50.convertReference(src.getSourcePatientInfo()));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated()) tgt.addRelated(Reference43_50.convertReference(t));
}
}

View File

@ -50,13 +50,13 @@ public class Encounter43_50 {
for (org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding43_50.convertCoding(src.getClass_())));
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding43_50.convertCoding(src.getClass_())));
for (org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept43_50.convertCodeableConcept(t));
if (src.hasServiceType())
tgt.setServiceType(new CodeableReference(CodeableConcept43_50.convertCodeableConcept(src.getServiceType())));
tgt.addServiceType(new CodeableReference(CodeableConcept43_50.convertCodeableConcept(src.getServiceType())));
if (src.hasPriority())
tgt.setPriority(CodeableConcept43_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())
@ -80,7 +80,7 @@ public class Encounter43_50 {
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.r4b.model.Reference t : src.getAccount()) tgt.addAccount(Reference43_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
for (org.hl7.fhir.r4b.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -102,13 +102,13 @@ public class Encounter43_50 {
for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
tgt.addStatusHistory(convertStatusHistoryComponent(t));
if (src.hasClass_())
tgt.setClass_(Coding43_50.convertCoding(src.getClass_().getCodingFirstRep()));
tgt.setClass_(Coding43_50.convertCoding(src.getClass_FirstRep().getCodingFirstRep()));
for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
tgt.addClassHistory(convertClassHistoryComponent(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept43_50.convertCodeableConcept(t));
if (src.getServiceType().hasConcept())
tgt.setServiceType(CodeableConcept43_50.convertCodeableConcept(src.getServiceType().getConcept()));
if (src.getServiceTypeFirstRep().hasConcept())
tgt.setServiceType(CodeableConcept43_50.convertCodeableConcept(src.getServiceTypeFirstRep().getConcept()));
if (src.hasPriority())
tgt.setPriority(CodeableConcept43_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())
@ -133,8 +133,8 @@ public class Encounter43_50 {
for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
tgt.addDiagnosis(convertDiagnosisComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference43_50.convertReference(t));
if (src.hasHospitalization())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getHospitalization()));
if (src.hasAdmission())
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
tgt.addLocation(convertEncounterLocationComponent(t));
if (src.hasServiceProvider())
@ -319,10 +319,10 @@ public class Encounter43_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent();
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasPreAdmissionIdentifier())
tgt.setPreAdmissionIdentifier(Identifier43_50.convertIdentifier(src.getPreAdmissionIdentifier()));
@ -345,7 +345,7 @@ public class Encounter43_50 {
return tgt;
}
public static org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
public static org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent();
@ -381,7 +381,7 @@ public class Encounter43_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEncounterLocationStatus(src.getStatusElement()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPeriod())
tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod()));
return tgt;
@ -396,8 +396,8 @@ public class Encounter43_50 {
tgt.setLocation(Reference43_50.convertReference(src.getLocation()));
if (src.hasStatus())
tgt.setStatusElement(convertEncounterLocationStatus(src.getStatusElement()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getForm()));
if (src.hasPeriod())
tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod()));
return tgt;

View File

@ -68,7 +68,7 @@ public class GraphDefinition43_50 {
if (src.hasPurpose())
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasStart())
tgt.setStartElement(Code43_50.convertResourceEnum(src.getStartElement()));
tgt.setStartElement(Code43_50.convertCode(src.getStartElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink())
@ -106,7 +106,7 @@ public class GraphDefinition43_50 {
if (src.hasPurpose())
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasStart())
tgt.setStartElement(Code43_50.convertResourceEnum(src.getStartElement()));
tgt.setStartElement(Code43_50.convertCode(src.getStartElement()));
if (src.hasProfile())
tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement()));
for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink())

View File

@ -9,6 +9,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.UnsignedInt43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.Group.GroupMembershipBasis;
/*
Copyright (c) 2011+, HL7, Inc.
@ -53,7 +54,7 @@ public class Group43_50 {
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean43_50.convertBoolean(src.getActualElement()));
tgt.setMembership(src.getActual() ? GroupMembershipBasis.ENUMERATED : GroupMembershipBasis.DEFINITIONAL);
if (src.hasCode())
tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -80,8 +81,8 @@ public class Group43_50 {
tgt.setActiveElement(Boolean43_50.convertBoolean(src.getActiveElement()));
if (src.hasType())
tgt.setTypeElement(convertGroupType(src.getTypeElement()));
if (src.hasActual())
tgt.setActualElement(Boolean43_50.convertBoolean(src.getActualElement()));
if (src.hasMembership())
tgt.setActual(src.getMembership() == GroupMembershipBasis.ENUMERATED);
if (src.hasCode())
tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode()));
if (src.hasName())
@ -115,12 +116,6 @@ public class Group43_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Group.GroupType.NULL);
break;
@ -146,12 +141,6 @@ public class Group43_50 {
case DEVICE:
tgt.setValue(org.hl7.fhir.r4b.model.Group.GroupType.DEVICE);
break;
case MEDICATION:
tgt.setValue(org.hl7.fhir.r4b.model.Group.GroupType.MEDICATION);
break;
case SUBSTANCE:
tgt.setValue(org.hl7.fhir.r4b.model.Group.GroupType.SUBSTANCE);
break;
default:
tgt.setValue(org.hl7.fhir.r4b.model.Group.GroupType.NULL);
break;

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Time43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import java.util.stream.Collectors;
@ -69,7 +70,7 @@ public class HealthcareService43_50 {
if (src.hasPhoto())
tgt.setPhoto(Attachment43_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r4b.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint43_50.convertContactPoint(t));
for (org.hl7.fhir.r4b.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference43_50.convertReference(t));
for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getServiceProvisionCode())
@ -86,12 +87,12 @@ public class HealthcareService43_50 {
tgt.addReferralMethod(CodeableConcept43_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean43_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r4b.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t));
return tgt;
}
@ -122,8 +123,9 @@ public class HealthcareService43_50 {
tgt.setExtraDetailsElement(MarkDown43_50.convertMarkdown(src.getExtraDetailsElement()));
if (src.hasPhoto())
tgt.setPhoto(Attachment43_50.convertAttachment(src.getPhoto()));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference43_50.convertReference(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceProvisionCode())
@ -140,12 +142,12 @@ public class HealthcareService43_50 {
tgt.addReferralMethod(CodeableConcept43_50.convertCodeableConcept(t));
if (src.hasAppointmentRequired())
tgt.setAppointmentRequiredElement(Boolean43_50.convertBoolean(src.getAppointmentRequiredElement()));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime())
// tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
// for (org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable())
// tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t));
return tgt;
}
@ -173,40 +175,40 @@ public class HealthcareService43_50 {
tgt.setCommentElement(MarkDown43_50.convertMarkdown(src.getCommentElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService43_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time43_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time43_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
public static org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(HealthcareService43_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
if (src.hasAvailableStartTime())
tgt.setAvailableStartTimeElement(Time43_50.convertTime(src.getAvailableStartTimeElement()));
if (src.hasAvailableEndTime())
tgt.setAvailableEndTimeElement(Time43_50.convertTime(src.getAvailableEndTimeElement()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService43_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time43_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time43_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt = new org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(HealthcareService43_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
// if (src.hasAvailableStartTime())
// tgt.setAvailableStartTimeElement(Time43_50.convertTime(src.getAvailableStartTimeElement()));
// if (src.hasAvailableEndTime())
// tgt.setAvailableEndTimeElement(Time43_50.convertTime(src.getAvailableEndTimeElement()));
// return tgt;
// }
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DaysOfWeek> convertDaysOfWeek(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.DaysOfWeek> src) throws FHIRException {
if (src == null || src.isEmpty())
@ -275,28 +277,28 @@ public class HealthcareService43_50 {
}
return tgt;
}
public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period43_50.convertPeriod(src.getDuring()));
return tgt;
}
public static org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasDescription())
tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
if (src.hasDuring())
tgt.setDuring(Period43_50.convertPeriod(src.getDuring()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period43_50.convertPeriod(src.getDuring()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent convertHealthcareServiceNotAvailableComponent(org.hl7.fhir.r5.model.HealthcareService.HealthcareServiceNotAvailableComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4b.model.HealthcareService.HealthcareServiceNotAvailableComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// if (src.hasDescription())
// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
// if (src.hasDuring())
// tgt.setDuring(Period43_50.convertPeriod(src.getDuring()));
// return tgt;
// }
}

View File

@ -1,6 +1,8 @@
package org.hl7.fhir.convertors.conv43_50.resources43_50;
import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical40_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.ContactDetail43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageContext43_50;
@ -2311,7 +2313,7 @@ public class ImplementationGuide43_50 {
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
for (org.hl7.fhir.r4b.model.Extension e : org.hl7.fhir.r4b.utils.ToolingExtensions.getExtensions(src, EXT_IG_DEFINITION_PARAMETER)) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent p = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
p.setCode(org.hl7.fhir.r4b.utils.ToolingExtensions.readStringExtension(e, "code"));
p.getCode().setCode(org.hl7.fhir.r4b.utils.ToolingExtensions.readStringExtension(e, "code"));
p.setValue(org.hl7.fhir.r4b.utils.ToolingExtensions.readStringExtension(e, "Value"));
tgt.addParameter(p);
}
@ -2332,11 +2334,11 @@ public class ImplementationGuide43_50 {
if (src.hasPage())
tgt.setPage(convertImplementationGuideDefinitionPageComponent(src.getPage()));
for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent t : src.getParameter()) {
if (Utilities.existsInList(t.getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template"))
if (Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template"))
tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t));
else {
org.hl7.fhir.r4b.model.Extension e = new org.hl7.fhir.r4b.model.Extension(EXT_IG_DEFINITION_PARAMETER);
org.hl7.fhir.r4b.model.Extension eCode = new org.hl7.fhir.r4b.model.Extension("code", new org.hl7.fhir.r4b.model.StringType(t.getCode()));
org.hl7.fhir.r4b.model.Extension eCode = new org.hl7.fhir.r4b.model.Extension("code", new org.hl7.fhir.r4b.model.StringType(t.getCode().getCode()));
org.hl7.fhir.r4b.model.Extension eValue = new org.hl7.fhir.r4b.model.Extension("value", new org.hl7.fhir.r4b.model.StringType(t.getValue()));
e.addExtension(eCode);
e.addExtension(eValue);
@ -2386,8 +2388,10 @@ public class ImplementationGuide43_50 {
tgt.setNameElement(String43_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasExample())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getExample()));
if (src.hasExampleBooleanType())
tgt.setIsExampleElement(Boolean43_50.convertBoolean(src.getExampleBooleanType()));
if (src.hasExampleCanonicalType())
tgt.getProfile().add(Canonical43_50.convertCanonical(src.getExampleCanonicalType()));
if (src.hasGroupingId())
tgt.setGroupingIdElement(Id43_50.convertId(src.getGroupingIdElement()));
return tgt;
@ -2407,8 +2411,10 @@ public class ImplementationGuide43_50 {
tgt.setNameElement(String43_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement()));
if (src.hasExample())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getExample()));
if (src.hasIsExample())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getIsExampleElement()));
if (src.hasProfile())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getProfile().get(0)));
if (src.hasGroupingId())
tgt.setGroupingIdElement(Id43_50.convertId(src.getGroupingIdElement()));
return tgt;
@ -2419,8 +2425,10 @@ public class ImplementationGuide43_50 {
return null;
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasName())
tgt.setName(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getName()));
if (src.hasNameReference())
tgt.setName(src.getNameReference().getReference());
else if (src.hasNameUrlType())
tgt.setName(src.getNameUrlType().getValue());
if (src.hasTitle())
tgt.setTitleElement(String43_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2436,7 +2444,7 @@ public class ImplementationGuide43_50 {
org.hl7.fhir.r4b.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent tgt = new org.hl7.fhir.r4b.model.ImplementationGuide.ImplementationGuideDefinitionPageComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasName())
tgt.setName(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getName()));
tgt.setName(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getNameElement()));
if (src.hasTitle())
tgt.setTitleElement(String43_50.convertString(src.getTitleElement()));
if (src.hasGeneration())
@ -2502,7 +2510,7 @@ public class ImplementationGuide43_50 {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent tgt = new org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.getCodeElement().setValueAsString(src.getCode().toCode());
tgt.getCode().setCode(src.getCode().toCode());
if (src.hasValue())
tgt.setValueElement(String43_50.convertString(src.getValueElement()));
return tgt;
@ -2514,7 +2522,7 @@ public class ImplementationGuide43_50 {
org.hl7.fhir.r4b.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent tgt = new org.hl7.fhir.r4b.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasCode())
tgt.getCodeElement().setValueAsString(src.getCode());
tgt.getCodeElement().setValueAsString(src.getCode().getCode());
if (src.hasValue())
tgt.setValueElement(String43_50.convertString(src.getValueElement()));
return tgt;
@ -2645,8 +2653,10 @@ public class ImplementationGuide43_50 {
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasReference())
tgt.setReference(Reference43_50.convertReference(src.getReference()));
if (src.hasExample())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getExample()));
if (src.hasExampleBooleanType())
tgt.setIsExampleElement(Boolean43_50.convertBoolean(src.getExampleBooleanType()));
if (src.hasExampleCanonicalType())
tgt.getProfile().add((Canonical43_50.convertCanonical(src.getExampleCanonicalType())));
if (src.hasRelativePath())
tgt.setRelativePathElement(Url43_50.convertUrl(src.getRelativePathElement()));
return tgt;
@ -2659,8 +2669,10 @@ public class ImplementationGuide43_50 {
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
if (src.hasReference())
tgt.setReference(Reference43_50.convertReference(src.getReference()));
if (src.hasExample())
tgt.setExample(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getExample()));
if (src.hasIsExample())
tgt.setExample(Boolean43_50.convertBoolean(src.getIsExampleElement()));
if (src.hasProfile())
tgt.setExample(Canonical43_50.convertCanonical(src.getProfile().get(0)));
if (src.hasRelativePath())
tgt.setRelativePathElement(Url43_50.convertUrl(src.getRelativePathElement()));
return tgt;

View File

@ -8,6 +8,8 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Time43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ContactPoint;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
import java.util.stream.Collectors;
@ -63,21 +65,21 @@ public class Location43_50 {
for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept43_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4b.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint43_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address43_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
tgt.setForm(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
tgt.setManagingOrganization(Reference43_50.convertReference(src.getManagingOrganization()));
if (src.hasPartOf())
tgt.setPartOf(Reference43_50.convertReference(src.getPartOf()));
for (org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
// tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r4b.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t));
return tgt;
}
@ -102,22 +104,23 @@ public class Location43_50 {
tgt.setModeElement(convertLocationMode(src.getModeElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept43_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
if (src.hasAddress())
tgt.setAddress(Address43_50.convertAddress(src.getAddress()));
if (src.hasPhysicalType())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getPhysicalType()));
if (src.hasForm())
tgt.setPhysicalType(CodeableConcept43_50.convertCodeableConcept(src.getForm()));
if (src.hasPosition())
tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
if (src.hasManagingOrganization())
tgt.setManagingOrganization(Reference43_50.convertReference(src.getManagingOrganization()));
if (src.hasPartOf())
tgt.setPartOf(Reference43_50.convertReference(src.getPartOf()));
for (org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
if (src.hasAvailabilityExceptions())
tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
// for (org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent t : src.getHoursOfOperation())
// tgt.addHoursOfOperation(convertLocationHoursOfOperationComponent(t));
// if (src.hasAvailabilityExceptions())
// tgt.setAvailabilityExceptionsElement(String43_50.convertString(src.getAvailabilityExceptionsElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t));
return tgt;
}
@ -231,40 +234,40 @@ public class Location43_50 {
tgt.setAltitudeElement(Decimal43_50.convertDecimal(src.getAltitudeElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(Location43_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
if (src.hasOpeningTime())
tgt.setOpeningTimeElement(Time43_50.convertTime(src.getOpeningTimeElement()));
if (src.hasClosingTime())
tgt.setClosingTimeElement(Time43_50.convertTime(src.getClosingTimeElement()));
return tgt;
}
public static org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
.map(Location43_50::convertDaysOfWeek)
.collect(Collectors.toList()));
if (src.hasAllDay())
tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
if (src.hasOpeningTime())
tgt.setOpeningTimeElement(Time43_50.convertTime(src.getOpeningTimeElement()));
if (src.hasClosingTime())
tgt.setClosingTimeElement(Time43_50.convertTime(src.getClosingTimeElement()));
return tgt;
}
//
// public static org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(Location43_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
// if (src.hasOpeningTime())
// tgt.setOpeningTimeElement(Time43_50.convertTime(src.getOpeningTimeElement()));
// if (src.hasClosingTime())
// tgt.setClosingTimeElement(Time43_50.convertTime(src.getClosingTimeElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent convertLocationHoursOfOperationComponent(org.hl7.fhir.r5.model.Location.LocationHoursOfOperationComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent tgt = new org.hl7.fhir.r4b.model.Location.LocationHoursOfOperationComponent();
// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt);
// tgt.setDaysOfWeek(src.getDaysOfWeek().stream()
// .map(Location43_50::convertDaysOfWeek)
// .collect(Collectors.toList()));
// if (src.hasAllDay())
// tgt.setAllDayElement(Boolean43_50.convertBoolean(src.getAllDayElement()));
// if (src.hasOpeningTime())
// tgt.setOpeningTimeElement(Time43_50.convertTime(src.getOpeningTimeElement()));
// if (src.hasClosingTime())
// tgt.setClosingTimeElement(Time43_50.convertTime(src.getClosingTimeElement()));
// return tgt;
// }
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DaysOfWeek> convertDaysOfWeek(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.DaysOfWeek> src) throws FHIRException {
if (src == null || src.isEmpty())

View File

@ -209,9 +209,9 @@ public class OperationDefinition43_50 {
if (src.hasMax())
tgt.setMaxElement(String43_50.convertString(src.getMaxElement()));
if (src.hasDocumentation())
tgt.setDocumentationElement(String43_50.convertString(src.getDocumentationElement()));
tgt.setDocumentationElement(String43_50.convertStringToMarkdown(src.getDocumentationElement()));
if (src.hasType())
tgt.getTypeElement().setValue(org.hl7.fhir.r5.model.Enumerations.FHIRAllTypes.fromCode(src.getType().toCode()));
tgt.getTypeElement().setValue(org.hl7.fhir.r5.model.Enumerations.FHIRTypes.fromCode(src.getType().toCode()));
for (org.hl7.fhir.r4b.model.CanonicalType t : src.getTargetProfile())
tgt.getTargetProfile().add(Canonical43_50.convertCanonical(t));
if (src.hasSearchType())

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExtendedContactDetail;
/*
Copyright (c) 2011+, HL7, Inc.
@ -53,7 +54,7 @@ public class Organization43_50 {
tgt.setNameElement(String43_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r4b.model.StringType t : src.getAlias()) tgt.getAlias().add(String43_50.convertString(t));
for (org.hl7.fhir.r4b.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
tgt.getContactFirstRep().addTelecom(ContactPoint43_50.convertContactPoint(t));
for (org.hl7.fhir.r4b.model.Address t : src.getAddress()) tgt.addAddress(Address43_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference43_50.convertReference(src.getPartOf()));
@ -77,8 +78,9 @@ public class Organization43_50 {
if (src.hasName())
tgt.setNameElement(String43_50.convertString(src.getNameElement()));
for (org.hl7.fhir.r5.model.StringType t : src.getAlias()) tgt.getAlias().add(String43_50.convertString(t));
for (org.hl7.fhir.r5.model.ContactPoint t : src.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
for (ExtendedContactDetail t1 : src.getContact())
for (org.hl7.fhir.r5.model.ContactPoint t : t1.getTelecom())
tgt.addTelecom(ContactPoint43_50.convertContactPoint(t));
for (org.hl7.fhir.r5.model.Address t : src.getAddress()) tgt.addAddress(Address43_50.convertAddress(t));
if (src.hasPartOf())
tgt.setPartOf(Reference43_50.convertReference(src.getPartOf()));

View File

@ -7,6 +7,9 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageConte
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
import java.util.stream.Collectors;
@ -74,15 +77,15 @@ public class SearchParameter43_50 {
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertResourceEnum(t));
for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration<AllResourceTypes>(new Enumerations.AllResourceTypesEnumFactory(), t.getCode()));
if (src.hasType())
tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression())
tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String43_50.convertString(src.getXpathElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String43_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
for (org.hl7.fhir.r4b.model.CodeType t : src.getTarget()) tgt.getTarget().add(Code43_50.convertResourceEnum(t));
if (src.hasMultipleOr())
tgt.setMultipleOrElement(Boolean43_50.convertBoolean(src.getMultipleOrElement()));
@ -133,15 +136,15 @@ public class SearchParameter43_50 {
tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCode())
tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement()));
for (CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertResourceEnum(t));
for (Enumeration<AllResourceTypes> t : src.getBase()) tgt.getBase().add(new org.hl7.fhir.r4b.model.CodeType(t.getCode()));
if (src.hasType())
tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement()));
if (src.hasExpression())
tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement()));
if (src.hasXpath())
tgt.setXpathElement(String43_50.convertString(src.getXpathElement()));
if (src.hasXpathUsage())
tgt.setXpathUsageElement(convertXPathUsageType(src.getXpathUsageElement()));
// if (src.hasXpath())
// tgt.setXpathElement(String43_50.convertString(src.getXpathElement()));
if (src.hasProcessingMode())
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
for (CodeType t : src.getTarget()) tgt.getTarget().add(Code43_50.convertResourceEnum(t));
if (src.hasMultipleOr())
tgt.setMultipleOrElement(Boolean43_50.convertBoolean(src.getMultipleOrElement()));
@ -159,35 +162,35 @@ public class SearchParameter43_50 {
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> convertXPathUsageType(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.SearchParameter.XPathUsageType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.XPathUsageTypeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeTypeEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case NORMAL:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NORMAL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NORMAL);
break;
case PHONETIC:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NULL);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.XPathUsageType> src) throws FHIRException {
static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.SearchParameter.XPathUsageType> convertXPathUsageType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchProcessingModeType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.SearchParameter.XPathUsageType> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.SearchParameter.XPathUsageTypeEnumFactory());

View File

@ -6,6 +6,10 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.ContactDet
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageContext43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4b.model.CodeType;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguages;
import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguagesEnumFactory;
/*
Copyright (c) 2011+, HL7, Inc.
@ -201,10 +205,10 @@ public class TerminologyCapabilities43_50 {
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case EXPLICIT:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.EXPLICIT);
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.INCOMPOSE);
break;
case ALL:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.ALL);
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.INCOMPOSEOREXPANSION);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.TerminologyCapabilities.CodeSearchSupport.NULL);
@ -219,10 +223,10 @@ public class TerminologyCapabilities43_50 {
org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.TerminologyCapabilities.CodeSearchSupport> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.TerminologyCapabilities.CodeSearchSupportEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt);
switch (src.getValue()) {
case EXPLICIT:
case INCOMPOSE:
tgt.setValue(org.hl7.fhir.r4b.model.TerminologyCapabilities.CodeSearchSupport.EXPLICIT);
break;
case ALL:
case INCOMPOSEOREXPANSION:
tgt.setValue(org.hl7.fhir.r4b.model.TerminologyCapabilities.CodeSearchSupport.ALL);
break;
default:
@ -319,7 +323,7 @@ public class TerminologyCapabilities43_50 {
tgt.setIsDefaultElement(Boolean43_50.convertBoolean(src.getIsDefaultElement()));
if (src.hasCompositional())
tgt.setCompositionalElement(Boolean43_50.convertBoolean(src.getCompositionalElement()));
for (org.hl7.fhir.r4b.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(Code43_50.convertCode(t));
for (org.hl7.fhir.r4b.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(new Enumeration<CommonLanguages>(new CommonLanguagesEnumFactory(), t.getCode()));
for (org.hl7.fhir.r4b.model.TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent t : src.getFilter())
tgt.addFilter(convertTerminologyCapabilitiesCodeSystemVersionFilterComponent(t));
for (org.hl7.fhir.r4b.model.CodeType t : src.getProperty()) tgt.getProperty().add(Code43_50.convertCode(t));
@ -337,7 +341,7 @@ public class TerminologyCapabilities43_50 {
tgt.setIsDefaultElement(Boolean43_50.convertBoolean(src.getIsDefaultElement()));
if (src.hasCompositional())
tgt.setCompositionalElement(Boolean43_50.convertBoolean(src.getCompositionalElement()));
for (org.hl7.fhir.r5.model.CodeType t : src.getLanguage()) tgt.getLanguage().add(Code43_50.convertCode(t));
for (Enumeration<CommonLanguages> t : src.getLanguage()) tgt.getLanguage().add(new CodeType(t.getCode()));
for (org.hl7.fhir.r5.model.TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent t : src.getFilter())
tgt.addFilter(convertTerminologyCapabilitiesCodeSystemVersionFilterComponent(t));
for (org.hl7.fhir.r5.model.CodeType t : src.getProperty()) tgt.getProperty().add(Code43_50.convertCode(t));

View File

@ -653,7 +653,7 @@ public class TestScript43_50 {
if (src.hasRequestURL())
tgt.setRequestURLElement(String43_50.convertString(src.getRequestURLElement()));
if (src.hasResource())
tgt.setResource(org.hl7.fhir.r5.model.TestScript.FHIRDefinedType.fromCode(src.getResource().toCode()));
tgt.setResource(src.getResource().toCode());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode())
@ -705,7 +705,7 @@ public class TestScript43_50 {
if (src.hasRequestURL())
tgt.setRequestURLElement(String43_50.convertString(src.getRequestURLElement()));
if (src.hasResource())
tgt.getResourceElement().setValueAsString(src.getResource().toCode());
tgt.getResourceElement().setValueAsString(src.getResource());
if (src.hasResponse())
tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
if (src.hasResponseCode())

View File

@ -21,4 +21,23 @@
public String getVersionedUrl() {
return hasVersion() ? getUrl()+"|"+getVersion() : getUrl();
}
}
public String oid() {
for (Identifier id : getIdentifier()) {
if (id.getValue().startsWith("urn:oid:")) {
return id.getValue().substring(8);
}
}
return null;
}
public String getOid() {
for (Identifier id : getIdentifier()) {
if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:")) {
return id.getValue().substring(8);
}
}
return null;
}

View File

@ -111,3 +111,23 @@
return getType().size() == 1 && Utilities.existsInList(getType().get(0).getCode(), "Element", "BackboneElement");
}
public boolean prohibited() {
return "0".equals(getMax());
}
public boolean hasFixedOrPattern() {
return hasFixed() || hasPattern();
}
public DataType getFixedOrPattern() {
return hasFixed() ? getFixed() : getPattern();
}
public boolean isProhibited() {
return "0".equals(getMax());
}
public boolean isRequired() {
return getMin() == 1;
}

View File

@ -14,8 +14,8 @@ import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
import org.hl7.fhir.r5.model.Enumerations.BindingStrength;
import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum;
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r5.utils.ToolingExtensions;
@ -309,8 +309,8 @@ public class Analyser {
if (!Utilities.existsInList(name, "Resource")) {
for (SearchParameter sp : definitions.getSearchParams().getList()) {
boolean relevant = false;
for (CodeType c : sp.getBase()) {
if (c.getValue().equals(name)) {
for (Enumeration<AllResourceTypes> c : sp.getBase()) {
if (c.getValue().toCode().equals(name)) {
relevant = true;
break;
}

View File

@ -54,7 +54,6 @@ import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.ResourceTypeEnum;
import org.hl7.fhir.r5.model.Enumerations.SearchParamType;
import org.hl7.fhir.r5.model.SearchParameter;
import org.hl7.fhir.r5.model.StringType;
@ -2364,7 +2363,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
*/
jdoc(indent, "@return Returns a reference to <code>this</code> for easy method chaining");
write(indent+"public " + className + " set"+getTitle(getElementName(e.getName(), false))+"(" + "List<"+listGenericType+"> the" + getTitle(getElementName(e.getName(), false)) + ") { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
/*
@ -2380,7 +2379,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
*/
jdoc(indent, "@return {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+")");
write(indent+"public "+tn+" add"+getTitle(getElementName(e.getName(), false))+"Element(){//2 \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
/*
@ -2388,7 +2387,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
*/
jdoc(indent, "@param value {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+")");
write(indent+"public "+className+" add"+getTitle(getElementName(e.getName(), false))+"("+simpleType+" value) { //1\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
/*
@ -2404,21 +2403,21 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
* addXXX() for repeatable composite
*/
write(indent+"public "+tn+" add"+getTitle(getElementName(e.getName(), false))+"() { //3\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
/*
* addXXX(foo) for repeatable composite
*/
write(indent+"public "+className+" add"+getTitle(getElementName(e.getName(), false))+"("+tn+" t) { //3\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
} else {
/*
* addXXX(foo) for repeatable composite
*/
write(indent+"public "+className+" add"+getTitle(getElementName(e.getName(), false))+"("+tn+" t) { //3\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
}
@ -2428,7 +2427,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
if (!"DomainResource".equals(className)) {
jdoc(indent, "@return The first repetition of repeating field {@link #"+getElementName(e.getName(), true)+"}, creating it if it does not already exist {2}");
write(indent+"public "+tn+" get"+getTitle(getElementName(e.getName(), false))+"FirstRep() { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
}
}
@ -2456,10 +2455,10 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
write("\r\n");
jdoc(indent, "@param value {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+"). This is the underlying object with id, value and extensions. The accessor \"get"+getTitle(getElementName(e.getName(), false))+"\" gives direct access to the value");
write(indent+"public "+className+" set"+getTitle(getElementName(e.getName(), false))+"Element("+tn+" value) { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
write(indent+"public "+simpleType+" get"+getTitle(getElementName(e.getName(), false))+"() { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
generateUnimplementedSetter(analysis, e, indent, className, tn, simpleType, analysis.getName());
@ -2471,16 +2470,18 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
} else {
jdoc(indent, "@return {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+")");
write(indent+"public "+tn+" get"+getTitle(getElementName(e.getName(), false))+"() { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
if (e.getType().size() > 1 && (tn.equals("DataType") || !tn.endsWith(".DataType"))) {
for (TypeRefComponent t : e.getType()) {
jdoc(indent, "@return {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+")");
String ttn = getTypename(t);
write(indent+"public "+ttn+" get"+getTitle(getElementName(e.getName(), false))+ttn+"() { throws FHIRException; \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+"public "+ttn+" get"+getTitle(getElementName(e.getName(), false))+ttn+"() { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
write(indent+"public boolean has"+getTitle(getElementName(e.getName(), false))+ttn+"() { \r\n");
write(indent+" return false;////K \r\n");
write(indent+"}\r\n");
}
}
write(indent+"public boolean has"+getTitle(getElementName(e.getName(), false))+"() { \r\n");
@ -2488,7 +2489,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
write(indent+"}\r\n");
jdoc(indent, "@param value {@link #"+getElementName(e.getName(), true)+"} ("+replaceTitle(analysis.getName(), e.getDefinition())+")");
write(indent+"public "+className+" set"+getTitle(getElementName(e.getName(), false))+"("+tn+" value) { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
write("\r\n");
}
@ -2500,7 +2501,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent
private void generateUnimplementedSetter(Analysis analysis, ElementDefinition e, String indent, String className, String tn, String simpleType, String rn) throws IOException {
jdoc(indent, "@param value "+replaceTitle(rn, e.getDefinition()));
write(indent+"public "+className+" set"+getTitle(getElementName(e.getName(), false))+"("+simpleType+" value) { \r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\");\r\n");
write(indent+" throw new Error(\"The resource type \\\""+analysis.getName()+"\\\" does not implement the property \\\""+e.getName()+"\\\"\"); \r\n");
write(indent+"}\r\n");
}
}

View File

@ -13,6 +13,8 @@ import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.ToolingExtensions;
import org.hl7.fhir.utilities.Utilities;
public class Definitions {
@ -77,25 +79,31 @@ public class Definitions {
return sd;
}
public void fix() {
StructureDefinition aa = structures.get("http://hl7.org/fhir/StructureDefinition/ArtifactAssessment");
if (aa != null) {
for (ElementDefinition ed : aa.getSnapshot().getElement()) {
fixAATypes(ed);
}
for (ElementDefinition ed : aa.getDifferential().getElement()) {
fixAATypes(ed);
// StructureDefinition aa = structures.get("http://hl7.org/fhir/StructureDefinition/ArtifactAssessment");
// if (aa != null) {
// for (ElementDefinition ed : aa.getSnapshot().getElement()) {
// fixAATypes(ed);
// }
// for (ElementDefinition ed : aa.getDifferential().getElement()) {
// fixAATypes(ed);
// }
// }
for (StructureDefinition sd : structures.getList()) {
if (sd.hasExtension(ToolingExtensions.EXT_RESOURCE_IMPLEMENTS) &&
!Utilities.existsInList(sd.getType(), "MedicationKnowledge", "ObservationDefinition", "SpecimenDefinition")) {
sd.setBaseDefinition(ToolingExtensions.readStringExtension(sd, ToolingExtensions.EXT_RESOURCE_IMPLEMENTS));
}
}
}
private void fixAATypes(ElementDefinition ed) {
if (ed.getPath().equals("ArtifactAssessment.approvalDate")) {
ed.getTypeFirstRep().setCode("date");
}
if (ed.getPath().equals("ArtifactAssessment.lastReviewDate")) {
ed.getTypeFirstRep().setCode("date");
}
}
// private void fixAATypes(ElementDefinition ed) {
// if (ed.getPath().equals("ArtifactAssessment.approvalDate")) {
// ed.getTypeFirstRep().setCode("date");
// }
// if (ed.getPath().equals("ArtifactAssessment.lastReviewDate")) {
// ed.getTypeFirstRep().setCode("date");
// }
// }

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