Invalid check digit for identifier while creating a new patient

Hi Every One,

I have overriden the existing Patient Registration form and render the Xform Patient Registration.[Reference].

When I create a new Patient I’m getting following error Error:

“Patient#null failed to validate with reason :Invalid check digit for identifier:10005G”.

I given following information for a new patient.

Family Name: Patient Given Name:One DOB:30/12/2000 Identifier :10005C Gender:M Location: Unknow Location Identifier Type:Old Identification Number Other Identifiers Identifier :10005G Identifier Type:OpenMrs ID Identifer Location:Unknow Location

Some one please help how to fix the issue.

If your identifier is using the LuhnMod30IdentifierValidator (like here), then I think you need to use K as the check digit. I checked using Node.js:

➜ npm install luhn-mod-n
➜ node -e "console.log(require('luhn-mod-n').generateCheckCharacter('10005', '0123456789ACDEFGHJKLMNPRTUVWXY'))"