Inventory adjustment for medications

Context: working to set up OpenEMR for a field clinic with on-site dispensary in central America

At long last, I have the dispensary module functioning fairly well–deducting quantity on hand as expected. I now was looking into how to adjust/correct supply on hand after a manual inventory. I presumed, from the Inventory Management screen, that I could click on the button marked “Tran”, then in the subsequent pop-up, select “Adjustment”. Unfortunately, this option is not selectable. Of the 5 options (Purchase/receipt, Return, Transfer, Adjustment, Consumption, and Edit only), only Purchase/receipt and Transfer are selectable.

The med is otherwise behaving as intended. It has dynamic quantity on hand, a valid expiration date for the lot, etc.

Any ideas, or am I going through the wrong pathway to accomplish this?

Hello @uncMD welcome to the OpenEMR community!
It was a thrill to read your post-- this is the first time I’ve read from somebody using the Dispensary module and referring to the documentation, which are probably the ones I wrote many long years ago.
And of course I doubt that I have read them since. But let me go look at them and see what I can come up with.

Gotta ask, what version of OpenEMR are you using? Those modules that were written for the older versions can develop odd little malfunctions on newer systems.
Best- Harley

Thanks for the reply! We just got started a week ago with our planning, so we are using 7.0.2. Just ran our first village clinic yesterday (never thought we would get a system up that quickly!). I see patients inside and RV and use the prescription writing function to generate an Rx, then I flip the patient status to “Rx Sent” so my pharmacy volunteer in a nearby shed (monitoring Flow) can be notified to open the chart to view the meds ordered. This all has worked pretty well and has been paperless (I don’t actually use the printed labels–I just make template Rxs that correspond to pre-packaged baggies of meds)–kind of like e-prescribing to an onsite pharmacy!

But I am puzzled by why the options for stock adjustment aren’t selectable–that would allow me to integrate the results of our end-of-week re-inventory and keep a more accurate running idea of our stock. Thanks for your help!

Hi @uncMD - this cooler than all get out, you guys are doing what OpenEMR always dreams of doing!

It’s been a few years since I played with the pharmacy inventory system and that was on a long- gone computer. I’m going to set it up on our company’s current demo and take a look at it again. One would think that the ‘Adjustment’ option would do what you want, but I guess we’ll see.

What IT resources do you have at your disposal? If somebody (not me; I am not a dev) came up with some code would you be able to mod your EMR? People here on the forum tend to love to figure out and post code hacks to fix any problem or add some arbitrary feature.
Best- Harley

Sorry for the delay, just got back to the US–saw about 120 patients on the first run of openEMR there!

I probably can cobble together some IT resources–I have some basic knowledge (at least with respect to cutting and pasting code!), and likely I can call in some favors locally with folks more expert than myself.

Hi @uncMD
As I mentioned, I’m trying to set up the pharmacy/ inventory system on my demo. While doing that I’m seeing all sorts of input choices that I can easily imagine might affect whether you can adjust inventory levels.

  • For example, is the ‘Features’ global set for pharm only or pharm+ non-pharm products?
  • Presumably all the Add/ Update drug panels are filled out the same way?
  • Does the amount on hand prevent a whole (as distinct from a fraction of a-) quantity of the packaging of the med from being transferred/ adjusted?

Rather than go through all the questions I might come up with, can you post screenshots of the ‘Add Drug’ and ‘Update Drug’ panels for one of the meds that won’t adjust levels?

My thinking here is that maybe one of the settings force the module into thinking it’s working with a unit that can’t be broken up to transfer a part of it.

I’m continuing to set this up in my system and looking forward to solving the conundrum!

Best- Harley

Hi @uncMD
Well I finally got my inventory set up and I’m seeing the same thing as you: can’t select any of the items on the dropdown list except ‘Purchase/ Receipt’ and ‘Transfer’.


Gotta say, it behaves like it WANTS to let them be selected if some pre-disposing condition were true but I have no idea what that might be. If I were a geek I’d reverse engineer the form, go in and see what the code needs to enable the list items on that dropdown. I’m sure it’d be a long tedious tracing back through the code but unless one of the OpenEMR old- timers can enlighten us (I believe this module dates back to one of the reeealy early releases) that’s all I can think of to do.

Best- HT

Thanks for the troubleshooting help! At least I know it isn’t just some setting on my install that I accidentally fouled up. I’m going to keep poking around to see if there is something about the way my lots are entered that triggers the behavior–it took me forever to realize that all lot expiration dates had to be in the format yyyy/mm/dd to trigger the correct inventory behavior, so maybe (like you said) there is some other unmet condition that I can stumble upon that will make it work.

Inventory list combines drugs/products & lots for the same as hierarchy drug->>lot. Looks like Tran button is for a common pop-up acting at drug level. To maintain/adjust lot related information, click on the hyperlinked lot number to display the pop with the transaction types toggled.


1 Like

That’s v cool, @mdsupport
Using the Lot nr link

you get an Update Lot panel with the Adjustment, Consumption and Edit Only list items active.

And I was looking at that ‘Date’ blank-- too bad it doesn’t come with a date picker widget. Wouldn’t having a date picker guarantee that the format was correct no matter what the user entered or the global settings were?

  • HT