This commit is contained in:
Grahame Grieve 2020-06-19 11:37:14 +10:00
commit 35be964dd4
2 changed files with 10 additions and 1 deletions

View File

@ -95,3 +95,5 @@ This project is maintained by [Grahame Grieve][Link-grahameGithub] and [James Ag
[Badge-r5SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Snapshots" [Badge-r5SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Snapshots"
[Badge-cliSonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Releases" [Badge-cliSonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Releases"
[Badge-cliSonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Snapshots" [Badge-cliSonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Snapshots"

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv30_40;
import org.hl7.fhir.convertors.VersionConvertor_30_40; import org.hl7.fhir.convertors.VersionConvertor_30_40;
import org.hl7.fhir.convertors.VersionConvertor_40_50; import org.hl7.fhir.convertors.VersionConvertor_40_50;
import org.hl7.fhir.dstu3.model.SimpleQuantity;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
public class MedicationAdministration30_40 { public class MedicationAdministration30_40 {
@ -109,8 +110,14 @@ public class MedicationAdministration30_40 {
tgt.setMethod(VersionConvertor_30_40.convertCodeableConcept(src.getMethod())); tgt.setMethod(VersionConvertor_30_40.convertCodeableConcept(src.getMethod()));
if (src.hasDose()) if (src.hasDose())
tgt.setDose(VersionConvertor_30_40.convertSimpleQuantity(src.getDose())); tgt.setDose(VersionConvertor_30_40.convertSimpleQuantity(src.getDose()));
if (src.hasRate()) if (src.hasRate()) {
if (src.hasRateQuantity()) {
tgt.setRate(new SimpleQuantity());
VersionConvertor_30_40.copyQuantity(src.getRateQuantity(), tgt.getRateSimpleQuantity());
} else {
tgt.setRate(VersionConvertor_30_40.convertType(src.getRate())); tgt.setRate(VersionConvertor_30_40.convertType(src.getRate()));
}
}
return tgt; return tgt;
} }