Patient Attributes

THIS IS AN ARCHIVED PAGE, AND AVAILABLE FOR HISTORICAL REFERENCE. FOR LATEST PAGE ON CONFIGURING PATIENT ATTRIBUTES PLEASE SEE: Configure Person Attributes


The Registration module allows for a flexible configuration of patient attributes that will suit several implementations. The following types of fields to be captured for a patient. 

Core Fields

Core fields come out of the box with Bahmni. Current set of core data are Name, gender, age and address. Addresses can be configured to take from a dictionary using the Address Hierarchy configuration. 

Implementation Specific Fields

Fields that needs to be captured from the user can be configured using OpenMRS PersonAttributes functionality. If you need to add more attributes in an implementation, follow these steps. 

1. Navigate to "Manage Person Attributes Types" link in OpenMRS Administration page.
2. Add "New Person Attribute Type". The "format" of the attribute will define the type of GUI element to be shown on Bahmni's Registration Page. If the attribute type is string, a textbox will be shown. If it is of "org.openmrs.Concept" type, then a dropdown is displayed. The label on the UI is taken from the "Description" of the attribute.
3. Apart from this, the bahmni-config (implementation specific configuration folder) provides an additional level of customiz

ation. We can display/hide some of the GUI elements that are configured in PersonAttributes. The settings are available at bahmni-config/openmrs/apps/registration/app.json. The following are some of the configurations.
showMiddleName, showCasteSameAsLastNameCheckbox,localNameSearch
4. Also, for the patient name, the autoComplete feature can be configured in app.json using the configuration-

"autoCompleteFields":["familyName", "caste"]

Configuring sections in Registration page

We can have patient attributes distributed into sections in the patient registration page. The configuration looks like this:

Patient Information Configuration
		"patientInformation": {
                "additionalPatientInformation": {
                    "title": "Additional Patient Information",
                    "attributes": [
                        "distanceFromCenter",
                        "isUrban",
                        "cluster"
                    ],
                    "order" : 1
                },
                "patientFinancialInformation": {
                    "translationKey": "REGISTRATION_FINANCIAL_INFO_KEY",
                    "shortcutKey": "REGISTRATION_FINANCIAL_ACCESS_KEY",
                    "attributes": ["familyIncome", "debt"],
                    "order" : 2,
					"expanded": true
                },
                "hidden": {
                    "attributes": [
                        "RationCard","cluster"
                    ]
                },
                "defaults":  {
  				    "class" : "General",
    			    "caste" : "Thakur",
    			    "isUrban" : true
    			}
            }

There can be multiple sections like "additionalPatientInformation", "patientFinancialInformation", etc. Each section can have related patient attributes like - "familyIncome", "debt", etc; and title and/or translation key and a shortcut/access key.  "hidden" is a special section which contains the patient attributes that should not be shown. So "Other Information" will now contain:

"Other Information" attributes = Attributes that are not present in any of the sections minus attributes specified in the hidden section.

"defaults" - This section holds the default attributes to be populated in Registration Page for the Patient Attributes . Default datatypes can be applied to any type of Patient Attributes. For example:-concept, string, integer, boolean.

Configuring mandatory patient attributes

We can configure the patient attributes as mandatory by adding the following configuration under config in registration/app.json 


Configuring mandatory attributes
"mandatoryPersonAttributes": ["isUrban", "distanceFromCenter"]


Configuring Display Order of Sections in Registration

These sections in the patientInformation will be shown in the order of "order" value that is present in the configuration. If some of the sections have the order value and other sections do not have the order value then all the sections with order value will be shown, while default behavior for the remaining sections will function As-Is. If none of the sections have order value, then default behavior(that is alphabetical order) will be displayed.

Expand a section by default

The sections will be collapsed on the registration new patient page. If any of the sections needed to be expanded on opening the page, "expanded : true" should be specified in the section(see above config for example).


The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)