Display secondary identifiers across the app (and in particular on the clinical patients and dashboard screens)

I have looked in clinical/app.json and dashboard.json, but am not sure of the exact name of the manually entered patientidentifierattribute (“Legacy ID” in our config) we should use, or where to put it.

1 Like

Hi @ouiliam, What do you mean by a Legacy ID - The patient Identifier or some other secondary identifier?

A secondary identifier, we’d like to make it our preferred identifier too, could only find documentation https://bahmni.atlassian.net/wiki/spaces/BAH/pages/114227194/Patient+Context+Display+Control on where/how to enter it in the following clinical config:

apps.json:

      "personAttributes": [
      ],
      "additionalPatientIdentifiers": [
      ],
      "preferredIdentifier": "Id_Number"

dashboard.json

            "patientInformation":{
            "type":"patientInformation",
            "patientAttributes":[
       
            ],
            "addressFields":[
                "cityVillage",
                "countyDistrict",
                "stateProvince"
            ]
        },

“Legacy ID” is the name of the Patient Identifier Type we want to use:

image

after trying many combinations, i could get the secondary identifier to display in dashboard (MK1233) by changing app.json only (additionalPatientIdentifiers entry):

image

but the clinical patients screen still only shows openmrs ID :frowning:

    "patientContext": {
      "programAttributes": [

      ],
      "personAttributes": [
      ],
      "additionalPatientIdentifiers": [
        "impl.legacyId"
      ],
      "preferredIdentifier": 
  },

image

1 Like

not sure if i also need to do this https://wiki.openmrs.org/display/docs/Registration+App+Configuration#RegistrationAppConfiguration-CollectingAdditionalPatientIdentifiersintheRegistrationApp

Hi @ouiliam, We always show primary identifier in the patient queues. You can either

  • Change bahmni.primaryIdentifierType global property pointing to secondary identifier. That will show your impl.legacyId in patient queues instead of patient identifier.
  • Show the list view instead of tiles view in clinical queue as mentioned in end-tb demo (credentials: superman/Admin123) . This will show both the identifier values. Hope this helps.
2 Likes

Thank you very much for your suggestions @binduak, I am using the list view option (in extension.json just add “view”:“tabular”, to relevant section https://bahmni.atlassian.net/wiki/spaces/BAH/pages/32014629/Configure+Patient+Lists+Queues) but am unsure how to change the SQL query to return the secondary identifier (Legacy ID) as well as the primary one (patient_identifier.identifier) for the list columns, the demo you provided does not seem to do this? image

emrapi.sqlSearch.activePatients from OpenMRS administration --> advanced settings

select distinct
      concat(pn.given_name,' ', ifnull(pn.family_name,'')) as name,
      pi.identifier as identifier,
      concat("",p.uuid) as uuid,
      concat("",v.uuid) as activeVisitUuid,
      IF(va.value_reference = "Admitted", "true", "false") as hasBeenAdmitted
    from visit v
    join person_name pn on v.patient_id = pn.person_id and pn.voided = 0
    join patient_identifier pi on v.patient_id = pi.patient_id
    join patient_identifier_type pit on pi.identifier_type = pit.patient_identifier_type_id
    join global_property gp on gp.property="bahmni.primaryIdentifierType" and gp.property_value=pit.uuid
    join person p on p.person_id = v.patient_id
    join location l on l.uuid = ${visit_location_uuid} and v.location_id = l.location_id
    left outer join visit_attribute va on va.visit_id = v.visit_id and va.attribute_type_id = (
      select visit_attribute_type_id from visit_attribute_type where name="Admission Status"
    ) and va.voided = 0
    where v.date_stopped is null AND v.voided = 0