Drug Order: Add Minute(s) and Hour(s) duration units

I am trying to add Minutes and Hours duration units in the Medication ordering tab in Bahmni.

From other post:

In the Bahmni demo, I see only the 3 units:

@angshuonline do you have a config example in which you achieve that?

I must be missing something obvious because it does not work to simply add new duration units via the config in the medication JSON:

"inputOptionsConfig": {
...
  "durationUnits": [
    "Minute(s)",
    "Hour(s)",
    "Day(s)",
    "Week(s)",
    "Month(s)"
  ],
...
}

From what I understand, this durationUnits list provided in the config is applied as a filter on the masterConfig duration units list returned by the treatmentConfig service. Which only contains the 3 following duration units (and their factor):

It works when I add the Hour(s) and Minute(s) to this list:

config.durationUnits = [
    {name: "Minute(s)", factor: 1/1440},
    {name: "Hour(s)", factor: 1/24},
    {name: "Day(s)", factor: 1},
    {name: "Week(s)", factor: 7},
    {name: "Month(s)", factor: 30}
];

adding duration units on my payload cannot save my drug order

@mksrom

  • the hours can be also mentioned number-of-times (TID, BID etc) / Day. Will that not suffice?
  • Minutes: any specific use case?

If it works, and has no adverse impact on order and subsequent quotation (and calculation of number of SKUs) - then please go ahead and create a JIRA card and a PR.

TID and BID (3x/day and 2x/day) are frequencies, so that’s a little different than this question about durations. A drug order may have both (give Paracetamol 500mg 3x/day for 7 days).

On an acute inpatient service, it would be possible to have durations that are only a few hours long, but those mainly apply to giving IV fluids (give Normal Saline 200 ml/hr for 6 hours); it’s not very common for medications. I cannot think of a situation that would call for a med order with duration measured in minutes — but willing to hear of a good example.

Well, perhaps one — rapid treatment of clot-busting drugs for a heart attack, where you give a drug in a very rapid infusion for a half hour, then a slower infusion for an hour. But that’s about the only one that comes to mind — it’s very rare, and I don’t know if I would make Minutes a regular member of the Duration field.

Incases of hypertensive emergency, you may be pushed to use an IV drug like hydralazine or labetalol a couple of times every half hour…also in pre-eclampsia/eclampsia…the same may apply

Those are really frequencies (how often you need to give and re-give the med) as opposed to duration (the entire period of time that it takes to give all doses of the drug). If I need to give labetalol multiple times rapidly, the order would say “Labetalol 20mg IV every 10 minutes” – “every 10 minutes” is a frequency. This order either would not have a duration because there’s no specified limit (many med orders have no duration), or it might have a dose limit rather than a time duration: “… up to 160mg max”. Dose limits sometimes replace time durations, but that’s out of scope for this question.

does the admistration of i.v Artesunate qualify then because ideally it’s given at 0,12 and 24hours then followed by artemesin-containing orals unless ofcourse in a few cases when the duration may not be predefined when u may need to go beyond 3 doses if the patient hasnt improved yet enough to be able to take orals…

If I know that the order is only for those three doses, I’ll enter

Artesunate XXX mg IV every 12 hours x 3 doses

Frequency is every 12 hours; Duration is 3 doses (in this case, it’s confusing to enter “x 1 day” or “x 24 hours” because that normally would be just two doses. This is an unusual order because you’re basically ordering it for a day and a half).

If I didn’t know in advance when the patient will be ready to change to oral therapy, I’d just write the order with no duration, and when the patient was ready to switch I’d change the order.

1 Like

Hello, I have a use case of ophthalmic drops after eye surgery, prescribed every 15 minutes for almost half a day, then prescribed every two hours, then prescribed 5 times a day.

1 Like

Bahmni ordering is not so advanced. It would be best to break the order - into 3 different ones. In a way, I see logic as well, as the Medication instructions are different and time-period specific (dates). May not make sense for billing/pharmacy - they would probably just want to dispense a single unit.

For the record, here is the ticket to cover this work: [BAH-1194] Order duration units are not internationalizable nor extendable - Bahmni - JIRA

And here is a PR: BAH-1194 | Remove hardcoded duration units by rbuisson · Pull Request #352 · Bahmni/openmrs-module-bahmniapps · GitHub

(cc @reagan )

1 Like

Change is now merged, so here is how to override the default duration units:

Provide a durationUnitsFactors config object in the clinical/medication.json in the form of:

 "durationUnitsFactors": [
      {
        "name": "Day(s)",
        "factor": "1"
      },
      {
        "name": "Week(s)",
        "factor": "7"
      },
      {
        "name": "Month(s)",
        "factor": "30"
      }
    ]

That way you can add as many as you want, providing the matching concepts exist of course (matched by FSN in default locale).

1 Like