Search in sources :

Example 6 with ENTEREDINERROR

use of org.hl7.fhir.dstu3.model.Appointment.AppointmentStatus.ENTEREDINERROR in project org.hl7.fhir.core by hapifhir.

the class MedicationDispense40_50 method convertMedicationStatus.

private static org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> convertMedicationStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus> src) {
    if (src == null)
        return null;
    org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new MedicationDispenseStatusCodesEnumFactory());
    ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
    switch(src.getValue()) {
        case CANCELLED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.CANCELLED);
            break;
        case COMPLETED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.COMPLETED);
            break;
        case DECLINED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.DECLINED);
            break;
        case ENTEREDINERROR:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.ENTEREDINERROR);
            break;
        case INPROGRESS:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.INPROGRESS);
            break;
        case NULL:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.NULL);
            break;
        case ONHOLD:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.ONHOLD);
            break;
        case PREPARATION:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.PREPARATION);
            break;
        case STOPPED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.STOPPED);
            break;
        case UNKNOWN:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.UNKNOWN);
            break;
    }
    return tgt;
}
Also used : MedicationDispenseStatusCodesEnumFactory(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory)

Aggregations

Appointment (org.hl7.fhir.dstu3.model.Appointment)2 MedicationDispenseStatusCodesEnumFactory (org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory)2 StatusMessage (org.sagebionetworks.bridge.models.StatusMessage)2 IParser (ca.uhn.fhir.parser.IParser)1 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ConverterConfiguration (io.github.linuxforhealth.core.config.ConverterConfiguration)1 HL7ToFHIRConverter (io.github.linuxforhealth.hl7.HL7ToFHIRConverter)1 DatatypeUtils (io.github.linuxforhealth.hl7.segments.util.DatatypeUtils)1 ResourceUtils (io.github.linuxforhealth.hl7.segments.util.ResourceUtils)1 ZoneId (java.time.ZoneId)1 Calendar (java.util.Calendar)1 Date (java.util.Date)1 List (java.util.List)1 TimeZone (java.util.TimeZone)1 Collectors (java.util.stream.Collectors)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 ContactPoint (org.hl7.fhir.dstu3.model.ContactPoint)1 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)1 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)1 Extension (org.hl7.fhir.r4.model.Extension)1