Can I change minimum Drug Order Sets to 1?

Hi What I want to achieve is to type name of drug with autocomplete instruction such as I type Amoxycillin 500mg it’s autocompleted with Amoxycillin 500mg 1 cap thrice per day for 10 days (total 30 caps)

as Drug order sets can deal with this but the minimum is 2. Is there a way to change minimum drug order sets?

Thanks Pi

Hi @zacrify As per my knowledge, minimum is 2 which can’t be changes.

Swathi, in your recollection, does this seem like a restriction that could be loosened in our next release, if @zacrify can find a developer to do it?

-Darius (by phone)

@darius, recently i came across similar need with another Bahmni implementation. The use case was as below. The hospital targeting only a particular treatment have a set of drugs with fixed dosage and duration etc that they prescribe. Hence they don’t want to manually enter all the drug units/duration/dosage every time it’s prescribed which is waste of time for them. They have been using a paper form with 10 drugs with fixed duration/dosage etc when they just check the box against the drugs they prescribe.

The restriction from Bahmni side can be removed. Bahmni uses the openmrs orderset api in the background. Looking at the code we didn’t find any restriction.[quote=“darius, post:3, topic:11918”] if @zacrify can find a developer to do it? [/quote]


Hi @swathivarkala Could you point out where the code is? I ll check with my dev.

Thanks Pi

The code for this is in openmrs-module-bahmniapps code repository. And specific files will be as below.

@darius I would prefer using this feature for @zacrify’s usecase in case this has been/being developed by someone or may be if @zacrify can contribute this feature to Bahmni.


Hi @swathivarkala I tried to search for orderSet.js and orderSetController.js but not found these 2 files in the system

Can you please specify where exactly you are searching for these files?

I’m using command line in CentOS

find / -name orderSet.js


find / -name orderSetController.js

Hi @zacrify, The javascript code will be minified in the server hence you will not find the exact file but all the code will be in /var/www/bahmniapps/admin/admin.min.xxxx.js. In side this minifies js file for admin, you can search for orderSetController

@swathivarkala Thank you so much :laughing:

Akhil, I agree that would be a better long term solution, but I imagine it requires quite a bit more development.

Can you think of a reason why we should not allow single-item order sets? Would this break some use case or assumption that I haven’t thought of yet?

-Darius (by phone)

Well, I don’t think we will break any assumption but fundamentally, an order set should have at least 2 members. A single member order set is essentially a pre-defined order. This would actually be a hack rather than a solution.

On another thought, at the database level also, we will unnecessarily create order groups with a single member. Not that it should have any functional implication but it will unnecessarily pollute the database.