Entered numeric patient identifier is too large

Hi all. I would like to add a new Patient Identifier Source of the type National ID that has 13 characters (all numbers). After successful creation of the Identifier source, upon registering a new patient and entering the National ID (ex: 1860125492671) i get this error: Entered numeric patient identifier is too large. Is there any way of solving this?

(full disclosure: really new to OpenMRS, still reading online documentation, not a developer and actually using Bahmni)

Thank you!

@margineanm i have just moved this to the Bahmni category where it can be seen by this team.

1 Like

@margineanm Got exactly the same error, did you fixed? Thanks!

cc. @darius

Hi @cristian,

Can you reproduce this on the demo? I couldn’t.

Those validations are defined through the patient identifier type, and there is no imposed format for the ‘National ID’ type.

Hi @mksd,

It can’t be reproduced on the Demo, let me explain you How I did it in my local bahmni-vagrant repo:

Based on this guides

  • https://bahmni.atlassian.net/wiki/spaces/BAH/pages/2850849/Patient+Identifier

  • https://www.youtube.com/watch?v=zfFAwvoq3rs&t=279s starting at min 4.45

  • Went back to Bahmni/Registration module and when I wanted to Enter the next ID using the field Patient Identifier (Not National ID, in my case) 1804198502986 it show the error message Entered numeric patient identifier is too large, it only Saved when I entered 10 numbers like 1804198502 and the final result was ID1804198502 based on my Prefix (ID + Number)

  • Then I was thinking, what if I need to update the Identifier field structure in some Patient table inside openmrs MySQL database?. So for that I when trough the list of tables that comes out of the box from bahmni-vagrant and saw that the Patient Identifier that I Saved before (ID1804198502) was created on the table called patient_identifier inside the identifier field and it result that it is a Varchar(50), see the image: https://imgur.com/bLrTP1H

Other Tests: https://imgur.com/CvzKR9f Updated next_sequence_value, min_length, max_lentgh

Thanks for your help!

Hi @cristian,

Are there any reasons why you would not rather retire that patient identifier type and configure a new one fulfilling your exact needs instead? And then configure the use of that one in your Bahmni config of course.

I cannot say that I like those SQL intrusive tips provided on Bahmni wiki, I wonder if they have been outlined under the assumption that the OpenMRS database already contains patients saved with identifiers of that type.