Bugs with creating patient identifier number

I have seen various problems with generating and assigning ID numbers from the registration page. Problems with my local system and also the Bahmni demo system:

  • After adding a patient (patient x) with “enter ID” selected (WBA100009), the next patient with an auto-generated sequential number is wrong (WBA211121). Obviously this is not next in the sequence. It was 100008. I expected to see that the next one should be sequential after the last auto-generated unless it was already entered manually.
  • On the demo system, after I created a patient with “enter ID”, I am unable to save another patient with an autogenerated id.
  • The warning message isn’t correct when you enter a WBA ID. “You entered an ID which is ahead of the sequence”" Even when there is no gap in the sequence or a lower number than the sequence, it says the wrong thing in the popup. This is less serious.

Thanks,

Ellen Ball Partners In Health

Hello,

Auto generation of Id’s in registration page works this way. It picks up the largest sequence from manual Id and auto generated Id.

Scenario 1 : If the manually entered Id is lesser than the auto generated sequence, then the next auto generated Id will follow the auto generated Id. Example : For suppose last auto generated Id is “200070” and after this there was a patient created with manual Id “100070”. Now if a patient is created with auto generated Id, the Id would be “200071

Scenario 2: If the manually entered Id is greater than the auto generated Id, then the next sequence will follow the manual Id. Example: Lets say the last auto generated Id is “200070” and after this a patient was created with Id manually entered as “300070”. Now if a patient is created with auto generated Id, the Id would be “300071

This should not happen. We will recheck and get back to you.

There is a limit for total length of identifier. Since the manually entered Id is “GAN23691535”, as explained earlier the next auto generated ID will be “23691536”. Thus this exceeded the maximum length configured, it is restricting to save the patient.

Right now in demo environment it is set to ‘9’ characters. You can change the limit from Openmrs UI and steps are as shown below.

  1. Go to Administration → Manage Patient Identifier Sources → Click on configure

You will see the below screen where you can change the maximum and minimum length of identifier

Thanks for the explanation, but there is still a problem with generating and entering IDs.

This is the problematic sequence:

  1. Create new patient with auto-generated ID (creates WBA100002) good
  2. Create new patient with entered ID (WBA100003) good
  3. Create new patient with auto-generated ID (creates patient and assigns ID = WBA21115)

The last ID seems completely random. Let me know if you want screen-shots. I would have created this sequence on the Bahmni demo server, but it won’t allow creation/save of new patients (Error: Server Error : There was an unexpected issue on the server. Please try again).

Regards,

Ellen

Hello,

Demo Environment now works fine…

Thanks