Search in sources :

Example 1 with RCMRMT030101UK04PertinentInformation

use of org.hl7.v3.RCMRMT030101UK04PertinentInformation in project nia-patient-switching-standard-adaptor by NHSDigital.

the class MedicationMapperUtils method buildDosage.

public static Dosage buildDosage(List<RCMRMT030101UK04PertinentInformation> pertinentInformationList) {
    Dosage dosage = new Dosage();
    var pertinentInformationDosage = pertinentInformationList.stream().filter(RCMRMT030101UK04PertinentInformation::hasPertinentMedicationDosage).map(RCMRMT030101UK04PertinentInformation::getPertinentMedicationDosage).filter(RCMRMT030101UK04MedicationDosage::hasText).map(RCMRMT030101UK04MedicationDosage::getText).findFirst();
    pertinentInformationDosage.ifPresentOrElse(dosage::setText, () -> dosage.setText(NO_INFORMATION_AVAILABLE));
    return dosage;
}
Also used : RCMRMT030101UK04PertinentInformation(org.hl7.v3.RCMRMT030101UK04PertinentInformation) RCMRMT030101UK04MedicationDosage(org.hl7.v3.RCMRMT030101UK04MedicationDosage) Dosage(org.hl7.fhir.dstu3.model.Dosage) RCMRMT030101UK04MedicationDosage(org.hl7.v3.RCMRMT030101UK04MedicationDosage)

Aggregations

Dosage (org.hl7.fhir.dstu3.model.Dosage)1 RCMRMT030101UK04MedicationDosage (org.hl7.v3.RCMRMT030101UK04MedicationDosage)1 RCMRMT030101UK04PertinentInformation (org.hl7.v3.RCMRMT030101UK04PertinentInformation)1