Merge pull request #865 from hapifhir/gg-202207-r5-update

Gg 202207 r5 update
This commit is contained in:
Grahame Grieve 2022-07-18 18:56:24 +10:00 committed by GitHub
commit 335ca6aa5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
331 changed files with 37043 additions and 84207 deletions

View File

@ -1,7 +1,9 @@
package org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50;
import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.dstu2.model.DateType;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.DateTimeType;
public class Date10_50 {
public static org.hl7.fhir.r5.model.DateType convertDate(org.hl7.fhir.dstu2.model.DateType src) throws FHIRException {
@ -27,4 +29,16 @@ public class Date10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
public static DateTimeType convertDatetoDateTime(DateType src) {
org.hl7.fhir.r5.model.DateTimeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.DateTimeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.DateTimeType();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
public static DateType convertDateTimeToDate(DateTimeType src) {
org.hl7.fhir.dstu2.model.DateType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.DateType(src.getValueAsString()) : new org.hl7.fhir.dstu2.model.DateType();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -15,4 +15,17 @@ public class String10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.dstu2.model.StringType convertMarkdownToString(org.hl7.fhir.r5.model.MarkdownType src) throws FHIRException {
org.hl7.fhir.dstu2.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.dstu2.model.StringType(src.getValueAsString()) : new org.hl7.fhir.dstu2.model.StringType();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.MarkdownType convertStringToMarkdown(org.hl7.fhir.dstu2.model.StringType src) throws FHIRException {
org.hl7.fhir.r5.model.MarkdownType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.MarkdownType (src.getValueAsString()) : new org.hl7.fhir.r5.model.MarkdownType ();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -23,8 +23,8 @@ public class Appointment10_50 {
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertAppointmentStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.setType(CodeableConcept10_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableReference t : src.getServiceType())
tgt.setType(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
if (src.hasPriority())
tgt.setPriorityElement(convertAppointmentPriority(src.getPriority()));
if (src.hasDescriptionElement())
@ -73,7 +73,7 @@ public class Appointment10_50 {
if (src.hasStatus())
tgt.setStatusElement(convertAppointmentStatus(src.getStatusElement()));
if (src.hasType())
tgt.addServiceType(CodeableConcept10_50.convertCodeableConcept(src.getType()));
tgt.addServiceType().setConcept(CodeableConcept10_50.convertCodeableConcept(src.getType()));
if (src.hasPriorityElement())
tgt.setPriority(convertAppointmentPriority(src.getPriorityElement()));
if (src.hasDescriptionElement())

View File

@ -21,7 +21,7 @@ public class Basic10_50 {
if (src.hasSubject())
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
if (src.hasCreatedElement())
tgt.setCreatedElement(Date10_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date10_50.convertDatetoDateTime(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference10_50.convertReference(src.getAuthor()));
return tgt;
@ -39,7 +39,7 @@ public class Basic10_50 {
if (src.hasSubject())
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
if (src.hasCreatedElement())
tgt.setCreatedElement(Date10_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date10_50.convertDateTimeToDate(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference10_50.convertReference(src.getAuthor()));
return tgt;

View File

@ -27,8 +27,8 @@ public class CarePlan10_50 {
if (src.hasPeriod())
tgt.setPeriod(Period10_50.convertPeriod(src.getPeriod()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getAuthor())
if (!tgt.hasAuthor())
tgt.setAuthor(Reference10_50.convertReference(t));
if (!tgt.hasCustodian())
tgt.setCustodian(Reference10_50.convertReference(t));
else
tgt.addContributor(Reference10_50.convertReference(t));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory())
@ -58,8 +58,8 @@ public class CarePlan10_50 {
tgt.setContext(Reference10_50.convertReference(src.getEncounter()));
if (src.hasPeriod())
tgt.setPeriod(Period10_50.convertPeriod(src.getPeriod()));
if (src.hasAuthor())
tgt.addAuthor(Reference10_50.convertReference(src.getAuthor()));
if (src.hasCustodian())
tgt.addAuthor(Reference10_50.convertReference(src.getCustodian()));
for (org.hl7.fhir.r5.model.Reference t : src.getContributor()) tgt.addAuthor(Reference10_50.convertReference(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCategory())
tgt.addCategory(CodeableConcept10_50.convertCodeableConcept(t));

View File

@ -8,9 +8,11 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Codeab
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.ContactPoint10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identifier10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.*;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.String14_50;
import org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.ConceptMap;
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
import org.hl7.fhir.r5.model.Enumeration;
@ -58,9 +60,9 @@ public class ConceptMap10_50 {
if (src.hasCopyright())
tgt.setCopyright(src.getCopyright());
org.hl7.fhir.r5.model.DataType r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSource());
tgt.setSource(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r);
tgt.setSourceScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r);
r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTarget());
tgt.setTarget(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r);
tgt.setTargetScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r);
for (org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent t : src.getElement()) {
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> ws = convertSourceElementComponent(t);
for (SourceElementComponentWrapper<ConceptMap.SourceElementComponent> w : ws)
@ -104,10 +106,10 @@ public class ConceptMap10_50 {
tgt.setRequirements(src.getPurpose());
if (src.hasCopyright())
tgt.setCopyright(src.getCopyright());
if (src.hasSource())
tgt.setSource(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSource()));
if (src.hasTarget())
tgt.setTarget(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTarget()));
if (src.hasSourceScope())
tgt.setSource(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSourceScope()));
if (src.hasTargetScope())
tgt.setTarget(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTargetScope()));
for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup())
for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : g.getElement())
tgt.addElement(convertSourceElementComponent(t, g));
@ -215,10 +217,11 @@ public class ConceptMap10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasPropertyElement())
tgt.setElementElement(Uri10_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setCodeSystem(src.getSystem());
if (src.hasValueElement())
tgt.setCodeElement(String10_50.convertString(src.getValueElement()));
if (src.hasValueCoding()) {
tgt.setCode(src.getValueCoding().getCode());
} else if (src.hasValue()) {
tgt.setCode(src.getValue().primitiveValue());
}
return tgt;
}
@ -229,10 +232,7 @@ public class ConceptMap10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasElementElement())
tgt.setPropertyElement(Uri10_50.convertUri(src.getElementElement()));
if (src.hasCodeSystem())
tgt.setSystem(src.getCodeSystem());
if (src.hasCodeElement())
tgt.setValueElement(String10_50.convertString(src.getCodeElement()));
tgt.setValue(String10_50.convertString(src.getCodeElement()));
return tgt;
}

View File

@ -1,10 +1,20 @@
package org.hl7.fhir.convertors.conv10_50.resources10_50;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.Reference10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.CodeableConcept10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identifier10_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_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.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
public class Condition10_50 {
@ -19,9 +29,10 @@ public class Condition10_50 {
tgt.setPatient(Reference10_50.convertReference(src.getSubject()));
if (src.hasEncounter())
tgt.setEncounter(Reference10_50.convertReference(src.getEncounter()));
if (src.hasAsserter())
tgt.setAsserter(Reference10_50.convertReference(src.getAsserter()));
if (src.hasRecordedDate())
for (org.hl7.fhir.r5.model.Condition.ConditionParticipantComponent t : src.getParticipant()) {
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant"))
tgt.setAsserter(Reference10_50.convertReference(t.getActor()));
} if (src.hasRecordedDate())
tgt.setDateRecorded(src.getRecordedDate());
if (src.hasCode())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
@ -39,7 +50,7 @@ public class Condition10_50 {
tgt.setAbatement(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAbatement()));
if (src.hasStage())
tgt.setStage(convertConditionStageComponent(src.getStageFirstRep()));
for (org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
for (CodeableReference t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getBodySite())
tgt.addBodySite(CodeableConcept10_50.convertCodeableConcept(t));
@ -58,7 +69,7 @@ public class Condition10_50 {
if (src.hasEncounter())
tgt.setEncounter(Reference10_50.convertReference(src.getEncounter()));
if (src.hasAsserter())
tgt.setAsserter(Reference10_50.convertReference(src.getAsserter()));
tgt.addParticipant().setFunction(new CodeableConcept(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant", "Informant"))).setActor(Reference10_50.convertReference(src.getAsserter()));
if (src.hasDateRecorded())
tgt.setRecordedDate(src.getDateRecorded());
if (src.hasCode())
@ -78,7 +89,7 @@ public class Condition10_50 {
if (src.hasStage())
tgt.addStage(convertConditionStageComponent(src.getStage()));
for (org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
tgt.getEvidence().addAll(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getBodySite())
tgt.addBodySite(CodeableConcept10_50.convertCodeableConcept(t));
return tgt;
@ -102,25 +113,34 @@ public class Condition10_50 {
return null;
}
public static org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
if (src == null || src.isEmpty())
public static List<org.hl7.fhir.r5.model.CodeableReference> convertConditionEvidenceComponent(org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
if (src == null)
return null;
List<org.hl7.fhir.r5.model.CodeableReference> list = new ArrayList<>();
if (src.hasCode()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
tgt.setConcept(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
list.add(tgt);
}
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
tgt.setReference(Reference10_50.convertReference(t));
list.add(tgt);
}
return list;
}
public static org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.CodeableReference src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept cc : src.getCode())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(cc));
for (org.hl7.fhir.r5.model.Reference t : src.getDetail()) tgt.addDetail(Reference10_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasCode())
tgt.addCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getDetail()) tgt.addDetail(Reference10_50.convertReference(t));
if (src.hasConcept())
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getConcept()));
if (src.hasReference())
tgt.addDetail(Reference10_50.convertReference(src.getReference()));
return tgt;
}

View File

@ -7,7 +7,8 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Mark
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.dstu2.model.CodeableConcept;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.DocumentReference.DocumentAttestationMode;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceAttesterComponent;
public class DocumentReference10_50 {
@ -63,7 +64,7 @@ public class DocumentReference10_50 {
if (src.hasCustodian())
tgt.setCustodian(Reference10_50.convertReference(src.getCustodian()));
for (DocumentReferenceAttesterComponent t : src.getAttester()) {
if (t.getMode() == DocumentAttestationMode.OFFICIAL)
if (t.getMode().hasCoding("http://hl7.org/fhir/composition-attestation-mode", "official"))
tgt.setAuthenticator(Reference10_50.convertReference(t.getParty()));
}
if (src.hasDate())
@ -102,7 +103,8 @@ public class DocumentReference10_50 {
if (src.hasCustodian())
tgt.setCustodian(Reference10_50.convertReference(src.getCustodian()));
if (src.hasAuthenticator())
tgt.addAttester().setMode(DocumentAttestationMode.OFFICIAL).setParty(Reference10_50.convertReference(src.getAuthenticator()));
tgt.addAttester().setMode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new Coding("http://hl7.org/fhir/composition-attestation-mode","official", "Official")))
.setParty(Reference10_50.convertReference(src.getAuthenticator()));
if (src.hasCreated())
tgt.setDate(src.getCreated());
if (src.hasStatus())
@ -128,8 +130,6 @@ public class DocumentReference10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment10_50.convertAttachment(src.getAttachment()));
if (src.hasFormat())
tgt.addFormat(Coding10_50.convertCoding(src.getFormat()));
return tgt;
}
@ -140,15 +140,15 @@ public class DocumentReference10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment10_50.convertAttachment(src.getAttachment()));
for (org.hl7.fhir.dstu2.model.Coding t : src.getFormat()) tgt.setFormat(Coding10_50.convertCoding(t));
return tgt;
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.r5.model.DocumentReference src, org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent tgt) throws FHIRException {
if (src.hasEncounter())
tgt.setEncounter(Reference10_50.convertReference(src.getEncounterFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasContext())
tgt.setEncounter(Reference10_50.convertReference(src.getContextFirstRep()));
for (CodeableReference t : src.getEvent())
if (t.hasConcept())
tgt.addEvent(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
if (src.hasPeriod())
tgt.setPeriod(Period10_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -157,15 +157,15 @@ public class DocumentReference10_50 {
tgt.setPracticeSetting(CodeableConcept10_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference10_50.convertReference(src.getSourcePatientInfo()));
for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextComponent src, org.hl7.fhir.r5.model.DocumentReference tgt) throws FHIRException {
if (src.hasEncounter())
tgt.addEncounter(Reference10_50.convertReference(src.getEncounter()));
tgt.addContext(Reference10_50.convertReference(src.getEncounter()));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept10_50.convertCodeableConcept(t));
tgt.addEvent(new CodeableReference().setConcept(CodeableConcept10_50.convertCodeableConcept(t)));
if (src.hasPeriod())
tgt.setPeriod(Period10_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -174,8 +174,8 @@ public class DocumentReference10_50 {
tgt.setPracticeSetting(CodeableConcept10_50.convertCodeableConcept(src.getPracticeSetting()));
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));
// for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
public static org.hl7.fhir.r5.model.Reference convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {

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_()));
tgt.setClass_( convertEncounterClass(src.getClass_().getCodingFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(t));
if (src.hasPriority())
@ -64,7 +64,7 @@ public class Encounter10_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEncounterState(src.getStatusElement()));
if (src.hasClass_())
tgt.setClass_(convertEncounterClass(src.getClass_()));
tgt.setClass_(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())

View File

@ -198,7 +198,7 @@ public class ImplementationGuide10_50 {
if (src.hasName())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t);
tn.setGroupingId(tgt.getId());
@ -233,7 +233,7 @@ public class ImplementationGuide10_50 {
if (src.hasName())
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasSourceReference())
tgt.setReference(Reference10_50.convertReference(src.getSourceReference()));
else if (src.hasSourceUriType())

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_50.resources10_50;
import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.Reference10_50;
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.DateTime10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.exceptions.FHIRException;
@ -98,8 +99,8 @@ public class MedicationDispense10_50 {
tgt.setTextElement(String10_50.convertString(src.getTextElement()));
if (src.hasTiming())
tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
if (src.hasAsNeededBooleanType())
tgt.setAsNeededElement(Boolean10_50.convertBoolean(src.getAsNeededBooleanType()));
if (src.hasSiteCodeableConcept())
tgt.setSite(CodeableConcept10_50.convertCodeableConcept(src.getSiteCodeableConcept()));
if (src.hasRoute())
@ -114,7 +115,7 @@ public class MedicationDispense10_50 {
dr.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getRate()));
}
if (src.hasMaxDosePerPeriod())
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
tgt.addMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
return tgt;
}
@ -125,13 +126,14 @@ public class MedicationDispense10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
tgt.setText(src.getText());
tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
if (src.hasAsNeeded())
tgt.setAsNeeded(Boolean10_50.convertBoolean(src.getAsNeededElement()));
tgt.setSite(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSite()));
tgt.setRoute(CodeableConcept10_50.convertCodeableConcept(src.getRoute()));
tgt.setMethod(CodeableConcept10_50.convertCodeableConcept(src.getMethod()));
if (src.hasDoseAndRate() && src.getDoseAndRate().get(0).hasDose())
tgt.setDose(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getDoseAndRate().get(0).getDose()));
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriodFirstRep()));
if (src.hasDoseAndRate() && src.getDoseAndRate().get(0).hasRate())
tgt.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getDoseAndRate().get(0).getRate()));
return tgt;

View File

@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.CodeableConcept10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Ratio10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Timing10_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.Dosage;
@ -15,8 +16,8 @@ public class MedicationOrder10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasTextElement()) tgt.setTextElement(String10_50.convertString(src.getTextElement()));
if (src.hasTiming()) tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
if (src.hasAsNeededBooleanType())
tgt.setAsNeededElement(Boolean10_50.convertBoolean(src.getAsNeededBooleanType()));
if (src.hasSiteCodeableConcept())
tgt.setSite(CodeableConcept10_50.convertCodeableConcept(src.getSiteCodeableConcept()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept10_50.convertCodeableConcept(src.getRoute()));
@ -28,7 +29,7 @@ public class MedicationOrder10_50 {
if (src.hasRate())
dr.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getRate()));
}
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.addMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
return tgt;
}
@ -39,7 +40,7 @@ public class MedicationOrder10_50 {
if (src.hasTextElement()) tgt.setTextElement(String10_50.convertString(src.getTextElement()));
if (src.hasTiming()) tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
tgt.setAsNeeded(Boolean10_50.convertBoolean(src.getAsNeededElement()));
if (src.hasSite())
tgt.setSite(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSite()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept10_50.convertCodeableConcept(src.getRoute()));
@ -48,7 +49,7 @@ public class MedicationOrder10_50 {
tgt.setDose(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getDoseAndRate().get(0).getDose()));
if (src.hasDoseAndRate() && src.getDoseAndRate().get(0).hasRate())
tgt.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getDoseAndRate().get(0).getRate()));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriodFirstRep()));
return tgt;
}
}

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Codeab
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identifier10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Ratio10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Timing10_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.DateTime10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
import org.hl7.fhir.exceptions.FHIRException;
@ -33,7 +34,7 @@ public class MedicationStatement10_50 {
if (src.hasEffective())
tgt.setEffective(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getEffective()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference10_50.convertReference(src.getInformationSource()));
tgt.setInformationSource(Reference10_50.convertReference(src.getInformationSourceFirstRep()));
for (org.hl7.fhir.r5.model.Reference t : src.getDerivedFrom())
tgt.addSupportingInformation(Reference10_50.convertReference(t));
if (src.hasDateAsserted())
@ -63,7 +64,7 @@ public class MedicationStatement10_50 {
if (src.hasEffective())
tgt.setEffective(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getEffective()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference10_50.convertReference(src.getInformationSource()));
tgt.addInformationSource(Reference10_50.convertReference(src.getInformationSource()));
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation())
tgt.addDerivedFrom(Reference10_50.convertReference(t));
if (src.hasDateAsserted())
@ -84,8 +85,8 @@ public class MedicationStatement10_50 {
tgt.setTextElement(String10_50.convertString(src.getTextElement()));
if (src.hasTiming())
tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
if (src.hasAsNeededBooleanType())
tgt.setAsNeededElement(Boolean10_50.convertBoolean(src.getAsNeededBooleanType()));
if (src.hasSiteCodeableConcept())
tgt.setSite(CodeableConcept10_50.convertCodeableConcept(src.getSiteCodeableConcept()));
if (src.hasRoute())
@ -98,7 +99,7 @@ public class MedicationStatement10_50 {
dr.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getRate()));
}
if (src.hasMaxDosePerPeriod())
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
tgt.addMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
return tgt;
}
@ -112,7 +113,7 @@ public class MedicationStatement10_50 {
if (src.hasTiming())
tgt.setTiming(Timing10_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getAsNeeded()));
tgt.setAsNeeded(Boolean10_50.convertBoolean(src.getAsNeededElement()));
if (src.hasSite())
tgt.setSite(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSite()));
if (src.hasRoute())
@ -122,7 +123,7 @@ public class MedicationStatement10_50 {
if (src.hasDoseAndRate() && src.getDoseAndRate().get(0).hasRate())
tgt.setRate(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getDoseAndRate().get(0).getRate()));
if (src.hasMaxDosePerPeriod())
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriod()));
tgt.setMaxDosePerPeriod(Ratio10_50.convertRatio(src.getMaxDosePerPeriodFirstRep()));
return tgt;
}

View File

@ -94,8 +94,8 @@ public class MessageHeader10_50 {
return null;
org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasIdentifierElement())
tgt.setIdentifierElement(Id10_50.convertId(src.getIdentifierElement()));
if (src.hasIdentifier())
tgt.setIdentifierElement(new org.hl7.fhir.dstu2.model.IdType(src.getIdentifier().getValue()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())
@ -109,7 +109,7 @@ public class MessageHeader10_50 {
org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasIdentifierElement())
tgt.setIdentifierElement(Id10_50.convertId(src.getIdentifierElement()));
tgt.setIdentifier(new org.hl7.fhir.r5.model.Identifier().setValue(src.getIdentifier()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())

View File

@ -50,12 +50,12 @@ public class Organization10_50 {
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()));
for (org.hl7.fhir.r5.model.Organization.OrganizationContactComponent t : src.getContact())
for (org.hl7.fhir.r5.model.ExtendedContactDetail t : src.getContact())
tgt.addContact(convertOrganizationContactComponent(t));
return tgt;
}
public static org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.ExtendedContactDetail src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent();
@ -71,10 +71,10 @@ public class Organization10_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.ExtendedContactDetail convertOrganizationContactComponent(org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r5.model.Organization.OrganizationContactComponent();
org.hl7.fhir.r5.model.ExtendedContactDetail tgt = new org.hl7.fhir.r5.model.ExtendedContactDetail();
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasPurpose())
tgt.setPurpose(CodeableConcept10_50.convertCodeableConcept(src.getPurpose()));

View File

@ -159,7 +159,7 @@ public class Provenance10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.DERIVATION);
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.INSTANTIATES);
break;
case REVISION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.REVISION);
@ -183,7 +183,7 @@ public class Provenance10_50 {
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRoleEnumFactory());
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
case INSTANTIATES:
tgt.setValue(org.hl7.fhir.dstu2.model.Provenance.ProvenanceEntityRole.DERIVATION);
break;
case REVISION:

View File

@ -7,6 +7,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.String10_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeableReference;
public class Schedule10_50 {
@ -17,8 +18,9 @@ public class Schedule10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.addType(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
if (src.hasActor())
tgt.setActor(Reference10_50.convertReference(src.getActorFirstRep()));
if (src.hasPlanningHorizon())
@ -36,7 +38,7 @@ public class Schedule10_50 {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getType())
tgt.addServiceType(CodeableConcept10_50.convertCodeableConcept(t));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept10_50.convertCodeableConcept(t)));
if (src.hasActor())
tgt.addActor(Reference10_50.convertReference(src.getActor()));
if (src.hasPlanningHorizon())

View File

