update version conversions for new version of R5
This commit is contained in:
parent
68090356cb
commit
7cf15f248d
|
@ -85,8 +85,8 @@ public class VersionConvertorResourceNameMapper {
|
|||
return org.hl7.fhir.r5.model.DeviceUsage.class.getSimpleName();
|
||||
case "DiagnosticReport":
|
||||
return org.hl7.fhir.r5.model.DiagnosticReport.class.getSimpleName();
|
||||
case "DocumentManifest":
|
||||
return org.hl7.fhir.r5.model.DocumentManifest.class.getSimpleName();
|
||||
// case "DocumentManifest":
|
||||
// return org.hl7.fhir.r5.model.DocumentManifest.class.getSimpleName();
|
||||
case "DocumentReference":
|
||||
return org.hl7.fhir.r5.model.DocumentReference.class.getSimpleName();
|
||||
case "Encounter":
|
||||
|
@ -150,7 +150,7 @@ public class VersionConvertorResourceNameMapper {
|
|||
case "MedicationRequest":
|
||||
return org.hl7.fhir.r5.model.MedicationRequest.class.getSimpleName();
|
||||
case "MedicationStatement":
|
||||
return org.hl7.fhir.r5.model.MedicationUsage.class.getSimpleName();
|
||||
return org.hl7.fhir.r5.model.MedicationStatement.class.getSimpleName();
|
||||
case "MessageDefinition":
|
||||
return org.hl7.fhir.r5.model.MessageDefinition.class.getSimpleName();
|
||||
case "MessageHeader":
|
||||
|
@ -403,8 +403,6 @@ public class VersionConvertorResourceNameMapper {
|
|||
return null;
|
||||
case "MedicationRequest":
|
||||
return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName();
|
||||
case "MedicationUsage":
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
|
||||
case "MedicationStatement":
|
||||
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
|
||||
case "MessageDefinition":
|
||||
|
|
|
@ -381,7 +381,9 @@ public class ElementDefinition10_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHumanElement()) tgt.setHumanElement(String10_50.convertString(src.getHumanElement()));
|
||||
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
|
||||
if (src.hasXpathElement()) tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpath()) {
|
||||
tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath())));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -396,7 +398,9 @@ public class ElementDefinition10_50 {
|
|||
if (src.hasHumanElement()) tgt.setHumanElement(String10_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression())
|
||||
ToolingExtensions.addStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression());
|
||||
if (src.hasXpathElement()) tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
|
||||
if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) {
|
||||
tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,32 +227,32 @@ public class Appointment10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Appointment.ParticipationStatusEnumFactory());
|
||||
|
|
|
@ -54,11 +54,11 @@ public class AppointmentResponse10_50 {
|
|||
if (src.hasParticipantStatus())
|
||||
tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement()));
|
||||
if (src.hasCommentElement())
|
||||
tgt.setCommentElement(String10_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatusEnumFactory());
|
||||
|
@ -83,32 +83,32 @@ public class AppointmentResponse10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipantStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> convertParticipantStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE);
|
||||
break;
|
||||
case INPROCESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -88,8 +88,8 @@ public class CarePlan10_50 {
|
|||
for (org.hl7.fhir.r5.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation10_50.convertAnnotation(t));
|
||||
if (src.hasPlannedActivityReference())
|
||||
tgt.setReference(Reference10_50.convertReference(src.getPlannedActivityReference()));
|
||||
if (src.hasPlannedActivityDetail())
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
// if (src.hasPlannedActivityDetail())
|
||||
// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -102,139 +102,139 @@ public class CarePlan10_50 {
|
|||
tgt.addProgress(Annotation10_50.convertAnnotation(t));
|
||||
if (src.hasReference())
|
||||
tgt.setPlannedActivityReference(Reference10_50.convertReference(src.getReference()));
|
||||
if (src.hasDetail())
|
||||
tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
// if (src.hasDetail())
|
||||
// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode())
|
||||
tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference())
|
||||
tgt.addReason(convertReferenceToCodableReference(t));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
if (src.hasProhibitedElement())
|
||||
tgt.setDoNotPerformElement(Boolean10_50.convertBoolean(src.getProhibitedElement()));
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled()));
|
||||
if (src.hasLocation())
|
||||
tgt.getLocation().setReference(Reference10_50.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer())
|
||||
tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct()));
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity()));
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference10_50.convertReference(t.getReference()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
if (src.hasDoNotPerformElement())
|
||||
tgt.setProhibitedElement(Boolean10_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled()));
|
||||
if (src.getLocation().hasReference())
|
||||
tgt.setLocation(Reference10_50.convertReference(src.getLocation().getReference()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct()));
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity()));
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
// for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode())
|
||||
// tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t));
|
||||
// for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference())
|
||||
// tgt.addReason(convertReferenceToCodableReference(t));
|
||||
// for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t));
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// if (src.hasProhibitedElement())
|
||||
// tgt.setDoNotPerformElement(Boolean10_50.convertBoolean(src.getProhibitedElement()));
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled()));
|
||||
// if (src.hasLocation())
|
||||
// tgt.getLocation().setReference(Reference10_50.convertReference(src.getLocation()));
|
||||
// for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer())
|
||||
// tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct()));
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// if (src.hasDescriptionElement())
|
||||
// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
// for (CodeableReference t : src.getReason())
|
||||
// if (t.hasConcept())
|
||||
// tgt.addReasonCode(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
|
||||
// for (CodeableReference t : src.getReason())
|
||||
// if (t.hasReference())
|
||||
// tgt.addReasonReference(Reference10_50.convertReference(t.getReference()));
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t));
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// if (src.hasDoNotPerformElement())
|
||||
// tgt.setProhibitedElement(Boolean10_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled()));
|
||||
// if (src.getLocation().hasReference())
|
||||
// tgt.setLocation(Reference10_50.convertReference(src.getLocation().getReference()));
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct()));
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// if (src.hasDescriptionElement())
|
||||
// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.CarePlan.CarePlanStatus> convertCarePlanStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
|
|
|
@ -72,7 +72,7 @@ public class ConceptMap10_50 {
|
|||
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);
|
||||
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> ws = convertSourceElementComponent(t, tgt);
|
||||
for (SourceElementComponentWrapper<ConceptMap.SourceElementComponent> w : ws)
|
||||
getGroup(tgt, w.getSource(), w.getTarget()).addElement(w.getComp());
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class ConceptMap10_50 {
|
|||
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));
|
||||
tgt.addElement(convertSourceElementComponent(t, g, src));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -218,13 +218,13 @@ public class ConceptMap10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasPropertyElement())
|
||||
tgt.setElementElement(Uri10_50.convertUri(src.getPropertyElement()));
|
||||
if (src.hasAttribute())
|
||||
tgt.setElement(srcMap.getAttributeUri(src.getAttribute()));
|
||||
if (src.hasValueCoding()) {
|
||||
tgt.setCode(src.getValueCoding().getCode());
|
||||
} else if (src.hasValue()) {
|
||||
|
@ -233,18 +233,18 @@ public class ConceptMap10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasElementElement())
|
||||
tgt.setPropertyElement(Uri10_50.convertUri(src.getElementElement()));
|
||||
tgt.setAttribute(tgtMap.registerAttribute(src.getElement()));
|
||||
tgt.setValue(String10_50.convertString(src.getCodeElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -256,12 +256,12 @@ public class ConceptMap10_50 {
|
|||
tgt.addTarget(new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
|
||||
} else {
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
|
||||
tgt.addTarget(convertTargetElementComponent(t, g));
|
||||
tgt.addTarget(convertTargetElementComponent(t, g, srcMap));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> res = new ArrayList<>();
|
||||
if (src == null || src.isEmpty())
|
||||
return res;
|
||||
|
@ -272,14 +272,14 @@ public class ConceptMap10_50 {
|
|||
if (t.getEquivalence() == org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
|
||||
tgt.setNoMap(true);
|
||||
} else {
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, tgtMap));
|
||||
}
|
||||
res.add(new SourceElementComponentWrapper<>(tgt, src.getCodeSystem(), t.getCodeSystem()));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -292,13 +292,13 @@ public class ConceptMap10_50 {
|
|||
if (src.hasCommentElement())
|
||||
tgt.setCommentsElement(String10_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, srcMap));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, srcMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -310,9 +310,9 @@ public class ConceptMap10_50 {
|
|||
if (src.hasCommentsElement())
|
||||
tgt.setCommentElement(String10_50.convertString(src.getCommentsElement()));
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, tgtMap));
|
||||
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, tgtMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ public class Conformance10_50 {
|
|||
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasUrl())
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
|
|
|
@ -52,7 +52,7 @@ public class DetectedIssue10_50 {
|
|||
for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated())
|
||||
tgt.addImplicated(Reference10_50.convertReference(t));
|
||||
if (src.hasDetailElement())
|
||||
tgt.setDetailElement(String10_50.convertString(src.getDetailElement()));
|
||||
tgt.setDetailElement(String10_50.convertStringToMarkdown(src.getDetailElement()));
|
||||
if (src.hasDate())
|
||||
tgt.setIdentified(DateTime10_50.convertDateTime(src.getDateElement()));
|
||||
if (src.hasAuthor())
|
||||
|
|
|
@ -21,18 +21,18 @@ public class DeviceMetric10_50 {
|
|||
tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifierFirstRep()));
|
||||
if (src.hasUnit())
|
||||
tgt.setUnit(CodeableConcept10_50.convertCodeableConcept(src.getUnit()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference10_50.convertReference(src.getSource()));
|
||||
if (src.hasParent())
|
||||
tgt.setParent(Reference10_50.convertReference(src.getParent()));
|
||||
if (src.hasDevice())
|
||||
tgt.setSource(Reference10_50.convertReference(src.getDevice()));
|
||||
// if (src.hasDevice())
|
||||
// tgt.setParent(Reference10_50.convertReference(src.getDevice()));
|
||||
if (src.hasOperationalStatus())
|
||||
tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement()));
|
||||
if (src.hasColor())
|
||||
tgt.setColorElement(convertDeviceMetricColor(src.getColorElement()));
|
||||
if (src.hasCategory())
|
||||
tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement()));
|
||||
if (src.hasMeasurementPeriod())
|
||||
tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod()));
|
||||
// if (src.hasMeasurementPeriod())
|
||||
// tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.r5.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())
|
||||
tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
|
@ -50,17 +50,17 @@ public class DeviceMetric10_50 {
|
|||
if (src.hasUnit())
|
||||
tgt.setUnit(CodeableConcept10_50.convertCodeableConcept(src.getUnit()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference10_50.convertReference(src.getSource()));
|
||||
tgt.setDevice(Reference10_50.convertReference(src.getSource()));
|
||||
if (src.hasParent())
|
||||
tgt.setParent(Reference10_50.convertReference(src.getParent()));
|
||||
tgt.setDevice(Reference10_50.convertReference(src.getParent()));
|
||||
if (src.hasOperationalStatus())
|
||||
tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement()));
|
||||
if (src.hasColor())
|
||||
tgt.setColorElement(convertDeviceMetricColor(src.getColorElement()));
|
||||
if (src.hasCategory())
|
||||
tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement()));
|
||||
if (src.hasMeasurementPeriod())
|
||||
tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod()));
|
||||
// if (src.hasMeasurementPeriod())
|
||||
// tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())
|
||||
tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DiagnosticReport10_50 {
|
|||
for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())
|
||||
tgt.addMedia(convertDiagnosticReportImageComponent(t));
|
||||
if (src.hasConclusionElement())
|
||||
tgt.setConclusionElement(String10_50.convertString(src.getConclusionElement()));
|
||||
tgt.setConclusionElement(String10_50.convertStringToMarkdown(src.getConclusionElement()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis())
|
||||
tgt.addConclusionCode(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPresentedForm())
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
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.Identifier10_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DocumentManifest10_50 {
|
||||
public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty()) return null;
|
||||
org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasIdentifier()) tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef()) tgt.setRef(Reference10_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null || src.isEmpty()) return null;
|
||||
org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasIdentifier()) tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef()) tgt.setRef(Reference10_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -226,29 +226,29 @@ public class DocumentReference10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case CURRENT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT);
|
||||
break;
|
||||
case SUPERSEDED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
|
|
|
@ -8,6 +8,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.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeableReference;
|
||||
import org.hl7.fhir.r5.model.Encounter.ReasonComponent;
|
||||
|
||||
public class Encounter10_50 {
|
||||
|
||||
|
@ -40,11 +41,12 @@ public class Encounter10_50 {
|
|||
tgt.setPeriod(Period10_50.convertPeriod(src.getActualPeriod()));
|
||||
if (src.hasLength())
|
||||
tgt.setLength(Duration10_50.convertDuration(src.getLength()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReason(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
|
||||
if (src.hasAdmission())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
|
||||
for (ReasonComponent t1 : src.getReason())
|
||||
for (CodeableReference t : t1.getValue())
|
||||
if (t.hasConcept())
|
||||
tgt.addReason(CodeableConcept10_50.convertCodeableConcept(t.getConcept()));
|
||||
if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src));
|
||||
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -84,9 +86,9 @@ public class Encounter10_50 {
|
|||
if (src.hasLength())
|
||||
tgt.setLength(Duration10_50.convertDuration(src.getLength()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason())
|
||||
tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t));
|
||||
tgt.addReason().addValue(CodeableConcept10_50.convertCodeableConceptToCodableReference(t));
|
||||
if (src.hasHospitalization())
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt));
|
||||
for (org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -143,7 +145,7 @@ public class Encounter10_50 {
|
|||
}
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
|
||||
|
@ -157,11 +159,11 @@ public class Encounter10_50 {
|
|||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept10_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
tgte.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference10_50.convertReference(src.getDestination()));
|
||||
if (src.hasDischargeDisposition())
|
||||
|
@ -169,7 +171,7 @@ public class Encounter10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent();
|
||||
|
@ -182,11 +184,11 @@ public class Encounter10_50 {
|
|||
tgt.setAdmitSource(CodeableConcept10_50.convertCodeableConcept(src.getAdmitSource()));
|
||||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept10_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference10_50.convertReference(src.getDestination()));
|
||||
|
@ -301,7 +303,7 @@ public class Encounter10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Encounter.EncounterState> convertEncounterState(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Encounter.EncounterState> convertEncounterState(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Encounter.EncounterState> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Encounter.EncounterStateEnumFactory());
|
||||
|
@ -326,32 +328,32 @@ public class Encounter10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> convertEncounterState(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Encounter.EncounterState> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> convertEncounterState(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Encounter.EncounterState> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case PLANNED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED);
|
||||
break;
|
||||
case ARRIVED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case ONLEAVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case FINISHED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -146,7 +146,7 @@ public class HealthcareService10_50 {
|
|||
if (src.hasLocation())
|
||||
tgt.addLocation(Reference10_50.convertReference(src.getLocation()));
|
||||
if (src.hasCommentElement())
|
||||
tgt.setCommentElement(String10_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
if (src.hasExtraDetails())
|
||||
tgt.setExtraDetails(src.getExtraDetails());
|
||||
if (src.hasPhoto())
|
||||
|
|
|
@ -24,7 +24,7 @@ public class List10_50 {
|
|||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
|
||||
tgt.setSubject(Reference10_50.convertReference(src.getSubjectFirstRep()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference10_50.convertReference(src.getSource()));
|
||||
if (src.hasEncounter())
|
||||
|
@ -55,7 +55,7 @@ public class List10_50 {
|
|||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference10_50.convertReference(src.getSubject()));
|
||||
tgt.addSubject(Reference10_50.convertReference(src.getSubject()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference10_50.convertReference(src.getSource()));
|
||||
if (src.hasEncounter())
|
||||
|
|
|
@ -59,7 +59,7 @@ public class Location10_50 {
|
|||
if (src.hasNameElement())
|
||||
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasMode())
|
||||
tgt.setModeElement(convertLocationMode(src.getModeElement()));
|
||||
if (src.hasType())
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent;
|
|||
|
||||
public class MedicationStatement10_50 {
|
||||
|
||||
public static org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.MedicationStatement tgt = new org.hl7.fhir.dstu2.model.MedicationStatement();
|
||||
|
@ -44,10 +44,10 @@ public class MedicationStatement10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage();
|
||||
org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement();
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier10_50.convertIdentifier(t));
|
||||
|
@ -127,32 +127,32 @@ public class MedicationStatement10_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory());
|
||||
ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACTIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR);
|
||||
break;
|
||||
case INTENDED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus> convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus> convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatusEnumFactory());
|
||||
|
|
|
@ -6,6 +6,8 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Codeab
|
|||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Coding10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.ContactPoint10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class MessageHeader10_50 {
|
||||
|
@ -19,8 +21,8 @@ public class MessageHeader10_50 {
|
|||
tgt.setNameElement(String10_50.convertString(src.getNameElement()));
|
||||
if (src.hasTarget())
|
||||
tgt.setTarget(Reference10_50.convertReference(src.getTarget()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
if (src.hasEndpointUrlType())
|
||||
tgt.setEndpointElement(Uri10_50.convertUri(src.getEndpointUrlType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -34,7 +36,7 @@ public class MessageHeader10_50 {
|
|||
if (src.hasTarget())
|
||||
tgt.setTarget(Reference10_50.convertReference(src.getTarget()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setEndpoint(Uri10_50.convertUri(src.getEndpointElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -51,8 +53,8 @@ public class MessageHeader10_50 {
|
|||
tgt.setSource(convertMessageSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
|
||||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasEnterer())
|
||||
tgt.setEnterer(Reference10_50.convertReference(src.getEnterer()));
|
||||
// if (src.hasEnterer())
|
||||
// tgt.setEnterer(Reference10_50.convertReference(src.getEnterer()));
|
||||
if (src.hasAuthor())
|
||||
tgt.setAuthor(Reference10_50.convertReference(src.getAuthor()));
|
||||
if (src.hasResponsible())
|
||||
|
@ -76,8 +78,8 @@ public class MessageHeader10_50 {
|
|||
tgt.setSource(convertMessageSourceComponent(src.getSource()));
|
||||
for (org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent t : src.getDestination())
|
||||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasEnterer())
|
||||
tgt.setEnterer(Reference10_50.convertReference(src.getEnterer()));
|
||||
// if (src.hasEnterer())
|
||||
// tgt.setEnterer(Reference10_50.convertReference(src.getEnterer()));
|
||||
if (src.hasAuthor())
|
||||
tgt.setAuthor(Reference10_50.convertReference(src.getAuthor()));
|
||||
if (src.hasResponsible())
|
||||
|
@ -129,8 +131,8 @@ public class MessageHeader10_50 {
|
|||
tgt.setVersionElement(String10_50.convertString(src.getVersionElement()));
|
||||
if (src.hasContact())
|
||||
tgt.setContact(ContactPoint10_50.convertContactPoint(src.getContact()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
if (src.hasEndpointUrlType())
|
||||
tgt.setEndpointElement(Uri10_50.convertUri(src.getEndpointUrlType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -148,7 +150,7 @@ public class MessageHeader10_50 {
|
|||
if (src.hasContact())
|
||||
tgt.setContact(ContactPoint10_50.convertContactPoint(src.getContact()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setEndpoint(Uri10_50.convertUri(src.getEndpointElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ public class Observation10_50 {
|
|||
if (src.hasAge())
|
||||
tgt.setAge(Range10_50.convertRange(src.getAge()));
|
||||
if (src.hasTextElement())
|
||||
tgt.setTextElement(String10_50.convertString(src.getTextElement()));
|
||||
tgt.setTextElement(String10_50.convertStringToMarkdown(src.getTextElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,16 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Date
|
|||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Integer10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
|
||||
import org.hl7.fhir.dstu2.model.Reference;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeType;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations;
|
||||
import org.hl7.fhir.r5.model.Enumerations.SearchParamType;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class OperationDefinition10_50 {
|
||||
|
@ -57,7 +61,7 @@ public class OperationDefinition10_50 {
|
|||
if (src.hasSystemElement())
|
||||
tgt.setSystemElement(Boolean10_50.convertBoolean(src.getSystemElement()));
|
||||
if (src.getType())
|
||||
for (CodeType t : src.getResource()) tgt.addType(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getResource()) tgt.addType(t.getCode());
|
||||
if (src.hasInstanceElement())
|
||||
tgt.setInstanceElement(Boolean10_50.convertBoolean(src.getInstanceElement()));
|
||||
for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())
|
||||
|
@ -102,7 +106,7 @@ public class OperationDefinition10_50 {
|
|||
tgt.setBaseElement(Reference10_50.convertReferenceToCanonical(src.getBase()));
|
||||
if (src.hasSystemElement())
|
||||
tgt.setSystemElement(Boolean10_50.convertBoolean(src.getSystemElement()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.getResource().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code10_50.convertCode(t)));
|
||||
tgt.setType(tgt.hasResource());
|
||||
if (src.hasInstanceElement())
|
||||
tgt.setInstanceElement(Boolean10_50.convertBoolean(src.getInstanceElement()));
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Period
|
|||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Boolean10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Date10_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent;
|
||||
|
||||
public class Practitioner10_50 {
|
||||
|
||||
|
@ -37,7 +38,7 @@ public class Practitioner10_50 {
|
|||
for (org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent t : src.getQualification())
|
||||
tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
tgt.addCommunication().setLanguage(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -61,8 +62,8 @@ public class Practitioner10_50 {
|
|||
for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment10_50.convertAttachment(t));
|
||||
for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification())
|
||||
tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t));
|
||||
for (PractitionerCommunicationComponent t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t.getLanguage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -212,8 +212,8 @@ public class Resource10_50 {
|
|||
return Location10_50.convertLocation((org.hl7.fhir.r5.model.Location) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationDispense)
|
||||
return MedicationDispense10_50.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationUsage)
|
||||
return MedicationStatement10_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationStatement)
|
||||
return MedicationStatement10_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MessageHeader)
|
||||
return MessageHeader10_50.convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.NamingSystem)
|
||||
|
|
|
@ -44,7 +44,7 @@ public class Schedule10_50 {
|
|||
if (src.hasPlanningHorizon())
|
||||
tgt.setPlanningHorizon(Period10_50.convertPeriod(src.getPlanningHorizon()));
|
||||
if (src.hasCommentElement())
|
||||
tgt.setCommentElement(String10_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -10,6 +10,9 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri1
|
|||
import org.hl7.fhir.dstu2.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
|
||||
public class SearchParameter10_50 {
|
||||
|
||||
|
@ -36,7 +39,7 @@ public class SearchParameter10_50 {
|
|||
tgt.setRequirements(src.getPurpose());
|
||||
if (src.hasCodeElement())
|
||||
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
|
||||
for (CodeType t : src.getBase()) tgt.setBaseElement(Code10_50.convertCode(t));
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getBase()) tgt.setBaseElement(Code10_50.convertCode(t.getCodeType()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDescription())
|
||||
|
@ -46,7 +49,7 @@ public class SearchParameter10_50 {
|
|||
// tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
|
||||
if (src.hasProcessingMode())
|
||||
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
|
||||
for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getTarget()) tgt.getTarget().add(Code10_50.convertCode(t.getCodeType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -73,7 +76,7 @@ public class SearchParameter10_50 {
|
|||
tgt.setPurpose(src.getRequirements());
|
||||
if (src.hasCodeElement())
|
||||
tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement()));
|
||||
tgt.getBase().add(Code10_50.convertCode(src.getBaseElement()));
|
||||
tgt.getBase().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code10_50.convertCode(src.getBaseElement())));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDescription())
|
||||
|
@ -83,7 +86,7 @@ public class SearchParameter10_50 {
|
|||
// tgt.setXpathElement(String10_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpathUsage())
|
||||
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class Substance10_50 {
|
|||
if (src.hasCode())
|
||||
tgt.getCode().setConcept(CodeableConcept10_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance())
|
||||
convertSubstanceInstanceComponent(t, tgt);
|
||||
for (org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent t : src.getIngredient())
|
||||
|
|
|
@ -161,7 +161,7 @@ public class TestScript10_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
|
||||
break;
|
||||
case BAD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST);
|
||||
break;
|
||||
case FORBIDDEN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN);
|
||||
|
@ -182,7 +182,7 @@ public class TestScript10_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
|
||||
break;
|
||||
case UNPROCESSABLE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL);
|
||||
|
@ -209,7 +209,7 @@ public class TestScript10_50 {
|
|||
case NOTMODIFIED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
|
||||
break;
|
||||
case BAD:
|
||||
case BADREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.BAD);
|
||||
break;
|
||||
case FORBIDDEN:
|
||||
|
@ -230,7 +230,7 @@ public class TestScript10_50 {
|
|||
case PRECONDITIONFAILED:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
|
||||
break;
|
||||
case UNPROCESSABLE:
|
||||
case UNPROCESSABLECONTENT:
|
||||
tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -496,7 +496,9 @@ public class ElementDefinition14_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHumanElement()) tgt.setHumanElement(String14_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpression(convertToR4Expression(src.getExpression()));
|
||||
if (src.hasXpathElement()) tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpath()) {
|
||||
tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath())));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -509,7 +511,9 @@ public class ElementDefinition14_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHumanElement()) tgt.setHumanElement(String14_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpression(convertTo2016MayExpression(src.getExpression()));
|
||||
if (src.hasXpathElement()) tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
|
||||
if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) {
|
||||
tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext14_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext14_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
|
@ -15,4 +16,19 @@ public class Id14_50 {
|
|||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.dstu2016may.model.IdType src) {
|
||||
org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.dstu2016may.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException {
|
||||
org.hl7.fhir.dstu2016may.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.dstu2016may.model.IdType(src.getValueAsString()) : new org.hl7.fhir.dstu2016may.model.IdType();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class ConceptMap14_50 {
|
|||
tt = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTarget());
|
||||
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);
|
||||
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> ws = convertSourceElementComponent(t, tgt);
|
||||
for (SourceElementComponentWrapper<ConceptMap.SourceElementComponent> w : ws)
|
||||
getGroup(tgt, w.getSource(), w.getTarget()).addElement(w.getComp());
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public class ConceptMap14_50 {
|
|||
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));
|
||||
tgt.addElement(convertSourceElementComponent(t, g, src));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -221,13 +221,13 @@ public class ConceptMap14_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasPropertyElement())
|
||||
tgt.setElementElement(Uri14_50.convertUri(src.getPropertyElement()));
|
||||
if (src.hasAttribute())
|
||||
tgt.setElement(srcMap.getAttributeUri(src.getAttribute()));
|
||||
if (src.hasValueCoding()) {
|
||||
tgt.setSystem(src.getValueCoding().getSystem());
|
||||
tgt.setCode(src.getValueCoding().getCode());
|
||||
|
@ -237,13 +237,13 @@ public class ConceptMap14_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasElementElement())
|
||||
tgt.setPropertyElement(Uri14_50.convertUri(src.getElementElement()));
|
||||
tgt.setAttribute(tgtMap.registerAttribute(src.getElement()));
|
||||
if (src.hasSystem()) {
|
||||
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode()));
|
||||
} else if (src.hasCodeElement()) {
|
||||
|
@ -252,7 +252,7 @@ public class ConceptMap14_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> convertSourceElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> convertSourceElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
List<SourceElementComponentWrapper<ConceptMap.SourceElementComponent>> res = new ArrayList<>();
|
||||
if (src == null || src.isEmpty())
|
||||
return res;
|
||||
|
@ -264,14 +264,14 @@ public class ConceptMap14_50 {
|
|||
if (t.getEquivalence() == org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
|
||||
tgt.setNoMap(true);
|
||||
} else {
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, tgtMap));
|
||||
}
|
||||
res.add(new SourceElementComponentWrapper<>(tgt, src.getSystem(), t.getSystem()));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -284,12 +284,12 @@ public class ConceptMap14_50 {
|
|||
tgt.addTarget(new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
|
||||
} else {
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
|
||||
tgt.addTarget(convertTargetElementComponent(t, g));
|
||||
tgt.addTarget(convertTargetElementComponent(t, g, srcMap));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -303,13 +303,13 @@ public class ConceptMap14_50 {
|
|||
if (src.hasComment())
|
||||
tgt.setCommentsElement(String14_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, srcMap));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, srcMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -321,9 +321,9 @@ public class ConceptMap14_50 {
|
|||
if (src.hasComments())
|
||||
tgt.setCommentElement(String14_50.convertString(src.getCommentsElement()));
|
||||
for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, tgtMap));
|
||||
for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, tgtMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ public class Conformance14_50 {
|
|||
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String14_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String14_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasUrl())
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
|
|
|
@ -11,10 +11,14 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Date
|
|||
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Integer14_50;
|
||||
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.String14_50;
|
||||
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeType;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
|
||||
public class OperationDefinition14_50 {
|
||||
|
||||
|
@ -61,7 +65,7 @@ public class OperationDefinition14_50 {
|
|||
if (src.hasSystemElement())
|
||||
tgt.setSystemElement(Boolean14_50.convertBoolean(src.getSystemElement()));
|
||||
if (src.getType())
|
||||
for (CodeType t : src.getResource()) tgt.addType(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getResource()) tgt.addType(t.getCode());
|
||||
if (src.hasInstanceElement())
|
||||
tgt.setInstanceElement(Boolean14_50.convertBoolean(src.getInstanceElement()));
|
||||
for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())
|
||||
|
@ -111,7 +115,7 @@ public class OperationDefinition14_50 {
|
|||
tgt.setBaseElement(Reference14_50.convertReferenceToCanonical(src.getBase()));
|
||||
if (src.hasSystemElement())
|
||||
tgt.setSystemElement(Boolean14_50.convertBoolean(src.getSystemElement()));
|
||||
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addResource(t.getValue());
|
||||
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.getResource().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code14_50.convertCode(t)));
|
||||
tgt.setType(tgt.hasResource());
|
||||
if (src.hasInstanceElement())
|
||||
tgt.setInstanceElement(Boolean14_50.convertBoolean(src.getInstanceElement()));
|
||||
|
|
|
@ -11,6 +11,9 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Stri
|
|||
import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
|
||||
public class SearchParameter14_50 {
|
||||
|
||||
|
@ -42,7 +45,7 @@ public class SearchParameter14_50 {
|
|||
tgt.setRequirements(src.getPurpose());
|
||||
if (src.hasCodeElement())
|
||||
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
|
||||
for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getBase()) tgt.setBaseElement(Code14_50.convertCode(t.getCodeType()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDescription())
|
||||
|
@ -53,7 +56,7 @@ public class SearchParameter14_50 {
|
|||
// tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
|
||||
if (src.hasProcessingMode())
|
||||
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
|
||||
for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getTarget()) tgt.getTarget().add(Code14_50.convertCode(t.getCodeType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -85,7 +88,7 @@ public class SearchParameter14_50 {
|
|||
tgt.setPurpose(src.getRequirements());
|
||||
if (src.hasCodeElement())
|
||||
tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement()));
|
||||
tgt.getBase().add(Code14_50.convertCode(src.getBaseElement()));
|
||||
tgt.getBase().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code14_50.convertCode(src.getBaseElement())));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDescription())
|
||||
|
@ -96,7 +99,7 @@ public class SearchParameter14_50 {
|
|||
// tgt.setXpathElement(String14_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpathUsage())
|
||||
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
|
||||
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ public class StructureMap14_50 {
|
|||
org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent();
|
||||
ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasContext())
|
||||
tgt.setContextElement(Id14_50.convertId(src.getContextElement()));
|
||||
tgt.setContextElement(Id14_50.convertIdToString(src.getContextElement()));
|
||||
if (src.hasContextType() && src.getContextType() == org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContextType.VARIABLE)
|
||||
throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here.
|
||||
if (src.hasElement())
|
||||
|
|
|
@ -380,8 +380,8 @@ public class Resource30_50 {
|
|||
return MedicationDispense30_50.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationRequest)
|
||||
return MedicationRequest30_50.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationUsage)
|
||||
return MedicationStatement30_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MedicationStatement)
|
||||
return MedicationStatement30_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MessageDefinition)
|
||||
return MessageDefinition30_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src);
|
||||
if (src instanceof org.hl7.fhir.r5.model.MessageHeader)
|
||||
|
|
|
@ -558,7 +558,9 @@ public class ElementDefinition30_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHuman()) tgt.setHumanElement(String30_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement()));
|
||||
if (src.hasXpath()) tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpath()) {
|
||||
tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath())));
|
||||
}
|
||||
if (src.hasSource()) tgt.setSource(src.getSource());
|
||||
return tgt;
|
||||
}
|
||||
|
@ -566,13 +568,15 @@ public class ElementDefinition30_50 {
|
|||
public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException {
|
||||
if (src == null) return null;
|
||||
org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT);
|
||||
if (src.hasKey()) tgt.setKeyElement(Id30_50.convertId(src.getKeyElement()));
|
||||
if (src.hasRequirements()) tgt.setRequirementsElement(String30_50.convertString(src.getRequirementsElement()));
|
||||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHuman()) tgt.setHumanElement(String30_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement()));
|
||||
if (src.hasXpath()) tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
|
||||
if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) {
|
||||
tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT));
|
||||
}
|
||||
if (src.hasSource()) tgt.setSource(src.getSource());
|
||||
return tgt;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50;
|
|||
import org.hl7.fhir.convertors.context.ConversionContext30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
|
||||
|
||||
public class Code30_50 {
|
||||
public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException {
|
||||
|
@ -43,12 +42,12 @@ public class Code30_50 {
|
|||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.dstu3.model.CodeType src) {
|
||||
return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getValue());
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
|
||||
return new org.hl7.fhir.dstu3.model.CodeType(src.getCode());
|
||||
}
|
||||
// public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.dstu3.model.CodeType src) {
|
||||
// return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getValue());
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.dstu3.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
|
||||
// return new org.hl7.fhir.dstu3.model.CodeType(src.getCode());
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext30_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
|
@ -15,4 +16,18 @@ public class Id30_50 {
|
|||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.dstu3.model.IdType src) {
|
||||
org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException {
|
||||
org.hl7.fhir.dstu3.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.IdType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.IdType();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ActivityDefinition30_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String30_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasApprovalDate())
|
||||
tgt.setApprovalDateElement(Date30_50.convertDate(src.getApprovalDateElement()));
|
||||
if (src.hasLastReviewDate())
|
||||
|
@ -256,9 +256,6 @@ public class ActivityDefinition30_50 {
|
|||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case CONTRACT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.CONTRACT);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.DEVICEREQUEST);
|
||||
break;
|
||||
|
@ -317,9 +314,6 @@ public class ActivityDefinition30_50 {
|
|||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case CONTRACT:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.CONTRACT);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.DEVICEREQUEST);
|
||||
break;
|
||||
|
|
|
@ -273,7 +273,7 @@ public class Appointment30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Appointment.ParticipationStatusEnumFactory());
|
||||
|
@ -298,26 +298,26 @@ public class Appointment30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -30,7 +30,7 @@ public class AppointmentResponse30_50 {
|
|||
if (src.hasParticipantStatus())
|
||||
tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement()));
|
||||
if (src.hasComment())
|
||||
tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class AppointmentResponse30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatusEnumFactory());
|
||||
|
@ -83,26 +83,26 @@ public class AppointmentResponse30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipantStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> convertParticipantStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BodySite30_50 {
|
|||
if (src.hasActive())
|
||||
tgt.setActiveElement(Boolean30_50.convertBoolean(src.getActiveElement()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getImage()) tgt.addImage(Attachment30_50.convertAttachment(t));
|
||||
if (src.hasPatient())
|
||||
tgt.setPatient(Reference30_50.convertReference(src.getPatient()));
|
||||
|
|
|
@ -185,7 +185,7 @@ public class CapabilityStatement30_50 {
|
|||
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasUrl())
|
||||
tgt.setUrl(src.getUrl());
|
||||
return tgt;
|
||||
|
|
|
@ -186,10 +186,10 @@ public class CarePlan30_50 {
|
|||
if (src.hasPlannedActivityReference())
|
||||
tgt.setReference(Reference30_50.convertReference(src.getPlannedActivityReference()));
|
||||
}
|
||||
if (src.hasPlannedActivityDetail()) {
|
||||
if (src.hasPlannedActivityDetail())
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
}
|
||||
// if (src.hasPlannedActivityDetail()) {
|
||||
// if (src.hasPlannedActivityDetail())
|
||||
// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
// }
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -211,221 +211,221 @@ public class CarePlan30_50 {
|
|||
if (src.hasReference())
|
||||
tgt.setPlannedActivityReference(Reference30_50.convertReference(src.getReference()));
|
||||
}
|
||||
if (src.hasDetail()) {
|
||||
if (src.hasDetail())
|
||||
tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
}
|
||||
// if (src.hasDetail()) {
|
||||
// if (src.hasDetail())
|
||||
// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
// }
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasExtension()) {
|
||||
org.hl7.fhir.r5.model.Extension extension = src.getExtensionByUrl(CarePlanActivityDetailComponentExtension);
|
||||
if (extension != null) {
|
||||
org.hl7.fhir.r5.model.DataType value = extension.getValue();
|
||||
if (value instanceof org.hl7.fhir.r5.model.CodeableConcept) {
|
||||
tgt.setCategory(CodeableConcept30_50.convertCodeableConcept((org.hl7.fhir.r5.model.CodeableConcept) value));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (src.hasCode()) {
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
}
|
||||
for (CodeableReference t : src.getReason()) {
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
|
||||
}
|
||||
for (CodeableReference t : src.getReason()) {
|
||||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference30_50.convertReference(t.getReference()));
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) {
|
||||
tgt.addGoal(Reference30_50.convertReference(t));
|
||||
}
|
||||
if (src.hasStatus()) {
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
}
|
||||
if (src.hasStatusReason()) {
|
||||
List<Coding> coding = src.getStatusReason().getCoding();
|
||||
if (coding.size() > 0) {
|
||||
tgt.setStatusReason(coding.get(0).getCode());
|
||||
}
|
||||
}
|
||||
if (src.hasDoNotPerform()) {
|
||||
if (src.hasDoNotPerformElement())
|
||||
tgt.setProhibitedElement(Boolean30_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
}
|
||||
if (src.hasScheduled()) {
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled()));
|
||||
}
|
||||
if (src.hasLocation()) {
|
||||
if (src.getLocation().hasReference())
|
||||
tgt.setLocation(Reference30_50.convertReference(src.getLocation().getReference()));
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) {
|
||||
tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
}
|
||||
if (src.hasProduct()) {
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct()));
|
||||
}
|
||||
if (src.hasDailyAmount()) {
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
}
|
||||
if (src.hasQuantity()) {
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity()));
|
||||
}
|
||||
if (src.hasDescription()) {
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCategory()) {
|
||||
org.hl7.fhir.r5.model.Extension t = new org.hl7.fhir.r5.model.Extension();
|
||||
t.setUrl(CarePlanActivityDetailComponentExtension);
|
||||
t.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getCategory()));
|
||||
tgt.addExtension(t);
|
||||
}
|
||||
if (src.hasCode()) {
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) {
|
||||
tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) {
|
||||
tgt.addReason(Reference30_50.convertReferenceToCodableReference(t));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) {
|
||||
tgt.addGoal(Reference30_50.convertReference(t));
|
||||
}
|
||||
if (src.hasStatus()) {
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
}
|
||||
if (src.hasStatusReason()) {
|
||||
org.hl7.fhir.r5.model.Coding code = new org.hl7.fhir.r5.model.Coding();
|
||||
code.setCode(src.getStatusReason());
|
||||
org.hl7.fhir.r5.model.CodeableConcept t = new org.hl7.fhir.r5.model.CodeableConcept(code);
|
||||
tgt.setStatusReason(t);
|
||||
}
|
||||
if (src.hasProhibited()) {
|
||||
if (src.hasProhibitedElement())
|
||||
tgt.setDoNotPerformElement(Boolean30_50.convertBoolean(src.getProhibitedElement()));
|
||||
}
|
||||
if (src.hasScheduled()) {
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled()));
|
||||
}
|
||||
if (src.hasLocation()) {
|
||||
if (src.hasLocation())
|
||||
tgt.getLocation().setReference(Reference30_50.convertReference(src.getLocation()));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) {
|
||||
tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
}
|
||||
if (src.hasProduct()) {
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct()));
|
||||
}
|
||||
if (src.hasDailyAmount()) {
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
}
|
||||
if (src.hasQuantity()) {
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity()));
|
||||
}
|
||||
if (src.hasDescription()) {
|
||||
if (src.hasDescriptionElement())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
// public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasExtension()) {
|
||||
// org.hl7.fhir.r5.model.Extension extension = src.getExtensionByUrl(CarePlanActivityDetailComponentExtension);
|
||||
// if (extension != null) {
|
||||
// org.hl7.fhir.r5.model.DataType value = extension.getValue();
|
||||
// if (value instanceof org.hl7.fhir.r5.model.CodeableConcept) {
|
||||
// tgt.setCategory(CodeableConcept30_50.convertCodeableConcept((org.hl7.fhir.r5.model.CodeableConcept) value));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (src.hasCode()) {
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
// }
|
||||
// for (CodeableReference t : src.getReason()) {
|
||||
// if (t.hasConcept())
|
||||
// tgt.addReasonCode(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
|
||||
// }
|
||||
// for (CodeableReference t : src.getReason()) {
|
||||
// if (t.hasReference())
|
||||
// tgt.addReasonReference(Reference30_50.convertReference(t.getReference()));
|
||||
// }
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) {
|
||||
// tgt.addGoal(Reference30_50.convertReference(t));
|
||||
// }
|
||||
// if (src.hasStatus()) {
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// }
|
||||
// if (src.hasStatusReason()) {
|
||||
// List<Coding> coding = src.getStatusReason().getCoding();
|
||||
// if (coding.size() > 0) {
|
||||
// tgt.setStatusReason(coding.get(0).getCode());
|
||||
// }
|
||||
// }
|
||||
// if (src.hasDoNotPerform()) {
|
||||
// if (src.hasDoNotPerformElement())
|
||||
// tgt.setProhibitedElement(Boolean30_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
// }
|
||||
// if (src.hasScheduled()) {
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled()));
|
||||
// }
|
||||
// if (src.hasLocation()) {
|
||||
// if (src.getLocation().hasReference())
|
||||
// tgt.setLocation(Reference30_50.convertReference(src.getLocation().getReference()));
|
||||
// }
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) {
|
||||
// tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
// }
|
||||
// if (src.hasProduct()) {
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct()));
|
||||
// }
|
||||
// if (src.hasDailyAmount()) {
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// }
|
||||
// if (src.hasQuantity()) {
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// }
|
||||
// if (src.hasDescription()) {
|
||||
// if (src.hasDescriptionElement())
|
||||
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasCategory()) {
|
||||
// org.hl7.fhir.r5.model.Extension t = new org.hl7.fhir.r5.model.Extension();
|
||||
// t.setUrl(CarePlanActivityDetailComponentExtension);
|
||||
// t.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getCategory()));
|
||||
// tgt.addExtension(t);
|
||||
// }
|
||||
// if (src.hasCode()) {
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
// }
|
||||
// for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) {
|
||||
// tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t));
|
||||
// }
|
||||
// for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) {
|
||||
// tgt.addReason(Reference30_50.convertReferenceToCodableReference(t));
|
||||
// }
|
||||
// for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) {
|
||||
// tgt.addGoal(Reference30_50.convertReference(t));
|
||||
// }
|
||||
// if (src.hasStatus()) {
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// }
|
||||
// if (src.hasStatusReason()) {
|
||||
// org.hl7.fhir.r5.model.Coding code = new org.hl7.fhir.r5.model.Coding();
|
||||
// code.setCode(src.getStatusReason());
|
||||
// org.hl7.fhir.r5.model.CodeableConcept t = new org.hl7.fhir.r5.model.CodeableConcept(code);
|
||||
// tgt.setStatusReason(t);
|
||||
// }
|
||||
// if (src.hasProhibited()) {
|
||||
// if (src.hasProhibitedElement())
|
||||
// tgt.setDoNotPerformElement(Boolean30_50.convertBoolean(src.getProhibitedElement()));
|
||||
// }
|
||||
// if (src.hasScheduled()) {
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled()));
|
||||
// }
|
||||
// if (src.hasLocation()) {
|
||||
// if (src.hasLocation())
|
||||
// tgt.getLocation().setReference(Reference30_50.convertReference(src.getLocation()));
|
||||
// }
|
||||
// for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) {
|
||||
// tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
// }
|
||||
// if (src.hasProduct()) {
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct()));
|
||||
// }
|
||||
// if (src.hasDailyAmount()) {
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// }
|
||||
// if (src.hasQuantity()) {
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// }
|
||||
// if (src.hasDescription()) {
|
||||
// if (src.hasDescriptionElement())
|
||||
// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case UNKNOWN:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case UNKNOWN:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CarePlan.CarePlanIntent> convertCarePlanIntent(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanIntent> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ConceptMap30_50 {
|
|||
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));
|
||||
tgt.addGroup(convertConceptMapGroupComponent(t, src));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -112,11 +112,11 @@ public class ConceptMap30_50 {
|
|||
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));
|
||||
tgt.addGroup(convertConceptMapGroupComponent(t, tgt));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent();
|
||||
|
@ -127,13 +127,13 @@ public class ConceptMap30_50 {
|
|||
tgt.setSourceElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement()));
|
||||
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent t : src.getElement())
|
||||
tgt.addElement(convertSourceElementComponent(t));
|
||||
tgt.addElement(convertSourceElementComponent(t, tgtMap));
|
||||
if (src.hasUnmapped())
|
||||
tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent();
|
||||
|
@ -149,7 +149,7 @@ public class ConceptMap30_50 {
|
|||
tgt.setTargetVersion(cp.getVersion());
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : src.getElement())
|
||||
tgt.addElement(convertSourceElementComponent(t));
|
||||
tgt.addElement(convertSourceElementComponent(t, srcMap));
|
||||
if (src.hasUnmapped())
|
||||
tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped()));
|
||||
return tgt;
|
||||
|
@ -317,13 +317,13 @@ public class ConceptMap30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasProperty())
|
||||
tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement()));
|
||||
tgt.setAttribute(tgtMap.registerAttribute(src.getProperty()));
|
||||
|
||||
if (src.hasSystem()) {
|
||||
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode()).setDisplay(src.getDisplay()));
|
||||
|
@ -333,14 +333,13 @@ public class ConceptMap30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasProperty())
|
||||
tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement()));
|
||||
|
||||
if (src.hasAttribute())
|
||||
tgt.setProperty(srcMap.getAttributeUri(src.getAttribute()));
|
||||
if (src.hasValueCoding()) {
|
||||
tgt.setSystem(src.getValueCoding().getSystem());
|
||||
tgt.setCode(src.getValueCoding().getCode());
|
||||
|
@ -351,7 +350,7 @@ public class ConceptMap30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -364,12 +363,12 @@ public class ConceptMap30_50 {
|
|||
tgt.addTarget(new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
|
||||
} else {
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, srcMap));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -382,12 +381,12 @@ public class ConceptMap30_50 {
|
|||
if (t.getEquivalence() == org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
|
||||
tgt.setNoMap(true);
|
||||
} else {
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, tgtMap));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -401,13 +400,13 @@ public class ConceptMap30_50 {
|
|||
if (src.hasComment())
|
||||
tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, tgtMap));
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, tgtMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -421,9 +420,9 @@ public class ConceptMap30_50 {
|
|||
if (src.hasComment())
|
||||
tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, srcMap));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, srcMap));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -62,7 +62,7 @@ public class DetectedIssue30_50 {
|
|||
for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated())
|
||||
tgt.addImplicated(Reference30_50.convertReference(t));
|
||||
if (src.hasDetail())
|
||||
tgt.setDetailElement(String30_50.convertString(src.getDetailElement()));
|
||||
tgt.setDetailElement(String30_50.convertStringToMarkdown(src.getDetailElement()));
|
||||
if (src.hasReference())
|
||||
tgt.setReferenceElement(Uri30_50.convertUri(src.getReferenceElement()));
|
||||
for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation())
|
||||
|
|
|
@ -38,7 +38,7 @@ public class DiagnosticReport30_50 {
|
|||
for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())
|
||||
tgt.addMedia(convertDiagnosticReportImageComponent(t));
|
||||
if (src.hasConclusion())
|
||||
tgt.setConclusionElement(String30_50.convertString(src.getConclusionElement()));
|
||||
tgt.setConclusionElement(String30_50.convertStringToMarkdown(src.getConclusionElement()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis())
|
||||
tgt.addConclusionCode(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.Attachment t : src.getPresentedForm())
|
||||
|
|
|
@ -1,26 +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.Identifier30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class DocumentManifest30_50 {
|
||||
public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null) return null;
|
||||
org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasIdentifier()) tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef()) tgt.setRef(Reference30_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null) return null;
|
||||
org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasIdentifier()) tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef()) tgt.setRef(Reference30_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -195,7 +195,7 @@ public class DocumentReference30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
|
@ -217,23 +217,23 @@ public class DocumentReference30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case CURRENT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT);
|
||||
break;
|
||||
case SUPERSEDED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -10,32 +10,33 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period
|
|||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.PositiveInt30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeableReference;
|
||||
import org.hl7.fhir.r5.model.Encounter.ReasonComponent;
|
||||
|
||||
public class Encounter30_50 {
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasClass_())
|
||||
tgt.setClass_(Coding30_50.convertCoding(src.getClass_()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasClass_())
|
||||
tgt.setClass_(Coding30_50.convertCoding(src.getClass_()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
// public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasClass_())
|
||||
// tgt.setClass_(Coding30_50.convertCoding(src.getClass_()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasClass_())
|
||||
// tgt.setClass_(Coding30_50.convertCoding(src.getClass_()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter convertEncounter(org.hl7.fhir.dstu3.model.Encounter src) throws FHIRException {
|
||||
if (src == null)
|
||||
|
@ -46,12 +47,12 @@ public class Encounter30_50 {
|
|||
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
// for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
// tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
if (src.hasClass_())
|
||||
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding30_50.convertCoding(src.getClass_())));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
|
||||
tgt.addClassHistory(convertClassHistoryComponent(t));
|
||||
// for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
|
||||
// tgt.addClassHistory(convertClassHistoryComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())
|
||||
tgt.addType(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
if (src.hasPriority())
|
||||
|
@ -71,12 +72,12 @@ public class Encounter30_50 {
|
|||
if (src.hasLength())
|
||||
tgt.setLength(Duration30_50.convertDuration(src.getLength()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())
|
||||
tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t));
|
||||
tgt.addReason().addValue(Reference30_50.convertCodeableConceptToCodableReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
|
||||
tgt.addDiagnosis(convertDiagnosisComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t));
|
||||
if (src.hasHospitalization())
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt));
|
||||
for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -95,12 +96,12 @@ public class Encounter30_50 {
|
|||
tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
// for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
// tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
if (src.hasClass_())
|
||||
tgt.setClass_(Coding30_50.convertCoding(src.getClass_FirstRep()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
|
||||
tgt.addClassHistory(convertClassHistoryComponent(t));
|
||||
// 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(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
if (src.hasPriority())
|
||||
|
@ -119,14 +120,15 @@ public class Encounter30_50 {
|
|||
tgt.setPeriod(Period30_50.convertPeriod(src.getActualPeriod()));
|
||||
if (src.hasLength())
|
||||
tgt.setLength(Duration30_50.convertDuration(src.getLength()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReason(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
|
||||
for (ReasonComponent t1 : src.getReason())
|
||||
for (CodeableReference t : t1.getValue())
|
||||
if (t.hasConcept())
|
||||
tgt.addReason(CodeableConcept30_50.convertCodeableConcept(t.getConcept()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
|
||||
tgt.addDiagnosis(convertDiagnosisComponent(t));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t));
|
||||
if (src.hasAdmission())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
|
||||
if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src));
|
||||
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -136,7 +138,7 @@ public class Encounter30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent();
|
||||
|
@ -149,11 +151,11 @@ public class Encounter30_50 {
|
|||
tgt.setAdmitSource(CodeableConcept30_50.convertCodeableConcept(src.getAdmitSource()));
|
||||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept30_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference30_50.convertReference(src.getDestination()));
|
||||
|
@ -162,7 +164,7 @@ public class Encounter30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
|
||||
|
@ -176,11 +178,11 @@ public class Encounter30_50 {
|
|||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept30_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
tgte.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference30_50.convertReference(src.getDestination()));
|
||||
if (src.hasDischargeDisposition())
|
||||
|
@ -294,7 +296,7 @@ public class Encounter30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Encounter.EncounterStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Encounter.EncounterStatusEnumFactory());
|
||||
|
@ -325,77 +327,77 @@ public class Encounter30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> convertEncounterStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case PLANNED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED);
|
||||
break;
|
||||
case ARRIVED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case TRIAGED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case ONLEAVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case FINISHED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.ENTEREDINERROR);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.UNKNOWN);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
// public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent();
|
||||
// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent src) throws FHIRException {
|
||||
if (src == null) return null;
|
||||
org.hl7.fhir.r5.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.Encounter.DiagnosisComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReference(src.getCondition()));
|
||||
if (src.hasRole()) tgt.setUse(CodeableConcept30_50.convertCodeableConcept(src.getRole()));
|
||||
if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
if (src.hasCondition()) tgt.addCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition()));
|
||||
if (src.hasRole()) tgt.addUse(CodeableConcept30_50.convertCodeableConcept(src.getRole()));
|
||||
// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -403,9 +405,9 @@ public class Encounter30_50 {
|
|||
if (src == null) return null;
|
||||
org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReference(src.getCondition()));
|
||||
if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUse()));
|
||||
if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
if (src.hasCondition() && src.getConditionFirstRep().hasReference()) tgt.setCondition(Reference30_50.convertReference(src.getConditionFirstRep().getReference()));
|
||||
if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUseFirstRep()));
|
||||
// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -7,8 +7,11 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Coding
|
|||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.ContactPoint30_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.Period30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Code30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Endpoint.EndpointPayloadComponent;
|
||||
|
||||
public class Endpoint30_50 {
|
||||
|
||||
|
@ -31,9 +34,12 @@ public class Endpoint30_50 {
|
|||
tgt.addContact(ContactPoint30_50.convertContactPoint(t));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPayloadType())
|
||||
tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue());
|
||||
for (EndpointPayloadComponent t : src.getPayload())
|
||||
if (t.hasType())
|
||||
tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t.getTypeFirstRep()));
|
||||
for (EndpointPayloadComponent t : src.getPayload())
|
||||
if (t.hasMimeType())
|
||||
tgt.getPayloadMimeType().add(Code30_50.convertCode(t.getMimeType().get(0)));
|
||||
if (src.hasAddress())
|
||||
tgt.setAddress(src.getAddress());
|
||||
for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue());
|
||||
|
@ -60,8 +66,8 @@ public class Endpoint30_50 {
|
|||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPayloadType())
|
||||
tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue());
|
||||
tgt.addPayload().addType(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayload().addMimeType(t.getValue());
|
||||
if (src.hasAddress())
|
||||
tgt.setAddress(src.getAddress());
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue());
|
||||
|
|
|
@ -166,9 +166,9 @@ public class EpisodeOfCare30_50 {
|
|||
if (src == null) return null;
|
||||
org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition()));
|
||||
if (src.hasRole()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getRole()));
|
||||
if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
if (src.hasCondition()) tgt.addCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition()));
|
||||
if (src.hasRole()) tgt.setUse(CodeableConcept30_50.convertCodeableConcept(src.getRole()));
|
||||
// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -176,9 +176,9 @@ public class EpisodeOfCare30_50 {
|
|||
if (src == null) return null;
|
||||
org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasCondition()) tgt.setCondition(Reference30_50.convertCodeableReferenceToReference(src.getCondition()));
|
||||
if (src.hasRole()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getRole()));
|
||||
if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
if (src.hasCondition()) tgt.setCondition(Reference30_50.convertCodeableReferenceToReference(src.getConditionFirstRep()));
|
||||
if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUse()));
|
||||
// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public class HealthcareService30_50 {
|
|||
if (src.hasName())
|
||||
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
|
||||
if (src.hasComment())
|
||||
tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
if (src.hasExtraDetails())
|
||||
tgt.setExtraDetails(src.getExtraDetails());
|
||||
if (src.hasPhoto())
|
||||
|
|
|
@ -73,9 +73,9 @@ public class ImagingStudy30_50 {
|
|||
if (src.hasReferrer())
|
||||
tgt.setReferrer(Reference30_50.convertReference(src.getReferrer()));
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) {
|
||||
tgt.addInterpreter(Reference30_50.convertReference(t));
|
||||
}
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) {
|
||||
// tgt.addInterpreter(Reference30_50.convertReference(t));
|
||||
// }
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) {
|
||||
tgt.addEndpoint(Reference30_50.convertReference(t));
|
||||
}
|
||||
|
@ -165,9 +165,9 @@ public class ImagingStudy30_50 {
|
|||
if (src.hasReferrer())
|
||||
tgt.setReferrer(Reference30_50.convertReference(src.getReferrer()));
|
||||
}
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) {
|
||||
tgt.addInterpreter(Reference30_50.convertReference(t));
|
||||
}
|
||||
// for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) {
|
||||
// tgt.addInterpreter(Reference30_50.convertReference(t));
|
||||
// }
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) {
|
||||
tgt.addEndpoint(Reference30_50.convertReference(t));
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ public class Library30_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String30_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasCopyright())
|
||||
tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
|
||||
if (src.hasApprovalDate())
|
||||
|
|
|
@ -28,7 +28,7 @@ public class List30_50 {
|
|||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
|
||||
tgt.addSubject(Reference30_50.convertReference(src.getSubject()));
|
||||
if (src.hasEncounter())
|
||||
tgt.setEncounter(Reference30_50.convertReference(src.getEncounter()));
|
||||
if (src.hasDate())
|
||||
|
@ -61,7 +61,7 @@ public class List30_50 {
|
|||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference30_50.convertReference(src.getSubject()));
|
||||
tgt.setSubject(Reference30_50.convertReference(src.getSubjectFirstRep()));
|
||||
if (src.hasEncounter())
|
||||
tgt.setEncounter(Reference30_50.convertReference(src.getEncounter()));
|
||||
if (src.hasDate())
|
||||
|
|
|
@ -30,7 +30,7 @@ public class Location30_50 {
|
|||
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
|
||||
for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue());
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasMode())
|
||||
tgt.setModeElement(convertLocationMode(src.getModeElement()));
|
||||
if (src.hasType())
|
||||
|
|
|
@ -59,7 +59,7 @@ public class Measure30_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String30_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasCopyright())
|
||||
tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
|
||||
if (src.hasApprovalDate())
|
||||
|
@ -103,9 +103,9 @@ public class Measure30_50 {
|
|||
if (src.hasCompositeScoring())
|
||||
tgt.setCompositeScoring(CodeableConcept30_50.convertCodeableConcept(src.getCompositeScoring()));
|
||||
if (src.hasRiskAdjustment())
|
||||
tgt.setRiskAdjustmentElement(String30_50.convertString(src.getRiskAdjustmentElement()));
|
||||
tgt.setRiskAdjustmentElement(String30_50.convertStringToMarkdown(src.getRiskAdjustmentElement()));
|
||||
if (src.hasRateAggregation())
|
||||
tgt.setRateAggregationElement(String30_50.convertString(src.getRateAggregationElement()));
|
||||
tgt.setRateAggregationElement(String30_50.convertStringToMarkdown(src.getRateAggregationElement()));
|
||||
if (src.hasRationale())
|
||||
tgt.setRationaleElement(MarkDown30_50.convertMarkdown(src.getRationaleElement()));
|
||||
if (src.hasClinicalRecommendationStatement())
|
||||
|
@ -259,7 +259,7 @@ public class Measure30_50 {
|
|||
if (src.hasIdentifier())
|
||||
tgt.setCode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding().setCode(src.getIdentifier().getValue())));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupPopulationComponent p : src.getPopulation())
|
||||
tgt.addPopulation(convertMeasureGroupPopulation(p));
|
||||
for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupStratifierComponent s : src.getStratifier())
|
||||
|
@ -290,7 +290,7 @@ public class Measure30_50 {
|
|||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasCriteria())
|
||||
tgt.setCriteria(new org.hl7.fhir.r5.model.Expression().setExpression(src.getCriteria()));
|
||||
if (src.hasName()) {
|
||||
|
|
|
@ -48,7 +48,9 @@ public class MedicationAdministration30_50 {
|
|||
tgt.addReasonReference(Reference30_50.convertReference(t.getReference()));
|
||||
if (src.hasRequest())
|
||||
tgt.setPrescription(Reference30_50.convertReference(src.getRequest()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReference(t));
|
||||
for (CodeableReference t : src.getDevice())
|
||||
if (t.hasReference())
|
||||
tgt.addDevice(Reference30_50.convertReference(t.getReference()));
|
||||
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
|
||||
if (src.hasDosage())
|
||||
tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage()));
|
||||
|
@ -90,7 +92,7 @@ public class MedicationAdministration30_50 {
|
|||
tgt.addReason(Reference30_50.convertReferenceToCodableReference(t));
|
||||
if (src.hasPrescription())
|
||||
tgt.setRequest(Reference30_50.convertReference(src.getPrescription()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReferenceToCodableReference(t));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
|
||||
if (src.hasDosage())
|
||||
tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage()));
|
||||
|
@ -145,7 +147,7 @@ public class MedicationAdministration30_50 {
|
|||
org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasActor())
|
||||
tgt.setActor(Reference30_50.convertReference(src.getActor()));
|
||||
tgt.setActor(Reference30_50.convertReferenceToCodableReference(src.getActor()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -154,8 +156,8 @@ public class MedicationAdministration30_50 {
|
|||
return null;
|
||||
org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasActor())
|
||||
tgt.setActor(Reference30_50.convertReference(src.getActor()));
|
||||
if (src.hasActor() && src.getActor().hasReference())
|
||||
tgt.setActor(Reference30_50.convertReference(src.getActor().getReference()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class MedicationRequest30_50 {
|
|||
}
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
|
||||
for (org.hl7.fhir.r5.model.Dosage t : src.getDose().getDosageInstruction())
|
||||
for (org.hl7.fhir.r5.model.Dosage t : src.getDosageInstruction())
|
||||
tgt.addDosageInstruction(Dosage30_50.convertDosage(t));
|
||||
if (src.hasDispenseRequest())
|
||||
tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest()));
|
||||
|
@ -106,7 +106,7 @@ public class MedicationRequest30_50 {
|
|||
tgt.addReason(new CodeableReference().setReference(Reference30_50.convertReference(t)));
|
||||
for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t));
|
||||
for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosageInstruction())
|
||||
tgt.getDose().addDosageInstruction(Dosage30_50.convertDosage(t));
|
||||
tgt.addDosageInstruction(Dosage30_50.convertDosage(t));
|
||||
if (src.hasDispenseRequest())
|
||||
tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest()));
|
||||
if (src.hasSubstitution())
|
||||
|
|
|
@ -12,10 +12,10 @@ import org.hl7.fhir.r5.model.CodeableReference;
|
|||
|
||||
public class MedicationStatement30_50 {
|
||||
|
||||
public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage();
|
||||
org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement();
|
||||
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));
|
||||
|
@ -52,7 +52,7 @@ public class MedicationStatement30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.dstu3.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException {
|
||||
public static org.hl7.fhir.dstu3.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.MedicationStatement tgt = new org.hl7.fhir.dstu3.model.MedicationStatement();
|
||||
|
@ -94,7 +94,7 @@ public class MedicationStatement30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus> convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus> convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatusEnumFactory());
|
||||
|
@ -125,32 +125,32 @@ public class MedicationStatement30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> convertMedicationStatementStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> convertMedicationStatementStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACTIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR);
|
||||
break;
|
||||
case INTENDED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case STOPPED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package org.hl7.fhir.convertors.conv30_50.resources30_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext30_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_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.Coding30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.ContactPoint30_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.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class MessageHeader30_50 {
|
||||
|
@ -19,8 +22,8 @@ public class MessageHeader30_50 {
|
|||
tgt.setNameElement(String30_50.convertString(src.getNameElement()));
|
||||
if (src.hasTarget())
|
||||
tgt.setTarget(Reference30_50.convertReference(src.getTarget()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
if (src.hasEndpointUrlType())
|
||||
tgt.setEndpointElement(Uri30_50.convertUrl(src.getEndpointUrlType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -34,7 +37,7 @@ public class MessageHeader30_50 {
|
|||
if (src.hasTarget())
|
||||
tgt.setTarget(Reference30_50.convertReference(src.getTarget()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setEndpoint(Uri30_50.convertUri(src.getEndpointElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -49,8 +52,8 @@ public class MessageHeader30_50 {
|
|||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasSender())
|
||||
tgt.setSender(Reference30_50.convertReference(src.getSender()));
|
||||
if (src.hasEnterer())
|
||||
tgt.setEnterer(Reference30_50.convertReference(src.getEnterer()));
|
||||
// if (src.hasEnterer())
|
||||
// tgt.setEnterer(Reference30_50.convertReference(src.getEnterer()));
|
||||
if (src.hasAuthor())
|
||||
tgt.setAuthor(Reference30_50.convertReference(src.getAuthor()));
|
||||
if (src.hasSource())
|
||||
|
@ -76,8 +79,8 @@ public class MessageHeader30_50 {
|
|||
tgt.addDestination(convertMessageDestinationComponent(t));
|
||||
if (src.hasSender())
|
||||
tgt.setSender(Reference30_50.convertReference(src.getSender()));
|
||||
if (src.hasEnterer())
|
||||
tgt.setEnterer(Reference30_50.convertReference(src.getEnterer()));
|
||||
// if (src.hasEnterer())
|
||||
// tgt.setEnterer(Reference30_50.convertReference(src.getEnterer()));
|
||||
if (src.hasAuthor())
|
||||
tgt.setAuthor(Reference30_50.convertReference(src.getAuthor()));
|
||||
if (src.hasSource())
|
||||
|
@ -133,8 +136,8 @@ public class MessageHeader30_50 {
|
|||
tgt.setVersionElement(String30_50.convertString(src.getVersionElement()));
|
||||
if (src.hasContact())
|
||||
tgt.setContact(ContactPoint30_50.convertContactPoint(src.getContact()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
if (src.hasEndpointUrlType())
|
||||
tgt.setEndpointElement(Uri30_50.convertUrl(src.getEndpointUrlType()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -152,7 +155,7 @@ public class MessageHeader30_50 {
|
|||
if (src.hasContact())
|
||||
tgt.setContact(ContactPoint30_50.convertContactPoint(src.getContact()));
|
||||
if (src.hasEndpoint())
|
||||
tgt.setEndpoint(src.getEndpoint());
|
||||
tgt.setEndpoint(Uri30_50.convertUri(src.getEndpointElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ public class Observation30_50 {
|
|||
if (src.hasAge())
|
||||
tgt.setAge(Range30_50.convertRange(src.getAge()));
|
||||
if (src.hasText())
|
||||
tgt.setTextElement(String30_50.convertString(src.getTextElement()));
|
||||
tgt.setTextElement(String30_50.convertStringToMarkdown(src.getTextElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,13 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Inte
|
|||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_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.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.DataType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
|
||||
public class OperationDefinition30_50 {
|
||||
|
||||
|
@ -58,7 +62,7 @@ public class OperationDefinition30_50 {
|
|||
tgt.setComment(src.getComment());
|
||||
if (src.hasBase())
|
||||
tgt.setBaseElement(Reference30_50.convertReferenceToCanonical(src.getBase()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addResource(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.getResource().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code30_50.convertCode(t)));
|
||||
if (src.hasSystem())
|
||||
tgt.setSystemElement(Boolean30_50.convertBoolean(src.getSystemElement()));
|
||||
if (src.hasType())
|
||||
|
@ -111,7 +115,7 @@ public class OperationDefinition30_50 {
|
|||
tgt.setComment(src.getComment());
|
||||
if (src.hasBase())
|
||||
tgt.setBase(Reference30_50.convertCanonicalToReference(src.getBaseElement()));
|
||||
for (org.hl7.fhir.r5.model.CodeType t : src.getResource()) tgt.addResource(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getResource()) tgt.getResource().add(Code30_50.convertCode(t.getCodeType()));
|
||||
if (src.hasSystem())
|
||||
tgt.setSystemElement(Boolean30_50.convertBoolean(src.getSystemElement()));
|
||||
if (src.hasType())
|
||||
|
|
|
@ -29,8 +29,8 @@ public class PaymentNotice30_50 {
|
|||
tgt.setCreatedElement(DateTime30_50.convertDateTime(src.getCreatedElement()));
|
||||
if (src.hasRecipient())
|
||||
tgt.setTarget(Reference30_50.convertReference(src.getRecipient()));
|
||||
if (src.hasProvider())
|
||||
tgt.setProvider(Reference30_50.convertReference(src.getProvider()));
|
||||
if (src.hasReporter())
|
||||
tgt.setProvider(Reference30_50.convertReference(src.getReporter()));
|
||||
if (src.hasPaymentStatus())
|
||||
tgt.setPaymentStatus(CodeableConcept30_50.convertCodeableConcept(src.getPaymentStatus()));
|
||||
return tgt;
|
||||
|
@ -56,7 +56,7 @@ public class PaymentNotice30_50 {
|
|||
if (src.hasTarget())
|
||||
tgt.setRecipient(Reference30_50.convertReference(src.getTarget()));
|
||||
if (src.hasProvider())
|
||||
tgt.setProvider(Reference30_50.convertReference(src.getProvider()));
|
||||
tgt.setReporter(Reference30_50.convertReference(src.getProvider()));
|
||||
if (src.hasPaymentStatus())
|
||||
tgt.setPaymentStatus(CodeableConcept30_50.convertCodeableConcept(src.getPaymentStatus()));
|
||||
return tgt;
|
||||
|
|
|
@ -534,7 +534,7 @@ public class PlanDefinition30_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String30_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasApprovalDate())
|
||||
tgt.setApprovalDateElement(Date30_50.convertDate(src.getApprovalDateElement()));
|
||||
if (src.hasLastReviewDate())
|
||||
|
@ -582,9 +582,9 @@ public class PlanDefinition30_50 {
|
|||
if (src.hasTitle())
|
||||
tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasTextEquivalent())
|
||||
tgt.setTextEquivalentElement(String30_50.convertString(src.getTextEquivalentElement()));
|
||||
tgt.setTextEquivalentElement(String30_50.convertStringToMarkdown(src.getTextEquivalentElement()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode())
|
||||
tgt.setCode(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())
|
||||
|
|
|
@ -12,6 +12,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.Date30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent;
|
||||
|
||||
public class Practitioner30_50 {
|
||||
|
||||
|
@ -36,7 +37,7 @@ public class Practitioner30_50 {
|
|||
for (org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent t : src.getQualification())
|
||||
tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
tgt.addCommunication().setLanguage(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -60,8 +61,8 @@ public class Practitioner30_50 {
|
|||
for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment30_50.convertAttachment(t));
|
||||
for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification())
|
||||
tgt.addQualification(convertPractitionerQualificationComponent(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t));
|
||||
for (PractitionerCommunicationComponent t : src.getCommunication())
|
||||
tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t.getLanguage()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class Schedule30_50 {
|
|||
if (src.hasPlanningHorizon())
|
||||
tgt.setPlanningHorizon(Period30_50.convertPeriod(src.getPlanningHorizon()));
|
||||
if (src.hasComment())
|
||||
tgt.setCommentElement(String30_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -15,50 +15,53 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Stri
|
|||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeType;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll;
|
||||
import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory;
|
||||
|
||||
public class SearchParameter30_50 {
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchComparator> convertSearchComparator(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchComparator> convertSearchComparator(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchComparator> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchComparatorEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchComparator> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchComparatorEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case EQ:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EQ);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EQ);
|
||||
break;
|
||||
case NE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NE);
|
||||
break;
|
||||
case GT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GT);
|
||||
break;
|
||||
case LT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LT);
|
||||
break;
|
||||
case GE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GE);
|
||||
break;
|
||||
case LE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LE);
|
||||
break;
|
||||
case SA:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.SA);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.SA);
|
||||
break;
|
||||
case EB:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EB);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EB);
|
||||
break;
|
||||
case AP:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.AP);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.AP);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator> convertSearchComparator(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchComparator> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator> convertSearchComparator(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchComparator> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchComparator> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.SearchParameter.SearchComparatorEnumFactory());
|
||||
|
@ -98,50 +101,50 @@ public class SearchParameter30_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode> convertSearchModifierCode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchModifierCode> convertSearchModifierCode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchModifierCodeEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchModifierCode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchModifierCodeEnumFactory());
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case MISSING:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.MISSING);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.MISSING);
|
||||
break;
|
||||
case EXACT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.EXACT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.EXACT);
|
||||
break;
|
||||
case CONTAINS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.CONTAINS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.CONTAINS);
|
||||
break;
|
||||
case NOT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOT);
|
||||
break;
|
||||
case TEXT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TEXT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TEXT);
|
||||
break;
|
||||
case IN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IN);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IN);
|
||||
break;
|
||||
case NOTIN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOTIN);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOTIN);
|
||||
break;
|
||||
case BELOW:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.BELOW);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.BELOW);
|
||||
break;
|
||||
case ABOVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.ABOVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.ABOVE);
|
||||
break;
|
||||
case TYPE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TYPE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TYPE);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode> convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode> src) throws FHIRException {
|
||||
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode> convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchModifierCode> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCodeEnumFactory());
|
||||
|
@ -213,7 +216,7 @@ public class SearchParameter30_50 {
|
|||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasCode())
|
||||
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), Code30_50.convertCode(t)));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDerivedFrom())
|
||||
|
@ -226,7 +229,7 @@ public class SearchParameter30_50 {
|
|||
// tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpathUsage())
|
||||
tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement()));
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration<VersionIndependentResourceTypesAll>(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue()));
|
||||
tgt.setComparator(src.getComparator().stream()
|
||||
.map(SearchParameter30_50::convertSearchComparator)
|
||||
.collect(Collectors.toList()));
|
||||
|
@ -268,7 +271,7 @@ public class SearchParameter30_50 {
|
|||
tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasCode())
|
||||
tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement()));
|
||||
for (CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t));
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t.getCodeType()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement()));
|
||||
if (src.hasDerivedFrom())
|
||||
|
@ -281,7 +284,7 @@ public class SearchParameter30_50 {
|
|||
// tgt.setXpathElement(String30_50.convertString(src.getXpathElement()));
|
||||
if (src.hasProcessingMode())
|
||||
tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement()));
|
||||
for (org.hl7.fhir.r5.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : src.getTarget()) tgt.getTarget().add(Code30_50.convertCode(t.getCodeType()));
|
||||
tgt.setComparator(src.getComparator().stream()
|
||||
.map(SearchParameter30_50::convertSearchComparator)
|
||||
.collect(Collectors.toList()));
|
||||
|
|
|
@ -303,7 +303,7 @@ public class StructureMap30_50 {
|
|||
org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent();
|
||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
|
||||
if (src.hasContext())
|
||||
tgt.setContextElement(Id30_50.convertId(src.getContextElement()));
|
||||
tgt.setContextElement(Id30_50.convertIdToString(src.getContextElement()));
|
||||
if (src.hasContextType() && src.getContextType() != org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE)
|
||||
throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here.
|
||||
if (src.hasElement())
|
||||
|
@ -600,7 +600,7 @@ public class StructureMap30_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.LAST);
|
||||
break;
|
||||
case COLLATE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.COLLATE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.SINGLE);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.NULL);
|
||||
|
@ -624,7 +624,7 @@ public class StructureMap30_50 {
|
|||
case LAST:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.LAST);
|
||||
break;
|
||||
case COLLATE:
|
||||
case SINGLE:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.COLLATE);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -70,7 +70,7 @@ public class Substance30_50 {
|
|||
if (src.hasCode())
|
||||
tgt.getCode().setConcept(CodeableConcept30_50.convertCodeableConcept(src.getCode()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance())
|
||||
convertSubstanceInstanceComponent(t, tgt);
|
||||
for (org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent t : src.getIngredient())
|
||||
|
|
|
@ -822,7 +822,7 @@ public class TestScript30_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
|
||||
break;
|
||||
case BAD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST);
|
||||
break;
|
||||
case FORBIDDEN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN);
|
||||
|
@ -843,7 +843,7 @@ public class TestScript30_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
|
||||
break;
|
||||
case UNPROCESSABLE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL);
|
||||
|
@ -873,7 +873,7 @@ public class TestScript30_50 {
|
|||
case NOTMODIFIED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
|
||||
break;
|
||||
case BAD:
|
||||
case BADREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD);
|
||||
break;
|
||||
case FORBIDDEN:
|
||||
|
@ -894,7 +894,7 @@ public class TestScript30_50 {
|
|||
case PRECONDITIONFAILED:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
|
||||
break;
|
||||
case UNPROCESSABLE:
|
||||
case UNPROCESSABLECONTENT:
|
||||
tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Expression40_50 {
|
|||
org.hl7.fhir.r5.model.Expression tgt = new org.hl7.fhir.r5.model.Expression();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
if (src.hasDescription()) tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
if (src.hasName()) tgt.setNameElement(Id40_50.convertId(src.getNameElement()));
|
||||
if (src.hasName()) tgt.setNameElement(Id40_50.convertIdToCode(src.getNameElement()));
|
||||
if (src.hasLanguage()) tgt.setLanguageElement(Code40_50.convertCode(src.getLanguageElement()));
|
||||
if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
|
||||
if (src.hasReference()) tgt.setReferenceElement(Uri40_50.convertUri(src.getReferenceElement()));
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
|
|||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes;
|
||||
|
||||
public class Code40_50 {
|
||||
public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException {
|
||||
|
@ -18,13 +17,13 @@ public class Code40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) {
|
||||
return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode());
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
|
||||
return new org.hl7.fhir.r4.model.CodeType(src.getCode());
|
||||
}
|
||||
//
|
||||
// public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) {
|
||||
// return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode());
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) {
|
||||
// return new org.hl7.fhir.r4.model.CodeType(src.getCode());
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -15,4 +15,15 @@ public class Decimal40_50 {
|
|||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Quantity convertDecimalToQuantity(org.hl7.fhir.r4.model.DecimalType src) {
|
||||
org.hl7.fhir.r5.model.Quantity tgt = new org.hl7.fhir.r5.model.Quantity();
|
||||
if (src.hasValue()) {
|
||||
tgt.setValue(src.getValue());
|
||||
tgt.setSystem("http://unitsofmeasure.org");
|
||||
tgt.setCode("1");
|
||||
}
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Id40_50 {
|
||||
|
@ -15,4 +16,33 @@ public class Id40_50 {
|
|||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.r4.model.IdType src) {
|
||||
org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException {
|
||||
org.hl7.fhir.r4.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4.model.IdType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r5.model.CodeType convertIdToCode(org.hl7.fhir.r4.model.IdType src) {
|
||||
org.hl7.fhir.r5.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CodeType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
||||
public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.r5.model.CodeType src) throws FHIRException {
|
||||
org.hl7.fhir.r4.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4.model.IdType();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
return tgt;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50;
|
|||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.hl7.fhir.convertors.VersionConvertorConstants;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.BackboneElement40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50;
|
||||
|
@ -519,7 +520,9 @@ public class ElementDefinition40_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHuman()) tgt.setHumanElement(String40_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
|
||||
if (src.hasXpath()) tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
|
||||
if (src.hasXpath()) {
|
||||
tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath())));
|
||||
}
|
||||
if (src.hasSource()) tgt.setSourceElement(Canonical40_50.convertCanonical(src.getSourceElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
@ -533,7 +536,9 @@ public class ElementDefinition40_50 {
|
|||
if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement()));
|
||||
if (src.hasHuman()) tgt.setHumanElement(String40_50.convertString(src.getHumanElement()));
|
||||
if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement()));
|
||||
if (src.hasXpath()) tgt.setXpathElement(String40_50.convertString(src.getXpathElement()));
|
||||
if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) {
|
||||
tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT));
|
||||
}
|
||||
if (src.hasSource()) tgt.setSourceElement(Canonical40_50.convertCanonical(src.getSourceElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class Account40_50 {
|
|||
if (src.hasOwner())
|
||||
tgt.setOwner(Reference40_50.convertReference(src.getOwner()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.r4.model.Account.GuarantorComponent t : src.getGuarantor())
|
||||
tgt.addGuarantor(convertGuarantorComponent(t));
|
||||
// if (src.hasPartOf())
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ActivityDefinition40_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String40_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasCopyright())
|
||||
tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement()));
|
||||
if (src.hasApprovalDate())
|
||||
|
@ -273,9 +273,6 @@ public class ActivityDefinition40_50 {
|
|||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case CONTRACT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.CONTRACT);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.DEVICEREQUEST);
|
||||
break;
|
||||
|
@ -335,9 +332,6 @@ public class ActivityDefinition40_50 {
|
|||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case CONTRACT:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.CONTRACT);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.DEVICEREQUEST);
|
||||
break;
|
||||
|
|
|
@ -325,32 +325,32 @@ public class Appointment40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Appointment.ParticipationStatus> convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Appointment.ParticipationStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Appointment.ParticipationStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Appointment.ParticipationStatusEnumFactory());
|
||||
|
|
|
@ -59,7 +59,7 @@ public class AppointmentResponse40_50 {
|
|||
if (src.hasParticipantStatus())
|
||||
tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement()));
|
||||
if (src.hasComment())
|
||||
tgt.setCommentElement(String40_50.convertString(src.getCommentElement()));
|
||||
tgt.setCommentElement(String40_50.convertStringToMarkdown(src.getCommentElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -87,32 +87,32 @@ public class AppointmentResponse40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> convertParticipantStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> convertParticipantStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case ACCEPTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED);
|
||||
break;
|
||||
case DECLINED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED);
|
||||
break;
|
||||
case TENTATIVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE);
|
||||
break;
|
||||
case NEEDSACTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ParticipationStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus> convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatusEnumFactory());
|
||||
|
|
|
@ -56,7 +56,7 @@ public class BodyStructure40_50 {
|
|||
// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getLocationQualifier())
|
||||
// tgt.addLocationQualifier(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.r4.model.Attachment t : src.getImage()) tgt.addImage(Attachment40_50.convertAttachment(t));
|
||||
if (src.hasPatient())
|
||||
tgt.setPatient(Reference40_50.convertReference(src.getPatient()));
|
||||
|
|
|
@ -244,7 +244,7 @@ public class CapabilityStatement40_50 {
|
|||
org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement()));
|
||||
if (src.hasUrl())
|
||||
tgt.setUrlElement(Url40_50.convertUrl(src.getUrlElement()));
|
||||
if (src.hasCustodian())
|
||||
|
|
|
@ -273,8 +273,8 @@ public class CarePlan40_50 {
|
|||
for (org.hl7.fhir.r4.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation40_50.convertAnnotation(t));
|
||||
if (src.hasReference())
|
||||
tgt.setPlannedActivityReference(Reference40_50.convertReference(src.getReference()));
|
||||
if (src.hasDetail())
|
||||
tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
// if (src.hasDetail())
|
||||
// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -292,244 +292,244 @@ public class CarePlan40_50 {
|
|||
for (org.hl7.fhir.r5.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation40_50.convertAnnotation(t));
|
||||
if (src.hasPlannedActivityReference())
|
||||
tgt.setReference(Reference40_50.convertReference(src.getPlannedActivityReference()));
|
||||
if (src.hasPlannedActivityDetail())
|
||||
tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasKind())
|
||||
tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement()));
|
||||
for (org.hl7.fhir.r4.model.CanonicalType t : src.getInstantiatesCanonical())
|
||||
tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t));
|
||||
for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri())
|
||||
tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
|
||||
tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference())
|
||||
tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
if (src.hasStatusReason())
|
||||
tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason()));
|
||||
if (src.hasDoNotPerform())
|
||||
tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled()));
|
||||
if (src.hasLocation())
|
||||
tgt.getLocation().setReference(Reference40_50.convertReference(src.getLocation()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t));
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct()));
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasKind())
|
||||
tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement()));
|
||||
for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical())
|
||||
tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t));
|
||||
for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri())
|
||||
tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
|
||||
if (src.hasCode())
|
||||
tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference40_50.convertReference(t.getReference()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
if (src.hasStatusReason())
|
||||
tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason()));
|
||||
if (src.hasDoNotPerform())
|
||||
tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
if (src.hasScheduled())
|
||||
tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled()));
|
||||
if (src.getLocation().hasReference())
|
||||
tgt.setLocation(Reference40_50.convertReference(src.getLocation().getReference()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t));
|
||||
if (src.hasProduct())
|
||||
tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct()));
|
||||
if (src.hasDailyAmount())
|
||||
tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> convertCarePlanActivityKind(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case APPOINTMENT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT);
|
||||
break;
|
||||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST);
|
||||
break;
|
||||
case MEDICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST);
|
||||
break;
|
||||
case NUTRITIONORDER:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER);
|
||||
break;
|
||||
case TASK:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK);
|
||||
break;
|
||||
case SERVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST);
|
||||
break;
|
||||
case VISIONPRESCRIPTION:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKindEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case APPOINTMENT:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.APPOINTMENT);
|
||||
break;
|
||||
case COMMUNICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST);
|
||||
break;
|
||||
case DEVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST);
|
||||
break;
|
||||
case MEDICATIONREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST);
|
||||
break;
|
||||
case NUTRITIONORDER:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER);
|
||||
break;
|
||||
case TASK:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.TASK);
|
||||
break;
|
||||
case SERVICEREQUEST:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST);
|
||||
break;
|
||||
case VISIONPRESCRIPTION:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
case STOPPED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case NOTSTARTED:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
break;
|
||||
case SCHEDULED:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
break;
|
||||
case ONHOLD:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
break;
|
||||
case COMPLETED:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
break;
|
||||
case STOPPED:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.STOPPED);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
break;
|
||||
}
|
||||
// if (src.hasPlannedActivityDetail())
|
||||
// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail()));
|
||||
return tgt;
|
||||
}
|
||||
//
|
||||
// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasKind())
|
||||
// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement()));
|
||||
// for (org.hl7.fhir.r4.model.CanonicalType t : src.getInstantiatesCanonical())
|
||||
// tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t));
|
||||
// for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri())
|
||||
// tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
|
||||
// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
|
||||
// tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t));
|
||||
// for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference())
|
||||
// tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t));
|
||||
// for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t));
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// if (src.hasStatusReason())
|
||||
// tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason()));
|
||||
// if (src.hasDoNotPerform())
|
||||
// tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled()));
|
||||
// if (src.hasLocation())
|
||||
// tgt.getLocation().setReference(Reference40_50.convertReference(src.getLocation()));
|
||||
// for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t));
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct()));
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// if (src.hasDescription())
|
||||
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasKind())
|
||||
// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement()));
|
||||
// for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical())
|
||||
// tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t));
|
||||
// for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri())
|
||||
// tgt.getInstantiatesUri().add(Uri40_50.convertUri(t));
|
||||
// if (src.hasCode())
|
||||
// tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode()));
|
||||
// for (CodeableReference t : src.getReason())
|
||||
// if (t.hasConcept())
|
||||
// tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
|
||||
// for (CodeableReference t : src.getReason())
|
||||
// if (t.hasReference())
|
||||
// tgt.addReasonReference(Reference40_50.convertReference(t.getReference()));
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t));
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement()));
|
||||
// if (src.hasStatusReason())
|
||||
// tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason()));
|
||||
// if (src.hasDoNotPerform())
|
||||
// tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement()));
|
||||
// if (src.hasScheduled())
|
||||
// tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled()));
|
||||
// if (src.getLocation().hasReference())
|
||||
// tgt.setLocation(Reference40_50.convertReference(src.getLocation().getReference()));
|
||||
// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t));
|
||||
// if (src.hasProduct())
|
||||
// tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct()));
|
||||
// if (src.hasDailyAmount())
|
||||
// tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount()));
|
||||
// if (src.hasQuantity())
|
||||
// tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity()));
|
||||
// if (src.hasDescription())
|
||||
// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> convertCarePlanActivityKind(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory());
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case APPOINTMENT:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT);
|
||||
// break;
|
||||
// case COMMUNICATIONREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST);
|
||||
// break;
|
||||
// case DEVICEREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST);
|
||||
// break;
|
||||
// case MEDICATIONREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST);
|
||||
// break;
|
||||
// case NUTRITIONORDER:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER);
|
||||
// break;
|
||||
// case TASK:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK);
|
||||
// break;
|
||||
// case SERVICEREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST);
|
||||
// break;
|
||||
// case VISIONPRESCRIPTION:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKindEnumFactory());
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case APPOINTMENT:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.APPOINTMENT);
|
||||
// break;
|
||||
// case COMMUNICATIONREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST);
|
||||
// break;
|
||||
// case DEVICEREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST);
|
||||
// break;
|
||||
// case MEDICATIONREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST);
|
||||
// break;
|
||||
// case NUTRITIONORDER:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER);
|
||||
// break;
|
||||
// case TASK:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.TASK);
|
||||
// break;
|
||||
// case SERVICEREQUEST:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST);
|
||||
// break;
|
||||
// case VISIONPRESCRIPTION:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// case STOPPED:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED);
|
||||
// break;
|
||||
// case UNKNOWN:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
// break;
|
||||
// case ENTEREDINERROR:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus> src) throws FHIRException {
|
||||
// if (src == null || src.isEmpty())
|
||||
// return null;
|
||||
// org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatusEnumFactory());
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
// switch (src.getValue()) {
|
||||
// case NOTSTARTED:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED);
|
||||
// break;
|
||||
// case SCHEDULED:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED);
|
||||
// break;
|
||||
// case INPROGRESS:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS);
|
||||
// break;
|
||||
// case ONHOLD:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD);
|
||||
// break;
|
||||
// case COMPLETED:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED);
|
||||
// break;
|
||||
// case CANCELLED:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED);
|
||||
// break;
|
||||
// case STOPPED:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.STOPPED);
|
||||
// break;
|
||||
// case UNKNOWN:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.UNKNOWN);
|
||||
// break;
|
||||
// case ENTEREDINERROR:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR);
|
||||
// break;
|
||||
// default:
|
||||
// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL);
|
||||
// break;
|
||||
// }
|
||||
// return tgt;
|
||||
// }
|
||||
}
|
|
@ -353,7 +353,7 @@ public class ClaimResponse40_50 {
|
|||
if (src.hasAmount())
|
||||
tgt.setAmount(Money40_50.convertMoney(src.getAmount()));
|
||||
if (src.hasValue())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement()));
|
||||
tgt.setQuantity(Decimal40_50.convertDecimalToQuantity(src.getValueElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -368,8 +368,8 @@ public class ClaimResponse40_50 {
|
|||
tgt.setReason(CodeableConcept40_50.convertCodeableConcept(src.getReason()));
|
||||
if (src.hasAmount())
|
||||
tgt.setAmount(Money40_50.convertMoney(src.getAmount()));
|
||||
if (src.hasValue())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getQuantity().getValueElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ public class ClaimResponse40_50 {
|
|||
if (src.hasNumber())
|
||||
tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement()));
|
||||
tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode());
|
||||
if (src.hasText())
|
||||
tgt.setTextElement(String40_50.convertString(src.getTextElement()));
|
||||
if (src.hasLanguage())
|
||||
|
@ -706,8 +706,8 @@ public class ClaimResponse40_50 {
|
|||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasNumber())
|
||||
tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement()));
|
||||
if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type"))
|
||||
tgt.setType(org.hl7.fhir.r4.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type")));
|
||||
if (src.hasText())
|
||||
tgt.setTextElement(String40_50.convertString(src.getTextElement()));
|
||||
if (src.hasLanguage())
|
||||
|
|
|
@ -94,7 +94,7 @@ public class ConceptMap40_50 {
|
|||
if (src.hasTarget())
|
||||
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));
|
||||
tgt.addGroup(convertConceptMapGroupComponent(t, tgt));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -138,11 +138,11 @@ public class ConceptMap40_50 {
|
|||
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));
|
||||
tgt.addGroup(convertConceptMapGroupComponent(t, src));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent();
|
||||
|
@ -152,7 +152,7 @@ public class ConceptMap40_50 {
|
|||
if (src.hasTarget() || src.hasTargetVersion())
|
||||
tgt.setTargetElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement()));
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : src.getElement())
|
||||
tgt.addElement(convertSourceElementComponent(t));
|
||||
tgt.addElement(convertSourceElementComponent(t, tgtMap));
|
||||
if (src.hasUnmapped())
|
||||
tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped()));
|
||||
return tgt;
|
||||
|
@ -173,7 +173,7 @@ public class ConceptMap40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent();
|
||||
|
@ -189,13 +189,13 @@ public class ConceptMap40_50 {
|
|||
tgt.setTargetVersion(cp.getVersion());
|
||||
}
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : src.getElement())
|
||||
tgt.addElement(convertSourceElementComponent(t));
|
||||
tgt.addElement(convertSourceElementComponent(t, srcMap));
|
||||
if (src.hasUnmapped())
|
||||
tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -208,13 +208,13 @@ public class ConceptMap40_50 {
|
|||
if (t.getEquivalence() == org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
|
||||
tgt.setNoMap(true);
|
||||
} else {
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, tgtMap));
|
||||
}
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent();
|
||||
|
@ -227,12 +227,12 @@ public class ConceptMap40_50 {
|
|||
tgt.addTarget(new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
|
||||
} else {
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
|
||||
tgt.addTarget(convertTargetElementComponent(t));
|
||||
tgt.addTarget(convertTargetElementComponent(t, srcMap));
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -246,13 +246,13 @@ public class ConceptMap40_50 {
|
|||
if (src.hasComment())
|
||||
tgt.setCommentElement(String40_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, tgtMap));
|
||||
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, tgtMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent();
|
||||
|
@ -268,9 +268,9 @@ public class ConceptMap40_50 {
|
|||
if (src.hasComment())
|
||||
tgt.setCommentElement(String40_50.convertString(src.getCommentElement()));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
|
||||
tgt.addDependsOn(convertOtherElementComponent(t));
|
||||
tgt.addDependsOn(convertOtherElementComponent(t, srcMap));
|
||||
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct())
|
||||
tgt.addProduct(convertOtherElementComponent(t));
|
||||
tgt.addProduct(convertOtherElementComponent(t, srcMap));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -350,13 +350,13 @@ public class ConceptMap40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasProperty())
|
||||
tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement()));
|
||||
tgt.setAttribute(tgtMap.registerAttribute(src.getProperty()));
|
||||
if (src.hasSystem()) {
|
||||
tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getValue()).setDisplay(src.getDisplay()));
|
||||
} else if (src.hasValueElement()) {
|
||||
|
@ -365,14 +365,14 @@ public class ConceptMap40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasProperty())
|
||||
tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement()));
|
||||
|
||||
if (src.hasAttribute())
|
||||
tgt.setProperty(srcMap.getAttributeUri(src.getAttribute()));
|
||||
|
||||
if (src.hasValueCoding()) {
|
||||
tgt.setSystem(src.getValueCoding().getSystem());
|
||||
tgt.setValue(src.getValueCoding().getCode());
|
||||
|
|
|
@ -72,7 +72,7 @@ public class Consent40_50 {
|
|||
for (org.hl7.fhir.r4.model.Consent.ConsentVerificationComponent t : src.getVerification())
|
||||
tgt.addVerification(convertConsentVerificationComponent(t));
|
||||
if (src.hasProvision())
|
||||
tgt.setProvision(convertprovisionComponent(src.getProvision()));
|
||||
tgt.addProvision(convertprovisionComponent(src.getProvision()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class Consent40_50 {
|
|||
for (org.hl7.fhir.r5.model.Consent.ConsentVerificationComponent t : src.getVerification())
|
||||
tgt.addVerification(convertConsentVerificationComponent(t));
|
||||
if (src.hasProvision())
|
||||
tgt.setProvision(convertprovisionComponent(src.getProvision()));
|
||||
tgt.setProvision(convertprovisionComponent(src.getProvisionFirstRep()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -225,8 +225,8 @@ public class Consent40_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r5.model.Consent.ProvisionComponent tgt = new org.hl7.fhir.r5.model.Consent.ProvisionComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement()));
|
||||
// if (src.hasType())
|
||||
// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r4.model.Consent.provisionActorComponent t : src.getActor())
|
||||
|
@ -252,8 +252,8 @@ public class Consent40_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r4.model.Consent.provisionComponent tgt = new org.hl7.fhir.r4.model.Consent.provisionComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement()));
|
||||
// if (src.hasType())
|
||||
// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r5.model.Consent.ProvisionActorComponent t : src.getActor())
|
||||
|
|
|
@ -63,7 +63,7 @@ public class DetectedIssue40_50 {
|
|||
for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueEvidenceComponent t : src.getEvidence())
|
||||
tgt.addEvidence(convertDetectedIssueEvidenceComponent(t));
|
||||
if (src.hasDetail())
|
||||
tgt.setDetailElement(String40_50.convertString(src.getDetailElement()));
|
||||
tgt.setDetailElement(String40_50.convertStringToMarkdown(src.getDetailElement()));
|
||||
if (src.hasReference())
|
||||
tgt.setReferenceElement(Uri40_50.convertUri(src.getReferenceElement()));
|
||||
for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation())
|
||||
|
|
|
@ -72,7 +72,7 @@ public class Device40_50 {
|
|||
if (src.hasSerialNumber())
|
||||
tgt.setSerialNumberElement(String40_50.convertString(src.getSerialNumberElement()));
|
||||
for (org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent t : src.getDeviceName())
|
||||
tgt.addDeviceName(convertDeviceDeviceNameComponent(t));
|
||||
tgt.addName(convertDeviceDeviceNameComponent(t));
|
||||
if (src.hasModelNumber())
|
||||
tgt.setModelNumberElement(String40_50.convertString(src.getModelNumberElement()));
|
||||
if (src.hasPartNumber())
|
||||
|
@ -85,8 +85,8 @@ public class Device40_50 {
|
|||
tgt.addVersion(convertDeviceVersionComponent(t));
|
||||
for (org.hl7.fhir.r4.model.Device.DevicePropertyComponent t : src.getProperty())
|
||||
tgt.addProperty(convertDevicePropertyComponent(t));
|
||||
if (src.hasPatient())
|
||||
tgt.getAssociationFirstRep().setHumanSubject(Reference40_50.convertReference(src.getPatient()));
|
||||
// if (src.hasPatient())
|
||||
// tgt.getAssociationFirstRep().setHumanSubject(Reference40_50.convertReference(src.getPatient()));
|
||||
if (src.hasOwner())
|
||||
tgt.setOwner(Reference40_50.convertReference(src.getOwner()));
|
||||
for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact())
|
||||
|
@ -130,7 +130,7 @@ public class Device40_50 {
|
|||
tgt.setLotNumberElement(String40_50.convertString(src.getLotNumberElement()));
|
||||
if (src.hasSerialNumber())
|
||||
tgt.setSerialNumberElement(String40_50.convertString(src.getSerialNumberElement()));
|
||||
for (org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent t : src.getDeviceName())
|
||||
for (org.hl7.fhir.r5.model.Device.DeviceNameComponent t : src.getName())
|
||||
tgt.addDeviceName(convertDeviceDeviceNameComponent(t));
|
||||
if (src.hasModelNumber())
|
||||
tgt.setModelNumberElement(String40_50.convertString(src.getModelNumberElement()));
|
||||
|
@ -144,8 +144,8 @@ public class Device40_50 {
|
|||
tgt.addVersion(convertDeviceVersionComponent(t));
|
||||
for (org.hl7.fhir.r5.model.Device.DevicePropertyComponent t : src.getProperty())
|
||||
tgt.addProperty(convertDevicePropertyComponent(t));
|
||||
if (src.getAssociationFirstRep().hasHumanSubject())
|
||||
tgt.setPatient(Reference40_50.convertReference(src.getAssociationFirstRep().getHumanSubject()));
|
||||
// if (src.getAssociationFirstRep().hasHumanSubject())
|
||||
// tgt.setPatient(Reference40_50.convertReference(src.getAssociationFirstRep().getHumanSubject()));
|
||||
if (src.hasOwner())
|
||||
tgt.setOwner(Reference40_50.convertReference(src.getOwner()));
|
||||
for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact())
|
||||
|
@ -311,25 +311,25 @@ public class Device40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.Device.DeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent();
|
||||
org.hl7.fhir.r5.model.Device.DeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceNameComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasName())
|
||||
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
|
||||
tgt.setValueElement(String40_50.convertString(src.getNameElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(convertDeviceNameType(src.getTypeElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceNameComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasName())
|
||||
tgt.setNameElement(String40_50.convertString(src.getNameElement()));
|
||||
if (src.hasValue())
|
||||
tgt.setNameElement(String40_50.convertString(src.getValueElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(convertDeviceNameType(src.getTypeElement()));
|
||||
return tgt;
|
||||
|
|
|
@ -85,8 +85,8 @@ public class DeviceDefinition40_50 {
|
|||
// if (src.hasOnlineInformation())
|
||||
// tgt.setOnlineInformationElement(Uri40_50.convertUri(src.getOnlineInformationElement()));
|
||||
for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
|
||||
if (src.hasParentDevice())
|
||||
tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice()));
|
||||
// if (src.hasParentDevice())
|
||||
// tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice()));
|
||||
for (org.hl7.fhir.r4.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial())
|
||||
tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t));
|
||||
return tgt;
|
||||
|
@ -132,8 +132,8 @@ public class DeviceDefinition40_50 {
|
|||
// if (src.hasOnlineInformation())
|
||||
// tgt.setOnlineInformationElement(Uri40_50.convertUri(src.getOnlineInformationElement()));
|
||||
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
|
||||
if (src.hasParentDevice())
|
||||
tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice()));
|
||||
// if (src.hasParentDevice())
|
||||
// tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice()));
|
||||
for (org.hl7.fhir.r5.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial())
|
||||
tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t));
|
||||
return tgt;
|
||||
|
|
|
@ -50,18 +50,18 @@ public class DeviceMetric40_50 {
|
|||
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
|
||||
if (src.hasUnit())
|
||||
tgt.setUnit(CodeableConcept40_50.convertCodeableConcept(src.getUnit()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference40_50.convertReference(src.getSource()));
|
||||
if (src.hasParent())
|
||||
tgt.setParent(Reference40_50.convertReference(src.getParent()));
|
||||
tgt.setDevice(Reference40_50.convertReference(src.getParent()));
|
||||
if (src.hasSource())
|
||||
tgt.setDevice(Reference40_50.convertReference(src.getSource()));
|
||||
if (src.hasOperationalStatus())
|
||||
tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement()));
|
||||
if (src.hasColor())
|
||||
tgt.setColorElement(convertDeviceMetricColor(src.getColorElement()));
|
||||
if (src.hasCategory())
|
||||
tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement()));
|
||||
if (src.hasMeasurementPeriod())
|
||||
tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod()));
|
||||
// if (src.hasMeasurementPeriod())
|
||||
// tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())
|
||||
tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
|
@ -78,18 +78,18 @@ public class DeviceMetric40_50 {
|
|||
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
|
||||
if (src.hasUnit())
|
||||
tgt.setUnit(CodeableConcept40_50.convertCodeableConcept(src.getUnit()));
|
||||
if (src.hasSource())
|
||||
tgt.setSource(Reference40_50.convertReference(src.getSource()));
|
||||
if (src.hasParent())
|
||||
tgt.setParent(Reference40_50.convertReference(src.getParent()));
|
||||
if (src.hasDevice())
|
||||
tgt.setSource(Reference40_50.convertReference(src.getDevice()));
|
||||
// if (src.hasParent())
|
||||
// tgt.setParent(Reference40_50.convertReference(src.getParent()));
|
||||
if (src.hasOperationalStatus())
|
||||
tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement()));
|
||||
if (src.hasColor())
|
||||
tgt.setColorElement(convertDeviceMetricColor(src.getColorElement()));
|
||||
if (src.hasCategory())
|
||||
tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement()));
|
||||
if (src.hasMeasurementPeriod())
|
||||
tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod()));
|
||||
// if (src.hasMeasurementPeriod())
|
||||
// tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod()));
|
||||
for (org.hl7.fhir.r5.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())
|
||||
tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
|
||||
return tgt;
|
||||
|
|
|
@ -8,6 +8,8 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical
|
|||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeableReference;
|
||||
|
||||
|
@ -82,9 +84,9 @@ public class DeviceRequest40_50 {
|
|||
if (src.hasRequester())
|
||||
tgt.setRequester(Reference40_50.convertReference(src.getRequester()));
|
||||
if (src.hasPerformerType())
|
||||
tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType()));
|
||||
tgt.getPerformer().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType()));
|
||||
if (src.hasPerformer())
|
||||
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
|
||||
tgt.getPerformer().setReference(Reference40_50.convertReference(src.getPerformer()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
|
||||
tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference())
|
||||
|
@ -136,10 +138,10 @@ public class DeviceRequest40_50 {
|
|||
tgt.setAuthoredOnElement(DateTime40_50.convertDateTime(src.getAuthoredOnElement()));
|
||||
if (src.hasRequester())
|
||||
tgt.setRequester(Reference40_50.convertReference(src.getRequester()));
|
||||
if (src.hasPerformerType())
|
||||
tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType()));
|
||||
if (src.hasPerformer())
|
||||
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer()));
|
||||
if (src.getPerformer().hasConcept())
|
||||
tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformer().getConcept()));
|
||||
if (src.getPerformer().hasReference())
|
||||
tgt.setPerformer(Reference40_50.convertReference(src.getPerformer().getReference()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
|
||||
|
|
|
@ -70,7 +70,7 @@ public class DiagnosticReport40_50 {
|
|||
for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia())
|
||||
tgt.addMedia(convertDiagnosticReportMediaComponent(t));
|
||||
if (src.hasConclusion())
|
||||
tgt.setConclusionElement(String40_50.convertString(src.getConclusionElement()));
|
||||
tgt.setConclusionElement(String40_50.convertStringToMarkdown(src.getConclusionElement()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode())
|
||||
tgt.addConclusionCode(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm())
|
||||
|
|
|
@ -1,124 +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.primitive40_50.DateTime40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_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 DocumentManifest40_50 {
|
||||
|
||||
public static org.hl7.fhir.r5.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.DocumentManifest tgt = new org.hl7.fhir.r5.model.DocumentManifest();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||
if (src.hasMasterIdentifier())
|
||||
tgt.setMasterIdentifier(Identifier40_50.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(Enumerations40_50.convertDocumentReferenceStatus(src.getStatusElement()));
|
||||
if (src.hasType())
|
||||
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
|
||||
if (src.hasCreated())
|
||||
tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference40_50.convertReference(t));
|
||||
if (src.hasSource())
|
||||
tgt.setSourceElement(Uri40_50.convertUri(src.getSourceElement()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getContent()) tgt.addContent(Reference40_50.convertReference(t));
|
||||
for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated())
|
||||
tgt.addRelated(convertDocumentManifestRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r5.model.DocumentManifest src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||
if (src.hasMasterIdentifier())
|
||||
tgt.setMasterIdentifier(Identifier40_50.convertIdentifier(src.getMasterIdentifier()));
|
||||
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(Enumerations40_50.convertDocumentReferenceStatus(src.getStatusElement()));
|
||||
if (src.hasType())
|
||||
tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType()));
|
||||
if (src.hasSubject())
|
||||
tgt.setSubject(Reference40_50.convertReference(src.getSubject()));
|
||||
if (src.hasCreated())
|
||||
tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference40_50.convertReference(t));
|
||||
if (src.hasSource())
|
||||
tgt.setSourceElement(Uri40_50.convertUri(src.getSourceElement()));
|
||||
if (src.hasDescription())
|
||||
tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getContent()) tgt.addContent(Reference40_50.convertReference(t));
|
||||
for (org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated())
|
||||
tgt.addRelated(convertDocumentManifestRelatedComponent(t));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasIdentifier())
|
||||
tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef())
|
||||
tgt.setRef(Reference40_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasIdentifier())
|
||||
tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier()));
|
||||
if (src.hasRef())
|
||||
tgt.setRef(Reference40_50.convertReference(src.getRef()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.PositiveI
|
|||
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;
|
||||
import org.hl7.fhir.r5.model.Encounter.ReasonComponent;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -51,12 +52,12 @@ public class Encounter40_50 {
|
|||
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
// for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
// tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
if (src.hasClass_())
|
||||
tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding40_50.convertCoding(src.getClass_())));
|
||||
for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
|
||||
tgt.addClassHistory(convertClassHistoryComponent(t));
|
||||
// for (org.hl7.fhir.r4.model.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())
|
||||
|
@ -77,14 +78,14 @@ public class Encounter40_50 {
|
|||
if (src.hasLength())
|
||||
tgt.setLength(Duration40_50.convertDuration(src.getLength()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode())
|
||||
tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t));
|
||||
tgt.addReason().addValue(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference())
|
||||
tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t));
|
||||
tgt.addReason().addValue(Reference40_50.convertReferenceToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
|
||||
tgt.addDiagnosis(convertDiagnosisComponent(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t));
|
||||
if (src.hasHospitalization())
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization()));
|
||||
tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt));
|
||||
for (org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -103,12 +104,12 @@ public class Encounter40_50 {
|
|||
tgt.addIdentifier(Identifier40_50.convertIdentifier(t));
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory())
|
||||
tgt.addStatusHistory(convertStatusHistoryComponent(t));
|
||||
// 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_FirstRep().getCodingFirstRep()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory())
|
||||
tgt.addClassHistory(convertClassHistoryComponent(t));
|
||||
// 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.getServiceTypeFirstRep().hasConcept())
|
||||
|
@ -128,17 +129,19 @@ public class Encounter40_50 {
|
|||
tgt.setPeriod(Period40_50.convertPeriod(src.getActualPeriod()));
|
||||
if (src.hasLength())
|
||||
tgt.setLength(Duration40_50.convertDuration(src.getLength()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
|
||||
for (CodeableReference t : src.getReason())
|
||||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference40_50.convertReference(t.getReference()));
|
||||
for (ReasonComponent t1 : src.getReason())
|
||||
for (CodeableReference t : t1.getValue())
|
||||
if (t.hasConcept())
|
||||
tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept()));
|
||||
for (ReasonComponent t1 : src.getReason())
|
||||
for (CodeableReference t : t1.getValue())
|
||||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference40_50.convertReference(t.getReference()));
|
||||
for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis())
|
||||
tgt.addDiagnosis(convertDiagnosisComponent(t));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t));
|
||||
if (src.hasAdmission())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission()));
|
||||
if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy())
|
||||
tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src));
|
||||
for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation())
|
||||
tgt.addLocation(convertEncounterLocationComponent(t));
|
||||
if (src.hasServiceProvider())
|
||||
|
@ -148,47 +151,47 @@ public class Encounter40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case PLANNED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED);
|
||||
break;
|
||||
case ARRIVED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case TRIAGED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case INPROGRESS:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case ONLEAVE:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS);
|
||||
break;
|
||||
case FINISHED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED);
|
||||
break;
|
||||
case CANCELLED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.ENTEREDINERROR);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.UNKNOWN);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Encounter.EncounterStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Encounter.EncounterStatus> convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.EncounterStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Encounter.EncounterStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Encounter.EncounterStatusEnumFactory());
|
||||
|
@ -219,53 +222,53 @@ public class Encounter40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasStatus())
|
||||
tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasClass_())
|
||||
tgt.setClass_(Coding40_50.convertCoding(src.getClass_()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasClass_())
|
||||
tgt.setClass_(Coding40_50.convertCoding(src.getClass_()));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
return tgt;
|
||||
}
|
||||
// public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasStatus())
|
||||
// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasClass_())
|
||||
// tgt.setClass_(Coding40_50.convertCoding(src.getClass_()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
//
|
||||
// public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException {
|
||||
// if (src == null)
|
||||
// return null;
|
||||
// org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent();
|
||||
// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
// if (src.hasClass_())
|
||||
// tgt.setClass_(Coding40_50.convertCoding(src.getClass_()));
|
||||
// if (src.hasPeriod())
|
||||
// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
// return tgt;
|
||||
// }
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException {
|
||||
if (src == null)
|
||||
|
@ -301,11 +304,11 @@ public class Encounter40_50 {
|
|||
org.hl7.fhir.r5.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.Encounter.DiagnosisComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasCondition())
|
||||
tgt.setCondition(Reference40_50.convertReference(src.getCondition()));
|
||||
tgt.addCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition()));
|
||||
if (src.hasUse())
|
||||
tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUse()));
|
||||
if (src.hasRank())
|
||||
tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
tgt.addUse(CodeableConcept40_50.convertCodeableConcept(src.getUse()));
|
||||
// if (src.hasRank())
|
||||
// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -314,16 +317,16 @@ public class Encounter40_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r4.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Encounter.DiagnosisComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasCondition())
|
||||
tgt.setCondition(Reference40_50.convertReference(src.getCondition()));
|
||||
if (src.hasCondition() && src.getConditionFirstRep().hasReference())
|
||||
tgt.setCondition(Reference40_50.convertReference(src.getConditionFirstRep().getReference()));
|
||||
if (src.hasUse())
|
||||
tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUse()));
|
||||
if (src.hasRank())
|
||||
tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUseFirstRep()));
|
||||
// if (src.hasRank())
|
||||
// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent();
|
||||
|
@ -337,11 +340,11 @@ public class Encounter40_50 {
|
|||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept40_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
tgte.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
tgte.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference40_50.convertReference(src.getDestination()));
|
||||
if (src.hasDischargeDisposition())
|
||||
|
@ -349,7 +352,7 @@ public class Encounter40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException {
|
||||
public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent();
|
||||
|
@ -362,11 +365,11 @@ public class Encounter40_50 {
|
|||
tgt.setAdmitSource(CodeableConcept40_50.convertCodeableConcept(src.getAdmitSource()));
|
||||
if (src.hasReAdmission())
|
||||
tgt.setReAdmission(CodeableConcept40_50.convertCodeableConcept(src.getReAdmission()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference())
|
||||
tgt.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy())
|
||||
tgt.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement())
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement())
|
||||
tgt.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
if (src.hasDestination())
|
||||
tgt.setDestination(Reference40_50.convertReference(src.getDestination()));
|
||||
|
|
|
@ -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.complextypes30_50.CodeableConcept30_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.Coding40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.ContactPoint40_50;
|
||||
|
@ -10,7 +11,9 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Code40_50
|
|||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.Endpoint.EndpointPayloadComponent;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
|
@ -63,9 +66,9 @@ public class Endpoint40_50 {
|
|||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPayloadType())
|
||||
tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
tgt.addPayload().addType(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r4.model.CodeType t : src.getPayloadMimeType())
|
||||
tgt.getPayloadMimeType().add(Code40_50.convertCode(t));
|
||||
tgt.addPayload().getMimeType().add(Code40_50.convertCode(t));
|
||||
if (src.hasAddress())
|
||||
tgt.setAddressElement(Url40_50.convertUrl(src.getAddressElement()));
|
||||
for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) tgt.getHeader().add(String40_50.convertString(t));
|
||||
|
@ -91,10 +94,12 @@ public class Endpoint40_50 {
|
|||
tgt.addContact(ContactPoint40_50.convertContactPoint(t));
|
||||
if (src.hasPeriod())
|
||||
tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPayloadType())
|
||||
tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t));
|
||||
for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType())
|
||||
tgt.getPayloadMimeType().add(Code40_50.convertCode(t));
|
||||
for (EndpointPayloadComponent t : src.getPayload())
|
||||
if (t.hasType())
|
||||
tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t.getTypeFirstRep()));
|
||||
for (EndpointPayloadComponent t : src.getPayload())
|
||||
if (t.hasMimeType())
|
||||
tgt.getPayloadMimeType().add(Code40_50.convertCode(t.getMimeType().get(0)));
|
||||
if (src.hasAddress())
|
||||
tgt.setAddressElement(Url40_50.convertUrl(src.getAddressElement()));
|
||||
for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.getHeader().add(String40_50.convertString(t));
|
||||
|
|
|
@ -231,10 +231,10 @@ public class Enumerations40_50 {
|
|||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0);
|
||||
break;
|
||||
case _4_3_0_CIBUILD:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_CIBUILD);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0CIBUILD);
|
||||
break;
|
||||
case _4_3_0_SNAPSHOT1:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0SNAPSHOT1);
|
||||
break;
|
||||
case _5_0_0:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0);
|
||||
|
@ -339,10 +339,10 @@ public class Enumerations40_50 {
|
|||
case _4_3_0:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0);
|
||||
break;
|
||||
case _4_3_0_CIBUILD:
|
||||
case _4_3_0CIBUILD:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_CIBUILD);
|
||||
break;
|
||||
case _4_3_0_SNAPSHOT1:
|
||||
case _4_3_0SNAPSHOT1:
|
||||
tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1);
|
||||
break;
|
||||
case _5_0_0:
|
||||
|
@ -448,29 +448,29 @@ public class Enumerations40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.NoteType> convertNoteType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> convertNoteType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.NoteType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.NoteTypeEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.PaymentReconciliation.NoteTypeEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case DISPLAY:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.DISPLAY);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.DISPLAY);
|
||||
break;
|
||||
case PRINT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINT);
|
||||
break;
|
||||
case PRINTOPER:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINTOPER);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINTOPER);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> convertNoteType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.NoteType> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> convertNoteType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.NoteTypeEnumFactory());
|
||||
|
@ -563,29 +563,29 @@ public class Enumerations40_50 {
|
|||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory());
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
|
||||
switch (src.getValue()) {
|
||||
case CURRENT:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT);
|
||||
break;
|
||||
case SUPERSEDED:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED);
|
||||
break;
|
||||
case ENTEREDINERROR:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR);
|
||||
break;
|
||||
default:
|
||||
tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL);
|
||||
tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL);
|
||||
break;
|
||||
}
|
||||
return tgt;
|
||||
}
|
||||
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException {
|
||||
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> src) throws FHIRException {
|
||||
if (src == null || src.isEmpty())
|
||||
return null;
|
||||
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatusEnumFactory());
|
||||
|
|
|
@ -197,11 +197,11 @@ public class EpisodeOfCare40_50 {
|
|||
org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasCondition())
|
||||
tgt.setCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition()));
|
||||
tgt.addCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition()));
|
||||
if (src.hasRole())
|
||||
tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getRole()));
|
||||
if (src.hasRank())
|
||||
tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getRole()));
|
||||
// if (src.hasRank())
|
||||
// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -211,11 +211,11 @@ public class EpisodeOfCare40_50 {
|
|||
org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent();
|
||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasCondition())
|
||||
tgt.setCondition(Reference40_50.convertCodeableReferenceToReference(src.getCondition()));
|
||||
if (src.hasRole())
|
||||
tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getRole()));
|
||||
if (src.hasRank())
|
||||
tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
tgt.setCondition(Reference40_50.convertCodeableReferenceToReference(src.getConditionFirstRep()));
|
||||
if (src.hasUse())
|
||||
tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getUse()));
|
||||
// if (src.hasRank())
|
||||
// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement()));
|
||||
return tgt;
|
||||
}
|
||||
}
|
|
@ -85,7 +85,7 @@ public class EventDefinition40_50 {
|
|||
if (src.hasPurpose())
|
||||
tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement()));
|
||||
if (src.hasUsage())
|
||||
tgt.setUsageElement(String40_50.convertString(src.getUsageElement()));
|
||||
tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement()));
|
||||
if (src.hasCopyright())
|
||||
tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement()));
|
||||
if (src.hasApprovalDate())
|
||||
|
|
|
@ -750,7 +750,7 @@ public class ExplanationOfBenefit40_50 {
|
|||
if (src.hasAmount())
|
||||
tgt.setAmount(Money40_50.convertMoney(src.getAmount()));
|
||||
if (src.hasValue())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement()));
|
||||
tgt.setQuantity(Decimal40_50.convertDecimalToQuantity(src.getValueElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -765,8 +765,8 @@ public class ExplanationOfBenefit40_50 {
|
|||
tgt.setReason(CodeableConcept40_50.convertCodeableConcept(src.getReason()));
|
||||
if (src.hasAmount())
|
||||
tgt.setAmount(Money40_50.convertMoney(src.getAmount()));
|
||||
if (src.hasValue())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement()));
|
||||
if (src.hasQuantity())
|
||||
tgt.setValueElement(Decimal40_50.convertDecimal(src.getQuantity().getValueElement()));
|
||||
return tgt;
|
||||
}
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ public class ExplanationOfBenefit40_50 {
|
|||
if (src.hasNumber())
|
||||
tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement()));
|
||||
tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode());
|
||||
if (src.hasText())
|
||||
tgt.setTextElement(String40_50.convertString(src.getTextElement()));
|
||||
if (src.hasLanguage())
|
||||
|
@ -1179,8 +1179,8 @@ public class ExplanationOfBenefit40_50 {
|
|||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt);
|
||||
if (src.hasNumber())
|
||||
tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement()));
|
||||
if (src.hasType())
|
||||
tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement()));
|
||||
if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type"))
|
||||
tgt.setType(org.hl7.fhir.r4.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type")));
|
||||
if (src.hasText())
|
||||
tgt.setTextElement(String40_50.convertString(src.getTextElement()));
|
||||
if (src.hasLanguage())
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier4
|
|||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.DataRequirement40_50;
|
||||
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.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.r5.model.CodeableReference;
|
||||
|
||||
|
@ -68,11 +69,11 @@ public class GuidanceResponse40_50 {
|
|||
tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t));
|
||||
for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
|
||||
for (org.hl7.fhir.r4.model.Reference t : src.getEvaluationMessage())
|
||||
tgt.addEvaluationMessage(Reference40_50.convertReference(t));
|
||||
tgt.setEvaluationMessage(Reference40_50.convertReference(t));
|
||||
if (src.hasOutputParameters())
|
||||
tgt.setOutputParameters(Reference40_50.convertReference(src.getOutputParameters()));
|
||||
if (src.hasResult())
|
||||
tgt.setResult(Reference40_50.convertReference(src.getResult()));
|
||||
tgt.addResult(Reference40_50.convertReference(src.getResult()));
|
||||
for (org.hl7.fhir.r4.model.DataRequirement t : src.getDataRequirement())
|
||||
tgt.addDataRequirement(DataRequirement40_50.convertDataRequirement(t));
|
||||
return tgt;
|
||||
|
@ -106,12 +107,12 @@ public class GuidanceResponse40_50 {
|
|||
if (t.hasReference())
|
||||
tgt.addReasonReference(Reference40_50.convertReference(t.getReference()));
|
||||
for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getEvaluationMessage())
|
||||
tgt.addEvaluationMessage(Reference40_50.convertReference(t));
|
||||
if (src.hasEvaluationMessage())
|
||||
tgt.addEvaluationMessage(Reference40_50.convertReference(src.getEvaluationMessage()));
|
||||
if (src.hasOutputParameters())
|
||||
tgt.setOutputParameters(Reference40_50.convertReference(src.getOutputParameters()));
|
||||
if (src.hasResult())
|
||||
tgt.setResult(Reference40_50.convertReference(src.getResult()));
|
||||
tgt.setResult(Reference40_50.convertReference(src.getResultFirstRep()));
|
||||
for (org.hl7.fhir.r5.model.DataRequirement t : src.getDataRequirement())
|
||||
tgt.addDataRequirement(DataRequirement40_50.convertDataRequirement(t));
|
||||
return tgt;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue