Drug order: Should the 'Duration' impact the Total Amount when 'Immediately' frequency is selected?

Hi everybody!

My idea is to use the medication ordering tab in Bahmni to record IVs ordered but in a very limited way.

So I would like to add the ‘Hour(s)’ and ‘Minute(s)’ to the Duration units (more on this specific task in another coming thread and likely a PR too) and record IVs such as for instance:

Medication order:

  • Dextrose 10% 250ml / Immediately 30 Minute(s) Total Amount: 250ml

In the very simple patient flow that I am dealing with, our client would be satisfied with this. The nurse would see this order when the patient comes to her after being seen by the doctor and apply the IV treatment ordered. Not more than that since this is only Outpatient care.

However, the ‘Immediately’ frequency is acting as if it is a ‘Once a day’ frequency. Looking at the current definition of the ‘Immediately’ frequency from the database indeed the frequency_per_day value is 1 (same as ‘Once a day’). Shouldn’t it be ‘0’ or NULL?

Acutally the term ‘Immediately’ is a bit confusing. It seems to me more like an Instruction rather than a frequency. The frequency term for this instruction could be ‘Once’ or ‘Once only’.

I also noticed that the ‘Immediately’ frequency UUID is ‘0’.


Anyway the problem is when ‘Immediately’ frequency is selected, then the ‘Duration’ is still taken into account to calculate the Total Amount of medication ordered. While maybe it should not be.

Taking the IVs example is not the best here because there is no ‘Minute(s)’ and ‘Hour(s)’ duration units in the Bahmni demo, but we could think of a scenario using ‘Day(s)’ where a medication is ordered for X days, given once and immediately.

Like a nicotine patch let’s say. Then we would like the order to look like:

  • Nicotin Patch (X strength) 1 patch / Immediately 2 days Total Amount: 1 patch

Currently it would show: Total Amount: 2 patches

(since ‘Immediately’ currently means ‘Once per day’)

If we agree the above makes sense, I would like to:

1/ Set the ‘Immediately’ frequency_per_day value to ‘0’ 2/ Implement a if freq=0 then Total Amount = Dose. So the duration is skipped in the calculation when the frequency is ‘Immediately’. 3/ Set a correct UUID for the ‘Immediately’ frequency 4/ Maybe rename the ‘Immediately’ to ‘Once’, but that’s optional

@mddubey: how did we handle this in BD? @mksrom: in the first example, what does 30 mins mean? If the “immediately” means - apply it now, but apply this once - then, wouldn’t frequency be just 1, and instructions as “Immediately”?

Bahmni default demo, has “Hours”, and mins can also be added. Note, all the frequency, units, dosages etc - are configurable. So we can’t assume that the same will be available in every installation - so I would be hesitant to hardcode anything based on name.

also, note based on the frequency and units the invoices are also generated with number of sellable units. So keep in mind, the effect the ordering side.

@jteich, @akhilmalhotra: any thoughts on this?

In my first example, ‘30 min’ is the duration of the treatment. The way doctors order IVs is that they prescribe a total quantity to be given in a certain amount of time (at least that’s what has been described to me): 250ml given in 30minutes Or another example would 250ml given in 6h for instance.

Total amount administered to the patient is 250ml

Well depends of what ‘frequency’ term means. But for me ‘frequency’ suggests that there is a recurrence of the treatment. In theory, “apply this once” means the treatment is not recurring, and therefore have no frequency. The problem with having the ‘Immediately’ frequency set to ‘1 per day’ is that if we select another duration unit that ‘Day(s)’ then the Total amount calculation becomes invalid.

Now the online demo seems currently offline so I can take screenshots and show you what I mean. But I will do it when it is back online.

i am not a doctor, but for the second example in regular language ‘Take 1 patch of Nicotine immediately for 2 days’ doesn’t make sense to me. But ‘Take 1 patch of Nicotine once a day for 2 days’ makes sense and i would expect it to give a total of 2 Nicotine patches in that case. So my guess is that the order represented by first statement would never exist (Immediately and multiple days) For the IV, the way i have modelled so far the drip rate or the time over which the drip is to be given is by using additional instructions. Usually as a predefined orderset so that doctor doesn’t have to type.

The duration for me is more what comes after ‘for’. Like you mention the order for IV is given using ‘in’. So my suggestion would be to not use duration for this. Also what would happen if the order is ‘IV 250ml given in 30minutes 4 times a day for 3 days’ The duration would be required to specify 3 days in this case. Drug Name : IV 250ml Dose : 1 Frequency : 4 times a day Duration : 3 days Total Quantity : 12 Additional Instructions : IV in 30 mins. (some people also use over. so IV over 30 mins)

I agree Immediately in frequency doesn’t make perfect sense. Actually in that case frequency should be left empty and Immediately available in instructions should be used. What appears in frequency drop down is data setup and you can choose to remove it. My guess is it would have been added as a workaround because frequency is not optional. Not sure if the restriction is on Bahmni side or openmrs side, need to confirm.

You can refer some drug orders / order sets modelled here : https://github.com/JanSwasthyaSahyog/jss-config/blob/master/openmrs/ordertemplates/templates.json

I think some patches can last 2 days. So what I meant is 1 patch, 2 days of treatment, once and Immediately. If that’s the case, then the Total Amount should be 1, not 2.

Yes sure and that would be just fine and continue to work as expected.

But for ‘Immediate’ IVs, non-recurring, it would be ideal to use the duration field to record the actual IV duration. Because otherwise it will display an incorrect duration of 1 day. The order would look like:

  • IV 10% 250ml Immediate 1 day Total: 250ml Additional Instructions : IV in 30 mins (1 day and 30min!)

So for ‘Immediately’ frequency I believe the duration unit should not impact the total amount. If so, then nothing would change for the existing cases anyway: It would just provide a way for simple clinics setups to record IVs duration.

Simplest way to order IVs, for Outpatient clinics that only provides immediate IVs:

  • IVs 10% 250ml Immediately 30 minutes Total: 250ml

And for more complicated setup like the one you describe:

  • IVs 10% 250ml 4 times a day 3 days Total: 3000ml Additional Instructions : IV in 30 mins

or if you use 250ml packs of IV:

  • IVs 10% - 250ml Dose: 1 4 times a day 3 days Total: 12 packs Additional Instructions : IV in 30 mins

Having the ‘Immediately’ frequency to be ‘0 per day’ and remove this into the total calculation would not impact any of these existing cases.


Or the other solution you mention works for me just as well :thumbsup: .

Though just setting ‘Immediate’ to ‘0 per day’ and implement this specific 0 freq behavior would end up being almost the same as what you describe. And as I suggested in my OP we could rename it to ‘Once only’ or ‘None’ or something so that’s clearer.


Thanks for sharing the orderTemplates.json. That is a very useful and we will make extensive use of that. And thanks also for sharing the tip about using additional instructions to record IV duration. We will use this if the proposed change is not accepted.

@mksrom The medication screen in Bahmni has been primarily designed for OPD cases and only works best for some of the drug forms (Tablets and Capsules). A lot of changes are needed for this to make it work for drug forms like syrups, injectables etc. Current medication screen also does not support variable doses that are used in IPD.

I agree with you on this. “Immediately” and “IV infusion over a period of 30 mins” are instructions and “once only” would be the frequency. Another example would be when we give a bolus dose immediately and then IV infusion over a period of X minutes. So such kinds of dosage requirements are not really handled in the current medication screen. The medication form should be dynamic and such options should be enabled when the system understands the context of the drug form being ordered and the route chosen for drug administration.

A workaround is to use the additional instructions field which is a free text field but in the longer run, a new design needs to be adopted for the medication screen to work for all kinds of prescription requirements. I suggest if someone is ready to pick up development work, then we can discuss this in one of the design forums and improve the medication tab.

Very good discussion. Here are some thoughts from past experience in building medication and IV ordering systems (including Bahmni):

  1. “Immediately” should not be used as a substitute for “Once”. As suggested above, “immediately” (often called “stat”) refers to how soon the first dose of something is to be given. “Once” refers to a drug given only one time; when “Once” is specified, neither frequency nor duration are valid. Drugs that are ordered Once may or may not be needed immediately.

  2. I would strongly agree with the comments above that Duration should not be used for how long you want the IV to run. Duration is intended to be a multiplier for dosing and prescribing (e.g., paracetamol 1 tablet 4 times a day, duration 7 days = 28 tablets). They are not the same concepts. If you are not going to use an IV infusion form (see next item), then the ‘over 30 minutes’ should go in the free-text instructions.

  3. IV fluid orders should have one of two forms:

A. “Bolus” (this is what you are ordering above): [Fluid type] [amount] [units] OVER [number] [time unit] – for example, [Dextrose 10%] [250] [mL] OVER [1] [hour]

