Set Bhamni to accept accents

I was trying to register and I noticed a bug that occurs in the Spanish language and that accents are not accepted.

This is equivilant to the Patient Name of the Demo

At first I thought it was the Db, but check and I can create concepts with accents so discard that option.

This error can come in the BackEnd (openmrs-core or bhamni-core) when parsing the string with accents, but I’m not sure how I could fix it.

Someone has some idea of what he could do either through configuration or code cc: @mksd @darius

@rafanetow could you remind me what changes you have already made to the configuration (because I can’t test this on the demo as-configured).

I thought this was working for you earlier. Did it work before and then break? Or has it never worked?

Hi @darius sure, Register works, while no name has an accent

I deleted this tag pattern in the Html, so that I could accept names with accents and I made a Regular Expression in the default-config to handle the errors. image

I was able to recover the error in the demo by deleting the tag pattern and trying to save a name with an accent Martín

@rafanetow you should not be editing the tags in the HTML.

In order to support accented names (or spaces, like in “Maria Jose”), you need to change two places: (1) the registration’s app.json file in your implementation config, and (2) the patient.nameValidationRegex advanced setting in OpenMRS.

This is documented on the wiki at: https://bahmni.atlassian.net/wiki/spaces/BAH/pages/32014595/Configure+Patient+Registration#ConfigurePatientRegistration-2.ConfigurationtoEnterPatientNameFieldsinMulti-language

You can also see the solution in this talk thread: Configuring Bahmni to allow for spaces in patient names

1 Like

Ok, thank you very much! I changed the patient.nameValidationRegex setting in OpenMRS to validate spanish accents and that worked :slight_smile: