Patient Id display in Reference App

(Paul Chinn) #1

I have created a custom patient id comprising a 0 character string. Everything seems to be working fine except the id no longer shows in the top right of the patient related screens and instead is replaced by the text "Patient ID ". By memory the out of the box Reference App had a 6 character id. Could anyone suggest a small modification that would allow the new id to display as intended?

(Daniel Kayiwa) #2

Is this something you can easily reproduce at int-refapp.openmrs.org for us to have a look?

We have a qa-refapp server; let's use it for manual testing
(Paul Chinn) #3

I can try, but it will mean replacing the standard Patient Registration form with an Xform. Is this OK?

(Daniel Kayiwa) #4

I will look at it immediately and revert.

(Paul Chinn) #5

Daniel, I have st everything to use the x form for registration, but have not done much in the way of customization. I have created an id type like ours, have upload a pool of ids and set autogen on.

The id is generating OK but I have provoked an error where it also demands an OpenMRS ID. I have tried to turn off all the mandatory settings but must have missed something. Maybe you will be quicker.

Once a new patient is created then with this id you should see the problem.

(Daniel Kayiwa) #6

@mafrica i think you could have been affected by a server restart. Can you try turning off and check again? http://int02.openmrs.org/openmrs/admin/patients/patientIdentifierType.form?patientIdentifierTypeId=3

(Paul Chinn) #7

I had forgotten a setting. Now sorted. Take a look at patient Ivanka Trump

(Daniel Kayiwa) #8

Good. I was able to finally reproduce it. Let me investigate.

(Daniel Kayiwa) #9

@mafrica the identifier displayed there is the one whose type is pointed to by the setting named “emr.primaryIdentifierType”. So if you set the value of this setting to the uuid of the identfier type you are using, it should display as expected.

1 Like
(Paul Chinn) #10

Perfect. Thank you.

(Samuel Male) #11

If someone encounters this and he was not helped by the above, possibly your running emrapi 1.27.0 or later. See commit : https://github.com/openmrs/openmrs-module-emrapi/commit/9f1eb1fee481deb9ff34d883558c1171f0918f72#diff-0e8ec544c2dc4fee40711c8b5f5c8f29 .

The GP “emr.primaryIdentifierType” was converted/moved to a metadata mapping here. So you probably want to update the metadata_term_mapping of name = “emr.primaryIdentifierType” and set its metadata_uuid with uuid of your new identifierType. Hope that would help someone.

cc: @ruhanga, @mksd

2 Likes