How do I assign patient to a polyclinic

In the hospital there are few polyclinics such as Hand and Dental.

  1. Can I add polyclinics above in bahmni ? if yes how ?
  2. How do I assign a registered patient to a polyclinic ?

Any information on the above is very much appreciated.

Hi @abiieez, now in Bahmni we dont have exact feature as such. Can you explain us the workflow for our better understanding of the requirement that you have. But i see a way with which we can achieve something like this. May not be a perfect solution just my thought.

With this we can achieve, registering patient to a Polyclinic and people in Polyclinic can see the patient registered to that Polyclinic.

Your solution might work. I just need the information on how to

  1. Associate login location with visit type through entity mapping
  2. configure patient queue


There is a table “entity_mapping_type” with name loginlocation_visittype. Using the above mentioned entity_mapping_type_id, insert a row for required login location and visit type.

Follow the documentation

I have added several visit types and now they are shown during patient registration.

However I am not very clear on the patient queue. In your example I can see you are able to show list of patients under “Dental Polyclinic”

May I see how the query looks like that you use to filter the patient list by dental polyclinic ?


select distinct concat(pn.given_name," “, pn.family_name) as name, pi.identifier as identifier, concat(”",p.uuid) as uuid, concat("",v.uuid) as activeVisitUuid, IF(va.value_reference = “Admitted”, “true”, “false”) as hasBeenAdmitted from visit v join person_name pn on v.patient_id = pn.person_id and pn.voided = 0 and v.voided=0 join patient_identifier pi on v.patient_id = pi.patient_id and pi.voided=0 join patient_identifier_type pit on pi.identifier_type = pit.patient_identifier_type_id join global_property gp on“emr.primaryIdentifierType” and gp.property_value=pit.uuid join person p on p.person_id = v.patient_id and p.voided=0 join encounter en on en.visit_id = v.visit_id and en.voided=0 left outer join location loc on en.location_id = loc.location_id join encounter_provider ep on ep.encounter_id = en.encounter_id and ep.voided=0 join provider pr on ep.provider_id=pr.provider_id and pr.retired=0 join person per on pr.person_id=per.person_id and per.voided=0 left outer join visit_attribute va on va.visit_id = v.visit_id and va.attribute_type_id = ( select visit_attribute_type_id from visit_attribute_type where name=“Admission Status” ) where v.date_stopped is null and loc.uuid=${location_uuid} and v.visit_type_id = 12 order by en.encounter_datetime desc

I reuse the query to filter patient by location and modified it with visit_type = 12 (the ID of my polyclinic). I got it working this way. Thank you so much for the assistance.

1 Like