How to relate patient to bed with API?

Hi everyone :slight_smile:

I am currently investigating whether or not it is possible to add a sales order to OpenERP once a patient is discharged. In order to create a valid invoice I need to know what kind of bed the patient stayed in, as they shall be charged differently.

There is actually an API endpoint to get all the beds:

openmrs/ws/rest/v1/bed

But they all have the same UUID, which is the same as the room UUID. From the patient api endpoint, I can only get as close as get the room ‘General Ward - Room 1’. But this room has no more child locations

So my question:

Is it possible to get a bed by patient?

Thanks in advance!

Moved to the bahmni category.