Bed Management module - Patient Assignment (inPatient)

Hey everyone! I’m currently working on a proyect for a public Hospital here in my country. They’re currently working with pure OpenMRS without Bahmni itself, and that won’t change at all. I’m aware that there already exists a BedManagement Module (and it’s quite useful to be honest it has everything the hospital needs), so I was wondering if there’s a way to extend its functionality (another owa actually) so an actual Patient could be assigned to a bed. Pretty much something similar to what the Bahmni inPatient module does.

@gduchi, I’m glad you find the Bahmni inpatient functionality to be good, and it’s too bad that you can’t use it directly. :slight_smile:

The answer to your question is “yes, but it will involve someone copying/writing a bunch of code”.

I’m honestly not sure if it would be easier to write something from scratch just mimicking the exact UI of the Bahmni screens, or to copy/paste the relevant code from Bahmni into an OWA (which also involves copy/pasting any relevant supporting code, which is why it might be complicated).

Do you have access to developer resources to work on this?

Just curious, but which country?

1 Like

First, sorry for the late reply @darius

AND Yes! It’s pretty useful and quite efficient. We’re working on the phase1 of the project actually, its focused on the Emergency Area at the Hospital Leon Becerra (here in Guayaquil, Ecuador).

I understand it’s quite complicated, and well we’re just fine with it, most of it has been complicated so.

We have full access to it as well! But we need some guidance here, specially because the hospital is running out of resources, so the time’s critical now. How could this be accomplished?

I don’t fully understand.

Do you have developers, and they would need help understanding how to build/copy/adapt this feature? (In that case people in the OpenMRS community can give some guidance.)

Or do you have no developers, and are looking for someone else to do this? (In this situation I expect it will be tricky, unless you’re able to post something on the #implementing:job-board.)

Yes! We’re currently working on it, but I need guidance exactly on that, so we can successfully adapt this feature.

I forgot to point out: the bed management module that you link to is the back-end for the Bahmni inpatient functionality.

So, there are two possible approaches:

  1. Write code from scratch by reverse-engineering the way you want things to work from Bahmni’s current functionality. (The argument for doing things this way is that your team should be able to straightforwardly estimate the amount of work required, since they’d be replicating a known UI in new code.) I think it would be appropriate to put this in the bedmanagement module itself.

  2. Start to copy-paste code from Bahmni. (The argument for doing this is that it may require less work. But it also might be more work. I don’t know if anyone has actually copied a large part of Bahmni into non-Bahmni code before and I don’t know how much complexity would be involved.)

Alright! I get it. The problem with copy-pasting I think I would be that it may depend from other parts of Bahmni and that would be quite complicated as well, so basically the first approach would be the most plausible.

The only important thing we, our team, would like to know is how to link a patient to a bed, how to link their id, the patient id with the bed id. In the bed management module documentation there’s a GET request that’s supposedly returns the patient ID and bed ID, but there’s not a POST one. So if we could only know that we could accomplish what we need.

@gduchi feel free to expand here on how you would like to REST API to be changed. This would be the preliminary step toward a pull request with those changes.