A new MedicationDispenseService will be added (via the MedicationDispense module) that handles:
- Basic CRUD operations on the Medication Dispense domain object
- A RESTful version of the API
- Business-layer operating needed for the implementation of the Medication Dispense UI
(We should also add new privileges for these various operations, based on the patterns we use for other domain objects)
Should medication dispense objects be updateable (my gut answer is yes)
Support for all the Java API methods via OpenMRS REST or FHIR format
If we support a "FHIR" format, will we have to map the an OpenMRS Drug Order to a FHIR Medication Request? Looks like there's already support in the FHIR module to do this, should research further. Could we use an extension to associate one or more Medication Dispense resources with a Medication Request?
Potential Business Layer Operations
These are all pending confirmation of the UI and use cases, very much a work-in-progress, Phase 2
Hold for now, pending further requirements
|Date earliestDateActivated, Date latestDateActivated, Patient patient, List<FullfillerStatus> fulfillerStatuses
(Is there a better way to translate this, than a map)?
Used to populate the Pharmacist List page (with Patient= null, and likely FulfillerStatus != COMPLETED) and the Back to Clinician Page (with Patient = null, and with FulfillerStatus == Exception or In_Progress or Received?) and Patient-specific medication page
Should likely build a custom DAO method that joins DrugOrder to MedicationDispense on drug_order.order_id = medication_dispense.drug_order_id
My thought is that this search based on Date and FulfillerStatus (likely all but FulfillerStatus = COMPLETED), but the other filters (Drug, Prescriber) can happen on the client side?
Perhaps this could all be handled via FHIR: https://www.hl7.org/fhir/search.html#include ... would this work: