Search in sources :

Example 1 with MedicationDispenseStatusCodesEnumFactory

use of org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory in project org.hl7.fhir.core by hapifhir.

the class MedicationDispense10_50 method convertMedicationDispenseStatus.

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)
        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());
    ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt);
    switch(src.getValue()) {
        case COMPLETED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.COMPLETED);
            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 STOPPED:
            tgt.setValue(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodes.STOPPED);
            break;
    }
    return tgt;
}
Also used : MedicationDispenseStatusCodesEnumFactory(org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory)

Example 2 with MedicationDispenseStatusCodesEnumFactory

use of org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory 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

MedicationDispenseStatusCodesEnumFactory (org.hl7.fhir.r5.model.MedicationDispense.MedicationDispenseStatusCodesEnumFactory)2