Encounter Matching
Visit is selected by the visitUuid sent in the EncounterTransaction. Within the visit, the encounter is filtered based on the following logic for regular encounters, retrospective encounter, on behalf of encounters and encounter edits. , in that order
Regular Consultation & Retrospective Consultation
- by encounterUuid if sent by the client.
- by encounterType
- by sessionTime (for retrospective entry, the client should send the date as 12:00)
- by provider if provider or on behalf of provider
- by user if not a provider
Visit Document
- by encounterType
- by provider
Encounter Type Matching
Regular Consultation Encounter & Retrospective Consultation Encounter
Encounter type to be used for finding an encounter or creating a new encounter for regular consultation or retrospective consultation is based on either of the following logic in the given order,
by location uuid - mapping present in entity_mapping table with entity_mapping_type as 'location_encountertype' (OR)
- Location encounter type mapping can be inserted using the following query:
location_encountertypeinsert into entity_mapping(uuid, entity_mapping_type_id, entity1_uuid, entity2_uuid, date_created) values (uuid(), <mapping_id_of_location_encountertype>, <uuid_of_location>, <uuid_of_encounter_type>, now())
- by default encounter type provided in global property ( bahmni.encounterType.default).
Program Consultation Encounter
Encounter type to be used for finding an encounter or creating a new encounter for program consultation is based on either of the following logic in the given order,
- by programUuid - mapping present in entity_mapping table with entity_mapping_type as 'program_encountertype' (OR)
- by default encounter type provided in global property ( bahmni.encounterType.default).
For other encounters, following encounter types are picked irrespective of location:
- Registration Encounter - 'REG'
- Radiology Upload Encounter - 'RADIOLOGY'
- Patient Document Encounter - 'Patient Document'
- Admission Encounter - 'ADMISSION'
- Discharge Encounter - 'DISCHARGE'
- Transfer Encounter - 'TRANSFER'
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)