@ -120,10 +120,10 @@ public class SearchParameter10_50 {
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NEARBY);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.DISTANCE);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
@ -147,12 +147,6 @@ public class SearchParameter10_50 {
case PHONETIC:
tgt.setValue(org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.NEARBY);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.DISTANCE);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.dstu2.model.SearchParameter.XPathUsageType.OTHER);
break;

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Bool
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Instant10_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.CodeableReference;
public class Slot10_50 {
@ -19,7 +20,7 @@ public class Slot10_50 {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
if (src.hasType())
tgt.addServiceType(CodeableConcept10_50.convertCodeableConcept(src.getType()));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept10_50.convertCodeableConcept(src.getType())));
if (src.hasSchedule())
tgt.setSchedule(Reference10_50.convertReference(src.getSchedule()));
if (src.hasStartElement())
@ -40,8 +41,9 @@ public class Slot10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.setType(CodeableConcept10_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.setType(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
if (src.hasSchedule())
tgt.setSchedule(Reference10_50.convertReference(src.getSchedule()));
if (src.hasStartElement())

View File

@ -376,7 +376,7 @@ public class TestScript10_50 {
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
if (src.hasType())
tgt.setType(Coding10_50.convertCoding(src.getType()));
tgt.setResource(src.getResource().toCode());
tgt.setResource(src.getResource());
if (src.hasLabelElement())
tgt.setLabelElement(String10_50.convertString(src.getLabelElement()));
if (src.hasDescriptionElement())
@ -412,7 +412,7 @@ public class TestScript10_50 {
if (src.hasType())
tgt.setType(Coding10_50.convertCoding(src.getType()));
if (src.hasResource())
tgt.setResource(TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasLabelElement())
tgt.setLabelElement(String10_50.convertString(src.getLabelElement()));
if (src.hasDescriptionElement())

View File

@ -11,6 +11,7 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.*;
import org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.ConceptMap;
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
import org.hl7.fhir.r5.model.Enumeration;
@ -58,9 +59,9 @@ public class ConceptMap14_50 {
if (src.hasCopyright())
tgt.setCopyright(src.getCopyright());
org.hl7.fhir.r5.model.DataType tt = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getSource());
tgt.setSource(tt instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) tt).getReference()) : tt);
tgt.setSourceScope(tt instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) tt).getReference()) : tt);
tt = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTarget());
tgt.setTarget(tt instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) tt).getReference()) : tt);
tgt.setTargetScope(tt instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) tt).getReference()) : tt);
for (org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent t : src.getElement()) {
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> ws = convertSourceElementComponent(t);
for (SourceElementComponentWrapper<ConceptMap.SourceElementComponent> w : ws)
@ -104,18 +105,18 @@ public class ConceptMap14_50 {
tgt.setRequirements(src.getPurpose());
if (src.hasCopyright())
tgt.setCopyright(src.getCopyright());
if (src.getSource() instanceof CanonicalType)
tgt.setSource(Reference14_50.convertCanonicalToReference((CanonicalType) src.getSource()));
else if (src.hasSource())
tgt.setSource(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getSource()));
if (src.getTarget() instanceof CanonicalType)
tgt.setTarget(Reference14_50.convertCanonicalToReference((CanonicalType) src.getTarget()));
else if (src.hasTarget())
tgt.setTarget(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTarget()));
if (src.hasSource())
tgt.setSource(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getSource()));
if (src.hasTarget())
tgt.setTarget(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTarget()));
if (src.getSourceScope() instanceof CanonicalType)
tgt.setSource(Reference14_50.convertCanonicalToReference((CanonicalType) src.getSourceScope()));
else if (src.hasSourceScope())
tgt.setSource(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getSourceScope()));
if (src.getTargetScope() instanceof CanonicalType)
tgt.setTarget(Reference14_50.convertCanonicalToReference((CanonicalType) src.getTargetScope()));
else if (src.hasTargetScope())
tgt.setTarget(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTargetScope()));
if (src.hasSourceScope())
tgt.setSource(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getSourceScope()));
if (src.hasTargetScope())
tgt.setTarget(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTargetScope()));
for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup())
for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : g.getElement())
tgt.addElement(convertSourceElementComponent(t, g));
@ -223,10 +224,12 @@ public class ConceptMap14_50 {
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasPropertyElement())
tgt.setElementElement(Uri14_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasValueElement())
tgt.setCodeElement(String14_50.convertString(src.getValueElement()));
if (src.hasValueCoding()) {
tgt.setSystem(src.getValueCoding().getSystem());
tgt.setCode(src.getValueCoding().getCode());
} else if (src.hasValue()) {
tgt.setCode(src.getValue().primitiveValue());
}
return tgt;
}
@ -237,10 +240,11 @@ public class ConceptMap14_50 {
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
if (src.hasElementElement())
tgt.setPropertyElement(Uri14_50.convertUri(src.getElementElement()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasCodeElement())
tgt.setValueElement(String14_50.convertString(src.getCodeElement()));
if (src.hasSystem()) {
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode()));
} else if (src.hasCodeElement()) {
tgt.setValue(String14_50.convertString(src.getCodeElement()));
}
return tgt;
}

View File

@ -209,7 +209,7 @@ public class ImplementationGuide14_50 {
if (src.hasName())
tgt.setNameElement(String14_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String14_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String14_50.convertStringToMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t);
tn.setGroupingId(tgt.getId());
@ -253,7 +253,7 @@ public class ImplementationGuide14_50 {
if (src.hasName())
tgt.setNameElement(String14_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String14_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String14_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasSourceReference())
tgt.setReference(Reference14_50.convertReference(src.getSourceReference()));
else if (src.hasSourceUriType())

View File

@ -132,12 +132,7 @@ public class SearchParameter14_50 {
case PHONETIC:
tgt.setValue(org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType.NEARBY);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType.DISTANCE);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.dstu2016may.model.SearchParameter.XPathUsageType.OTHER);
break;
@ -161,10 +156,10 @@ public class SearchParameter14_50 {
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NEARBY);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.DISTANCE);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);

View File

@ -172,8 +172,6 @@ public class Resource30_50 {
return Schedule30_50.convertSchedule((org.hl7.fhir.dstu3.model.Schedule) src);
if (src instanceof org.hl7.fhir.dstu3.model.SearchParameter)
return SearchParameter30_50.convertSearchParameter((org.hl7.fhir.dstu3.model.SearchParameter) src);
if (src instanceof org.hl7.fhir.dstu3.model.Sequence)
return Sequence30_50.convertSequence((org.hl7.fhir.dstu3.model.Sequence) src);
if (src instanceof org.hl7.fhir.dstu3.model.Slot) return Slot30_50.convertSlot((org.hl7.fhir.dstu3.model.Slot) src);
if (src instanceof org.hl7.fhir.dstu3.model.Specimen)
return Specimen30_50.convertSpecimen((org.hl7.fhir.dstu3.model.Specimen) src);
@ -332,8 +330,6 @@ public class Resource30_50 {
return Schedule30_50.convertSchedule((org.hl7.fhir.r5.model.Schedule) src);
if (src instanceof org.hl7.fhir.r5.model.SearchParameter)
return SearchParameter30_50.convertSearchParameter((org.hl7.fhir.r5.model.SearchParameter) src);
if (src instanceof org.hl7.fhir.r5.model.MolecularSequence)
return Sequence30_50.convertSequence((org.hl7.fhir.r5.model.MolecularSequence) src);
if (src instanceof org.hl7.fhir.r5.model.Slot) return Slot30_50.convertSlot((org.hl7.fhir.r5.model.Slot) src);
if (src instanceof org.hl7.fhir.r5.model.Specimen)
return Specimen30_50.convertSpecimen((org.hl7.fhir.r5.model.Specimen) src);

View File

@ -5,8 +5,11 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Codeab
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Ratio30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.SimpleQuantity30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Timing30_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.Integer30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40_50;
import org.hl7.fhir.exceptions.FHIRException;
public class Dosage30_50 {
@ -21,8 +24,11 @@ public class Dosage30_50 {
if (src.hasPatientInstruction())
tgt.setPatientInstructionElement(String30_50.convertString(src.getPatientInstructionElement()));
if (src.hasTiming()) tgt.setTiming(Timing30_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAsNeeded()));
if (src.hasAsNeededBooleanType())
tgt.setAsNeededElement(Boolean30_50.convertBoolean(src.getAsNeededBooleanType()));
if (src.hasAsNeededCodeableConcept()) {
tgt.addAsNeededFor(CodeableConcept30_50.convertCodeableConcept(src.getAsNeededCodeableConcept()));
}
if (src.hasSite()) tgt.setSite(CodeableConcept30_50.convertCodeableConcept(src.getSite()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept30_50.convertCodeableConcept(src.getRoute()));
if (src.hasMethod()) tgt.setMethod(CodeableConcept30_50.convertCodeableConcept(src.getMethod()));
@ -33,7 +39,7 @@ public class Dosage30_50 {
if (src.hasRate())
dr.setRate(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getRate()));
}
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio30_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.addMaxDosePerPeriod(Ratio30_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerAdministration())
tgt.setMaxDosePerAdministration(SimpleQuantity30_50.convertSimpleQuantity(src.getMaxDosePerAdministration()));
if (src.hasMaxDosePerLifetime())
@ -53,13 +59,15 @@ public class Dosage30_50 {
tgt.setPatientInstructionElement(String30_50.convertString(src.getPatientInstructionElement()));
if (src.hasTiming()) tgt.setTiming(Timing30_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAsNeeded()));
tgt.setAsNeeded(Boolean30_50.convertBoolean(src.getAsNeededElement()));
if (src.hasAsNeededFor())
tgt.setAsNeeded(CodeableConcept30_50.convertCodeableConcept(src.getAsNeededForFirstRep()));
if (src.hasSite()) tgt.setSite(CodeableConcept30_50.convertCodeableConcept(src.getSite()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept30_50.convertCodeableConcept(src.getRoute()));
if (src.hasMethod()) tgt.setMethod(CodeableConcept30_50.convertCodeableConcept(src.getMethod()));
if (src.hasDoseAndRate() && src.getDoseAndRate().get(0).hasDose())
tgt.setDose(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getDoseAndRate().get(0).getDose()));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio30_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio30_50.convertRatio(src.getMaxDosePerPeriodFirstRep()));
if (src.hasMaxDosePerAdministration())
tgt.setMaxDosePerAdministration(SimpleQuantity30_50.convertSimpleQuantity(src.getMaxDosePerAdministration()));
if (src.hasMaxDosePerLifetime())

View File

@ -1,7 +1,10 @@
package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50;
import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.dstu3.model.DateType;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.DateTimeType;
public class Date30_50 {
public static org.hl7.fhir.r5.model.DateType convertDate(org.hl7.fhir.dstu3.model.DateType src) throws FHIRException {
@ -27,4 +30,11 @@ public class Date30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.DateTimeType convertDatetoDateTime(org.hl7.fhir.dstu3.model.DateType src) {
org.hl7.fhir.r5.model.DateTimeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.DateTimeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.DateTimeType();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -8,7 +8,10 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identi
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.exceptions.FHIRException;
import org.hl7.fhir.r5.model.AllergyIntolerance.AllergyIntoleranceParticipantComponent;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
import java.util.stream.Collectors;
@ -40,10 +43,12 @@ public class AllergyIntolerance30_50 {
tgt.setOnset(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getOnset()));
if (src.hasRecordedDate())
tgt.setAssertedDateElement(DateTime30_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference30_50.convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(Reference30_50.convertReference(src.getAsserter()));
for (AllergyIntoleranceParticipantComponent t : src.getParticipant()) {
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author"))
tgt.setRecorder(Reference30_50.convertReference(t.getActor()));
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "attester"))
tgt.setAsserter(Reference30_50.convertReference(t.getActor()));
}
if (src.hasLastOccurrence())
tgt.setLastOccurrenceElement(DateTime30_50.convertDateTime(src.getLastOccurrenceElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
@ -79,9 +84,13 @@ public class AllergyIntolerance30_50 {
if (src.hasAssertedDate())
tgt.setRecordedDateElement(DateTime30_50.convertDateTime(src.getAssertedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference30_50.convertReference(src.getRecorder()));
tgt.addParticipant(new AllergyIntoleranceParticipantComponent()
.setFunction(new CodeableConcept().addCoding(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author", "Author")))
.setActor(Reference30_50.convertReference(src.getRecorder())));
if (src.hasAsserter())
tgt.setAsserter(Reference30_50.convertReference(src.getAsserter()));
tgt.addParticipant(new AllergyIntoleranceParticipantComponent()
.setFunction(new CodeableConcept().addCoding(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "attester", "Attester")))
.setActor(Reference30_50.convertReference(src.getRecorder())));
if (src.hasLastOccurrence())
tgt.setLastOccurrenceElement(DateTime30_50.convertDateTime(src.getLastOccurrenceElement()));
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));

View File

@ -27,8 +27,8 @@ public class Appointment30_50 {
tgt.setStatusElement(convertAppointmentStatus(src.getStatusElement()));
if (src.hasServiceCategory())
tgt.setServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategoryFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableReference t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentType())
@ -98,7 +98,7 @@ public class Appointment30_50 {
if (src.hasServiceCategory())
tgt.addServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategory()));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
tgt.addServiceType().setConcept(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentType())

View File

@ -21,7 +21,7 @@ public class Basic30_50 {
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
if (src.hasCreated())
tgt.setCreatedElement(Date30_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date30_50.convertDatetoDateTime(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference30_50.convertReference(src.getAuthor()));
return tgt;
@ -39,7 +39,7 @@ public class Basic30_50 {
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
if (src.hasCreated())
tgt.setCreatedElement(Date30_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date30_50.convertDateTimeToDate(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference30_50.convertReference(src.getAuthor()));
return tgt;

View File

@ -65,7 +65,7 @@ public class CarePlan30_50 {
}
List<Reference> authors = src.getAuthor();
if (authors.size() > 0) {
tgt.setAuthor(Reference30_50.convertReference(authors.get(0)));
tgt.setCustodian(Reference30_50.convertReference(authors.get(0)));
if (authors.size() > 1) {
}
}
@ -137,9 +137,8 @@ public class CarePlan30_50 {
if (src.hasPeriod())
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
}
if (src.hasAuthor()) {
if (src.hasAuthor())
tgt.addAuthor(Reference30_50.convertReference(src.getAuthor()));
if (src.hasCustodian()) {
tgt.addAuthor(Reference30_50.convertReference(src.getCustodian()));
}
for (org.hl7.fhir.r5.model.Reference t : src.getCareTeam()) {
tgt.addCareTeam(Reference30_50.convertReference(t));

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_50.resources30_50;
import org.hl7.fhir.convertors.VersionConvertorConstants;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.String14_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
@ -10,6 +11,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.*;
import org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
@ -53,10 +55,10 @@ public class ConceptMap30_50 {
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
if (src.hasSource())
tgt.setSource(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getSource()));
if (src.hasTarget())
tgt.setTarget(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getTarget()));
if (src.hasSourceScope())
tgt.setSource(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getSourceScope()));
if (src.hasTargetScope())
tgt.setTarget(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getTargetScope()));
for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup())
tgt.addGroup(convertConceptMapGroupComponent(t));
return tgt;
@ -99,11 +101,11 @@ public class ConceptMap30_50 {
tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
if (src.hasSource()) {
org.hl7.fhir.r5.model.DataType t = ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getSource());
tgt.setSource(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.setSourceScope(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t);
}
if (src.hasTarget()) {
org.hl7.fhir.r5.model.DataType t = ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getTarget());
tgt.setTarget(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.setTargetScope(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t);
}
for (org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup())
tgt.addGroup(convertConceptMapGroupComponent(t));
@ -177,7 +179,7 @@ public class ConceptMap30_50 {
if (src.hasDisplay())
tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement()));
if (src.hasUrl())
tgt.setUrl(src.getUrl());
tgt.setOtherMap(src.getUrl());
return tgt;
}
@ -192,40 +194,40 @@ public class ConceptMap30_50 {
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement()));
if (src.hasUrl())
tgt.setUrl(src.getUrl());
if (src.hasOtherMap())
tgt.setUrl(src.getOtherMap());
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedModeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case PROVIDED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.PROVIDED);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.USESOURCECODE);
break;
case FIXED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.FIXED);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.FIXED);
break;
case OTHERMAP:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.OTHERMAP);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.OTHERMAP);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> src) throws FHIRException {
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedModeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case PROVIDED:
case USESOURCECODE:
tgt.setValue(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupUnmappedMode.PROVIDED);
break;
case FIXED:
@ -318,12 +320,12 @@ public class ConceptMap30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasProperty())
tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasCode())
tgt.setValueElement(String30_50.convertString(src.getCodeElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement()));
if (src.hasSystem()) {
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode()).setDisplay(src.getDisplay()));
} else if (src.hasCodeElement()) {
tgt.setValue(String30_50.convertString(src.getCodeElement()));
}
return tgt;
}
@ -334,12 +336,14 @@ public class ConceptMap30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasProperty())
tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasValue())
tgt.setCodeElement(String30_50.convertString(src.getValueElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement()));
if (src.hasValueCoding()) {
tgt.setSystem(src.getValueCoding().getSystem());
tgt.setCode(src.getValueCoding().getCode());
tgt.setDisplay(src.getValueCoding().getDisplay());
} else if (src.hasValue()) {
tgt.setCode(src.getValue().primitiveValue());
}
return tgt;
}

View File

@ -1,12 +1,18 @@
package org.hl7.fhir.convertors.conv30_50.resources30_50;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Annotation30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_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.CodeableConcept;
import org.hl7.fhir.r5.model.Coding;
public class Condition30_50 {
@ -48,11 +54,11 @@ public class Condition30_50 {
if (src.hasAssertedDate())
tgt.setRecordedDateElement(DateTime30_50.convertDateTime(src.getAssertedDateElement()));
if (src.hasAsserter())
tgt.setAsserter(Reference30_50.convertReference(src.getAsserter()));
tgt.addParticipant().setFunction(new CodeableConcept(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant", "Informant"))).setActor(Reference30_50.convertReference(src.getAsserter()));
if (src.hasStage())
tgt.addStage(convertConditionStageComponent(src.getStage()));
for (org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
tgt.getEvidence().addAll(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
return tgt;
}
@ -86,11 +92,13 @@ public class Condition30_50 {
tgt.setAbatement(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAbatement()));
if (src.hasRecordedDate())
tgt.setAssertedDateElement(DateTime30_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasAsserter())
tgt.setAsserter(Reference30_50.convertReference(src.getAsserter()));
for (org.hl7.fhir.r5.model.Condition.ConditionParticipantComponent t : src.getParticipant()) {
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant"))
tgt.setAsserter(Reference30_50.convertReference(t.getActor()));
}
if (src.hasStage())
tgt.setStage(convertConditionStageComponent(src.getStageFirstRep()));
for (org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
for (org.hl7.fhir.r5.model.CodeableReference t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
return tgt;
@ -137,25 +145,34 @@ public class Condition30_50 {
}
}
public static org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
public static List<org.hl7.fhir.r5.model.CodeableReference> convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode())
tgt.addCode(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) tgt.addDetail(Reference30_50.convertReference(t));
return tgt;
List<org.hl7.fhir.r5.model.CodeableReference> list = new ArrayList<>();
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
tgt.setConcept(CodeableConcept30_50.convertCodeableConcept(t));
list.add(tgt);
}
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetail()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
tgt.setReference(Reference30_50.convertReference(t));
list.add(tgt);
}
return list;
}
public static org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
public static org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.CodeableReference src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCode())
tgt.addCode(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getDetail()) tgt.addDetail(Reference30_50.convertReference(t));
if (src.hasConcept())
tgt.addCode(CodeableConcept30_50.convertCodeableConcept(src.getConcept()));
if (src.hasReference())
tgt.addDetail(Reference30_50.convertReference(src.getReference()));
return tgt;
}

View File

@ -20,21 +20,21 @@ public class Consent30_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.Consent.ConsentPolicyBasisComponent convertConsentPolicyComponent(org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent();
org.hl7.fhir.r5.model.Consent.ConsentPolicyBasisComponent tgt = new org.hl7.fhir.r5.model.Consent.ConsentPolicyBasisComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasAuthority()) tgt.setAuthorityElement(Uri30_50.convertUri(src.getAuthorityElement()));
if (src.hasUri()) tgt.setUriElement(Uri30_50.convertUri(src.getUriElement()));
// if (src.hasAuthority()) tgt.setRefereceElement(Uri30_50.convertUri(src.getAuthorityElement()));
if (src.hasUri()) tgt.setUrl(src.getUri());
return tgt;
}
public static org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent src) throws FHIRException {
public static org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r5.model.Consent.ConsentPolicyBasisComponent src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.dstu3.model.Consent.ConsentPolicyComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasAuthority()) tgt.setAuthorityElement(Uri30_50.convertUri(src.getAuthorityElement()));
if (src.hasUri()) tgt.setUriElement(Uri30_50.convertUri(src.getUriElement()));
// if (src.hasAuthority()) tgt.setAuthorityElement(Uri30_50.convertUri(src.getReferenceElement()));
if (src.hasUrl()) tgt.setUriElement(Uri30_50.convertUri(src.getUrlElement()));
return tgt;
}

View File

