use of org.hl7.fhir.r5.model.CodeableReference in project org.hl7.fhir.core by hapifhir.
the class DeviceUseStatement30_50 method convertDeviceUseStatement.
public static org.hl7.fhir.dstu3.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.r5.model.DeviceUsage src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.DeviceUseStatement tgt = new org.hl7.fhir.dstu3.model.DeviceUseStatement();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertDeviceUseStatementStatus(src.getStatusElement()));
if (src.hasPatient())
tgt.setSubject(Reference30_50.convertReference(src.getPatient()));
if (src.hasTiming())
tgt.setTiming(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getTiming()));
if (src.hasDateAsserted())
tgt.setRecordedOnElement(DateTime30_50.convertDateTime(src.getDateAssertedElement()));
if (src.hasInformationSource())
tgt.setSource(Reference30_50.convertReference(src.getInformationSource()));
if (src.getDevice().hasReference())
tgt.setDevice(Reference30_50.convertReference(src.getDevice().getReference()));
for (CodeableReference t : src.getReason()) if (t.hasConcept())
tgt.addIndication(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
if (src.getBodySite().hasConcept())
tgt.setBodySite(CodeableConcept30_50.convertCodeableConcept(src.getBodySite().getConcept()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
return tgt;
}
use of org.hl7.fhir.r5.model.CodeableReference in project org.hl7.fhir.core by hapifhir.
the class CareTeam30_50 method convertCareTeam.
public static org.hl7.fhir.dstu3.model.CareTeam convertCareTeam(org.hl7.fhir.r5.model.CareTeam src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.CareTeam tgt = new org.hl7.fhir.dstu3.model.CareTeam();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertCareTeamStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory()) tgt.addCategory(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
if (src.hasPeriod())
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
for (org.hl7.fhir.r5.model.CareTeam.CareTeamParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertCareTeamParticipantComponent(t));
for (CodeableReference t : src.getReason()) if (t.hasConcept())
tgt.addReasonCode(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
for (CodeableReference t : src.getReason()) if (t.hasReference())
tgt.addReasonReference(Reference30_50.convertReference(t.getReference()));
for (org.hl7.fhir.r5.model.Reference t : src.getManagingOrganization()) tgt.addManagingOrganization(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
return tgt;
}
use of org.hl7.fhir.r5.model.CodeableReference in project org.hl7.fhir.core by hapifhir.
the class AllergyIntolerance30_50 method convertAllergyIntoleranceReactionComponent.
public static org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent convertAllergyIntoleranceReactionComponent(org.hl7.fhir.r5.model.AllergyIntolerance.AllergyIntoleranceReactionComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent tgt = new org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceReactionComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasSubstance())
tgt.setSubstance(CodeableConcept30_50.convertCodeableConcept(src.getSubstance()));
for (CodeableReference t : src.getManifestation()) if (t.hasConcept())
tgt.addManifestation(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasOnset())
tgt.setOnsetElement(DateTime30_50.convertDateTime(src.getOnsetElement()));
if (src.hasSeverity())
tgt.setSeverityElement(convertAllergyIntoleranceSeverity(src.getSeverityElement()));
if (src.hasExposureRoute())
tgt.setExposureRoute(CodeableConcept30_50.convertCodeableConcept(src.getExposureRoute()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
return tgt;
}
use of org.hl7.fhir.r5.model.CodeableReference in project org.hl7.fhir.core by hapifhir.
the class Reference30_50 method convertReferenceToCodableReference.
public static CodeableReference convertReferenceToCodableReference(org.hl7.fhir.dstu3.model.Reference src) {
CodeableReference tgt = new CodeableReference();
tgt.setReference(convertReference(src));
return tgt;
}
use of org.hl7.fhir.r5.model.CodeableReference in project org.hl7.fhir.core by hapifhir.
the class Reference30_50 method convertCodeableConceptToCodableReference.
public static CodeableReference convertCodeableConceptToCodableReference(org.hl7.fhir.dstu3.model.CodeableConcept src) {
CodeableReference tgt = new CodeableReference();
tgt.setConcept(CodeableConcept30_50.convertCodeableConcept(src));
return tgt;
}
Aggregations