Bahmni supports searching of registered patients based on configurable criteria. This could range from amongst the name of the patient (including local names), addresses, phone numbers or other IDs that the patient may have.
Bahmni also gives implementers the freedom to separately configure the search display attributes, which can be person attributes and address attributes. These are in addition to the attributes which are displayed OOTB in Bahmni such as Patient ID, Name, Gender, Village, etc. Program attribute if configured for patient search will be displayed by default in the search results. Note that display of program attributes is non-configurable for now, i.e. if they are configured to be searched by, they will be displayed by default in the display section.
Steps to Configure Patient Search Attributes
Registration search appears in the registration module as shown below :
The criteria with which a registered patient can be searched is configured as per the implementation. The configurations are maintained in json files. Bahmni allows configuring search by:
Address fields
Custom patient attributes like local name, caste, etc
Program attributes such as program registration ID, registration facility, etc.
NOTE: Patient search by Patient attributes of format "org.openmrs.Concept" is not supported right now.
Key Fields
Field
Description
Address
Defines the block to configure the address search details
Field
Description
label
The label to be displayed on the patient search page
placeholder
The label to be displayed inside the search text box
field
The patient address table field upon which the search will be performed
Custom Patient Attributes
Defines the block to configure the patient's custom attributes search
Field
Description
label
The label to be displayed on the patient search page
placeholder
The label to be displayed inside the search text box
fields
List of fields upon which the search will be performed
If the fields is a falsy value, customAttributes search will be disabled.
Program Attributes
Defines the block to configure the patient's program attributes search
Field
Description
label
The label to be displayed on the patient search page
placeholder
The label to be displayed inside the search text box
field
Field upon which the search will be performed, should be one among several program attribute types
Patient Identifier
If this field is not configured, then by default Patient ID search box will be shown on the page. If it is configured
Value
Description
true
Patient ID search text box shown on the page, default behavior
false
Patient ID search text box not shown on the page
Steps to Configure Search Display Attributes
To configure patient search results parameters, add the following to app.json's config section.If we provide this config patient search results will now show only the fields under "patientSearchResults" section and not the patient search config. If "patientSearchResults" is not given, patient search results will show the fields configured under "patientSearch" section.
Defines the block to configure the address fields for patient search results.
Value
Description
fields
The patient address table fields to be displayed in patient search results.
Field
Description
personAttributes
Defines the block to configure custom attributes for patient search results.
Value
Description
fields
Patient Attributes to be displayed in patient search results.
Patient results will display at most 10 fields and the number of configurable fields is 4 since we have 5 fixed fields and 1 program attribute. If we configure more than 4 fields, first 4 fields in the configured order will be displayed. In the above case all the address fields and one person attribute will be displayed.
Please note that if the Program Attribute is not configured to be searched by, it will not be displayed in the search results and we will have 5 configurable fields for the display section of the page.