@ -5,7 +5,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_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.DocumentReference.DocumentAttestationMode;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceAttesterComponent;
public class DocumentReference30_50 {
@ -32,7 +32,8 @@ public class DocumentReference30_50 {
if (src.hasCreated())
tgt.setDate(src.getCreated());
if (src.hasAuthenticator())
tgt.addAttester().setMode(DocumentAttestationMode.OFFICIAL).setParty(Reference30_50.convertReference(src.getAuthenticator()));
tgt.addAttester().setMode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding("http://hl7.org/fhir/composition-attestation-mode","official", "Official")))
.setParty(Reference30_50.convertReference(src.getAuthenticator()));
if (src.hasCustodian())
tgt.setCustodian(Reference30_50.convertReference(src.getCustodian()));
for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo())
@ -70,7 +71,7 @@ public class DocumentReference30_50 {
if (src.hasDate())
tgt.setCreated(src.getDate());
for (DocumentReferenceAttesterComponent t : src.getAttester()) {
if (t.getMode() == DocumentAttestationMode.OFFICIAL)
if (t.getMode().hasCoding("http://hl7.org/fhir/composition-attestation-mode", "official"))
tgt.setAuthenticator(Reference30_50.convertReference(t.getParty()));
}
if (src.hasCustodian())
@ -94,8 +95,6 @@ public class DocumentReference30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment30_50.convertAttachment(src.getAttachment()));
if (src.hasFormat())
tgt.setFormat(Coding30_50.convertCoding(src.getFormat()));
return tgt;
}
@ -106,16 +105,15 @@ public class DocumentReference30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment30_50.convertAttachment(src.getAttachment()));
if (src.hasFormat())
tgt.setFormat(Coding30_50.convertCoding(src.getFormat()));
return tgt;
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.r5.model.DocumentReference src, org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent tgt) throws FHIRException {
if (src.hasEncounter())
tgt.setEncounter(Reference30_50.convertReference(src.getEncounterFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasContext())
tgt.setEncounter(Reference30_50.convertReference(src.getContextFirstRep()));
for (CodeableReference t : src.getEvent())
if (t.hasConcept())
tgt.addEvent(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
if (src.hasPeriod())
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -124,15 +122,15 @@ public class DocumentReference30_50 {
tgt.setPracticeSetting(CodeableConcept30_50.convertCodeableConcept(src.getPracticeSetting()));
if (src.hasSourcePatientInfo())
tgt.setSourcePatientInfo(Reference30_50.convertReference(src.getSourcePatientInfo()));
for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextComponent src, org.hl7.fhir.r5.model.DocumentReference tgt) throws FHIRException {
if (src.hasEncounter())
tgt.addEncounter(Reference30_50.convertReference(src.getEncounter()));
tgt.addContext(Reference30_50.convertReference(src.getEncounter()));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept30_50.convertCodeableConcept(t));
tgt.addEvent(new CodeableReference().setConcept(CodeableConcept30_50.convertCodeableConcept(t)));
if (src.hasPeriod())
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -141,8 +139,8 @@ public class DocumentReference30_50 {
tgt.setPracticeSetting(CodeableConcept30_50.convertCodeableConcept(src.getPracticeSetting()));
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));
// for (org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent t : src.getRelated())
// tgt.addRelated(convertDocumentReferenceContextRelatedComponent(t));
}
public static org.hl7.fhir.r5.model.Reference convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {

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_(Coding30_50.convertCoding(src.getClass_()));
tgt.setClass_(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())

View File

@ -18,7 +18,7 @@ public class Endpoint30_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEndpointStatus(src.getStatusElement()));
if (src.hasConnectionType())
tgt.setConnectionType(Coding30_50.convertCoding(src.getConnectionType()));
tgt.setConnectionType(Coding30_50.convertCoding(src.getConnectionTypeFirstRep()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasManagingOrganization())
@ -46,7 +46,7 @@ public class Endpoint30_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEndpointStatus(src.getStatusElement()));
if (src.hasConnectionType())
tgt.setConnectionType(Coding30_50.convertCoding(src.getConnectionType()));
tgt.addConnectionType(Coding30_50.convertCoding(src.getConnectionType()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasManagingOrganization())

View File

@ -10,7 +10,9 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Stri
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.UnsignedInt30_50;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
import java.util.List;
@ -48,8 +50,9 @@ public class ImagingStudy30_50 {
break;
}
}
for (org.hl7.fhir.r5.model.Coding t : src.getModality()) {
tgt.addModalityList(Coding30_50.convertCoding(t));
for (CodeableConcept t : src.getModality()) {
for (Coding tt : t.getCoding())
tgt.addModalityList(Coding30_50.convertCoding(tt));
}
if (src.hasSubject()) {
if (src.hasSubject())
@ -143,7 +146,7 @@ public class ImagingStudy30_50 {
tgt.setStatus(org.hl7.fhir.r5.model.ImagingStudy.ImagingStudyStatus.UNKNOWN);
}
for (org.hl7.fhir.dstu3.model.Coding t : src.getModalityList()) {
tgt.addModality(Coding30_50.convertCoding(t));
tgt.addModality(new CodeableConcept().addCoding(Coding30_50.convertCoding(t)));
}
if (src.hasPatient())
tgt.setSubject(Reference30_50.convertReference(src.getPatient()));
@ -225,9 +228,8 @@ public class ImagingStudy30_50 {
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) {
tgt.addEndpoint(Reference30_50.convertReference(t));
}
if (src.hasBodySite()) {
if (src.hasBodySite())
tgt.setBodySite(Coding30_50.convertCoding(src.getBodySite()));
if (src.getBodySite().hasConcept()) {
tgt.setBodySite(Coding30_50.convertCoding(src.getBodySite().getConcept().getCodingFirstRep()));
}
if (src.hasLaterality()) {
if (src.hasLaterality())
@ -258,7 +260,7 @@ public class ImagingStudy30_50 {
}
if (src.hasModality()) {
if (src.hasModality())
tgt.setModality(Coding30_50.convertCoding(src.getModality()));
tgt.setModality(new CodeableConcept().addCoding(Coding30_50.convertCoding(src.getModality())));
}
if (src.hasDescription()) {
if (src.hasDescriptionElement())
@ -273,11 +275,11 @@ public class ImagingStudy30_50 {
}
if (src.hasBodySite()) {
if (src.hasBodySite())
tgt.setBodySite(Coding30_50.convertCoding(src.getBodySite()));
tgt.setBodySite(new CodeableReference(new CodeableConcept(Coding30_50.convertCoding(src.getBodySite()))));
}
if (src.hasLaterality()) {
if (src.hasLaterality())
tgt.setLaterality(Coding30_50.convertCoding(src.getLaterality()));
tgt.setLaterality(new CodeableConcept(Coding30_50.convertCoding(src.getLaterality())));
}
if (src.hasStarted()) {
if (src.hasStartedElement())

View File

@ -11,6 +11,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Date
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.exceptions.FHIRException;
import org.hl7.fhir.r4.model.codesystems.CoverageeligibilityresponseExAuthSupportEnumFactory;
import org.hl7.fhir.r5.model.CodeableReference;
public class Immunization30_50 {
@ -35,7 +36,7 @@ public class Immunization30_50 {
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(Boolean30_50.convertBoolean(src.getPrimarySourceElement()));
if (src.hasReportOrigin())
tgt.setInformationSource(CodeableConcept30_50.convertCodeableConcept(src.getReportOrigin()));
tgt.setInformationSource(new CodeableReference(CodeableConcept30_50.convertCodeableConcept(src.getReportOrigin())));
if (src.hasLocation())
tgt.setLocation(Reference30_50.convertReference(src.getLocation()));
if (src.hasManufacturer())
@ -77,8 +78,8 @@ public class Immunization30_50 {
tgt.setDateElement(DateTime30_50.convertDateTime(src.getOccurrenceDateTimeType()));
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(Boolean30_50.convertBoolean(src.getPrimarySourceElement()));
if (src.hasInformationSourceCodeableConcept())
tgt.setReportOrigin(CodeableConcept30_50.convertCodeableConcept(src.getInformationSourceCodeableConcept()));
if (src.getInformationSource().hasConcept())
tgt.setReportOrigin(CodeableConcept30_50.convertCodeableConcept(src.getInformationSource().getConcept()));
if (src.hasLocation())
tgt.setLocation(Reference30_50.convertReference(src.getLocation()));
if (src.hasManufacturer())

View File

@ -182,7 +182,7 @@ public class ImplementationGuide30_50 {
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) {
org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t);
tn.setGroupingId(tgt.getId());
@ -226,7 +226,7 @@ public class ImplementationGuide30_50 {
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasSourceReference())
tgt.setReference(Reference30_50.convertReference(src.getSourceReference()));
else if (src.hasSourceUriType())

View File

@ -57,8 +57,8 @@ public class MedicationDispense30_50 {
tgt.addDosageInstruction(Dosage30_50.convertDosage(t));
if (src.hasSubstitution())
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference30_50.convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference30_50.convertReference(t));
return tgt;
@ -108,8 +108,8 @@ public class MedicationDispense30_50 {
tgt.addDosageInstruction(Dosage30_50.convertDosage(t));
if (src.hasSubstitution())
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference30_50.convertReference(t));
// for (org.hl7.fhir.dstu3.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference30_50.convertReference(t));
return tgt;

View File

@ -58,8 +58,8 @@ public class MedicationRequest30_50 {
tgt.setSubstitution(convertMedicationRequestSubstitutionComponent(src.getSubstitution()));
if (src.hasPriorPrescription())
tgt.setPriorPrescription(Reference30_50.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference30_50.convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference30_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference30_50.convertReference(t));
return tgt;
@ -108,8 +108,8 @@ public class MedicationRequest30_50 {
tgt.setSubstitution(convertMedicationRequestSubstitutionComponent(src.getSubstitution()));
if (src.hasPriorPrescription())
tgt.setPriorPrescription(Reference30_50.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference30_50.convertReference(t));
// for (org.hl7.fhir.dstu3.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference30_50.convertReference(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference30_50.convertReference(t));
return tgt;

View File

@ -38,7 +38,7 @@ public class MedicationStatement30_50 {
if (src.hasDateAsserted())
tgt.setDateAssertedElement(DateTime30_50.convertDateTime(src.getDateAssertedElement()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference30_50.convertReference(src.getInformationSource()));
tgt.addInformationSource(Reference30_50.convertReference(src.getInformationSource()));
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getDerivedFrom())
@ -78,7 +78,7 @@ public class MedicationStatement30_50 {
if (src.hasDateAsserted())
tgt.setDateAssertedElement(DateTime30_50.convertDateTime(src.getDateAssertedElement()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference30_50.convertReference(src.getInformationSource()));
tgt.setInformationSource(Reference30_50.convertReference(src.getInformationSourceFirstRep()));
if (src.hasSubject())
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
for (org.hl7.fhir.r5.model.Reference t : src.getDerivedFrom())

View File

@ -99,7 +99,7 @@ public class MessageHeader30_50 {
org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifierElement(Id30_50.convertId(src.getIdentifierElement()));
tgt.setIdentifier(new org.hl7.fhir.r5.model.Identifier().setValue(src.getIdentifier()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())
@ -113,7 +113,7 @@ public class MessageHeader30_50 {
org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifierElement(Id30_50.convertId(src.getIdentifierElement()));
tgt.setIdentifierElement(new org.hl7.fhir.dstu3.model.IdType(src.getIdentifier().getValue()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())

View File

@ -53,13 +53,13 @@ public class Organization30_50 {
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()));
for (org.hl7.fhir.r5.model.Organization.OrganizationContactComponent t : src.getContact())
for (org.hl7.fhir.r5.model.ExtendedContactDetail t : src.getContact())
tgt.addContact(convertOrganizationContactComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference30_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.ExtendedContactDetail src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent();
@ -75,10 +75,10 @@ public class Organization30_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.ExtendedContactDetail convertOrganizationContactComponent(org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r5.model.Organization.OrganizationContactComponent();
org.hl7.fhir.r5.model.ExtendedContactDetail tgt = new org.hl7.fhir.r5.model.ExtendedContactDetail();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasPurpose())
tgt.setPurpose(CodeableConcept30_50.convertCodeableConcept(src.getPurpose()));

View File

@ -159,7 +159,7 @@ public class Provenance30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.DERIVATION);
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.INSTANTIATES);
break;
case REVISION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.REVISION);
@ -186,7 +186,7 @@ public class Provenance30_50 {
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRoleEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
case INSTANTIATES:
tgt.setValue(org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityRole.DERIVATION);
break;
case REVISION:

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period
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.CodeableReference;
public class Schedule30_50 {
@ -22,8 +23,9 @@ public class Schedule30_50 {
tgt.setActiveElement(Boolean30_50.convertBoolean(src.getActiveElement()));
if (src.hasServiceCategory())
tgt.setServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategoryFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t.getConcept() ));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getActor()) tgt.addActor(Reference30_50.convertReference(t));
@ -46,7 +48,7 @@ public class Schedule30_50 {
if (src.hasServiceCategory())
tgt.addServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategory()));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept30_50.convertCodeableConcept(t)));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getActor()) tgt.addActor(Reference30_50.convertReference(t));

View File

@ -325,10 +325,10 @@ public class SearchParameter30_50 {
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NEARBY);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.DISTANCE);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
@ -352,12 +352,6 @@ public class SearchParameter30_50 {
case PHONETIC:
tgt.setValue(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NEARBY);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.DISTANCE);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.OTHER);
break;

View File

@ -1,429 +0,0 @@
package org.hl7.fhir.convertors.conv30_50.resources30_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Quantity30_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.Integer30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
import org.hl7.fhir.exceptions.FHIRException;
public class Sequence30_50 {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> convertQualityType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.QualityType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.QualityTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case INDEL:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.INDEL);
break;
case SNP:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.SNP);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.QualityType> convertQualityType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.QualityType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Sequence.QualityTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case INDEL:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.QualityType.INDEL);
break;
case SNP:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.QualityType.SNP);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.QualityType.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.QualityType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.RepositoryType> convertRepositoryType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.RepositoryType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Sequence.RepositoryTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case DIRECTLINK:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.DIRECTLINK);
break;
case OPENAPI:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OPENAPI);
break;
case LOGIN:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.LOGIN);
break;
case OAUTH:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OAUTH);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.RepositoryType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> convertRepositoryType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.RepositoryType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.RepositoryTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case DIRECTLINK:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.DIRECTLINK);
break;
case OPENAPI:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OPENAPI);
break;
case LOGIN:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.LOGIN);
break;
case OAUTH:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OAUTH);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence convertSequence(org.hl7.fhir.dstu3.model.Sequence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence tgt = new org.hl7.fhir.r5.model.MolecularSequence();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasType())
tgt.setTypeElement(convertSequenceType(src.getTypeElement()));
if (src.hasCoordinateSystem())
tgt.setCoordinateSystemElement(Integer30_50.convertInteger(src.getCoordinateSystemElement()));
if (src.hasPatient())
tgt.setPatient(Reference30_50.convertReference(src.getPatient()));
if (src.hasSpecimen())
tgt.setSpecimen(Reference30_50.convertReference(src.getSpecimen()));
if (src.hasDevice())
tgt.setDevice(Reference30_50.convertReference(src.getDevice()));
if (src.hasPerformer())
tgt.setPerformer(Reference30_50.convertReference(src.getPerformer()));
if (src.hasQuantity())
tgt.setQuantity(Quantity30_50.convertQuantity(src.getQuantity()));
if (src.hasReferenceSeq())
tgt.setReferenceSeq(convertSequenceReferenceSeqComponent(src.getReferenceSeq()));
for (org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent t : src.getVariant())
tgt.addVariant(convertSequenceVariantComponent(t));
if (src.hasObservedSeq())
tgt.setObservedSeqElement(String30_50.convertString(src.getObservedSeqElement()));
for (org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent t : src.getQuality())
tgt.addQuality(convertSequenceQualityComponent(t));
if (src.hasReadCoverage())
tgt.setReadCoverageElement(Integer30_50.convertInteger(src.getReadCoverageElement()));
for (org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent t : src.getRepository())
tgt.addRepository(convertSequenceRepositoryComponent(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getPointer()) tgt.addPointer(Reference30_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Sequence convertSequence(org.hl7.fhir.r5.model.MolecularSequence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Sequence tgt = new org.hl7.fhir.dstu3.model.Sequence();
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.hasType())
tgt.setTypeElement(convertSequenceType(src.getTypeElement()));
if (src.hasCoordinateSystem())
tgt.setCoordinateSystemElement(Integer30_50.convertInteger(src.getCoordinateSystemElement()));
if (src.hasPatient())
tgt.setPatient(Reference30_50.convertReference(src.getPatient()));
if (src.hasSpecimen())
tgt.setSpecimen(Reference30_50.convertReference(src.getSpecimen()));
if (src.hasDevice())
tgt.setDevice(Reference30_50.convertReference(src.getDevice()));
if (src.hasPerformer())
tgt.setPerformer(Reference30_50.convertReference(src.getPerformer()));
if (src.hasQuantity())
tgt.setQuantity(Quantity30_50.convertQuantity(src.getQuantity()));
if (src.hasReferenceSeq())
tgt.setReferenceSeq(convertSequenceReferenceSeqComponent(src.getReferenceSeq()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent t : src.getVariant())
tgt.addVariant(convertSequenceVariantComponent(t));
if (src.hasObservedSeq())
tgt.setObservedSeqElement(String30_50.convertString(src.getObservedSeqElement()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent t : src.getQuality())
tgt.addQuality(convertSequenceQualityComponent(t));
if (src.hasReadCoverage())
tgt.setReadCoverageElement(Integer30_50.convertInteger(src.getReadCoverageElement()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent t : src.getRepository())
tgt.addRepository(convertSequenceRepositoryComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPointer()) tgt.addPointer(Reference30_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent convertSequenceQualityComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertQualityType(src.getTypeElement()));
if (src.hasStandardSequence())
tgt.setStandardSequence(CodeableConcept30_50.convertCodeableConcept(src.getStandardSequence()));
if (src.hasStart())
tgt.setStartElement(Integer30_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer30_50.convertInteger(src.getEndElement()));
if (src.hasScore())
tgt.setScore(Quantity30_50.convertQuantity(src.getScore()));
if (src.hasMethod())
tgt.setMethod(CodeableConcept30_50.convertCodeableConcept(src.getMethod()));
if (src.hasTruthTP())
tgt.setTruthTPElement(Decimal30_50.convertDecimal(src.getTruthTPElement()));
if (src.hasQueryTP())
tgt.setQueryTPElement(Decimal30_50.convertDecimal(src.getQueryTPElement()));
if (src.hasTruthFN())
tgt.setTruthFNElement(Decimal30_50.convertDecimal(src.getTruthFNElement()));
if (src.hasQueryFP())
tgt.setQueryFPElement(Decimal30_50.convertDecimal(src.getQueryFPElement()));
if (src.hasGtFP())
tgt.setGtFPElement(Decimal30_50.convertDecimal(src.getGtFPElement()));
if (src.hasPrecision())
tgt.setPrecisionElement(Decimal30_50.convertDecimal(src.getPrecisionElement()));
if (src.hasRecall())
tgt.setRecallElement(Decimal30_50.convertDecimal(src.getRecallElement()));
if (src.hasFScore())
tgt.setFScoreElement(Decimal30_50.convertDecimal(src.getFScoreElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent convertSequenceQualityComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceQualityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertQualityType(src.getTypeElement()));
if (src.hasStandardSequence())
tgt.setStandardSequence(CodeableConcept30_50.convertCodeableConcept(src.getStandardSequence()));
if (src.hasStart())
tgt.setStartElement(Integer30_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer30_50.convertInteger(src.getEndElement()));
if (src.hasScore())
tgt.setScore(Quantity30_50.convertQuantity(src.getScore()));
if (src.hasMethod())
tgt.setMethod(CodeableConcept30_50.convertCodeableConcept(src.getMethod()));
if (src.hasTruthTP())
tgt.setTruthTPElement(Decimal30_50.convertDecimal(src.getTruthTPElement()));
if (src.hasQueryTP())
tgt.setQueryTPElement(Decimal30_50.convertDecimal(src.getQueryTPElement()));
if (src.hasTruthFN())
tgt.setTruthFNElement(Decimal30_50.convertDecimal(src.getTruthFNElement()));
if (src.hasQueryFP())
tgt.setQueryFPElement(Decimal30_50.convertDecimal(src.getQueryFPElement()));
if (src.hasGtFP())
tgt.setGtFPElement(Decimal30_50.convertDecimal(src.getGtFPElement()));
if (src.hasPrecision())
tgt.setPrecisionElement(Decimal30_50.convertDecimal(src.getPrecisionElement()));
if (src.hasRecall())
tgt.setRecallElement(Decimal30_50.convertDecimal(src.getRecallElement()));
if (src.hasFScore())
tgt.setFScoreElement(Decimal30_50.convertDecimal(src.getFScoreElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasChromosome())
tgt.setChromosome(CodeableConcept30_50.convertCodeableConcept(src.getChromosome()));
if (src.hasGenomeBuild())
tgt.setGenomeBuildElement(String30_50.convertString(src.getGenomeBuildElement()));
if (src.hasReferenceSeqId())
tgt.setReferenceSeqId(CodeableConcept30_50.convertCodeableConcept(src.getReferenceSeqId()));
if (src.hasReferenceSeqPointer())
tgt.setReferenceSeqPointer(Reference30_50.convertReference(src.getReferenceSeqPointer()));
if (src.hasReferenceSeqString())
tgt.setReferenceSeqStringElement(String30_50.convertString(src.getReferenceSeqStringElement()));
if (src.hasWindowStart())
tgt.setWindowStartElement(Integer30_50.convertInteger(src.getWindowStartElement()));
if (src.hasWindowEnd())
tgt.setWindowEndElement(Integer30_50.convertInteger(src.getWindowEndElement()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent convertSequenceReferenceSeqComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceReferenceSeqComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasChromosome())
tgt.setChromosome(CodeableConcept30_50.convertCodeableConcept(src.getChromosome()));
if (src.hasGenomeBuild())
tgt.setGenomeBuildElement(String30_50.convertString(src.getGenomeBuildElement()));
if (src.hasReferenceSeqId())
tgt.setReferenceSeqId(CodeableConcept30_50.convertCodeableConcept(src.getReferenceSeqId()));
if (src.hasReferenceSeqPointer())
tgt.setReferenceSeqPointer(Reference30_50.convertReference(src.getReferenceSeqPointer()));
if (src.hasReferenceSeqString())
tgt.setReferenceSeqStringElement(String30_50.convertString(src.getReferenceSeqStringElement()));
if (src.hasWindowStart())
tgt.setWindowStartElement(Integer30_50.convertInteger(src.getWindowStartElement()));
if (src.hasWindowEnd())
tgt.setWindowEndElement(Integer30_50.convertInteger(src.getWindowEndElement()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent convertSequenceRepositoryComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertRepositoryType(src.getTypeElement()));
if (src.hasUrl())
tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasDatasetId())
tgt.setDatasetIdElement(String30_50.convertString(src.getDatasetIdElement()));
if (src.hasVariantsetId())
tgt.setVariantsetIdElement(String30_50.convertString(src.getVariantsetIdElement()));
if (src.hasReadsetId())
tgt.setReadsetIdElement(String30_50.convertString(src.getReadsetIdElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent convertSequenceRepositoryComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceRepositoryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertRepositoryType(src.getTypeElement()));
if (src.hasUrl())
tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
if (src.hasName())
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
if (src.hasDatasetId())
tgt.setDatasetIdElement(String30_50.convertString(src.getDatasetIdElement()));
if (src.hasVariantsetId())
tgt.setVariantsetIdElement(String30_50.convertString(src.getVariantsetIdElement()));
if (src.hasReadsetId())
tgt.setReadsetIdElement(String30_50.convertString(src.getReadsetIdElement()));
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.SequenceType> convertSequenceType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.SequenceType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Sequence.SequenceTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case AA:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.SequenceType.AA);
break;
case DNA:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.SequenceType.DNA);
break;
case RNA:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.SequenceType.RNA);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Sequence.SequenceType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> convertSequenceType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Sequence.SequenceType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.SequenceTypeEnumFactory());
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
switch (src.getValue()) {
case AA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.AA);
break;
case DNA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.DNA);
break;
case RNA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.RNA);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent tgt = new org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer30_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer30_50.convertInteger(src.getEndElement()));
if (src.hasObservedAllele())
tgt.setObservedAlleleElement(String30_50.convertString(src.getObservedAlleleElement()));
if (src.hasReferenceAllele())
tgt.setReferenceAlleleElement(String30_50.convertString(src.getReferenceAlleleElement()));
if (src.hasCigar())
tgt.setCigarElement(String30_50.convertString(src.getCigarElement()));
if (src.hasVariantPointer())
tgt.setVariantPointer(Reference30_50.convertReference(src.getVariantPointer()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent convertSequenceVariantComponent(org.hl7.fhir.dstu3.model.Sequence.SequenceVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer30_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer30_50.convertInteger(src.getEndElement()));
if (src.hasObservedAllele())
tgt.setObservedAlleleElement(String30_50.convertString(src.getObservedAlleleElement()));
if (src.hasReferenceAllele())
tgt.setReferenceAlleleElement(String30_50.convertString(src.getReferenceAlleleElement()));
if (src.hasCigar())
tgt.setCigarElement(String30_50.convertString(src.getCigarElement()));
if (src.hasVariantPointer())
tgt.setVariantPointer(Reference30_50.convertReference(src.getVariantPointer()));
return tgt;
}
}

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Bool
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Instant30_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.CodeableReference;
public class Slot30_50 {
@ -21,7 +22,7 @@ public class Slot30_50 {
if (src.hasServiceCategory())
tgt.addServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategory()));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept30_50.convertCodeableConcept(t)));
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentType())
@ -50,8 +51,9 @@ public class Slot30_50 {
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasServiceCategory())
tgt.setServiceCategory(CodeableConcept30_50.convertCodeableConcept(src.getServiceCategoryFirstRep()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.addServiceType(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept30_50.convertCodeableConcept(t));
if (src.hasAppointmentType())

View File

@ -111,18 +111,18 @@ public class Specimen30_50 {
return null;
org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent tgt = new org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(CodeableConcept30_50.convertCodeableConcept(src.getType()));
if (src.hasCapacity())
tgt.setCapacity(SimpleQuantity30_50.convertSimpleQuantity(src.getCapacity()));
if (src.hasSpecimenQuantity())
tgt.setSpecimenQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getSpecimenQuantity()));
if (src.hasAdditive())
tgt.setAdditive(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAdditive()));
// for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
// if (src.hasDescription())
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
// if (src.hasType())
// tgt.setType(CodeableConcept30_50.convertCodeableConcept(src.getType()));
// if (src.hasCapacity())
// tgt.setCapacity(SimpleQuantity30_50.convertSimpleQuantity(src.getCapacity()));
// if (src.hasSpecimenQuantity())
// tgt.setSpecimenQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getSpecimenQuantity()));
// if (src.hasAdditive())
// tgt.setAdditive(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAdditive()));
return tgt;
}
@ -131,18 +131,18 @@ public class Specimen30_50 {
return null;
org.hl7.fhir.r5.model.Specimen.SpecimenContainerComponent tgt = new org.hl7.fhir.r5.model.Specimen.SpecimenContainerComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
if (src.hasDescription())
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(CodeableConcept30_50.convertCodeableConcept(src.getType()));
if (src.hasCapacity())
tgt.setCapacity(SimpleQuantity30_50.convertSimpleQuantity(src.getCapacity()));
if (src.hasSpecimenQuantity())
tgt.setSpecimenQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getSpecimenQuantity()));
if (src.hasAdditive())
tgt.setAdditive(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAdditive()));
// for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
// if (src.hasDescription())
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
// if (src.hasType())
// tgt.setType(CodeableConcept30_50.convertCodeableConcept(src.getType()));
// if (src.hasCapacity())
// tgt.setCapacity(SimpleQuantity30_50.convertSimpleQuantity(src.getCapacity()));
// if (src.hasSpecimenQuantity())
// tgt.setSpecimenQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getSpecimenQuantity()));
// if (src.hasAdditive())
// tgt.setAdditive(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAdditive()));
return tgt;
}

