Improve the way "bahmni.emrPrimaryIdentifierType" GP is set.

Description

As per Slack message:
https://bahmni.slack.com/archives/C03LWT96L/p1562064646029100

mksrom [12:50 PM]
@angshuonline @binduak I see there is so many changeSets in Bahmni Core Liquibase files that are creating/renaming/setting `emr.primaryIdentifierType` or `bahmni.primaryIdentifierType`.

In fact 6 change sets:
`bahmni-35` -> V1_61__CreatingGlobalPropertyForPatientIdentifierType.sql
`bahmni-clinical-201402201520` -> Add global property for emr primary identifier type
`bahmni-clinical-201402201530` -> set global property value for emr primary identifier type
`bahmni-clinical-201703071203` -> set global property value for bahmni primary identifier type
`bahmni-201703061748` -> update global property key 'emr.primaryIdentifierType' to 'bahmni.primaryIdentifierType'
`bahmni-setup-5` ->

Plus it is set in the config.xml file too.
```<globalProperty>
<property>bahmni.primaryIdentifierType</property>
<defaultValue></defaultValue>
<description>Primary identifier type for looking up patients</description>
</globalProperty>```
(with no default value)

It seems to me that, similar to the `emr.concept.diagnosisSetofSets` this is in fact implementation specific and should probably not be set via the Bahmni Core liquibase files at all.
If we really want to provide a default value though, I suggest we set it in the config.xml file.

This would allow implementers to set their own value to bahmni.emrPrimaryIdentifier configuration without having Bahmni Core overriding it, which could happen if Bahmni Core starts after it the module that sets the GPs.
This also brings the question of if Bahmni Core should set those metadata, which are going to be changed anyway, in its Liquibase files (Patient Identifier Types, some concepts...).

Status

Assignee

Unassigned

Reporter

Romain Buisson

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Components

Configure