My ideal approach would be:
- Don’t reuse the medication tab for this, but introduce a new “Pharmacy Dispensing” app, whose workflow is:
- find a patient record (using our typical UI approach)
- you see their active drug orders, and a history of past dispensing
- for each order you can record what you’re dispensing now (or what you’re not dispensing)
- On the back-end, introduce a new (shared with OpenMRS) module for this, that introduces a REST resource for dispensing.
- I don’t know if this would get its own table, or if we’d just represent this with an obs group
- The model should align with FHIR’s medicationdispense resource
- might be okay to put this in the emrapi module, for eventual inclusion in openmrs-core (will need discussion with other OpenMRS folks)
- If ERP is installed, then anything entered via this module should be automatically synced there (to decrement stock, and to bill)
- But it can also work without ERP
Another theoretically good approach could be to introduce a new domain object (initially in a module, eventually to go to openmrs-core) to represent a “formulary”. Pharmacists could periodically update the formulary to indicate what’s out of stock. You’d enhance the medication tab to display formulary information alongside the drug search or the recent orders. (This would be similar to Arjun’s approach, without some of the hacky downsides, but it would require dev work.)
Honestly what we’re doing now, by having the dispensing info be marked on the consultation/prescribing screen is theoretically wrong. But given that current implementation, I do think it could be okay to add support for an optional, short free-text comment when you click on the D to dispense. (I guess in your case you’d need to add a button for not dispensed, which makes things more cluttered…)
Other Links:
- some notes by a ThoughtWorks BA working with PIH on the Mirebalais project: https://wiki.openmrs.org/x/YAEjAw
- those led to this (dormant?) module, which I think has a Java API backed by Obs Groups, but no REST API: https://github.com/openmrs/openmrs-module-dispensing
- Burke’s thoughts about where dispensing belongs, in post #24 of this thread from 2016