Customise display order of First name, Last name and Middle name in Patient registration in EMR

Description

As per Bahmni default config First Name is mandatory, where as hide/show options exists for middleName and lastName

For reordering option that we are creating for Patient Name (FirstName, MiddleName and LastName) using array ,

"nameFieldsOrder": ["firstName", "lastName", "middleName"]
This array should always contain all the three fields (FirstName, MiddleName and LastName) in the order which they should appear and we will still use existing hide/show options of config for middleName and lastName

The array that we are creating will have below features

Should always contain all the three fields FirstName, Middle Name and LastName in desired order For instance, if user wants only FirstName and LastName to be displayed, array will look
"nameFieldsOrder": ["firstName", "lastName", "middleName"]
and existing setting “showMiddleName” needs to be set to false.

2 . If the array is not declared properly, it will fall back to default order of display which is (FirstName, MiddleName and LastName) For instance, if array is declared with only 2 values

"nameFieldsOrder": ["firstName", "lastName"]
then settings will fall back to default value which is (FirstName, Middle Name and LastName) always.

If array is declared with some inappropriate values like

"nameFieldsOrder": ["firstName", "abcd", "middleName"],
even in this case, then settings will fall back to default value which is (FirstName, Middle Name and LastName) always.

Backword Compatability: If array is NOT defined in config, even in this case, settings will fall back to default value which is (FirstName, Middle Name and LastName) always.

Please let me know your thoughts on this and is the approach fine ?

Activity

Show:
Neha Jain
June 9, 2020, 4:44 AM
Edited

Updated “nameFieldsOrder” to “patientNameDisplayOrder”

Neha Jain
June 10, 2020, 10:43 AM

PR link:

Neha Jain
June 10, 2020, 11:07 AM

Need to update documentation for this.

Neha Jain
June 12, 2020, 6:51 AM

Added documentation content in below card

Assignee

Neha Jain

Reporter

Buvaneswari Arun

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Components

Sprint

0.93 Product M2

Fix versions