Medication Tab for Pharmacist needs


Our implementation is currently using the medication tab to prescribe the drugs for the patients, and we are not using OpenERP for the pharmacist to look at the drugs that have been ordered and to dispense the medicines. As of now the thought process is Pharmacist access the medication tab and dispense the medicines and mark them as dispensed. But for certain medicine if the stock is not there, Pharmacist need to enter that information in medication tab itself, so that when patient goes back to doctor, they can see that certain medicines are not available and need to prescribe other medicines.

Any implementations used this kind of workflow for the pharmacy department ? Inputs/Thoughts on how to go about this would be really helpful.

@darius @angshuonline @sruti

@padmavati is the requirement to enable the EMR medication screen to provide stock level information?

@Dimitri Requirement is not to enable the EMR medication screen to provide the stock level information(Pharmacy department will maintain this offline). It is more of if there is no stock, pharmacist needs to enter that particular medicine is not there in stock in EMR, so that it is recorded and clinicians can look at this and prescribe replacement medicine.

Do you want to keep track of drug stock levels without using the ERP component?

@mksd No it is not for drug stock levels. As a pharmacist if certain drug is not available, then i need to enter that information in EMR, For eg: If there is a provision for Notes for the Pharmacist to enter Drug not available it is good enough.

1 Like

Yes, however saying that a drug is available or not is an information about the stock level.

There is not enough information at this stage to be honest. While I could imagine (from the distance) that this could be beneficial, I am also concerned that it overlaps on data that should in fact be processed out of the ERP, were it to be used.

Could you clarify the exact workflow though and how it spreads across patients? Doesn’t it bring weird questions at the edges, like what if you have enough of a drug for a patient but not for another? Then what do you record the drug availability in such cases?

I’d be curious about what others think about it as well obviously.

Hi @padmavati,

How does the the Pharmacist in your implementation currently get access to the list of medicines prescribed by the provider? Also have you explored using the Order fulfillment feature to meet your needs?


How about pharmacist going to openmrs and updating the name to include “Out of Stock”?

I have done it for one drug on demo to demo. Have a look:

Of course, this is a “Jugaad” solution but if you are not looking to build a new functionality, this could frugally and neatly solve your problem.


@sruti Pharmacist have the access to Medication tab to look at the prescribed medicine. Order fulfillment we have used for Lab orders not Drug orders as it will not meet our requirement and criteria.

@arjun Thank you for the workaround, but as a result of it:

  • Pharmacist every time login to OpenMRS and update it for every drug.
  • If the drug is available in the stock after few days, again they will have to go back and edit the drug name.
  • If the drug is already prescribed and dispensed for some patients, still it will show as Out of stock in the entire application.
  • It involves a lot of manual work.
  • It will also impact the reports as well(Drug reports, drug name is changed).

I think having a note available for each prescribed drug would be very useful for this and other purposes (similar format to that used for complaints and diagnoses).

My ideal approach would be:

  • Don’t reuse the medication tab for this, but introduce a new “Pharmacy Dispensing” app, whose workflow is:
    1. find a patient record (using our typical UI approach)
    2. you see their active drug orders, and a history of past dispensing
    3. 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:

1 Like

To avoid the clutter, would it be better to just make the short free-text available by default? (Then don’t need not dispensed button)

Not really. This screen is primarily be for the clinician, not the pharmacist, so having a free-text box there wouldn’t really make sense.

(Which is why I’m saying that the right solution is to have a separate dispensing app…)

We’ve faced a similar use case with a site running an existing pharmacy/stock management system that already covers some of the OpenERP functionality. Ideally, we would find a way to interoperate with this system, or look at switching it out for OpenERP, but these options may not be viable at this point.

For the cases where OpenERP is not used or the pharma/stock system is not connected to Bahmni (i.e. not ideal cases), I can see value in having a way to specify when a prescribed drug could not be dispensed.

I believe some of this has also been covered in this (old) thread:

As suggested there, one workaround to achieve this for now is to configure the Stop Medication Reasons and use that to specify when a drug was out of stock and could not be dispensed. This is problematic though, as you’d have to first mark the prescription as dispensed (which isn’t actually the case).

Presumably, there are a few different use cases too (maybe others?):

  • Drug is out of stock or partially available, so an alternate drug is prescribed & dispensed.
  • Drug is partially available, so pharmacist dispenses what’s available.
  • Drug is out of stock or partially available, but pharmacist wants to wait for more stock to arrive and then dispense the drug.

In each case, it could be useful to add a note to the dispensing event. In the first and second cases, the addition of Not Dispensed/Partially Dispensed options could also be useful, effectively closing the order so it can’t be dispensed at a later stage (also sounds like a good candidate for a coded set of reasons/resolutions).

The idea of a “Pharmacy Dispensing” app sounds ideal, and I understand having dispensing on the prescription screen may not be entirely correct, but… in our use case clinicians maintain stock of certain drugs in the consultation rooms, and dispense these directly during consultations, so it could be useful to have the dispensing functionality configurable in the Medication tab, rather than removing it entirely (but this likely adds some redundancy and makes code harder to maintain).

Trying to simplify the use case (and to avoid overloading some data elements – definitely do not agree with changing the drug name as it goes in/out of stock):

Perhaps the minimum workflow for the pharmacist is:

  • Indicate whether the dispense has been completed (yes/no, i.e., a checkbox or button) – so you know that this task does/doesn’t need to be revisited. This may be the only logical control you need;
  • Text note to clarify any variations from the ‘normal’ complete dispense, e.g., only partially filled, out of stock, substitute drug used, etc.
  • (Optional) other yes/no controls also asserting these variations – (not dispensed, partially dispensed, substitute drug used) – I think you can get by without any of these

As @darius writes, ideally this would happen on its own tab, but if the docs are doing a lot of the dispensing then you could probably get away with these controls on the prescribing screen.


I am Unable to show medication Tab ,

I just happened to see this thread now. Sounds like there might have been a conclusion. What occurred to me is that I would really like to see a swim lane diagram showing exactly what information would be shown to each actor during the initial dispensing, follow-up provider visit, and later dispensing (if and when the original drug is available). It was not clear to me from @darius or @jteich what is actually happening to the OBS order for the medication (and the medication history) and what happens when a replacement is made at the pharmacy. Thanks.