View File

@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.*;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.exceptions.FHIRException;
public class TestReport30_50 {
@ -20,7 +21,7 @@ public class TestReport30_50 {
if (src.hasStatus())
tgt.setStatusElement(convertTestReportStatus(src.getStatusElement()));
if (src.hasTestScript())
tgt.setTestScript(Reference30_50.convertReference(src.getTestScript()));
tgt.setTestScript(new Reference().setReference(src.getTestScript()));
if (src.hasResult())
tgt.setResultElement(convertTestReportResult(src.getResultElement()));
if (src.hasScore())
@ -52,7 +53,7 @@ public class TestReport30_50 {
if (src.hasStatus())
tgt.setStatusElement(convertTestReportStatus(src.getStatusElement()));
if (src.hasTestScript())
tgt.setTestScript(Reference30_50.convertReference(src.getTestScript()));
tgt.setTestScript(src.getTestScript().getReference());
if (src.hasResult())
tgt.setResultElement(convertTestReportResult(src.getResultElement()));
if (src.hasScore())

View File

@ -426,7 +426,7 @@ public class TestScript30_50 {
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType()) tgt.setType(Coding30_50.convertCoding(src.getType()));
if (src.hasResource())
tgt.setResource(org.hl7.fhir.r5.model.TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasLabel()) tgt.setLabelElement(String30_50.convertString(src.getLabelElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasAccept()) tgt.setAccept(convertContentType(src.getAccept()));
@ -451,7 +451,7 @@ public class TestScript30_50 {
org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
if (src.hasType()) tgt.setType(Coding30_50.convertCoding(src.getType()));
if (src.hasResource()) tgt.setResource(src.getResource().toCode());
if (src.hasResource()) tgt.setResource(src.getResource());
if (src.hasLabel()) tgt.setLabelElement(String30_50.convertString(src.getLabelElement()));
if (src.hasDescription()) tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
if (src.hasAccept()) tgt.setAccept(convertContentType(src.getAccept()));

View File

@ -1,7 +1,10 @@
package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
import org.hl7.fhir.convertors.context.ConversionContext10_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.DateType;
import org.hl7.fhir.r5.model.DateTimeType;
public class Date40_50 {
public static org.hl7.fhir.r5.model.DateType convertDate(org.hl7.fhir.r4.model.DateType src) throws FHIRException {
@ -15,4 +18,16 @@ public class Date40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.DateTimeType convertDatetoDateTime(org.hl7.fhir.r4.model.DateType src) {
org.hl7.fhir.r5.model.DateTimeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.DateTimeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.DateTimeType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r4.model.DateType convertDateTimeToDate(org.hl7.fhir.r5.model.DateTimeType src) {
org.hl7.fhir.r4.model.DateType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.DateType(src.getValueAsString()) : new org.hl7.fhir.r4.model.DateType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -1,5 +1,6 @@
package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.exceptions.FHIRException;
@ -15,4 +16,19 @@ public class String40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r5.model.MarkdownType convertStringToMarkdown(org.hl7.fhir.r4.model.StringType src) throws FHIRException {
org.hl7.fhir.r5.model.MarkdownType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.MarkdownType(src.getValueAsString()) : new org.hl7.fhir.r5.model.MarkdownType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r4.model.StringType convertMarkdownToString(org.hl7.fhir.r5.model.MarkdownType src) throws FHIRException {
org.hl7.fhir.r4.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.StringType(src.getValue()) : new org.hl7.fhir.r4.model.StringType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
}

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableCon
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Ratio40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.SimpleQuantity40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Timing40_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.Integer40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
import org.hl7.fhir.exceptions.FHIRException;
@ -22,14 +23,17 @@ public class Dosage40_50 {
if (src.hasPatientInstruction())
tgt.setPatientInstructionElement(String40_50.convertString(src.getPatientInstructionElement()));
if (src.hasTiming()) tgt.setTiming(Timing40_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAsNeeded()));
if (src.hasAsNeededBooleanType())
tgt.setAsNeededElement(Boolean40_50.convertBoolean(src.getAsNeededBooleanType()));
if (src.hasAsNeededCodeableConcept()) {
tgt.addAsNeededFor(CodeableConcept40_50.convertCodeableConcept(src.getAsNeededCodeableConcept()));
}
if (src.hasSite()) tgt.setSite(CodeableConcept40_50.convertCodeableConcept(src.getSite()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept40_50.convertCodeableConcept(src.getRoute()));
if (src.hasMethod()) tgt.setMethod(CodeableConcept40_50.convertCodeableConcept(src.getMethod()));
for (org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent t : src.getDoseAndRate())
tgt.addDoseAndRate(convertDosageDoseAndRateComponent(t));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio40_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.addMaxDosePerPeriod(Ratio40_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerAdministration())
tgt.setMaxDosePerAdministration(SimpleQuantity40_50.convertSimpleQuantity(src.getMaxDosePerAdministration()));
if (src.hasMaxDosePerLifetime())
@ -49,13 +53,15 @@ public class Dosage40_50 {
tgt.setPatientInstructionElement(String40_50.convertString(src.getPatientInstructionElement()));
if (src.hasTiming()) tgt.setTiming(Timing40_50.convertTiming(src.getTiming()));
if (src.hasAsNeeded())
tgt.setAsNeeded(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAsNeeded()));
tgt.setAsNeeded(Boolean40_50.convertBoolean(src.getAsNeededElement()));
if (src.hasAsNeededFor())
tgt.setAsNeeded(CodeableConcept40_50.convertCodeableConcept(src.getAsNeededForFirstRep()));
if (src.hasSite()) tgt.setSite(CodeableConcept40_50.convertCodeableConcept(src.getSite()));
if (src.hasRoute()) tgt.setRoute(CodeableConcept40_50.convertCodeableConcept(src.getRoute()));
if (src.hasMethod()) tgt.setMethod(CodeableConcept40_50.convertCodeableConcept(src.getMethod()));
for (org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent t : src.getDoseAndRate())
tgt.addDoseAndRate(convertDosageDoseAndRateComponent(t));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio40_50.convertRatio(src.getMaxDosePerPeriod()));
if (src.hasMaxDosePerPeriod()) tgt.setMaxDosePerPeriod(Ratio40_50.convertRatio(src.getMaxDosePerPeriodFirstRep()));
if (src.hasMaxDosePerAdministration())
tgt.setMaxDosePerAdministration(SimpleQuantity40_50.convertSimpleQuantity(src.getMaxDosePerAdministration()));
if (src.hasMaxDosePerLifetime())

View File

@ -1,6 +1,7 @@
package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Annotation40_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;
@ -8,7 +9,10 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime4
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.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.AllergyIntolerance.AllergyIntoleranceParticipantComponent;
import java.util.stream.Collectors;
@ -72,9 +76,13 @@ public class AllergyIntolerance40_50 {
if (src.hasRecordedDate())
tgt.setRecordedDateElement(DateTime40_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference40_50.convertReference(src.getRecorder()));
tgt.addParticipant(new AllergyIntoleranceParticipantComponent()
.setFunction(new CodeableConcept().addCoding(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author", "Author")))
.setActor(Reference40_50.convertReference(src.getRecorder())));
if (src.hasAsserter())
tgt.setAsserter(Reference40_50.convertReference(src.getAsserter()));
tgt.addParticipant(new AllergyIntoleranceParticipantComponent()
.setFunction(new CodeableConcept().addCoding(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "attester", "Attester")))
.setActor(Reference40_50.convertReference(src.getRecorder())));
if (src.hasLastOccurrence())
tgt.setLastOccurrenceElement(DateTime40_50.convertDateTime(src.getLastOccurrenceElement()));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
@ -111,10 +119,12 @@ public class AllergyIntolerance40_50 {
tgt.setOnset(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getOnset()));
if (src.hasRecordedDate())
tgt.setRecordedDateElement(DateTime40_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference40_50.convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(Reference40_50.convertReference(src.getAsserter()));
for (AllergyIntoleranceParticipantComponent t : src.getParticipant()) {
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author"))
tgt.setRecorder(Reference40_50.convertReference(t.getActor()));
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "attester"))
tgt.setAsserter(Reference40_50.convertReference(t.getActor()));
}
if (src.hasLastOccurrence())
tgt.setLastOccurrenceElement(DateTime40_50.convertDateTime(src.getLastOccurrenceElement()));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));

View File

@ -60,7 +60,7 @@ public class Appointment40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
tgt.addServiceType().setConcept(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentType())
@ -109,8 +109,8 @@ public class Appointment40_50 {
tgt.setCancelationReason(CodeableConcept40_50.convertCodeableConcept(src.getCancellationReason()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableReference t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentType())

View File

@ -50,7 +50,7 @@ public class Basic40_50 {
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
if (src.hasCreated())
tgt.setCreatedElement(Date40_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date40_50.convertDatetoDateTime(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference40_50.convertReference(src.getAuthor()));
return tgt;
@ -68,7 +68,7 @@ public class Basic40_50 {
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
if (src.hasCreated())
tgt.setCreatedElement(Date40_50.convertDate(src.getCreatedElement()));
tgt.setCreatedElement(Date40_50.convertDateTimeToDate(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference40_50.convertReference(src.getAuthor()));
return tgt;

View File

@ -48,12 +48,12 @@ public class BiologicallyDerivedProduct40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasProductCategory())
tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement()));
if (src.hasProductCode())
tgt.setProductCode(CodeableConcept40_50.convertCodeableConcept(src.getProductCode()));
if (src.hasStatus())
tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement()));
// if (src.hasProductCategory())
// tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement()));
// if (src.hasProductCode())
// tgt.setProductCode(CodeableConcept40_50.convertCodeableConcept(src.getProductCode()));
// if (src.hasStatus())
// tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getRequest()) tgt.addRequest(Reference40_50.convertReference(t));
// if (src.hasQuantity())
// tgt.setQuantityElement(Integer40_50.convertInteger(src.getQuantityElement()));
@ -76,12 +76,12 @@ public class BiologicallyDerivedProduct40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasProductCategory())
tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement()));
if (src.hasProductCode())
tgt.setProductCode(CodeableConcept40_50.convertCodeableConcept(src.getProductCode()));
if (src.hasStatus())
tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement()));
// if (src.hasProductCategory())
// tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement()));
// if (src.hasProductCode())
// tgt.setProductCode(CodeableConcept40_50.convertCodeableConcept(src.getProductCode()));
// if (src.hasStatus())
// tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getRequest()) tgt.addRequest(Reference40_50.convertReference(t));
// if (src.hasQuantity())
// tgt.setQuantityElement(Integer40_50.convertInteger(src.getQuantityElement()));
@ -96,100 +96,100 @@ public class BiologicallyDerivedProduct40_50 {
// tgt.addStorage(convertBiologicallyDerivedProductStorageComponent(t));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case ORGAN:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN);
break;
case TISSUE:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE);
break;
case FLUID:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID);
break;
case CELLS:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS);
break;
case BIOLOGICALAGENT:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case ORGAN:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN);
break;
case TISSUE:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE);
break;
case FLUID:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID);
break;
case CELLS:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS);
break;
case BIOLOGICALAGENT:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case AVAILABLE:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE);
break;
case UNAVAILABLE:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case AVAILABLE:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE);
break;
case UNAVAILABLE:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL);
break;
}
return tgt;
}
//
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory());
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// switch (src.getValue()) {
// case ORGAN:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN);
// break;
// case TISSUE:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE);
// break;
// case FLUID:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID);
// break;
// case CELLS:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS);
// break;
// case BIOLOGICALAGENT:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT);
// break;
// default:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL);
// break;
// }
// return tgt;
// }
//
// static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory());
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// switch (src.getValue()) {
// case ORGAN:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN);
// break;
// case TISSUE:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE);
// break;
// case FLUID:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID);
// break;
// case CELLS:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS);
// break;
// case BIOLOGICALAGENT:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT);
// break;
// default:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL);
// break;
// }
// return tgt;
// }
//
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory());
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// switch (src.getValue()) {
// case AVAILABLE:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE);
// break;
// case UNAVAILABLE:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE);
// break;
// default:
// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL);
// break;
// }
// return tgt;
// }
//
// static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException {
// if (src == null || src.isEmpty())
// return null;
// org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory());
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// switch (src.getValue()) {
// case AVAILABLE:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE);
// break;
// case UNAVAILABLE:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE);
// break;
// default:
// tgt.setValue(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL);
// break;
// }
// return tgt;
// }
public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent convertBiologicallyDerivedProductCollectionComponent(org.hl7.fhir.r4.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent src) throws FHIRException {
if (src == null)

View File

@ -51,8 +51,8 @@ public class BodyStructure40_50 {
tgt.setActiveElement(Boolean40_50.convertBoolean(src.getActiveElement()));
if (src.hasMorphology())
tgt.setMorphology(CodeableConcept40_50.convertCodeableConcept(src.getMorphology()));
if (src.hasLocation())
tgt.setLocation(CodeableConcept40_50.convertCodeableConcept(src.getLocation()));
// if (src.hasLocation())
// tgt.setLocation(CodeableConcept40_50.convertCodeableConcept(src.getLocation()));
// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getLocationQualifier())
// tgt.addLocationQualifier(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasDescription())
@ -74,8 +74,8 @@ public class BodyStructure40_50 {
tgt.setActiveElement(Boolean40_50.convertBoolean(src.getActiveElement()));
if (src.hasMorphology())
tgt.setMorphology(CodeableConcept40_50.convertCodeableConcept(src.getMorphology()));
if (src.hasLocation())
tgt.setLocation(CodeableConcept40_50.convertCodeableConcept(src.getLocation()));
// if (src.hasLocation())
// tgt.setLocation(CodeableConcept40_50.convertCodeableConcept(src.getLocation()));
// for (org.hl7.fhir.r5.model.CodeableConcept t : src.getLocationQualifier())
// tgt.addLocationQualifier(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasDescription())

View File

@ -71,7 +71,7 @@ public class CarePlan40_50 {
if (src.hasCreated())
tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference40_50.convertReference(src.getAuthor()));
tgt.setCustodian(Reference40_50.convertReference(src.getAuthor()));
for (org.hl7.fhir.r4.model.Reference t : src.getContributor())
tgt.addContributor(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getCareTeam()) tgt.addCareTeam(Reference40_50.convertReference(t));
@ -118,8 +118,8 @@ public class CarePlan40_50 {
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
if (src.hasCreated())
tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement()));
if (src.hasAuthor())
tgt.setAuthor(Reference40_50.convertReference(src.getAuthor()));
if (src.hasCustodian())
tgt.setAuthor(Reference40_50.convertReference(src.getCustodian()));
for (org.hl7.fhir.r5.model.Reference t : src.getContributor())
tgt.addContributor(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getCareTeam()) tgt.addCareTeam(Reference40_50.convertReference(t));

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.VersionConvertorConstants;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_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.metadata40_50.ContactDetail40_50;
@ -10,6 +11,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.*;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
@ -83,9 +85,9 @@ public class ConceptMap40_50 {
if (src.hasCopyright())
tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement()));
if (src.hasSource())
tgt.setSource(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSource()));
tgt.setSourceScope(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSource()));
if (src.hasTarget())
tgt.setTarget(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTarget()));
tgt.setTargetScope(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTarget()));
for (org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup())
tgt.addGroup(convertConceptMapGroupComponent(t));
return tgt;
@ -126,10 +128,10 @@ public class ConceptMap40_50 {
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
if (src.hasCopyright())
tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement()));
if (src.hasSource())
tgt.setSource(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSource()));
if (src.hasTarget())
tgt.setTarget(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTarget()));
if (src.hasSourceScope())
tgt.setSource(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSourceScope()));
if (src.hasTargetScope())
tgt.setTarget(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTargetScope()));
for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup())
tgt.addGroup(convertConceptMapGroupComponent(t));
return tgt;
@ -350,12 +352,11 @@ public class ConceptMap40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasProperty())
tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setSystemElement(Canonical40_50.convertCanonical(src.getSystemElement()));
if (src.hasValue())
tgt.setValueElement(String40_50.convertString(src.getValueElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String40_50.convertString(src.getDisplayElement()));
if (src.hasSystem()) {
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getValue()).setDisplay(src.getDisplay()));
} else if (src.hasValueElement()) {
tgt.setValue(String40_50.convertString(src.getValueElement()));
}
return tgt;
}
@ -366,12 +367,15 @@ public class ConceptMap40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasProperty())
tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement()));
if (src.hasSystem())
tgt.setSystemElement(Canonical40_50.convertCanonical(src.getSystemElement()));
if (src.hasValue())
tgt.setValueElement(String40_50.convertString(src.getValueElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String40_50.convertString(src.getDisplayElement()));
if (src.hasValueCoding()) {
tgt.setSystem(src.getValueCoding().getSystem());
tgt.setValue(src.getValueCoding().getCode());
tgt.setDisplay(src.getValueCoding().getDisplay());
} else if (src.hasValue()) {
tgt.setValue(src.getValue().primitiveValue());
}
return tgt;
}
@ -387,7 +391,7 @@ public class ConceptMap40_50 {
if (src.hasDisplay())
tgt.setDisplayElement(String40_50.convertString(src.getDisplayElement()));
if (src.hasUrl())
tgt.setUrlElement(Canonical40_50.convertCanonical(src.getUrlElement()));
tgt.setOtherMapElement(Canonical40_50.convertCanonical(src.getUrlElement()));
return tgt;
}
@ -402,40 +406,40 @@ public class ConceptMap40_50 {
tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement()));
if (src.hasDisplay())
tgt.setDisplayElement(String40_50.convertString(src.getDisplayElement()));
if (src.hasUrl())
tgt.setUrlElement(Canonical40_50.convertCanonical(src.getUrlElement()));
if (src.hasOtherMap())
tgt.setUrlElement(Canonical40_50.convertCanonical(src.getOtherMapElement()));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedModeEnumFactory());
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedModeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case PROVIDED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.PROVIDED);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.USESOURCECODE);
break;
case FIXED:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.FIXED);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.FIXED);
break;
case OTHERMAP:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.OTHERMAP);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.OTHERMAP);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode.NULL);
tgt.setValue(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapGroupUnmappedMode> src) throws FHIRException {
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode> convertConceptMapGroupUnmappedMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupUnmappedMode> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedModeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case PROVIDED:
case USESOURCECODE:
tgt.setValue(org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupUnmappedMode.PROVIDED);
break;
case FIXED:

View File

@ -1,5 +1,9 @@
package org.hl7.fhir.convertors.conv40_50.resources40_50;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Annotation40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
@ -7,6 +11,10 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier4
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_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.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.Condition.ConditionParticipantComponent;
/*
Copyright (c) 2011+, HL7, Inc.
@ -69,13 +77,13 @@ public class Condition40_50 {
if (src.hasRecordedDate())
tgt.setRecordedDateElement(DateTime40_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference40_50.convertReference(src.getRecorder()));
tgt.addParticipant().setFunction(new CodeableConcept(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author", "Author"))).setActor(Reference40_50.convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(Reference40_50.convertReference(src.getAsserter()));
tgt.addParticipant().setFunction(new CodeableConcept(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant", "Informant"))).setActor(Reference40_50.convertReference(src.getAsserter()));
for (org.hl7.fhir.r4.model.Condition.ConditionStageComponent t : src.getStage())
tgt.addStage(convertConditionStageComponent(t));
for (org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
tgt.getEvidence().addAll(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
return tgt;
}
@ -109,13 +117,15 @@ public class Condition40_50 {
tgt.setAbatement(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAbatement()));
if (src.hasRecordedDate())
tgt.setRecordedDateElement(DateTime40_50.convertDateTime(src.getRecordedDateElement()));
if (src.hasRecorder())
tgt.setRecorder(Reference40_50.convertReference(src.getRecorder()));
if (src.hasAsserter())
tgt.setAsserter(Reference40_50.convertReference(src.getAsserter()));
for (org.hl7.fhir.r5.model.Condition.ConditionParticipantComponent t : src.getParticipant()) {
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "author"))
tgt.setRecorder(Reference40_50.convertReference(t.getActor()));
if (t.getFunction().hasCoding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "informant"))
tgt.setAsserter(Reference40_50.convertReference(t.getActor()));
}
for (org.hl7.fhir.r5.model.Condition.ConditionStageComponent t : src.getStage())
tgt.addStage(convertConditionStageComponent(t));
for (org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent t : src.getEvidence())
for (CodeableReference t : src.getEvidence())
tgt.addEvidence(convertConditionEvidenceComponent(t));
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
return tgt;
@ -147,25 +157,35 @@ public class Condition40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
public static List<org.hl7.fhir.r5.model.CodeableReference> convertConditionEvidenceComponent(org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode())
tgt.addCode(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) tgt.addDetail(Reference40_50.convertReference(t));
return tgt;
List<org.hl7.fhir.r5.model.CodeableReference> list = new ArrayList<>();
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
tgt.setConcept(CodeableConcept40_50.convertCodeableConcept(t));
list.add(tgt);
}
for (org.hl7.fhir.r4.model.Reference t : src.getDetail()) {
org.hl7.fhir.r5.model.CodeableReference tgt = new org.hl7.fhir.r5.model.CodeableReference();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
tgt.setReference(Reference40_50.convertReference(t));
list.add(tgt);
}
return list;
}
public static org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
public static org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.r5.model.CodeableReference src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent tgt = new org.hl7.fhir.r4.model.Condition.ConditionEvidenceComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCode())
tgt.addCode(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getDetail()) tgt.addDetail(Reference40_50.convertReference(t));
if (src.hasConcept())
tgt.addCode(CodeableConcept40_50.convertCodeableConcept(src.getConcept()));
if (src.hasReference())
tgt.addDetail(Reference40_50.convertReference(src.getReference()));
return tgt;
}
}

View File

@ -62,10 +62,10 @@ public class Consent40_50 {
tgt.addSourceAttachment(Attachment40_50.convertAttachment(src.getSourceAttachment()));
if (src.hasSourceReference())
tgt.addSourceReference(Reference40_50.convertReference(src.getSourceReference()));
for (org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent t : src.getPolicy())
tgt.addPolicy(convertConsentPolicyComponent(t));
if (src.hasPolicyRule())
tgt.setPolicyRule(CodeableConcept40_50.convertCodeableConcept(src.getPolicyRule()));
// for (org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent t : src.getPolicy())
// tgt.addPolicy(convertConsentPolicyComponent(t));
// if (src.hasPolicyRule())
// tgt.setPolicyRule(CodeableConcept40_50.convertCodeableConcept(src.getPolicyRule()));
for (org.hl7.fhir.r4.model.Consent.ConsentVerificationComponent t : src.getVerification())
tgt.addVerification(convertConsentVerificationComponent(t));
if (src.hasProvision())
@ -98,10 +98,10 @@ public class Consent40_50 {
tgt.setSource(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSourceAttachmentFirstRep()));
if (src.hasSourceReference())
tgt.setSource(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSourceReferenceFirstRep()));
for (org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent t : src.getPolicy())
tgt.addPolicy(convertConsentPolicyComponent(t));
if (src.hasPolicyRule())
tgt.setPolicyRule(CodeableConcept40_50.convertCodeableConcept(src.getPolicyRule()));
// for (org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent t : src.getPolicy())
// tgt.addPolicy(convertConsentPolicyComponent(t));
// if (src.hasPolicyRule())
// tgt.setPolicyRule(CodeableConcept40_50.convertCodeableConcept(src.getPolicyRule()));
for (org.hl7.fhir.r5.model.Consent.ConsentVerificationComponent t : src.getVerification())
tgt.addVerification(convertConsentVerificationComponent(t));
if (src.hasProvision())
@ -165,29 +165,29 @@ public class Consent40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasAuthority())
tgt.setAuthorityElement(Uri40_50.convertUri(src.getAuthorityElement()));
if (src.hasUri())
tgt.setUriElement(Uri40_50.convertUri(src.getUriElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasAuthority())
tgt.setAuthorityElement(Uri40_50.convertUri(src.getAuthorityElement()));
if (src.hasUri())
tgt.setUriElement(Uri40_50.convertUri(src.getUriElement()));
return tgt;
}
// public static org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// if (src.hasAuthority())
// tgt.setAuthorityElement(Uri40_50.convertUri(src.getAuthorityElement()));
// if (src.hasUri())
// tgt.setUriElement(Uri40_50.convertUri(src.getUriElement()));
// return tgt;
// }
//
// public static org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent convertConsentPolicyComponent(org.hl7.fhir.r5.model.Consent.ConsentPolicyComponent src) throws FHIRException {
// if (src == null)
// return null;
// org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent tgt = new org.hl7.fhir.r4.model.Consent.ConsentPolicyComponent();
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
// if (src.hasAuthority())
// tgt.setAuthorityElement(Uri40_50.convertUri(src.getAuthorityElement()));
// if (src.hasUri())
// tgt.setUriElement(Uri40_50.convertUri(src.getUriElement()));
// return tgt;
// }
public static org.hl7.fhir.r5.model.Consent.ConsentVerificationComponent convertConsentVerificationComponent(org.hl7.fhir.r4.model.Consent.ConsentVerificationComponent src) throws FHIRException {
if (src == null)

View File

@ -56,7 +56,7 @@ public class Device40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasDistinctIdentifier())
tgt.getBiologicalSource().setValueElement(String40_50.convertString(src.getDistinctIdentifierElement()));
tgt.getBiologicalSourceEvent().setValueElement(String40_50.convertString(src.getDistinctIdentifierElement()));
if (src.hasManufacturer())
tgt.setManufacturerElement(String40_50.convertString(src.getManufacturerElement()));
if (src.hasManufactureDate())
@ -114,8 +114,8 @@ public class Device40_50 {
tgt.setStatusElement(convertFHIRDeviceStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getStatusReason())
tgt.addStatusReason(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasBiologicalSource())
tgt.setDistinctIdentifierElement(String40_50.convertString(src.getBiologicalSource().getValueElement()));
if (src.hasBiologicalSourceEvent())
tgt.setDistinctIdentifierElement(String40_50.convertString(src.getBiologicalSourceEvent().getValueElement()));
if (src.hasManufacturer())
tgt.setManufacturerElement(String40_50.convertString(src.getManufacturerElement()));
if (src.hasManufactureDate())

View File

@ -50,8 +50,8 @@ public class DeviceDefinition40_50 {
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
for (org.hl7.fhir.r4.model.DeviceDefinition.DeviceDefinitionUdiDeviceIdentifierComponent t : src.getUdiDeviceIdentifier())
tgt.addUdiDeviceIdentifier(convertDeviceDefinitionUdiDeviceIdentifierComponent(t));
if (src.hasManufacturer())
tgt.setManufacturer(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getManufacturer()));
if (src.hasManufacturerReference())
tgt.setManufacturer(Reference40_50.convertReference(src.getManufacturerReference()));
for (org.hl7.fhir.r4.model.DeviceDefinition.DeviceDefinitionDeviceNameComponent t : src.getDeviceName())
tgt.addDeviceName(convertDeviceDefinitionDeviceNameComponent(t));
if (src.hasModelNumber())

View File

@ -54,8 +54,8 @@ public class DeviceRequest40_50 {
for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri())
tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPriorRequest())
tgt.addPriorRequest(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getPriorRequest())
// tgt.addPriorRequest(Reference40_50.convertReference(t));
if (src.hasGroupIdentifier())
tgt.setGroupIdentifier(Identifier40_50.convertIdentifier(src.getGroupIdentifier()));
if (src.hasStatus())
@ -110,8 +110,8 @@ public class DeviceRequest40_50 {
for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri())
tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPriorRequest())
tgt.addPriorRequest(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getPriorRequest())
// tgt.addPriorRequest(Reference40_50.convertReference(t));
if (src.hasGroupIdentifier())
tgt.setGroupIdentifier(Identifier40_50.convertIdentifier(src.getGroupIdentifier()));
if (src.hasStatus())

View File

@ -7,7 +7,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.MarkDown4
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.DocumentReference.DocumentAttestationMode;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceAttesterComponent;
/*
@ -64,7 +64,8 @@ public class DocumentReference40_50 {
tgt.setDateElement(Instant40_50.convertInstant(src.getDateElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t));
if (src.hasAuthenticator())
tgt.addAttester().setMode(DocumentAttestationMode.OFFICIAL).setParty(Reference40_50.convertReference(src.getAuthenticator()));
tgt.addAttester().setMode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding("http://hl7.org/fhir/composition-attestation-mode","official", "Official")))
.setParty(Reference40_50.convertReference(src.getAuthenticator()));
if (src.hasCustodian())
tgt.setCustodian(Reference40_50.convertReference(src.getCustodian()));
for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo())
@ -103,7 +104,7 @@ public class DocumentReference40_50 {
tgt.setDateElement(Instant40_50.convertInstant(src.getDateElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t));
for (DocumentReferenceAttesterComponent t : src.getAttester()) {
if (t.getMode() == DocumentAttestationMode.OFFICIAL)
if (t.getMode().hasCoding("http://hl7.org/fhir/composition-attestation-mode", "official"))
tgt.setAuthenticator(Reference40_50.convertReference(t.getParty()));
}
if (src.hasCustodian())
@ -250,8 +251,6 @@ public class DocumentReference40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment40_50.convertAttachment(src.getAttachment()));
if (src.hasFormat())
tgt.setFormat(Coding40_50.convertCoding(src.getFormat()));
return tgt;
}
@ -262,15 +261,13 @@ public class DocumentReference40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasAttachment())
tgt.setAttachment(Attachment40_50.convertAttachment(src.getAttachment()));
if (src.hasFormat())
tgt.setFormat(Coding40_50.convertCoding(src.getFormat()));
return tgt;
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent src, org.hl7.fhir.r5.model.DocumentReference tgt) throws FHIRException {
for (org.hl7.fhir.r4.model.Reference t : src.getEncounter()) tgt.addEncounter(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getEncounter()) tgt.addContext(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept40_50.convertCodeableConcept(t));
tgt.addEvent(new CodeableReference().setConcept(CodeableConcept40_50.convertCodeableConcept(t)));
if (src.hasPeriod())
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -279,13 +276,14 @@ public class DocumentReference40_50 {
tgt.setPracticeSetting(CodeableConcept40_50.convertCodeableConcept(src.getPracticeSetting()));
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));
// for (org.hl7.fhir.r4.model.Reference t : src.getRelated()) tgt.addRelated(Reference40_50.convertReference(t));
}
public static void convertDocumentReferenceContextComponent(org.hl7.fhir.r5.model.DocumentReference src, org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceContextComponent tgt) throws FHIRException {
for (org.hl7.fhir.r5.model.Reference t : src.getEncounter()) tgt.addEncounter(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getEvent())
tgt.addEvent(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getContext()) tgt.addEncounter(Reference40_50.convertReference(t));
for (CodeableReference t : src.getEvent())
if (t.hasConcept())
tgt.addEvent(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
if (src.hasPeriod())
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
if (src.hasFacilityType())
@ -294,6 +292,6 @@ public class DocumentReference40_50 {
tgt.setPracticeSetting(CodeableConcept40_50.convertCodeableConcept(src.getPracticeSetting()));
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));
// 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_(Coding40_50.convertCoding(src.getClass_()));
tgt.setClass_(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(CodeableConcept40_50.convertCodeableConcept(src.getServiceType()));
tgt.setServiceType(new CodeableReference(CodeableConcept40_50.convertCodeableConcept(src.getServiceType())));
if (src.hasPriority())
tgt.setPriority(CodeableConcept40_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())
@ -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_()));
tgt.setClass_(Coding40_50.convertCoding(src.getClass_().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.hasServiceType())
tgt.setServiceType(CodeableConcept40_50.convertCodeableConcept(src.getServiceType()));
if (src.getServiceType().hasConcept())
tgt.setServiceType(CodeableConcept40_50.convertCodeableConcept(src.getServiceType().getConcept()));
if (src.hasPriority())
tgt.setPriority(CodeableConcept40_50.convertCodeableConcept(src.getPriority()));
if (src.hasSubject())

View File

@ -49,7 +49,7 @@ public class Endpoint40_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEndpointStatus(src.getStatusElement()));
if (src.hasConnectionType())
tgt.setConnectionType(Coding40_50.convertCoding(src.getConnectionType()));
tgt.addConnectionType(Coding40_50.convertCoding(src.getConnectionType()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasManagingOrganization())
@ -78,7 +78,7 @@ public class Endpoint40_50 {
if (src.hasStatus())
tgt.setStatusElement(convertEndpointStatus(src.getStatusElement()));
if (src.hasConnectionType())
tgt.setConnectionType(Coding40_50.convertCoding(src.getConnectionType()));
tgt.setConnectionType(Coding40_50.convertCoding(src.getConnectionTypeFirstRep()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasManagingOrganization())

View File

@ -201,7 +201,7 @@ public class ExampleScenario40_50 {
if (src.hasResourceId())
tgt.setResourceIdElement(String40_50.convertString(src.getResourceIdElement()));
if (src.hasResourceType())
tgt.setResourceTypeElement(convertFHIRResourceType(src.getResourceTypeElement()));
tgt.setTypeElement(convertFHIRResourceType(src.getResourceTypeElement()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())
@ -220,8 +220,8 @@ public class ExampleScenario40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasResourceId())
tgt.setResourceIdElement(String40_50.convertString(src.getResourceIdElement()));
if (src.hasResourceType())
tgt.setResourceTypeElement(convertFHIRResourceType(src.getResourceTypeElement()));
if (src.hasType())
tgt.setResourceTypeElement(convertFHIRResourceType(src.getTypeElement()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())

View File

@ -11,7 +11,10 @@ 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.r4.model.codesystems.CodesystemAltcodeKindEnumFactory;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.CodeableReference;
import org.hl7.fhir.r5.model.Coding;
/*
Copyright (c) 2011+, HL7, Inc.
@ -53,7 +56,8 @@ public class ImagingStudy40_50 {
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertImagingStudyStatus(src.getStatusElement()));
for (org.hl7.fhir.r4.model.Coding t : src.getModality()) tgt.addModality(Coding40_50.convertCoding(t));
for (org.hl7.fhir.r4.model.Coding t : src.getModality())
tgt.addModality(new CodeableConcept().addCoding(Coding40_50.convertCoding(t)));
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
if (src.hasEncounter())
@ -97,7 +101,9 @@ public class ImagingStudy40_50 {
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertImagingStudyStatus(src.getStatusElement()));
for (org.hl7.fhir.r5.model.Coding t : src.getModality()) tgt.addModality(Coding40_50.convertCoding(t));
for (CodeableConcept t : src.getModality())
for (Coding tt : t.getCoding())
tgt.addModality(Coding40_50.convertCoding(tt));
if (src.hasSubject())
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
if (src.hasEncounter())
@ -203,16 +209,16 @@ public class ImagingStudy40_50 {
if (src.hasNumber())
tgt.setNumberElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberElement()));
if (src.hasModality())
tgt.setModality(Coding40_50.convertCoding(src.getModality()));
tgt.setModality(new CodeableConcept().addCoding(Coding40_50.convertCoding(src.getModality())));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasNumberOfInstances())
tgt.setNumberOfInstancesElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberOfInstancesElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
if (src.hasBodySite())
tgt.setBodySite(Coding40_50.convertCoding(src.getBodySite()));
tgt.setBodySite(new CodeableReference(new CodeableConcept(Coding40_50.convertCoding(src.getBodySite()))));
if (src.hasLaterality())
tgt.setLaterality(Coding40_50.convertCoding(src.getLaterality()));
tgt.setLaterality(new CodeableConcept(Coding40_50.convertCoding(src.getLaterality())));
for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t));
if (src.hasStarted())
tgt.setStartedElement(DateTime40_50.convertDateTime(src.getStartedElement()));
@ -233,16 +239,16 @@ public class ImagingStudy40_50 {
if (src.hasNumber())
tgt.setNumberElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberElement()));
if (src.hasModality())
tgt.setModality(Coding40_50.convertCoding(src.getModality()));
tgt.setModality(Coding40_50.convertCoding(src.getModality().getCodingFirstRep()));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasNumberOfInstances())
tgt.setNumberOfInstancesElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberOfInstancesElement()));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
if (src.hasBodySite())
tgt.setBodySite(Coding40_50.convertCoding(src.getBodySite()));
if (src.hasLaterality())
tgt.setLaterality(Coding40_50.convertCoding(src.getLaterality()));
if (src.getBodySite().getConcept().hasCoding())
tgt.setBodySite(Coding40_50.convertCoding(src.getBodySite().getConcept().getCodingFirstRep()));
if (src.getLaterality().hasCoding())
tgt.setLaterality(Coding40_50.convertCoding(src.getLaterality().getCodingFirstRep()));
for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t));
if (src.hasStarted())
tgt.setStartedElement(DateTime40_50.convertDateTime(src.getStartedElement()));

View File

@ -60,12 +60,12 @@ public class Immunization40_50 {
tgt.setEncounter(Reference40_50.convertReference(src.getEncounter()));
if (src.hasOccurrence())
tgt.setOccurrence(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getOccurrence()));
if (src.hasRecorded())
tgt.setRecordedElement(DateTime40_50.convertDateTime(src.getRecordedElement()));
// if (src.hasRecorded())
// tgt.setRecordedElement(DateTime40_50.convertDateTime(src.getRecordedElement()));
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(Boolean40_50.convertBoolean(src.getPrimarySourceElement()));
if (src.hasReportOrigin())
tgt.setInformationSource(CodeableConcept40_50.convertCodeableConcept(src.getReportOrigin()));
tgt.setInformationSource(new CodeableReference(CodeableConcept40_50.convertCodeableConcept(src.getReportOrigin())));
if (src.hasLocation())
tgt.setLocation(Reference40_50.convertReference(src.getLocation()));
if (src.hasManufacturer())
@ -123,12 +123,12 @@ public class Immunization40_50 {
tgt.setEncounter(Reference40_50.convertReference(src.getEncounter()));
if (src.hasOccurrence())
tgt.setOccurrence(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getOccurrence()));
if (src.hasRecorded())
tgt.setRecordedElement(DateTime40_50.convertDateTime(src.getRecordedElement()));
// if (src.hasRecorded())
// tgt.setRecordedElement(DateTime40_50.convertDateTime(src.getRecordedElement()));
if (src.hasPrimarySource())
tgt.setPrimarySourceElement(Boolean40_50.convertBoolean(src.getPrimarySourceElement()));
if (src.hasInformationSourceCodeableConcept())
tgt.setReportOrigin(CodeableConcept40_50.convertCodeableConcept(src.getInformationSourceCodeableConcept()));
if (src.getInformationSource().hasConcept())
tgt.setReportOrigin(CodeableConcept40_50.convertCodeableConcept(src.getInformationSource().getConcept()));
if (src.hasLocation())
tgt.setLocation(Reference40_50.convertReference(src.getLocation()));
if (src.hasManufacturer())
@ -277,7 +277,7 @@ public class Immunization40_50 {
if (src.hasDate())
tgt.setDateElement(DateTime40_50.convertDateTime(src.getDateElement()));
if (src.hasDetail())
tgt.setDetail(Reference40_50.convertReference(src.getDetail()));
tgt.setManifestation(new CodeableReference(Reference40_50.convertReference(src.getDetail())));
if (src.hasReported())
tgt.setReportedElement(Boolean40_50.convertBoolean(src.getReportedElement()));
return tgt;
@ -290,8 +290,8 @@ public class Immunization40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasDate())
tgt.setDateElement(DateTime40_50.convertDateTime(src.getDateElement()));
if (src.hasDetail())
tgt.setDetail(Reference40_50.convertReference(src.getDetail()));
if (src.hasManifestation())
tgt.setDetail(Reference40_50.convertReference(src.getManifestation().getReference()));
if (src.hasReported())
tgt.setReportedElement(Boolean40_50.convertBoolean(src.getReportedElement()));
return tgt;

View File

@ -2356,7 +2356,7 @@ public class ImplementationGuide40_50 {
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
return tgt;
}
@ -2385,7 +2385,7 @@ public class ImplementationGuide40_50 {
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
if (src.hasExample())
tgt.setExample(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getExample()));
if (src.hasGroupingId())

View File

@ -6,6 +6,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.PositiveI
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.
@ -93,7 +94,7 @@ public class InsurancePlan40_50 {
tgt.setAdministeredBy(Reference40_50.convertReference(src.getAdministeredBy()));
for (org.hl7.fhir.r5.model.Reference t : src.getCoverageArea())
tgt.addCoverageArea(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.InsurancePlan.InsurancePlanContactComponent t : src.getContact())
for (ExtendedContactDetail t : src.getContact())
tgt.addContact(convertInsurancePlanContactComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getNetwork()) tgt.addNetwork(Reference40_50.convertReference(t));
@ -104,10 +105,10 @@ public class InsurancePlan40_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.InsurancePlan.InsurancePlanContactComponent convertInsurancePlanContactComponent(org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.ExtendedContactDetail convertInsurancePlanContactComponent(org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.InsurancePlan.InsurancePlanContactComponent tgt = new org.hl7.fhir.r5.model.InsurancePlan.InsurancePlanContactComponent();
org.hl7.fhir.r5.model.ExtendedContactDetail tgt = new org.hl7.fhir.r5.model.ExtendedContactDetail();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasPurpose())
tgt.setPurpose(CodeableConcept40_50.convertCodeableConcept(src.getPurpose()));
@ -120,7 +121,7 @@ public class InsurancePlan40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent convertInsurancePlanContactComponent(org.hl7.fhir.r5.model.InsurancePlan.InsurancePlanContactComponent src) throws FHIRException {
public static org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent convertInsurancePlanContactComponent(org.hl7.fhir.r5.model.ExtendedContactDetail src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent tgt = new org.hl7.fhir.r4.model.InsurancePlan.InsurancePlanContactComponent();

View File

@ -53,10 +53,10 @@ public class MedicationDispense40_50 {
for (org.hl7.fhir.r4.model.Reference t : src.getPartOf()) tgt.addPartOf(Reference40_50.convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertMedicationStatus(src.getStatusElement()));
if (src.hasStatusReasonCodeableConcept())
tgt.getStatusReason().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getStatusReasonCodeableConcept()));
if (src.hasStatusReasonReference())
tgt.getStatusReason().setReference(Reference40_50.convertReference(src.getStatusReasonReference()));
// if (src.hasStatusReasonCodeableConcept())
// tgt.getStatusReason().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getStatusReasonCodeableConcept()));
// if (src.hasStatusReasonReference())
// tgt.getStatusReason().setReference(Reference40_50.convertReference(src.getStatusReasonReference()));
if (src.hasCategory())
tgt.addCategory(CodeableConcept40_50.convertCodeableConcept(src.getCategory()));
if (src.hasMedicationCodeableConcept())
@ -93,8 +93,8 @@ public class MedicationDispense40_50 {
tgt.addDosageInstruction(Dosage40_50.convertDosage(t));
if (src.hasSubstitution())
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
for (org.hl7.fhir.r4.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference40_50.convertReference(t));
return tgt;
@ -110,10 +110,10 @@ public class MedicationDispense40_50 {
for (org.hl7.fhir.r5.model.Reference t : src.getPartOf()) tgt.addPartOf(Reference40_50.convertReference(t));
if (src.hasStatus())
tgt.setStatusElement(convertStatus(src.getStatusElement()));
if (src.getStatusReason().hasConcept())
tgt.setStatusReason(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getStatusReason().getConcept()));
if (src.getStatusReason().hasReference())
tgt.setStatusReason(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getStatusReason().getReference()));
// if (src.getStatusReason().hasConcept())
// tgt.setStatusReason(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getStatusReason().getConcept()));
// if (src.getStatusReason().hasReference())
// tgt.setStatusReason(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getStatusReason().getReference()));
if (src.hasCategory())
tgt.setCategory(CodeableConcept40_50.convertCodeableConcept(src.getCategoryFirstRep()));
if (src.getMedication().hasConcept())
@ -150,8 +150,8 @@ public class MedicationDispense40_50 {
tgt.addDosageInstruction(Dosage40_50.convertDosage(t));
if (src.hasSubstitution())
tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution()));
for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference40_50.convertReference(t));
return tgt;

View File

@ -60,7 +60,7 @@ public class MedicationRequest40_50 {
if (src.hasReportedBooleanType())
tgt.setReportedElement(Boolean40_50.convertBoolean(src.getReportedBooleanType()));
if (src.hasReportedReference())
tgt.setInformationSource(Reference40_50.convertReference(src.getReportedReference()));
tgt.addInformationSource(Reference40_50.convertReference(src.getReportedReference()));
if (src.hasMedicationCodeableConcept())
tgt.getMedication().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getMedicationCodeableConcept()));
if (src.hasMedicationReference())
@ -76,7 +76,7 @@ public class MedicationRequest40_50 {
if (src.hasRequester())
tgt.setRequester(Reference40_50.convertReference(src.getRequester()));
if (src.hasPerformer())
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
tgt.addPerformer(Reference40_50.convertReference(src.getPerformer()));
if (src.hasPerformerType())
tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType()));
if (src.hasRecorder())
@ -105,8 +105,8 @@ public class MedicationRequest40_50 {
if (src.hasPriorPrescription())
tgt.setPriorPrescription(Reference40_50.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.r4.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getEventHistory())
// tgt.addDetectedIssue(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r4.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference40_50.convertReference(t));
return tgt;
}
@ -133,7 +133,7 @@ public class MedicationRequest40_50 {
if (src.hasReported())
tgt.setReported(Boolean40_50.convertBoolean(src.getReportedElement()));
if (src.hasInformationSource())
tgt.setReported(Reference40_50.convertReference(src.getInformationSource()));
tgt.setReported(Reference40_50.convertReference(src.getInformationSourceFirstRep()));
if (src.getMedication().hasReference())
tgt.setMedication(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getMedication().getReference()));
if (src.getMedication().hasConcept())
@ -149,7 +149,7 @@ public class MedicationRequest40_50 {
if (src.hasRequester())
tgt.setRequester(Reference40_50.convertReference(src.getRequester()));
if (src.hasPerformer())
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
tgt.setPerformer(Reference40_50.convertReference(src.getPerformerFirstRep()));
if (src.hasPerformerType())
tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType()));
if (src.hasRecorder())
@ -179,8 +179,8 @@ public class MedicationRequest40_50 {
tgt.setSubstitution(convertMedicationRequestSubstitutionComponent(src.getSubstitution()));
if (src.hasPriorPrescription())
tgt.setPriorPrescription(Reference40_50.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
tgt.addDetectedIssue(Reference40_50.convertReference(t));
// for (org.hl7.fhir.r5.model.Reference t : src.getDetectedIssue())
// tgt.addDetectedIssue(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEventHistory())
tgt.addEventHistory(Reference40_50.convertReference(t));
return tgt;

View File

@ -71,7 +71,7 @@ public class MedicationStatement40_50 {
if (src.hasDateAsserted())
tgt.setDateAssertedElement(DateTime40_50.convertDateTime(src.getDateAssertedElement()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference40_50.convertReference(src.getInformationSource()));
tgt.addInformationSource(Reference40_50.convertReference(src.getInformationSource()));
for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom())
tgt.addDerivedFrom(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
@ -113,7 +113,7 @@ public class MedicationStatement40_50 {
if (src.hasDateAsserted())
tgt.setDateAssertedElement(DateTime40_50.convertDateTime(src.getDateAssertedElement()));
if (src.hasInformationSource())
tgt.setInformationSource(Reference40_50.convertReference(src.getInformationSource()));
tgt.setInformationSource(Reference40_50.convertReference(src.getInformationSourceFirstRep()));
for (org.hl7.fhir.r5.model.Reference t : src.getDerivedFrom())
tgt.addDerivedFrom(Reference40_50.convertReference(t));
for (CodeableReference t : src.getReason())

View File

@ -90,7 +90,7 @@ public class MessageDefinition40_50 {
tgt.setResponseRequiredElement(convertMessageheaderResponseRequest(src.getResponseRequiredElement()));
for (org.hl7.fhir.r4.model.MessageDefinition.MessageDefinitionAllowedResponseComponent t : src.getAllowedResponse())
tgt.addAllowedResponse(convertMessageDefinitionAllowedResponseComponent(t));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getGraph()) tgt.getGraph().add(Canonical40_50.convertCanonical(t));
for (org.hl7.fhir.r4.model.CanonicalType t : src.getGraph()) tgt.setGraphElement(Canonical40_50.convertCanonical(t));
return tgt;
}
@ -145,7 +145,8 @@ public class MessageDefinition40_50 {
tgt.setResponseRequiredElement(convertMessageheaderResponseRequest(src.getResponseRequiredElement()));
for (org.hl7.fhir.r5.model.MessageDefinition.MessageDefinitionAllowedResponseComponent t : src.getAllowedResponse())
tgt.addAllowedResponse(convertMessageDefinitionAllowedResponseComponent(t));
for (org.hl7.fhir.r5.model.CanonicalType t : src.getGraph()) tgt.getGraph().add(Canonical40_50.convertCanonical(t));
if (src.hasGraph())
tgt.getGraph().add(Canonical40_50.convertCanonical(src.getGraphElement()));
return tgt;
}

View File

@ -173,7 +173,7 @@ public class MessageHeader40_50 {
org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r5.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifierElement(Id40_50.convertId(src.getIdentifierElement()));
tgt.setIdentifier(new org.hl7.fhir.r5.model.Identifier().setValue(src.getIdentifier()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())
@ -187,7 +187,7 @@ public class MessageHeader40_50 {
org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasIdentifier())
tgt.setIdentifierElement(Id40_50.convertId(src.getIdentifierElement()));
tgt.setIdentifierElement(new org.hl7.fhir.r4.model.IdType(src.getIdentifier().getValue()));
if (src.hasCode())
tgt.setCodeElement(convertResponseType(src.getCodeElement()));
if (src.hasDetails())

View File

@ -1,665 +0,0 @@
package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Quantity40_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.exceptions.FHIRException;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class MolecularSequence40_50 {
public static org.hl7.fhir.r5.model.MolecularSequence convertMolecularSequence(org.hl7.fhir.r4.model.MolecularSequence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence tgt = new org.hl7.fhir.r5.model.MolecularSequence();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasType())
tgt.setTypeElement(convertSequenceType(src.getTypeElement()));
if (src.hasCoordinateSystem())
tgt.setCoordinateSystemElement(Integer40_50.convertInteger(src.getCoordinateSystemElement()));
if (src.hasPatient())
tgt.setPatient(Reference40_50.convertReference(src.getPatient()));
if (src.hasSpecimen())
tgt.setSpecimen(Reference40_50.convertReference(src.getSpecimen()));
if (src.hasDevice())
tgt.setDevice(Reference40_50.convertReference(src.getDevice()));
if (src.hasPerformer())
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
if (src.hasQuantity())
tgt.setQuantity(Quantity40_50.convertQuantity(src.getQuantity()));
if (src.hasReferenceSeq())
tgt.setReferenceSeq(convertMolecularSequenceReferenceSeqComponent(src.getReferenceSeq()));
for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent t : src.getVariant())
tgt.addVariant(convertMolecularSequenceVariantComponent(t));
if (src.hasObservedSeq())
tgt.setObservedSeqElement(String40_50.convertString(src.getObservedSeqElement()));
for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent t : src.getQuality())
tgt.addQuality(convertMolecularSequenceQualityComponent(t));
if (src.hasReadCoverage())
tgt.setReadCoverageElement(Integer40_50.convertInteger(src.getReadCoverageElement()));
for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent t : src.getRepository())
tgt.addRepository(convertMolecularSequenceRepositoryComponent(t));
for (org.hl7.fhir.r4.model.Reference t : src.getPointer()) tgt.addPointer(Reference40_50.convertReference(t));
for (org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantComponent t : src.getStructureVariant())
tgt.addStructureVariant(convertMolecularSequenceStructureVariantComponent(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence convertMolecularSequence(org.hl7.fhir.r5.model.MolecularSequence src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence tgt = new org.hl7.fhir.r4.model.MolecularSequence();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasType())
tgt.setTypeElement(convertSequenceType(src.getTypeElement()));
if (src.hasCoordinateSystem())
tgt.setCoordinateSystemElement(Integer40_50.convertInteger(src.getCoordinateSystemElement()));
if (src.hasPatient())
tgt.setPatient(Reference40_50.convertReference(src.getPatient()));
if (src.hasSpecimen())
tgt.setSpecimen(Reference40_50.convertReference(src.getSpecimen()));
if (src.hasDevice())
tgt.setDevice(Reference40_50.convertReference(src.getDevice()));
if (src.hasPerformer())
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
if (src.hasQuantity())
tgt.setQuantity(Quantity40_50.convertQuantity(src.getQuantity()));
if (src.hasReferenceSeq())
tgt.setReferenceSeq(convertMolecularSequenceReferenceSeqComponent(src.getReferenceSeq()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent t : src.getVariant())
tgt.addVariant(convertMolecularSequenceVariantComponent(t));
if (src.hasObservedSeq())
tgt.setObservedSeqElement(String40_50.convertString(src.getObservedSeqElement()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent t : src.getQuality())
tgt.addQuality(convertMolecularSequenceQualityComponent(t));
if (src.hasReadCoverage())
tgt.setReadCoverageElement(Integer40_50.convertInteger(src.getReadCoverageElement()));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent t : src.getRepository())
tgt.addRepository(convertMolecularSequenceRepositoryComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getPointer()) tgt.addPointer(Reference40_50.convertReference(t));
for (org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantComponent t : src.getStructureVariant())
tgt.addStructureVariant(convertMolecularSequenceStructureVariantComponent(t));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> convertSequenceType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.SequenceType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.SequenceTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case AA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.AA);
break;
case DNA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.DNA);
break;
case RNA:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.RNA);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.SequenceType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.SequenceType> convertSequenceType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.SequenceType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.SequenceType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MolecularSequence.SequenceTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case AA:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.SequenceType.AA);
break;
case DNA:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.SequenceType.DNA);
break;
case RNA:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.SequenceType.RNA);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.SequenceType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent convertMolecularSequenceReferenceSeqComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceReferenceSeqComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasChromosome())
tgt.setChromosome(CodeableConcept40_50.convertCodeableConcept(src.getChromosome()));
if (src.hasGenomeBuild())
tgt.setGenomeBuildElement(String40_50.convertString(src.getGenomeBuildElement()));
if (src.hasOrientation())
tgt.setOrientationElement(convertOrientationType(src.getOrientationElement()));
if (src.hasReferenceSeqId())
tgt.setReferenceSeqId(CodeableConcept40_50.convertCodeableConcept(src.getReferenceSeqId()));
if (src.hasReferenceSeqPointer())
tgt.setReferenceSeqPointer(Reference40_50.convertReference(src.getReferenceSeqPointer()));
if (src.hasReferenceSeqString())
tgt.setReferenceSeqStringElement(String40_50.convertString(src.getReferenceSeqStringElement()));
if (src.hasStrand())
tgt.setStrandElement(convertStrandType(src.getStrandElement()));
if (src.hasWindowStart())
tgt.setWindowStartElement(Integer40_50.convertInteger(src.getWindowStartElement()));
if (src.hasWindowEnd())
tgt.setWindowEndElement(Integer40_50.convertInteger(src.getWindowEndElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceReferenceSeqComponent convertMolecularSequenceReferenceSeqComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceReferenceSeqComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceReferenceSeqComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceReferenceSeqComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasChromosome())
tgt.setChromosome(CodeableConcept40_50.convertCodeableConcept(src.getChromosome()));
if (src.hasGenomeBuild())
tgt.setGenomeBuildElement(String40_50.convertString(src.getGenomeBuildElement()));
if (src.hasOrientation())
tgt.setOrientationElement(convertOrientationType(src.getOrientationElement()));
if (src.hasReferenceSeqId())
tgt.setReferenceSeqId(CodeableConcept40_50.convertCodeableConcept(src.getReferenceSeqId()));
if (src.hasReferenceSeqPointer())
tgt.setReferenceSeqPointer(Reference40_50.convertReference(src.getReferenceSeqPointer()));
if (src.hasReferenceSeqString())
tgt.setReferenceSeqStringElement(String40_50.convertString(src.getReferenceSeqStringElement()));
if (src.hasStrand())
tgt.setStrandElement(convertStrandType(src.getStrandElement()));
if (src.hasWindowStart())
tgt.setWindowStartElement(Integer40_50.convertInteger(src.getWindowStartElement()));
if (src.hasWindowEnd())
tgt.setWindowEndElement(Integer40_50.convertInteger(src.getWindowEndElement()));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.OrientationType> convertOrientationType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.OrientationType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.OrientationType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.OrientationTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case SENSE:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.OrientationType.SENSE);
break;
case ANTISENSE:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.OrientationType.ANTISENSE);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.OrientationType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.OrientationType> convertOrientationType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.OrientationType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.OrientationType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MolecularSequence.OrientationTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case SENSE:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.OrientationType.SENSE);
break;
case ANTISENSE:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.OrientationType.ANTISENSE);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.OrientationType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.StrandType> convertStrandType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.StrandType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.StrandType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.StrandTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case WATSON:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.StrandType.WATSON);
break;
case CRICK:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.StrandType.CRICK);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.StrandType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.StrandType> convertStrandType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.StrandType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.StrandType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MolecularSequence.StrandTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case WATSON:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.StrandType.WATSON);
break;
case CRICK:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.StrandType.CRICK);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.StrandType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent convertMolecularSequenceVariantComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
if (src.hasObservedAllele())
tgt.setObservedAlleleElement(String40_50.convertString(src.getObservedAlleleElement()));
if (src.hasReferenceAllele())
tgt.setReferenceAlleleElement(String40_50.convertString(src.getReferenceAlleleElement()));
if (src.hasCigar())
tgt.setCigarElement(String40_50.convertString(src.getCigarElement()));
if (src.hasVariantPointer())
tgt.setVariantPointer(Reference40_50.convertReference(src.getVariantPointer()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent convertMolecularSequenceVariantComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceVariantComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
if (src.hasObservedAllele())
tgt.setObservedAlleleElement(String40_50.convertString(src.getObservedAlleleElement()));
if (src.hasReferenceAllele())
tgt.setReferenceAlleleElement(String40_50.convertString(src.getReferenceAlleleElement()));
if (src.hasCigar())
tgt.setCigarElement(String40_50.convertString(src.getCigarElement()));
if (src.hasVariantPointer())
tgt.setVariantPointer(Reference40_50.convertReference(src.getVariantPointer()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent convertMolecularSequenceQualityComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertQualityType(src.getTypeElement()));
if (src.hasStandardSequence())
tgt.setStandardSequence(CodeableConcept40_50.convertCodeableConcept(src.getStandardSequence()));
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
if (src.hasScore())
tgt.setScore(Quantity40_50.convertQuantity(src.getScore()));
if (src.hasMethod())
tgt.setMethod(CodeableConcept40_50.convertCodeableConcept(src.getMethod()));
if (src.hasTruthTP())
tgt.setTruthTPElement(Decimal40_50.convertDecimal(src.getTruthTPElement()));
if (src.hasQueryTP())
tgt.setQueryTPElement(Decimal40_50.convertDecimal(src.getQueryTPElement()));
if (src.hasTruthFN())
tgt.setTruthFNElement(Decimal40_50.convertDecimal(src.getTruthFNElement()));
if (src.hasQueryFP())
tgt.setQueryFPElement(Decimal40_50.convertDecimal(src.getQueryFPElement()));
if (src.hasGtFP())
tgt.setGtFPElement(Decimal40_50.convertDecimal(src.getGtFPElement()));
if (src.hasPrecision())
tgt.setPrecisionElement(Decimal40_50.convertDecimal(src.getPrecisionElement()));
if (src.hasRecall())
tgt.setRecallElement(Decimal40_50.convertDecimal(src.getRecallElement()));
if (src.hasFScore())
tgt.setFScoreElement(Decimal40_50.convertDecimal(src.getFScoreElement()));
if (src.hasRoc())
tgt.setRoc(convertMolecularSequenceQualityRocComponent(src.getRoc()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent convertMolecularSequenceQualityComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertQualityType(src.getTypeElement()));
if (src.hasStandardSequence())
tgt.setStandardSequence(CodeableConcept40_50.convertCodeableConcept(src.getStandardSequence()));
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
if (src.hasScore())
tgt.setScore(Quantity40_50.convertQuantity(src.getScore()));
if (src.hasMethod())
tgt.setMethod(CodeableConcept40_50.convertCodeableConcept(src.getMethod()));
if (src.hasTruthTP())
tgt.setTruthTPElement(Decimal40_50.convertDecimal(src.getTruthTPElement()));
if (src.hasQueryTP())
tgt.setQueryTPElement(Decimal40_50.convertDecimal(src.getQueryTPElement()));
if (src.hasTruthFN())
tgt.setTruthFNElement(Decimal40_50.convertDecimal(src.getTruthFNElement()));
if (src.hasQueryFP())
tgt.setQueryFPElement(Decimal40_50.convertDecimal(src.getQueryFPElement()));
if (src.hasGtFP())
tgt.setGtFPElement(Decimal40_50.convertDecimal(src.getGtFPElement()));
if (src.hasPrecision())
tgt.setPrecisionElement(Decimal40_50.convertDecimal(src.getPrecisionElement()));
if (src.hasRecall())
tgt.setRecallElement(Decimal40_50.convertDecimal(src.getRecallElement()));
if (src.hasFScore())
tgt.setFScoreElement(Decimal40_50.convertDecimal(src.getFScoreElement()));
if (src.hasRoc())
tgt.setRoc(convertMolecularSequenceQualityRocComponent(src.getRoc()));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> convertQualityType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.QualityType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.QualityTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case INDEL:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.INDEL);
break;
case SNP:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.SNP);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.QualityType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.QualityType> convertQualityType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.QualityType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.QualityType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MolecularSequence.QualityTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case INDEL:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.QualityType.INDEL);
break;
case SNP:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.QualityType.SNP);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.QualityType.UNKNOWN);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.QualityType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityRocComponent convertMolecularSequenceQualityRocComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityRocComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityRocComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityRocComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r4.model.IntegerType t : src.getScore()) tgt.getScore().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r4.model.IntegerType t : src.getNumTP()) tgt.getNumTP().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r4.model.IntegerType t : src.getNumFP()) tgt.getNumFP().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r4.model.IntegerType t : src.getNumFN()) tgt.getNumFN().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r4.model.DecimalType t : src.getPrecision())
tgt.getPrecision().add(Decimal40_50.convertDecimal(t));
for (org.hl7.fhir.r4.model.DecimalType t : src.getSensitivity())
tgt.getSensitivity().add(Decimal40_50.convertDecimal(t));
for (org.hl7.fhir.r4.model.DecimalType t : src.getFMeasure()) tgt.getFMeasure().add(Decimal40_50.convertDecimal(t));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityRocComponent convertMolecularSequenceQualityRocComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceQualityRocComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityRocComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceQualityRocComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.IntegerType t : src.getScore()) tgt.getScore().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r5.model.IntegerType t : src.getNumTP()) tgt.getNumTP().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r5.model.IntegerType t : src.getNumFP()) tgt.getNumFP().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r5.model.IntegerType t : src.getNumFN()) tgt.getNumFN().add(Integer40_50.convertInteger(t));
for (org.hl7.fhir.r5.model.DecimalType t : src.getPrecision())
tgt.getPrecision().add(Decimal40_50.convertDecimal(t));
for (org.hl7.fhir.r5.model.DecimalType t : src.getSensitivity())
tgt.getSensitivity().add(Decimal40_50.convertDecimal(t));
for (org.hl7.fhir.r5.model.DecimalType t : src.getFMeasure()) tgt.getFMeasure().add(Decimal40_50.convertDecimal(t));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent convertMolecularSequenceRepositoryComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertRepositoryType(src.getTypeElement()));
if (src.hasUrl())
tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDatasetId())
tgt.setDatasetIdElement(String40_50.convertString(src.getDatasetIdElement()));
if (src.hasVariantsetId())
tgt.setVariantsetIdElement(String40_50.convertString(src.getVariantsetIdElement()));
if (src.hasReadsetId())
tgt.setReadsetIdElement(String40_50.convertString(src.getReadsetIdElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent convertMolecularSequenceRepositoryComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceRepositoryComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceRepositoryComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasType())
tgt.setTypeElement(convertRepositoryType(src.getTypeElement()));
if (src.hasUrl())
tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement()));
if (src.hasName())
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
if (src.hasDatasetId())
tgt.setDatasetIdElement(String40_50.convertString(src.getDatasetIdElement()));
if (src.hasVariantsetId())
tgt.setVariantsetIdElement(String40_50.convertString(src.getVariantsetIdElement()));
if (src.hasReadsetId())
tgt.setReadsetIdElement(String40_50.convertString(src.getReadsetIdElement()));
return tgt;
}
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> convertRepositoryType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.RepositoryType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MolecularSequence.RepositoryTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case DIRECTLINK:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.DIRECTLINK);
break;
case OPENAPI:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OPENAPI);
break;
case LOGIN:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.LOGIN);
break;
case OAUTH:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OAUTH);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r5.model.MolecularSequence.RepositoryType.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.RepositoryType> convertRepositoryType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MolecularSequence.RepositoryType> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MolecularSequence.RepositoryType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MolecularSequence.RepositoryTypeEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case DIRECTLINK:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.DIRECTLINK);
break;
case OPENAPI:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.OPENAPI);
break;
case LOGIN:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.LOGIN);
break;
case OAUTH:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.OAUTH);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.OTHER);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.MolecularSequence.RepositoryType.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantComponent convertMolecularSequenceStructureVariantComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasVariantType())
tgt.setVariantType(CodeableConcept40_50.convertCodeableConcept(src.getVariantType()));
if (src.hasExact())
tgt.setExactElement(Boolean40_50.convertBoolean(src.getExactElement()));
if (src.hasLength())
tgt.setLengthElement(Integer40_50.convertInteger(src.getLengthElement()));
if (src.hasOuter())
tgt.setOuter(convertMolecularSequenceStructureVariantOuterComponent(src.getOuter()));
if (src.hasInner())
tgt.setInner(convertMolecularSequenceStructureVariantInnerComponent(src.getInner()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantComponent convertMolecularSequenceStructureVariantComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasVariantType())
tgt.setVariantType(CodeableConcept40_50.convertCodeableConcept(src.getVariantType()));
if (src.hasExact())
tgt.setExactElement(Boolean40_50.convertBoolean(src.getExactElement()));
if (src.hasLength())
tgt.setLengthElement(Integer40_50.convertInteger(src.getLengthElement()));
if (src.hasOuter())
tgt.setOuter(convertMolecularSequenceStructureVariantOuterComponent(src.getOuter()));
if (src.hasInner())
tgt.setInner(convertMolecularSequenceStructureVariantInnerComponent(src.getInner()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent convertMolecularSequenceStructureVariantOuterComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent convertMolecularSequenceStructureVariantOuterComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantOuterComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
return tgt;
}
public static org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent convertMolecularSequenceStructureVariantInnerComponent(org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent tgt = new org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent convertMolecularSequenceStructureVariantInnerComponent(org.hl7.fhir.r5.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent tgt = new org.hl7.fhir.r4.model.MolecularSequence.MolecularSequenceStructureVariantInnerComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasStart())
tgt.setStartElement(Integer40_50.convertInteger(src.getStartElement()));
if (src.hasEnd())
tgt.setEndElement(Integer40_50.convertInteger(src.getEndElement()));
return tgt;
}
}

View File

@ -82,16 +82,16 @@ public class Organization40_50 {
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()));
for (org.hl7.fhir.r5.model.Organization.OrganizationContactComponent t : src.getContact())
for (org.hl7.fhir.r5.model.ExtendedContactDetail t : src.getContact())
tgt.addContact(convertOrganizationContactComponent(t));
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t));
return tgt;
}
public static org.hl7.fhir.r5.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.r5.model.ExtendedContactDetail convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r5.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r5.model.Organization.OrganizationContactComponent();
org.hl7.fhir.r5.model.ExtendedContactDetail tgt = new org.hl7.fhir.r5.model.ExtendedContactDetail();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
if (src.hasPurpose())
tgt.setPurpose(CodeableConcept40_50.convertCodeableConcept(src.getPurpose()));
@ -104,7 +104,7 @@ public class Organization40_50 {
return tgt;
}
public static org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.Organization.OrganizationContactComponent src) throws FHIRException {
public static org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r5.model.ExtendedContactDetail src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r4.model.Organization.OrganizationContactComponent();

View File

@ -158,7 +158,7 @@ public class Provenance40_50 {
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.DERIVATION);
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.INSTANTIATES);
break;
case REVISION:
tgt.setValue(org.hl7.fhir.r5.model.Provenance.ProvenanceEntityRole.REVISION);
@ -185,7 +185,7 @@ public class Provenance40_50 {
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Provenance.ProvenanceEntityRole> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Provenance.ProvenanceEntityRoleEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
switch (src.getValue()) {
case DERIVATION:
case INSTANTIATES:
tgt.setValue(org.hl7.fhir.r4.model.Provenance.ProvenanceEntityRole.DERIVATION);
break;
case REVISION:

View File

@ -180,8 +180,6 @@ public class Resource40_50 {
return MessageDefinition40_50.convertMessageDefinition((org.hl7.fhir.r4.model.MessageDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.MessageHeader)
return MessageHeader40_50.convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader) src);
if (src instanceof org.hl7.fhir.r4.model.MolecularSequence)
return MolecularSequence40_50.convertMolecularSequence((org.hl7.fhir.r4.model.MolecularSequence) src);
if (src instanceof org.hl7.fhir.r4.model.NamingSystem)
return NamingSystem40_50.convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem) src);
if (src instanceof org.hl7.fhir.r4.model.NutritionOrder)
@ -422,8 +420,6 @@ public class Resource40_50 {
return MessageDefinition40_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.MessageHeader)
return MessageHeader40_50.convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src);
if (src instanceof org.hl7.fhir.r5.model.MolecularSequence)
return MolecularSequence40_50.convertMolecularSequence((org.hl7.fhir.r5.model.MolecularSequence) src);
if (src instanceof org.hl7.fhir.r5.model.NamingSystem)
return NamingSystem40_50.convertNamingSystem((org.hl7.fhir.r5.model.NamingSystem) src);
if (src instanceof org.hl7.fhir.r5.model.NutritionOrder)

View File

@ -8,6 +8,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.CodeableReference;
/*
Copyright (c) 2011+, HL7, Inc.
@ -52,7 +53,7 @@ public class Schedule40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept40_50.convertCodeableConcept(t)));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.Reference t : src.getActor()) tgt.addActor(Reference40_50.convertReference(t));
@ -74,8 +75,9 @@ public class Schedule40_50 {
tgt.setActiveElement(Boolean40_50.convertBoolean(src.getActiveElement()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.Reference t : src.getActor()) tgt.addActor(Reference40_50.convertReference(t));

View File

@ -172,10 +172,10 @@ public class SearchParameter40_50 {
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.NEARBY);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.DISTANCE);
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.XPathUsageType.OTHER);
@ -199,12 +199,6 @@ public class SearchParameter40_50 {
case PHONETIC:
tgt.setValue(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.PHONETIC);
break;
case NEARBY:
tgt.setValue(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NEARBY);
break;
case DISTANCE:
tgt.setValue(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.DISTANCE);
break;
case OTHER:
tgt.setValue(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.OTHER);
break;

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Instant40
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.CodeableReference;
/*
Copyright (c) 2011+, HL7, Inc.
@ -50,7 +51,7 @@ public class Slot40_50 {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
tgt.addServiceType(new CodeableReference().setConcept(CodeableConcept40_50.convertCodeableConcept(t)));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentType())
@ -79,8 +80,9 @@ public class Slot40_50 {
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceCategory())
tgt.addServiceCategory(CodeableConcept40_50.convertCodeableConcept(t));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getServiceType())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t));
for (CodeableReference t : src.getServiceType())
if (t.hasConcept())
tgt.addServiceType(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialty())
tgt.addSpecialty(CodeableConcept40_50.convertCodeableConcept(t));
if (src.hasAppointmentType())

View File

@ -229,18 +229,18 @@ public class Specimen40_50 {
return null;
org.hl7.fhir.r5.model.Specimen.SpecimenContainerComponent tgt = new org.hl7.fhir.r5.model.Specimen.SpecimenContainerComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
if (src.hasCapacity())
tgt.setCapacity(SimpleQuantity40_50.convertSimpleQuantity(src.getCapacity()));
if (src.hasSpecimenQuantity())
tgt.setSpecimenQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getSpecimenQuantity()));
if (src.hasAdditive())
tgt.setAdditive(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAdditive()));
// for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
// if (src.hasDescription())
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
// if (src.hasType())
// tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
// if (src.hasCapacity())
// tgt.setCapacity(SimpleQuantity40_50.convertSimpleQuantity(src.getCapacity()));
// if (src.hasSpecimenQuantity())
// tgt.setSpecimenQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getSpecimenQuantity()));
// if (src.hasAdditive())
// tgt.setAdditive(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAdditive()));
return tgt;
}
@ -249,18 +249,18 @@ public class Specimen40_50 {
return null;
org.hl7.fhir.r4.model.Specimen.SpecimenContainerComponent tgt = new org.hl7.fhir.r4.model.Specimen.SpecimenContainerComponent();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
if (src.hasDescription())
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
if (src.hasType())
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
if (src.hasCapacity())
tgt.setCapacity(SimpleQuantity40_50.convertSimpleQuantity(src.getCapacity()));
if (src.hasSpecimenQuantity())
tgt.setSpecimenQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getSpecimenQuantity()));
if (src.hasAdditive())
tgt.setAdditive(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAdditive()));
// for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
// tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
// if (src.hasDescription())
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
// if (src.hasType())
// tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
// if (src.hasCapacity())
// tgt.setCapacity(SimpleQuantity40_50.convertSimpleQuantity(src.getCapacity()));
// if (src.hasSpecimenQuantity())
// tgt.setSpecimenQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getSpecimenQuantity()));
// if (src.hasAdditive())
// tgt.setAdditive(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAdditive()));
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.primitive40_50.*;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Reference;
/*
Copyright (c) 2011+, HL7, Inc.
@ -49,7 +50,7 @@ public class TestReport40_50 {
if (src.hasStatus())
tgt.setStatusElement(convertTestReportStatus(src.getStatusElement()));
if (src.hasTestScript())
tgt.setTestScript(Reference40_50.convertReference(src.getTestScript()));
tgt.setTestScript(src.getTestScript().getReference());
if (src.hasResult())
tgt.setResultElement(convertTestReportResult(src.getResultElement()));
if (src.hasScore())
@ -81,7 +82,7 @@ public class TestReport40_50 {
if (src.hasStatus())
tgt.setStatusElement(convertTestReportStatus(src.getStatusElement()));
if (src.hasTestScript())
tgt.setTestScript(Reference40_50.convertReference(src.getTestScript()));
tgt.setTestScript(new Reference().setReference(src.getTestScript()));
if (src.hasResult())
tgt.setResultElement(convertTestReportResult(src.getResultElement()));
if (src.hasScore())

View File

@ -449,7 +449,7 @@ public class TestScript40_50 {
if (src.hasType())
tgt.setType(Coding40_50.convertCoding(src.getType()));
if (src.hasResource())
tgt.setResource(org.hl7.fhir.r5.model.TestScript.FHIRDefinedType.fromCode(src.getResource()));
tgt.setResource(src.getResource());
if (src.hasLabel())
tgt.setLabelElement(String40_50.convertString(src.getLabelElement()));
if (src.hasDescription())
@ -491,7 +491,7 @@ public class TestScript40_50 {
if (src.hasType())
tgt.setType(Coding40_50.convertCoding(src.getType()));
if (src.hasResource())
tgt.setResource(src.getResource().toCode());
tgt.setResource(src.getResource());
if (src.hasLabel())
tgt.setLabelElement(String40_50.convertString(src.getLabelElement()));
if (src.hasDescription())

View File

@ -127,12 +127,14 @@ import org.hl7.fhir.r5.utils.XVerExtensionManager.XVerExtensionStatus;
import org.hl7.fhir.r5.utils.formats.CSVWriter;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.MarkDownProcessor;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.i18n.I18nConstants;
import org.hl7.fhir.utilities.npm.BasePackageCacheManager;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.PackageHacker;
import org.hl7.fhir.utilities.npm.NpmPackage.PackageResourceInformation;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
@ -6846,100 +6848,6 @@ public class ProfileUtilities extends TranslatingUtilities {
public void setMasterSourceFileNames(Set<String> masterSourceFileNames) {
this.masterSourceFileNames = masterSourceFileNames;
}
public static int loadR5Extensions(BasePackageCacheManager pcm, IWorkerContext context) throws FHIRException, IOException {
NpmPackage npm = pcm.loadPackage("hl7.fhir.r5.core", "current");
String[] types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem" };
Map<String, ValueSet> valueSets = new HashMap<>();
Map<String, CodeSystem> codeSystems = new HashMap<>();
List<StructureDefinition> extensions = new ArrayList<>();
JsonParser json = new JsonParser();
for (PackageResourceInformation pri : npm.listIndexedResources(types)) {
CanonicalResource r = (CanonicalResource) json.parse(npm.load(pri));
if (r instanceof CodeSystem) {
codeSystems.put(r.getUrl(), (CodeSystem) r);
} else if (r instanceof ValueSet) {
valueSets.put(r.getUrl(), (ValueSet) r);
} else if (r instanceof StructureDefinition) {
extensions.add((StructureDefinition) r);
}
}
PackageVersion pd = new PackageVersion(npm.name(), npm.version(), npm.dateAsDate());
int c = 0;
List<String> typeNames = context.getTypeNames();
for (StructureDefinition sd : extensions) {
if (sd.getType().equals("Extension") && sd.getDerivation() == TypeDerivationRule.CONSTRAINT &&
!context.hasResource(StructureDefinition.class, sd.getUrl())) {
if (survivesStrippingTypes(sd, context, typeNames)) {
c++;
sd.setUserData("path", Utilities.pathURL(npm.getWebLocation(), "extension-"+sd.getId()+".html"));
context.cacheResourceFromPackage(sd, pd);
registerTerminologies(sd, context, valueSets, codeSystems, pd);
}
}
}
return c;
}
private static void registerTerminologies(StructureDefinition sd, IWorkerContext context, Map<String, ValueSet> valueSets, Map<String, CodeSystem> codeSystems, PackageVersion pd) {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (ed.hasBinding() && ed.getBinding().hasValueSet()) {
String vs = ed.getBinding().getValueSet();
if (!context.hasResource(StructureDefinition.class, vs)) {
loadValueSet(vs, context, valueSets, codeSystems, pd);
}
}
}
}
private static void loadValueSet(String url, IWorkerContext context, Map<String, ValueSet> valueSets, Map<String, CodeSystem> codeSystems, PackageVersion pd) {
if (valueSets.containsKey(url)) {
ValueSet vs = valueSets.get(url);
context.cacheResourceFromPackage(vs, pd);
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
for (CanonicalType t : inc.getValueSet()) {
loadValueSet(t.asStringValue(), context, valueSets, codeSystems, pd);
}
if (inc.hasSystem()) {
if (!context.hasResource(CodeSystem.class, inc.getSystem()) && codeSystems.containsKey(inc.getSystem())) {
context.cacheResourceFromPackage(codeSystems.get(inc.getSystem()), pd);
}
}
}
}
}
private static boolean survivesStrippingTypes(StructureDefinition sd, IWorkerContext context, List<String> typeNames) {
for (ElementDefinition ed : sd.getDifferential().getElement()) {
stripTypes(ed, context, typeNames);
}
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (!stripTypes(ed, context, typeNames)) {
return false;
}
}
return true;
}
private static boolean stripTypes(ElementDefinition ed, IWorkerContext context, List<String> typeNames) {
if (!ed.getPath().contains(".") || !ed.hasType()) {
return true;
}
ed.getType().removeIf(tr -> !typeNames.contains(tr.getWorkingCode()));
if (!ed.hasType()) {
return false;
}
for (TypeRefComponent tr : ed.getType()) {
if (tr.hasTargetProfile()) {
tr.getTargetProfile().removeIf(n -> !context.hasResource(StructureDefinition.class, n.asStringValue()));
if (!tr.hasTargetProfile()) {
return false;
}
}
}
return true;
}
}

View File

@ -0,0 +1,153 @@
package org.hl7.fhir.r5.conformance;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.IWorkerContext.PackageVersion;
import org.hl7.fhir.r5.formats.JsonParser;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.npm.BasePackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.NpmPackage.PackageResourceInformation;
public class R5ExtensionsLoader {
private BasePackageCacheManager pcm;
private int count;
private byte[] map;
private NpmPackage pck;
public R5ExtensionsLoader(BasePackageCacheManager pcm) {
super();
this.pcm = pcm;
}
public void loadR5Extensions(IWorkerContext context) throws FHIRException, IOException {
pck = pcm.loadPackage("hl7.fhir.r5.core", "current");
String[] types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem" };
Map<String, ValueSet> valueSets = new HashMap<>();
Map<String, CodeSystem> codeSystems = new HashMap<>();
List<StructureDefinition> extensions = new ArrayList<>();
JsonParser json = new JsonParser();
for (PackageResourceInformation pri : pck.listIndexedResources(types)) {
CanonicalResource r = (CanonicalResource) json.parse(pck.load(pri));
if (r instanceof CodeSystem) {
codeSystems.put(r.getUrl(), (CodeSystem) r);
} else if (r instanceof ValueSet) {
valueSets.put(r.getUrl(), (ValueSet) r);
} else if (r instanceof StructureDefinition) {
extensions.add((StructureDefinition) r);
}
}
PackageVersion pd = new PackageVersion(pck.name(), pck.version(), pck.dateAsDate());
count = 0;
List<String> typeNames = context.getTypeNames();
for (StructureDefinition sd : extensions) {
if (sd.getType().equals("Extension") && sd.getDerivation() == TypeDerivationRule.CONSTRAINT &&
!context.hasResource(StructureDefinition.class, sd.getUrl())) {
if (survivesStrippingTypes(sd, context, typeNames)) {
count++;
sd.setUserData("path", Utilities.pathURL(pck.getWebLocation(), "extension-"+sd.getId().toLowerCase()+".html"));
context.cacheResourceFromPackage(sd, pd);
registerTerminologies(sd, context, valueSets, codeSystems, pd);
}
}
}
map = pck.hasFile("other", "spec.internals") ? TextFile.streamToBytes(pck.load("other", "spec.internals")) : null;
}
private void registerTerminologies(StructureDefinition sd, IWorkerContext context, Map<String, ValueSet> valueSets, Map<String, CodeSystem> codeSystems, PackageVersion pd) {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (ed.hasBinding() && ed.getBinding().hasValueSet()) {
String vs = ed.getBinding().getValueSet();
if (!context.hasResource(StructureDefinition.class, vs)) {
loadValueSet(vs, context, valueSets, codeSystems, pd);
}
}
}
}
private void loadValueSet(String url, IWorkerContext context, Map<String, ValueSet> valueSets, Map<String, CodeSystem> codeSystems, PackageVersion pd) {
if (valueSets.containsKey(url)) {
ValueSet vs = valueSets.get(url);
context.cacheResourceFromPackage(vs, pd);
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
for (CanonicalType t : inc.getValueSet()) {
loadValueSet(t.asStringValue(), context, valueSets, codeSystems, pd);
}
if (inc.hasSystem()) {
if (!context.hasResource(CodeSystem.class, inc.getSystem()) && codeSystems.containsKey(inc.getSystem())) {
context.cacheResourceFromPackage(codeSystems.get(inc.getSystem()), pd);
}
}
}
}
}
private boolean survivesStrippingTypes(StructureDefinition sd, IWorkerContext context, List<String> typeNames) {
for (ElementDefinition ed : sd.getDifferential().getElement()) {
stripTypes(ed, context, typeNames);
}
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (!stripTypes(ed, context, typeNames)) {
return false;
}
}
return true;
}
private boolean stripTypes(ElementDefinition ed, IWorkerContext context, List<String> typeNames) {
if (!ed.getPath().contains(".") || !ed.hasType()) {
return true;
}
ed.getType().removeIf(tr -> !typeNames.contains(tr.getWorkingCode()));
if (!ed.hasType()) {
return false;
}
for (TypeRefComponent tr : ed.getType()) {
if (tr.hasTargetProfile()) {
tr.getTargetProfile().removeIf(n -> !context.hasResource(StructureDefinition.class, n.asStringValue()));
if (!tr.hasTargetProfile()) {
return false;
}
}
}
return true;
}
public BasePackageCacheManager getPcm() {
return pcm;
}
public int getCount() {
return count;
}
public byte[] getMap() {
return map;
}
public NpmPackage getPck() {
return pck;
}
}

View File

@ -331,7 +331,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (Utilities.existsInList(url, "http://hl7.org/fhir/SearchParameter/example")) {
return;
}
throw new DefinitionException(formatMessage(I18nConstants.DUPLICATE_RESOURCE_, url));
throw new DefinitionException(formatMessage(I18nConstants.DUPLICATE_RESOURCE_, url,
fetchResourceWithException(r.getType(), url).fhirType()));
}
switch(r.getType()) {
case "StructureDefinition":
@ -412,7 +413,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (Utilities.existsInList(url, "http://hl7.org/fhir/SearchParameter/example")) {
return;
}
throw new DefinitionException(formatMessage(I18nConstants.DUPLICATE_RESOURCE_, url));
throw new DefinitionException(formatMessage(I18nConstants.DUPLICATE_RESOURCE_, url,
fetchResourceWithException(r.getClass(), url).fhirType()));
}
if (r instanceof StructureDefinition) {
StructureDefinition sd = (StructureDefinition) m;
@ -1296,7 +1298,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
synchronized (lock) {
List<ConceptMap> res = new ArrayList<ConceptMap>();
for (ConceptMap map : maps.getList()) {
if (((Reference) map.getSource()).getReference().equals(url)) {
if (((Reference) map.getSourceScope()).getReference().equals(url)) {
res.add(map);
}
}

View File

@ -140,7 +140,7 @@ public abstract class ParserBase extends FormatUtilities implements IParser {
* @return Whether to throw an exception if unknown content is found (or just skip it)
*/
public boolean isAllowUnknownContent() {
return allowUnknownContent;
return true; // allowUnknownContent;
}
/**
* @param allowUnknownContent Whether to throw an exception if unknown content is found (or just skip it)

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.r5.model;
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR vcurrent
import java.util.ArrayList;
import java.util.Date;
@ -103,6 +103,7 @@ public class Account extends DomainResource {
case ENTEREDINERROR: return "entered-in-error";
case ONHOLD: return "on-hold";
case UNKNOWN: return "unknown";
case NULL: return null;
default: return "?";
}
}
@ -113,6 +114,7 @@ public class Account extends DomainResource {
case ENTEREDINERROR: return "http://hl7.org/fhir/account-status";
case ONHOLD: return "http://hl7.org/fhir/account-status";
case UNKNOWN: return "http://hl7.org/fhir/account-status";
case NULL: return null;
default: return "?";
}
}
@ -123,6 +125,7 @@ public class Account extends DomainResource {
case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record.";
case ONHOLD: return "This account is on hold.";
case UNKNOWN: return "The account status is unknown.";
case NULL: return null;
default: return "?";
}
}
@ -133,6 +136,7 @@ public class Account extends DomainResource {
case ENTEREDINERROR: return "Entered in error";
case ONHOLD: return "On Hold";
case UNKNOWN: return "Unknown";
case NULL: return null;
default: return "?";
}
}
@ -1586,210 +1590,6 @@ A coverage may only be responsible for specific types of charges, and the sequen
return ResourceType.Account;
}
/**
* Search parameter: <b>guarantor</b>
* <p>
* Description: <b>The parties ultimately responsible for balancing the Account</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.guarantor.party</b><br>
* </p>
*/
@SearchParamDefinition(name="guarantor", path="Account.guarantor.party", description="The parties ultimately responsible for balancing the Account", type="reference", target={Organization.class, Patient.class, RelatedPerson.class } )
public static final String SP_GUARANTOR = "guarantor";
/**
* <b>Fluent Client</b> search parameter constant for <b>guarantor</b>
* <p>
* Description: <b>The parties ultimately responsible for balancing the Account</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.guarantor.party</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GUARANTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GUARANTOR);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Account:guarantor</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_GUARANTOR = new ca.uhn.fhir.model.api.Include("Account:guarantor").toLocked();
/**
* Search parameter: <b>identifier</b>
* <p>
* Description: <b>Account number</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.identifier</b><br>
* </p>
*/
@SearchParamDefinition(name="identifier", path="Account.identifier", description="Account number", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b>Account number</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.identifier</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter: <b>name</b>
* <p>
* Description: <b>Human-readable label</b><br>
* Type: <b>string</b><br>
* Path: <b>Account.name</b><br>
* </p>
*/
@SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b>Human-readable label</b><br>
* Type: <b>string</b><br>
* Path: <b>Account.name</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
/**
* Search parameter: <b>owner</b>
* <p>
* Description: <b>Entity managing the Account</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.owner</b><br>
* </p>
*/
@SearchParamDefinition(name="owner", path="Account.owner", description="Entity managing the Account", type="reference", target={Organization.class } )
public static final String SP_OWNER = "owner";
/**
* <b>Fluent Client</b> search parameter constant for <b>owner</b>
* <p>
* Description: <b>Entity managing the Account</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.owner</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Account:owner</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Account:owner").toLocked();
/**
* Search parameter: <b>patient</b>
* <p>
* Description: <b>The entity that caused the expenses</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.subject.where(resolve() is Patient)</b><br>
* </p>
*/
@SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient)", description="The entity that caused the expenses", type="reference", target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } )
public static final String SP_PATIENT = "patient";
/**
* <b>Fluent Client</b> search parameter constant for <b>patient</b>
* <p>
* Description: <b>The entity that caused the expenses</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.subject.where(resolve() is Patient)</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Account:patient</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Account:patient").toLocked();
/**
* Search parameter: <b>period</b>
* <p>
* Description: <b>Transaction window</b><br>
* Type: <b>date</b><br>
* Path: <b>Account.servicePeriod</b><br>
* </p>
*/
@SearchParamDefinition(name="period", path="Account.servicePeriod", description="Transaction window", type="date" )
public static final String SP_PERIOD = "period";
/**
* <b>Fluent Client</b> search parameter constant for <b>period</b>
* <p>
* Description: <b>Transaction window</b><br>
* Type: <b>date</b><br>
* Path: <b>Account.servicePeriod</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
/**
* Search parameter: <b>status</b>
* <p>
* Description: <b>active | inactive | entered-in-error | on-hold | unknown</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.status</b><br>
* </p>
*/
@SearchParamDefinition(name="status", path="Account.status", description="active | inactive | entered-in-error | on-hold | unknown", type="token" )
public static final String SP_STATUS = "status";
/**
* <b>Fluent Client</b> search parameter constant for <b>status</b>
* <p>
* Description: <b>active | inactive | entered-in-error | on-hold | unknown</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.status</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
/**
* Search parameter: <b>subject</b>
* <p>
* Description: <b>The entity that caused the expenses</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.subject</b><br>
* </p>
*/
@SearchParamDefinition(name="subject", path="Account.subject", description="The entity that caused the expenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } )
public static final String SP_SUBJECT = "subject";
/**
* <b>Fluent Client</b> search parameter constant for <b>subject</b>
* <p>
* Description: <b>The entity that caused the expenses</b><br>
* Type: <b>reference</b><br>
* Path: <b>Account.subject</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>Account:subject</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Account:subject").toLocked();
/**
* Search parameter: <b>type</b>
* <p>
* Description: <b>E.g. patient, expense, depreciation</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.type</b><br>
* </p>
*/
@SearchParamDefinition(name="type", path="Account.type", description="E.g. patient, expense, depreciation", type="token" )
public static final String SP_TYPE = "type";
/**
* <b>Fluent Client</b> search parameter constant for <b>type</b>
* <p>
* Description: <b>E.g. patient, expense, depreciation</b><br>
* Type: <b>token</b><br>
* Path: <b>Account.type</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.r5.model;
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR vcurrent
import java.util.ArrayList;
import java.util.Date;
@ -173,6 +173,7 @@ public class ActivityDefinition extends MetadataResource {
case SUPPLYREQUEST: return "SupplyRequest";
case TASK: return "Task";
case VISIONPRESCRIPTION: return "VisionPrescription";
case NULL: return null;
default: return "?";
}
}
@ -193,6 +194,7 @@ public class ActivityDefinition extends MetadataResource {
case SUPPLYREQUEST: return "http://hl7.org/fhir/request-resource-types";
case TASK: return "http://hl7.org/fhir/request-resource-types";
case VISIONPRESCRIPTION: return "http://hl7.org/fhir/request-resource-types";
case NULL: return null;
default: return "?";
}
}
@ -213,6 +215,7 @@ public class ActivityDefinition extends MetadataResource {
case SUPPLYREQUEST: return "Request for a medication, substance or device.";
case TASK: return "A task to be performed.";
case VISIONPRESCRIPTION: return "Prescription for vision correction products for a patient.";
case NULL: return null;
default: return "?";
}
}
@ -233,6 +236,7 @@ public class ActivityDefinition extends MetadataResource {
case SUPPLYREQUEST: return "SupplyRequest";
case TASK: return "Task";
case VISIONPRESCRIPTION: return "VisionPrescription";
case NULL: return null;
default: return "?";
}
}
@ -4435,496 +4439,6 @@ public class ActivityDefinition extends MetadataResource {
return ResourceType.ActivityDefinition;
}
/**
* Search parameter: <b>composed-of</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
* </p>
*/
@SearchParamDefinition(name="composed-of", path="ActivityDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
public static final String SP_COMPOSED_OF = "composed-of";
/**
* <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>ActivityDefinition:composed-of</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ActivityDefinition:composed-of").toLocked();
/**
* Search parameter: <b>context-quantity</b>
* <p>
* Description: <b>A quantity- or range-valued use context assigned to the activity definition</b><br>
* Type: <b>quantity</b><br>
* Path: <b>(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)</b><br>
* </p>
*/
@SearchParamDefinition(name="context-quantity", path="(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the activity definition", type="quantity" )
public static final String SP_CONTEXT_QUANTITY = "context-quantity";
/**
* <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
* <p>
* Description: <b>A quantity- or range-valued use context assigned to the activity definition</b><br>
* Type: <b>quantity</b><br>
* Path: <b>(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
/**
* Search parameter: <b>context-type-quantity</b>
* <p>
* Description: <b>A use context type and quantity- or range-based value assigned to the activity definition</b><br>
* Type: <b>composite</b><br>
* Path: <b>ActivityDefinition.useContext</b><br>
* </p>
*/
@SearchParamDefinition(name="context-type-quantity", path="ActivityDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the activity definition", type="composite", compositeOf={"context-type", "context-quantity"} )
public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
/**
* <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
* <p>
* Description: <b>A use context type and quantity- or range-based value assigned to the activity definition</b><br>
* Type: <b>composite</b><br>
* Path: <b>ActivityDefinition.useContext</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
/**
* Search parameter: <b>context-type-value</b>
* <p>
* Description: <b>A use context type and value assigned to the activity definition</b><br>
* Type: <b>composite</b><br>
* Path: <b>ActivityDefinition.useContext</b><br>
* </p>
*/
@SearchParamDefinition(name="context-type-value", path="ActivityDefinition.useContext", description="A use context type and value assigned to the activity definition", type="composite", compositeOf={"context-type", "context"} )
public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
/**
* <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
* <p>
* Description: <b>A use context type and value assigned to the activity definition</b><br>
* Type: <b>composite</b><br>
* Path: <b>ActivityDefinition.useContext</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
/**
* Search parameter: <b>context-type</b>
* <p>
* Description: <b>A type of use context assigned to the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.useContext.code</b><br>
* </p>
*/
@SearchParamDefinition(name="context-type", path="ActivityDefinition.useContext.code", description="A type of use context assigned to the activity definition", type="token" )
public static final String SP_CONTEXT_TYPE = "context-type";
/**
* <b>Fluent Client</b> search parameter constant for <b>context-type</b>
* <p>
* Description: <b>A type of use context assigned to the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.useContext.code</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
/**
* Search parameter: <b>context</b>
* <p>
* Description: <b>A use context assigned to the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>(ActivityDefinition.useContext.value as CodeableConcept)</b><br>
* </p>
*/
@SearchParamDefinition(name="context", path="(ActivityDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the activity definition", type="token" )
public static final String SP_CONTEXT = "context";
/**
* <b>Fluent Client</b> search parameter constant for <b>context</b>
* <p>
* Description: <b>A use context assigned to the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>(ActivityDefinition.useContext.value as CodeableConcept)</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
/**
* Search parameter: <b>date</b>
* <p>
* Description: <b>The activity definition publication date</b><br>
* Type: <b>date</b><br>
* Path: <b>ActivityDefinition.date</b><br>
* </p>
*/
@SearchParamDefinition(name="date", path="ActivityDefinition.date", description="The activity definition publication date", type="date" )
public static final String SP_DATE = "date";
/**
* <b>Fluent Client</b> search parameter constant for <b>date</b>
* <p>
* Description: <b>The activity definition publication date</b><br>
* Type: <b>date</b><br>
* Path: <b>ActivityDefinition.date</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
/**
* Search parameter: <b>depends-on</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library</b><br>
* </p>
*/
@SearchParamDefinition(name="depends-on", path="ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
public static final String SP_DEPENDS_ON = "depends-on";
/**
* <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>ActivityDefinition:depends-on</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ActivityDefinition:depends-on").toLocked();
/**
* Search parameter: <b>derived-from</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
* </p>
*/
@SearchParamDefinition(name="derived-from", path="ActivityDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
public static final String SP_DERIVED_FROM = "derived-from";
/**
* <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>ActivityDefinition:derived-from</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ActivityDefinition:derived-from").toLocked();
/**
* Search parameter: <b>description</b>
* <p>
* Description: <b>The description of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.description</b><br>
* </p>
*/
@SearchParamDefinition(name="description", path="ActivityDefinition.description", description="The description of the activity definition", type="string" )
public static final String SP_DESCRIPTION = "description";
/**
* <b>Fluent Client</b> search parameter constant for <b>description</b>
* <p>
* Description: <b>The description of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.description</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
/**
* Search parameter: <b>effective</b>
* <p>
* Description: <b>The time during which the activity definition is intended to be in use</b><br>
* Type: <b>date</b><br>
* Path: <b>ActivityDefinition.effectivePeriod</b><br>
* </p>
*/
@SearchParamDefinition(name="effective", path="ActivityDefinition.effectivePeriod", description="The time during which the activity definition is intended to be in use", type="date" )
public static final String SP_EFFECTIVE = "effective";
/**
* <b>Fluent Client</b> search parameter constant for <b>effective</b>
* <p>
* Description: <b>The time during which the activity definition is intended to be in use</b><br>
* Type: <b>date</b><br>
* Path: <b>ActivityDefinition.effectivePeriod</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
/**
* Search parameter: <b>identifier</b>
* <p>
* Description: <b>External identifier for the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.identifier</b><br>
* </p>
*/
@SearchParamDefinition(name="identifier", path="ActivityDefinition.identifier", description="External identifier for the activity definition", type="token" )
public static final String SP_IDENTIFIER = "identifier";
/**
* <b>Fluent Client</b> search parameter constant for <b>identifier</b>
* <p>
* Description: <b>External identifier for the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.identifier</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
/**
* Search parameter: <b>jurisdiction</b>
* <p>
* Description: <b>Intended jurisdiction for the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.jurisdiction</b><br>
* </p>
*/
@SearchParamDefinition(name="jurisdiction", path="ActivityDefinition.jurisdiction", description="Intended jurisdiction for the activity definition", type="token" )
public static final String SP_JURISDICTION = "jurisdiction";
/**
* <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
* <p>
* Description: <b>Intended jurisdiction for the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.jurisdiction</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
/**
* Search parameter: <b>kind</b>
* <p>
* Description: <b>The kind of activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.kind</b><br>
* </p>
*/
@SearchParamDefinition(name="kind", path="ActivityDefinition.kind", description="The kind of activity definition", type="token" )
public static final String SP_KIND = "kind";
/**
* <b>Fluent Client</b> search parameter constant for <b>kind</b>
* <p>
* Description: <b>The kind of activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.kind</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND);
/**
* Search parameter: <b>name</b>
* <p>
* Description: <b>Computationally friendly name of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.name</b><br>
* </p>
*/
@SearchParamDefinition(name="name", path="ActivityDefinition.name", description="Computationally friendly name of the activity definition", type="string" )
public static final String SP_NAME = "name";
/**
* <b>Fluent Client</b> search parameter constant for <b>name</b>
* <p>
* Description: <b>Computationally friendly name of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.name</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
/**
* Search parameter: <b>predecessor</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
* </p>
*/
@SearchParamDefinition(name="predecessor", path="ActivityDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
public static final String SP_PREDECESSOR = "predecessor";
/**
* <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>ActivityDefinition:predecessor</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:predecessor").toLocked();
/**
* Search parameter: <b>publisher</b>
* <p>
* Description: <b>Name of the publisher of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.publisher</b><br>
* </p>
*/
@SearchParamDefinition(name="publisher", path="ActivityDefinition.publisher", description="Name of the publisher of the activity definition", type="string" )
public static final String SP_PUBLISHER = "publisher";
/**
* <b>Fluent Client</b> search parameter constant for <b>publisher</b>
* <p>
* Description: <b>Name of the publisher of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.publisher</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
/**
* Search parameter: <b>status</b>
* <p>
* Description: <b>The current status of the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.status</b><br>
* </p>
*/
@SearchParamDefinition(name="status", path="ActivityDefinition.status", description="The current status of the activity definition", type="token" )
public static final String SP_STATUS = "status";
/**
* <b>Fluent Client</b> search parameter constant for <b>status</b>
* <p>
* Description: <b>The current status of the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.status</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
/**
* Search parameter: <b>successor</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='successor').resource</b><br>
* </p>
*/
@SearchParamDefinition(name="successor", path="ActivityDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
public static final String SP_SUCCESSOR = "successor";
/**
* <b>Fluent Client</b> search parameter constant for <b>successor</b>
* <p>
* Description: <b>What resource is being referenced</b><br>
* Type: <b>reference</b><br>
* Path: <b>ActivityDefinition.relatedArtifact.where(type='successor').resource</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "<b>ActivityDefinition:successor</b>".
*/
public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:successor").toLocked();
/**
* Search parameter: <b>title</b>
* <p>
* Description: <b>The human-friendly name of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.title</b><br>
* </p>
*/
@SearchParamDefinition(name="title", path="ActivityDefinition.title", description="The human-friendly name of the activity definition", type="string" )
public static final String SP_TITLE = "title";
/**
* <b>Fluent Client</b> search parameter constant for <b>title</b>
* <p>
* Description: <b>The human-friendly name of the activity definition</b><br>
* Type: <b>string</b><br>
* Path: <b>ActivityDefinition.title</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
/**
* Search parameter: <b>topic</b>
* <p>
* Description: <b>Topics associated with the module</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.topic</b><br>
* </p>
*/
@SearchParamDefinition(name="topic", path="ActivityDefinition.topic", description="Topics associated with the module", type="token" )
public static final String SP_TOPIC = "topic";
/**
* <b>Fluent Client</b> search parameter constant for <b>topic</b>
* <p>
* Description: <b>Topics associated with the module</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.topic</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
/**
* Search parameter: <b>url</b>
* <p>
* Description: <b>The uri that identifies the activity definition</b><br>
* Type: <b>uri</b><br>
* Path: <b>ActivityDefinition.url</b><br>
* </p>
*/
@SearchParamDefinition(name="url", path="ActivityDefinition.url", description="The uri that identifies the activity definition", type="uri" )
public static final String SP_URL = "url";
/**
* <b>Fluent Client</b> search parameter constant for <b>url</b>
* <p>
* Description: <b>The uri that identifies the activity definition</b><br>
* Type: <b>uri</b><br>
* Path: <b>ActivityDefinition.url</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
/**
* Search parameter: <b>version</b>
* <p>
* Description: <b>The business version of the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.version</b><br>
* </p>
*/
@SearchParamDefinition(name="version", path="ActivityDefinition.version", description="The business version of the activity definition", type="token" )
public static final String SP_VERSION = "version";
/**
* <b>Fluent Client</b> search parameter constant for <b>version</b>
* <p>
* Description: <b>The business version of the activity definition</b><br>
* Type: <b>token</b><br>
* Path: <b>ActivityDefinition.version</b><br>
* </p>
*/
public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.r5.model;
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR vcurrent
import java.util.ArrayList;
import java.util.Date;
@ -87,6 +87,7 @@ public class Address extends DataType implements ICompositeType {
case POSTAL: return "postal";
case PHYSICAL: return "physical";
case BOTH: return "both";
case NULL: return null;
default: return "?";
}
}
@ -95,6 +96,7 @@ public class Address extends DataType implements ICompositeType {
case POSTAL: return "http://hl7.org/fhir/address-type";
case PHYSICAL: return "http://hl7.org/fhir/address-type";
case BOTH: return "http://hl7.org/fhir/address-type";
case NULL: return null;
default: return "?";
}
}
@ -103,6 +105,7 @@ public class Address extends DataType implements ICompositeType {
case POSTAL: return "Mailing addresses - PO Boxes and care-of addresses.";
case PHYSICAL: return "A physical address that can be visited.";
case BOTH: return "An address that is both physical and postal.";
case NULL: return null;
default: return "?";
}
}
@ -111,6 +114,7 @@ public class Address extends DataType implements ICompositeType {
case POSTAL: return "Postal";
case PHYSICAL: return "Physical";
case BOTH: return "Postal & Physical";
case NULL: return null;
default: return "?";
}
}
@ -209,6 +213,7 @@ public class Address extends DataType implements ICompositeType {
case TEMP: return "temp";
case OLD: return "old";
case BILLING: return "billing";
case NULL: return null;
default: return "?";
}
}
@ -219,6 +224,7 @@ public class Address extends DataType implements ICompositeType {
case TEMP: return "http://hl7.org/fhir/address-use";
case OLD: return "http://hl7.org/fhir/address-use";
case BILLING: return "http://hl7.org/fhir/address-use";
case NULL: return null;
default: return "?";
}
}
@ -229,6 +235,7 @@ public class Address extends DataType implements ICompositeType {
case TEMP: return "A temporary address. The period can provide more detailed information.";
case OLD: return "This address is no longer in use (or was never correct but retained for records).";
case BILLING: return "An address to be used to send bills, invoices, receipts etc.";
case NULL: return null;
default: return "?";
}
}
@ -239,6 +246,7 @@ public class Address extends DataType implements ICompositeType {
case TEMP: return "Temporary";
case OLD: return "Old / Incorrect";
case BILLING: return "Billing";
case NULL: return null;
default: return "?";
}
}

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