Class EMediplanConverter
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.service.EMediplanConverter
Utility class to convert CH EMED EPR documents to an eMediplan object equivalent.
-
Method Summary
Modifier and TypeMethodDescriptionprotected static EMediplanDosegetEMediplanDoseFromChEmedEpr(Dose chEmedEprDose) Converts a CH EMED EPRDoseto the appropriateEMediplanDoseobject.protected static @Nullable StringmedicalAuthorToPrescriber(Author author) Translates aAuthorto a prescriber string for eMediplan.static EMediplanConverts the received PMLC document to an eMediplan object.protected static EMediplanPosologytoPosology(ChEmedEprDosage baseDosage, List<@NonNull ChEmedEprDosage> additionalDosages) Converts the list of Dosage objects of a CH EMED EPR resource (either medication statement or medication request) to anEMediplanPosologyobject.
-
Method Details
-
toEMediplan
Converts the received PMLC document to an eMediplan object.- Parameters:
pmlc- The PMLC document to be converted.- Returns:
- An equivalent eMediplan object.
-
medicalAuthorToPrescriber
Translates aAuthorto a prescriber string for eMediplan. The prescriber string, according to the eMediplan specifications, consists of the prescriber's GLN number.- Parameters:
author- The CH EMED EPR Author from which to get a prescriber string.- Returns:
- The GLN of the practitioner author, if a professional author,
nullotherwise.
-
toPosology
protected static EMediplanPosology toPosology(ChEmedEprDosage baseDosage, List<@NonNull ChEmedEprDosage> additionalDosages) Converts the list of Dosage objects of a CH EMED EPR resource (either medication statement or medication request) to anEMediplanPosologyobject.- Parameters:
baseDosage- The CH EMED EPR resource base dosage.additionalDosages- The CH EMED EPR list of additional dosages (if split dose). It can be empty.- Returns:
- The equivalent eMediplan posology object.
-
getEMediplanDoseFromChEmedEpr
Converts a CH EMED EPRDoseto the appropriateEMediplanDoseobject.Depending on whether the dose is a simple quantity or a range, the returned object will be an instance of
SimpleDoseorRangeDoserespectively.Note that the unit of the dose is ignored. The aim of this method is just to convert the quantity part of the dose object, since the unit is specified at a higher level in the eMediplan model.
- Parameters:
chEmedEprDose- The CH EMED EPR dose to be converted.- Returns:
- The resulting
EMediplanDoseobject.
-