Order sets error in Bahmni 0.85

I’m getting an error message when trying to add an order set with custom rules using the block rule on the medications tab in Bahmni 0.85 with the End TB configuration (1.5). I was hoping I could get some help to troubleshoot this error.

The error message is “Please capture Height and/or weight for current visit.”

I’ve created an order set named “ipt” in the admin module and have added two drugs to this and have set them both to use “customrule”. I’ve then created a csv file with a name (ipt.csv (260 Bytes)) matching the order set name and have placed this in /opt/openmrs/bahmni_config/openmrs/rulesengine/drugorderrules The csv file uses the block rule.

I then go to the clinical app and enter the weight and height for a patient in a follow up obs template with the visit date set to the current date. After saving those observations I then go the medication tab (TB drugs) and try to add the ipt order set and get the error message that I posted above.

In the openmrs concept dictionary the UUID for weight is set to 5089AAAAAAAAAAAAAAAAAAAAAAAAAAAA and the fully specified name is “Weight” The UUID for height is set to 5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA and the fully specified name is “Height (cm)” These are the exact two concepts that are on the followup observation template.

In /opt/openmrs/rulesengine-concept.properties I noticed that the UUID for weight matched the UUID in our concept dictionary. The UUID for height however, was shorter (32 characters vs 36). The concept dictionary has an additional 4 characters “AAAA”. However even after changing the value in rulesengine-concept.properties the error persists.

Any suggestions on aspects of the configuration that I should check? I think I’ve seen order sets with custom rules working fine on the default config for Bahmni so was hoping that there might be something in the concept dictionary or a setting in a configuration file that needs to be adjusted.

Hi @gchan, Looking at the rules engine code, it seems that it looks for Height/Weight captured in latest Registration encounter (Registration second page). I am assuming you don’t have the registration second page and you are capturing Height/Weight in one of the forms. Is that correct?

Hi @Arjun, yes that’s correct - we don’t have a second registration page and are entering height/weight in forms.

We collect weight and height in observations templates in the clinical module and not in the registration module. Our flow in Bahmni is that the clinical module takes us to patient queues. From there we can select a patient, then open the TB program dashboard (or enrol the patient in the TB program). We then enter weight data in an observation template.

Currently, the registration module is used only to enter new patients into the system.

Thanks for the confirmation Geoff. This is a missed usecase then. @gsluthra / @akhilmalhotra, looks like we need to fix this. What do you think? cc : @sruti

The rule should look for weight and height in the latest visit and should not be limited to a specific type of an encounter. Different hospitals may have different workflows and based on that they may capture height and weight at registration by the triage nurse or in the forms by the doctors. This problem should definitely be fixed. @siddhartha any specific reason it was built that way?

(Commenting without knowing the full context…)

For general usage (outside of endTB) I would expect that we should allow the rule to use any height that was ever recorded (even if it was captured years ago). I can see why we’d require weight to be captured in the current visit (or at least recently) to enable weight-based dosing.

To expand on Darius’s point: clinically, height and weight are durable patient status elements – I can rely on the most recently entered height and weight for a reasonably long period of time even if several encounters have passed without any new entries.

ideally, all heights (or weights) recorded on a patient should be accessible together, through an index or similar. That would let you use the latest height no matter how or where it was recorded, and also makes growth charts and weight charts much easier.

Jonathan

I cannot remember of any reason why we built that way, but, based on the discussions here, I think we should fix it. Edit: I thought it was me. :slight_smile:

Thanks all,

I agree that a weight observation on the same date, or very close to the date that the drugs are ordered seems like a reasonable requirement. This would be especially important for dosing of young children.

It would be great if the order set rules could use any weight recorded in the EMR that falls within a specified period, regardless of whether recorded at registration or in forms.

We have fixed this to pick up latest height and weight observations and it would be available in next release of Bahmni.

You can track this mingle card - https://bahmni.mingle.thoughtworks.com/projects/bahmni_emr/cards/3617

1 Like