Registration Page

Registration Page

 

Purpose and Benefits : Go to Patient Registration module page on the Feature Guide to know more

Registration Screen

The Registration Screen in Bahmni (when you choose to create a new patient), contains 2 sub-pages: 

  • Registration Page: This is where you mention patient name, gender, DOB, attributes, etc. 

  • Visit Details Page: This is visit specific information (like height, weight, and other concepts). 


The configuration of this page is controlled by the app.json file in <implementation-config>/openmrs/apps/registration



Registration Page Field Validation Configurations

Middle Name Field: The middle name field is shown/not depending on the following flag in app.json: showMiddleName




Registration Page Custom Field Validation Configurations

 You can have custom validators written in javascript for registration screen. For achieving this, you need to do the following.

  • Add a file called fieldValidation.js and put it under openmrs/apps/registration/ folder.

  • Add the functions required to validate the field.


The format of the validator should be  

customValidator = { "<field id>" : { method: function (name, value, attributeDetails) { if (.......) { return true; } return false; }, errorMessage: "Error Message" } };



The fieldName details can be obtained from the openmrs administration module (Patient Attributes). This validators will work for non-attributes as well. For non attributes, you will need to get the field names using some html debuggers.

Registration Page Patient Name Related Custom Field Validation Configurations

If the format of the patient names need to be changed, the global property patient.nameValidationRegex needs to be updated. This field is used in server side validations by openmrs.

NOTE:
  Error message is displayed only when return is false.
  The specified field should be of non coded value type.
  If the field is not a patient attribute, the attributeDetails will not be given.
  The attribute details can contain,

property

description

property

description

description

a description

format

java class of the attribute

name

name of the attribute

uuid

uuid of the attribute

Example:

  1. description"मरीज़ का उपनाम"

  2. format"java.lang.String"

  3. name"familyNameLocal"

  4. requiredfalse

  5. uuid"b4f44ade-c79a-11e2-b284-107d46e7b2c5"

 

Pre-fill Address details based on login location

To use this functionality location needs to be configured as a login location in openmrs. The configuration needed in registration/app.json is 

    "config": {

             "prepopulateFields" : ["Division", "Zilla", "Upazilla"]

         }

}

The fields specified in the configuration need to be the address fields labels as seen on the registration page. This data will only be pre-filled when new patients are being created.


Visit Details Configuration (Registration 2nd Page)

This page can help to capture additional details relevant to the visit. To capture data on this page, you have to first define what values you want. 

To do this, you may create a concept set with member concepts in OpenMRS concept dictionary and do necessary setup in "registration/extension.json" configuration file.

For example, assuming you want to capture details relevant to "Weight", "Height", "Registration Fees", "Comments" in this page, create a concept set (named as "Registration Concepts") with the specified concepts as members.  Then in "registration/extension.json", configure an extension point like below. The "extensionPointId" must be as mentioned below. 



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