Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning

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. 

...

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

Using appointment module:

If you are using appointment module in your implementation, then you should add a database migration to add two person attributes that are required by the appointment module to function correctly. They are 'Telephone Number' and 'Unknown patient'.

  1. Add a migration in the bahmni_config/openmrs/migrations folder.
  2. This migrations can be added directly to the liquibase.xml file or other based on your migrations folder structure.
  3. The migration should contain the following two changesets.

...

<changeSet id="IMPL-PERSON-ATTRIBUTE-TELEPHONE-NUMBER" author="Swathi, Jaswanth" context="rel0.76">
    <preConditions onFail="MARK_RAN">

Configuring sections in Registration page

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

...

Code Block
languagejs
titlePatient Information Configuration
		"patientInformation": {
                "additionalPatientInformation": {
                    "title": "Additional Patient Information",
                    "attributes": [
                        "distanceFromCenter",
                        "isUrban",
                       
<sqlCheck
 
expectedResult=
"
0">
cluster"
                
SELECT
 
COUNT(*)
 
FROM
 
person_attribute_type where name = 'Telephone Number';
 ],
           
</sqlCheck>
    
</preConditions>
    
<comment>Adding
 
Telephone
"order" 
Number
: 
person
1
attribute
 
type</comment>
    
<sql>
        
INSERT
 
INTO
 
person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('Telephone Number', 'Telephone Number', 'java.lang.String', '0', 1, now(), 0, 3, uuid());
    </sql>
</changeSet>
<changeSet id="IMPL-PERSON-ATTRIBUTE-UNKNOWN-PATIENT" author="Swathi, Jaswanth" context="rel0.76">
    <preConditions onFail="MARK_RAN">
 },
                "patientFinancialInformation": {
                    "translationKey": "REGISTRATION_FINANCIAL_INFO_KEY",
                    "shortcutKey": "REGISTRATION_FINANCIAL_ACCESS_KEY",
                    "attributes": ["familyIncome", "debt"],
                    "order" : 2,
					"expanded": true
                },
                "hidden": {
                    "attributes": [
                       
<sqlCheck expectedResult="0">
 "RationCard","cluster"
                    
SELECT COUNT(*) FROM person_attribute_type where name = 'Unknown patient';
]
                
</sqlCheck>
},
   
</preConditions>
    
<comment>Adding
 
Unknown
 
patient
 
person
 
attribute
 
type</comment>
    
<sql>
"defaults":  {
  				   
INSERT
 
INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('Unknown patient', 'Unknown Patient', 'java.lang.String', '0', 1, now(), 0, 3, uuid());
    </sql>
</changeSet>

 

Additional Patient Information

There are certain situations where you would need to fill in some patient attributes always, and some on a need basis. For that, the process is to add the PersonAttributes as mentioned in previous section. Then update the app.json file to include the attribute in "additionalPatientInformation" section as shown below. In this example, familyIncome was added in PatientAttributes and is configured to be shown as additional patient information.

"additionalPatientInformation" : [
{ "name":"familyIncome", "display":true }, /* display determines whether to show or hide */
{ "name":"rationCard", "display":true }
]

"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 


Code Block
languagejs
titleConfiguring 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).