fixed convertors calling Enumeration with deprecated constructor
This commit is contained in:
parent
b15d72a755
commit
63e97e6fa9
|
@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r5.model.Dosage;
|
import org.hl7.fhir.r5.model.Dosage;
|
||||||
import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent;
|
import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent;
|
||||||
|
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory;
|
||||||
|
|
||||||
public class MedicationDispense10_50 {
|
public class MedicationDispense10_50 {
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ public class MedicationDispense10_50 {
|
||||||
public static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> convertMedicationDispenseStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus> src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> convertMedicationDispenseStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseStatus> src) throws FHIRException {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes>();
|
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new MedicationDispenseStatusCodesEnumFactory());
|
||||||
VersionConvertor_10_50.copyElement(src, tgt);
|
VersionConvertor_10_50.copyElement(src, tgt);
|
||||||
switch(src.getValue()) {
|
switch(src.getValue()) {
|
||||||
case COMPLETED:
|
case COMPLETED:
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv30_50;
|
||||||
import org.hl7.fhir.convertors.VersionConvertor_30_50;
|
import org.hl7.fhir.convertors.VersionConvertor_30_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r5.model.CodeableReference;
|
import org.hl7.fhir.r5.model.CodeableReference;
|
||||||
|
import org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodesEnumFactory;
|
||||||
|
|
||||||
public class MedicationAdministration30_50 {
|
public class MedicationAdministration30_50 {
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@ public class MedicationAdministration30_50 {
|
||||||
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes> convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus> src) {
|
static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes> convertMedicationAdministrationStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationStatus> src) {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes>();
|
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new MedicationAdministrationStatusCodesEnumFactory());
|
||||||
VersionConvertor_30_50.copyElement(src, tgt);
|
VersionConvertor_30_50.copyElement(src, tgt);
|
||||||
tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString()));
|
tgt.setValue(org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes.fromCode(src.getValueAsString()));
|
||||||
return tgt;
|
return tgt;
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.hl7.fhir.r4.model.CodeType;
|
||||||
import org.hl7.fhir.r5.model.CodeableReference;
|
import org.hl7.fhir.r5.model.CodeableReference;
|
||||||
import org.hl7.fhir.r5.model.Enumeration;
|
import org.hl7.fhir.r5.model.Enumeration;
|
||||||
import org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes;
|
import org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodes;
|
||||||
|
import org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationStatusCodesEnumFactory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011+, HL7, Inc.
|
Copyright (c) 2011+, HL7, Inc.
|
||||||
|
@ -141,7 +142,7 @@ public class MedicationAdministration40_50 extends VersionConvertor_40_50 {
|
||||||
private static Enumeration<MedicationAdministrationStatusCodes> convertMedicationAdministrationStatus(CodeType src) {
|
private static Enumeration<MedicationAdministrationStatusCodes> convertMedicationAdministrationStatus(CodeType src) {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
Enumeration<MedicationAdministrationStatusCodes> tgt = new Enumeration<MedicationAdministrationStatusCodes>();
|
Enumeration<MedicationAdministrationStatusCodes> tgt = new Enumeration<>(new MedicationAdministrationStatusCodesEnumFactory());
|
||||||
copyElement(src, tgt);
|
copyElement(src, tgt);
|
||||||
tgt.setValue(MedicationAdministrationStatusCodes.fromCode(src.getCode()));
|
tgt.setValue(MedicationAdministrationStatusCodes.fromCode(src.getCode()));
|
||||||
return tgt;
|
return tgt;
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.hl7.fhir.convertors.VersionConvertor_40_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r4.model.CodeType;
|
import org.hl7.fhir.r4.model.CodeType;
|
||||||
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes;
|
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes;
|
||||||
|
import org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011+, HL7, Inc.
|
Copyright (c) 2011+, HL7, Inc.
|
||||||
|
@ -162,7 +163,7 @@ public class MedicationDispense40_50 extends VersionConvertor_40_50 {
|
||||||
private static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> convertMedicationStatus(org.hl7.fhir.r4.model.CodeType src) {
|
private static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> convertMedicationStatus(org.hl7.fhir.r4.model.CodeType src) {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes>();
|
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new MedicationDispenseStatusCodesEnumFactory());
|
||||||
copyElement(src, tgt);
|
copyElement(src, tgt);
|
||||||
if (src.hasCode())
|
if (src.hasCode())
|
||||||
tgt.setValue(MedicationDispenseStatusCodes.fromCode(src.getCode()));
|
tgt.setValue(MedicationDispenseStatusCodes.fromCode(src.getCode()));
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r4.model.CodeType;
|
import org.hl7.fhir.r4.model.CodeType;
|
||||||
import org.hl7.fhir.r5.model.Enumeration;
|
import org.hl7.fhir.r5.model.Enumeration;
|
||||||
import org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodes;
|
import org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodes;
|
||||||
|
import org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodesEnumFactory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011+, HL7, Inc.
|
Copyright (c) 2011+, HL7, Inc.
|
||||||
|
@ -148,7 +149,7 @@ public class MedicationKnowledge40_50 extends VersionConvertor_40_50 {
|
||||||
private static Enumeration<MedicationKnowledgeStatusCodes> convertMedicationKnowledgeStatus(CodeType src) {
|
private static Enumeration<MedicationKnowledgeStatusCodes> convertMedicationKnowledgeStatus(CodeType src) {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodes>();
|
org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationKnowledge.MedicationKnowledgeStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new MedicationKnowledgeStatusCodesEnumFactory());
|
||||||
copyElement(src, tgt);
|
copyElement(src, tgt);
|
||||||
tgt.setValue(MedicationKnowledgeStatusCodes.fromCode(src.getCode()));
|
tgt.setValue(MedicationKnowledgeStatusCodes.fromCode(src.getCode()));
|
||||||
return tgt;
|
return tgt;
|
||||||
|
|
Loading…
Reference in New Issue