Unable to overridePrimary Patient Identifier

Tags: #<Tag:0x00007f88c97c0f20> #<Tag:0x00007f88c97c0d90> #<Tag:0x00007f88c97c0c00>

(Nicolas Piaget) #1

I have trouble to set up another Patient Identifier Type using OpenMRS 2.1.3 with the ref app 2.8.0. I get a validation error when I want to confirm the new patient:

Here are the steps that I did:

  1. Create a new Patient Identifier Type (ELWA ID) with the required option
  2. Remove the required option from OpenMRS ID
  3. Create a generator for the ELWA ID(Local Pool of Identifiers) and uploaded 8 ID.
  4. Change metadata_uuid in the table metadatamapping_metadata_term_mapping for the emr.primaryIdentifierType code

Am I missing any step?

Thanks for your help

(Daniel Kayiwa) #2

After restarting OpenMRS, does the emr.primaryIdentifierType property maintain the new value that you set? Or does it revert to the old one?

(Nicolas Piaget) #3

It revert to the old one.

(Daniel Kayiwa) #4

Before restarting, and hence reverting, does it work well?

(Nicolas Piaget) #5

No, it does not work, both before and after.

Sorry, I was not too clear.

(Daniel Kayiwa) #6

Are you able to successfully register the patient using your equivalent of this page? http://localhost:8080/openmrs/findPatient.htm

(Nicolas Piaget) #7

Yes, but I have to manually select the ID and check the generate option. But maybe it is the correct behaviour ? Thanks Daniel for your help.

(Daniel Kayiwa) #8

The reference application overwrites your values on restart. Can you instead use the default OpenMRS ID identifier type? Just edit it to have the attributes that you would want for your identifier type. The other alternative is, create a ticket to prevent the overwriting of the custom value for emr.primaryIdentifierType.

(Nicolas Piaget) #9

OK thanks for the idea. I will try it on Monday.

(Nicolas Piaget) #10

Hi Daniel,

Following your advice I changed the OpenMRS ID to fit my needs. But I’m now getting the following error: “Validation errors found: Select a preferred identifier”.

I’m able to create a patient using the findPatient.htm form.

I have empty the following table in mysql: idgen_auto_generation_option, idgen_seq_id_gen, idgen_identifier_source, because I needed to change the source from Local Identifier Generator to Local Pool of identifiers. I removed as well the Identifier validator and change the name of the OpenMRS ID.

Does any of this step could affect the validation in the registration app?