More fixing Observation conversion between versions for R5
This commit is contained in:
parent
8ac01bd5a4
commit
472fb19542
|
@ -1,6 +1,7 @@
|
|||
package org.hl7.fhir.convertors.conv10_50.resources10_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext10_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.Reference10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.CodeableConcept10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identifier10_50;
|
||||
|
@ -8,6 +9,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Range1
|
|||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.SimpleQuantity10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Instant10_50;
|
||||
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Observation10_50 {
|
||||
|
@ -34,8 +36,15 @@ public class Observation10_50 {
|
|||
if (src.hasIssuedElement())
|
||||
tgt.setIssuedElement(Instant10_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getValue()));
|
||||
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueMarkdownType()) {
|
||||
tgt.setValue(String10_50.convertMarkdownToString(src.getValueMarkdownType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept10_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
if (src.hasInterpretation())
|
||||
|
@ -84,8 +93,15 @@ public class Observation10_50 {
|
|||
tgt.setIssuedElement(Instant10_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer())
|
||||
tgt.addPerformer(Reference10_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getValue()));
|
||||
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueStringType()) {
|
||||
tgt.setValue(String10_50.convertStringToMarkdown(src.getValueStringType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept10_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
if (src.hasInterpretation())
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.hl7.fhir.convertors.conv30_50.resources30_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext30_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
|
||||
|
@ -8,6 +9,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Range3
|
|||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.SimpleQuantity30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Instant30_50;
|
||||
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public class Observation30_50 {
|
||||
|
@ -35,8 +37,15 @@ public class Observation30_50 {
|
|||
if (src.hasIssued())
|
||||
tgt.setIssuedElement(Instant30_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
|
||||
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueMarkdownType()) {
|
||||
tgt.setValue(String30_50.convertMarkdownToString(src.getValueMarkdownType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept30_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
if (src.hasInterpretation())
|
||||
|
@ -86,8 +95,15 @@ public class Observation30_50 {
|
|||
tgt.setIssuedElement(Instant30_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer())
|
||||
tgt.addPerformer(Reference30_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
|
||||
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueStringType()) {
|
||||
tgt.setValue(String30_50.convertStringToMarkdown(src.getValueStringType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept30_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
if (src.hasInterpretation())
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.hl7.fhir.convertors.conv43_50.resources43_50;
|
||||
|
||||
import org.hl7.fhir.convertors.context.ConversionContext40_50;
|
||||
import org.hl7.fhir.convertors.context.ConversionContext43_50;
|
||||
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Annotation43_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
|
||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50;
|
||||
|
@ -67,8 +69,13 @@ public class Observation43_50 {
|
|||
if (src.hasIssued())
|
||||
tgt.setIssuedElement(Instant43_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.r4b.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue()));
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueStringType()) {
|
||||
tgt.setValue(String43_50.convertStringToMarkdown(src.getValueStringType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept43_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getInterpretation())
|
||||
|
@ -117,8 +124,13 @@ public class Observation43_50 {
|
|||
if (src.hasIssued())
|
||||
tgt.setIssuedElement(Instant43_50.convertInstant(src.getIssuedElement()));
|
||||
for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t));
|
||||
if (src.hasValue())
|
||||
tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue()));
|
||||
if (src.hasValue()) {
|
||||
if (src.hasValueMarkdownType()) {
|
||||
tgt.setValue(String43_50.convertMarkdownToString(src.getValueMarkdownType()));
|
||||
} else {
|
||||
tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue()));
|
||||
}
|
||||
}
|
||||
if (src.hasDataAbsentReason())
|
||||
tgt.setDataAbsentReason(CodeableConcept43_50.convertCodeableConcept(src.getDataAbsentReason()));
|
||||
for (org.hl7.fhir.r5.model.CodeableConcept t : src.getInterpretation())
|
||||
|
|
Loading…
Reference in New Issue