B. Infusion (we’re not discussing this here): [Fluid type] [rate #] [rate units] FOR [number] [time unit] – such as [Dextrose 10%] [100] [mL/hour] FOR [3] [hours]

BTW, you almost never would see a frequency for either of these orders.

If you want to use the medication order as a workaround for these more correct forms, then most of these orders should be Once, and again, the running time should be in an instruction field, not in the Duration field, to avoid the problems you have cited.

Finally, just to refer to the other question about nicotine patch, the right form would be, for a pack of patches: [Nicotine patch] [1] [Patch] [(Frequency:) Every other day] [(Duration:) 14 days] Then the multiplication would be 1 patch x 0.5 patches per day x 14 days = 7 patches, which is correct

Jonathan

Thanks @jteich for your input. So I will not use ‘Duration’ to record duration of IVs but instead use instructions and additional notes.

@angshuonline, @arjun do we agree that:

1/ ‘Immediate’ is not a frequency and should not be in the frequency list and even database 2/ Instead we should have a ‘Once’ option 3/ Selecting ‘Once’ would disable the ‘Frequency’, ‘Duration’ and ‘Duration Units’ fields. 4/ Total Quantity should then be the Dose

Something like below:

My initial proposed solution was a bit of a workaround to make changes simpler: Rename ‘Immediate’ to ‘Once’ and ensure that we change its frequency value to 0 (currently is 1 and is incorrect). And skip Duration and Duration Units when the selected frequency value is 0, ie ‘Once’ is selected, from the Total Quantity calculation.


Now I understand that this medication ordering screen is only meant for simple OPD departments and we are waiting for some improvements to bring IPD drugs administration features. However, our client OPD clinic does give Bolus IVs and it is common in Cambodian OPD health centers to do so. I am just thinking here that implementing a change such as described above would simply not impact any current use of the feature but just add a ‘clean’ way to order Bolus IVs. (I think it could even be extended to Infusion IVs by adding Dose Units of type ‘volume per duration’ (ie, ml/hour) such as you describe it @jteich, but that needs to be thought through too)

What do you guys think?

It looks like that would work (the four items you listed at the top of your post and the graphic).

Incidentally, even if the orderer left out the “over 1 hour” in the instructions, most boluses are given over standard rough time frames – about a half hour for 100 ml or less, about an hour for up to 400-500 ml, and about two hours for larger boluses. Most IVs can’t run any faster, and except for patients with severe burns or severe bleeding they don’t need to. So, while ideally there should be a dedicated field for running time, this workaround can get by without it.

@angshuonline, should I create a Bahmni JIRA ticket for this feature?

If you mean a ticket for the “immediate” -> “once”, that makes sense.

In the longer term, we should add support to openmrs-core (or some shared module) for IV/Fluid/Inufusion orders and dosing, so that we can ultimately add this to Bahmni in the right way. (@jteich, @burke) Looking back at our Ebola code I see we introduced an IvFluidOrder class (i.e. it’s a different type of order, rather than a dosing type that can be applied to drug orders).

@mksrom: Please. Also what effect will it have on the ERP side - billing and inventory? Do we need more work there?

Just a word of caution : Medication is a heavily used screen. Even though its not the best and users would like improvements including the old horizontal layout, all the implementations that i am connected to have accepted the as-is and are at peace. Any change (as small as including a new checkbox) to this screen that they don’t like evokes strong reaction. So my suggestion would be take up medication changes holistically rather than piecemeal. There was research done and design prepared sometime back which i think Akhil had shared over here. Even if we choose to do piecemeal/incremental changes (there could be valid reasons for that), we should have a configuration so that the implementations who don’t want the changes can turn them off.

I would create a ticket (or multiple ones) to implement the changes described in point 2/ 3/ and 4/ of my previous message. Point 1/ does not have to be implemented since one can simply hide it from the list using the Bahmni Config, if needed.

That would be great.


I believe it does not have any effect on the ERP side of things other than what it does already.


@arjun, I would be interested to know how they are currently recording their IVs if at all, and how satisfied they are with it. And how satisfied they would be with the changes. Does some of these persons can be tagged on this thread so they can give their input on this change and tell us how much/why that would be a problem to have one checkbox added in the next Bahmni release.

I believe the change is fairly small, simple to implement and would fill the gap for OPD IVs. Now I would also prefer to have a holistic change of the medication screen but I am not sure how long implementing this could take.

OK.