error add pacient in spanish

hello i have the following error at the moment of add a patient(with spanish language)

I moved this topic to the #software:bahmni category, so that the right people see it. (@patsotoe, can you give some more details about what version of Bahmni you are running?)

Hi Patricio,

Can you right click on the webpage->inspect->Console tab-> and copy the error from there. The current screenshot doesn’t give much details about the error.

Im running bahmni 0.84

https://50.116.56.150/implementation_config/openmrs/apps/clinical/formConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) https://50.116.56.150/bahmni_config/openmrs/apps/registration/attributesConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) https://50.116.56.150/implementation_config/openmrs/apps/registration/attributesConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) https://50.116.56.150/implementation_config/openmrs/apps/clinical/formConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) https://50.116.56.150/bahmni_config/openmrs/apps/registration/attributesConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) https://50.116.56.150/implementation_config/openmrs/apps/registration/attributesConditions.jsFailed to load resource: the server responded with a status of 404 (Not Found) 66angular.min.9324788c.js:2:6268Error: [$parse:syntax] http://errors.angularjs.org/1.4.9/$parse/syntax?p0=de&p1=is[object Object]n%6unexpected%6token&p2=6&p3=tipo%6de%6visita&p4=de%6visita https://50.116.56.150/bahmni/components/angular/angular.min.9324788c.js:1:421

Hello @patsotoe

Do you have any changes to your config ? Please paste the contents of filedValidation ‚Äú/var/www/bahmni_config/openmrs/apps/registration/app.json‚ÄĚ

i delete some fields in person attributes and address from open mrs. But in English open mrs works well the Problem is when use the Spanish Language

{ ‚Äúid‚ÄĚ: ‚Äúbahmni.registration‚ÄĚ, ‚ÄúinstanceOf‚ÄĚ:‚Äúbahmni.template.registration‚ÄĚ, ‚Äúdescription‚ÄĚ: ‚ÄúBahmni Patient Registration App‚ÄĚ, ‚ÄúextensionPoints‚ÄĚ: [

{ ‚Äúid‚ÄĚ: ‚Äúorg.bahmni.registration.patient.search.result.action‚ÄĚ, ‚Äúdescription‚ÄĚ: ‚ÄúBahmni Patient Search Result Action‚ÄĚ }, { ‚Äúid‚ÄĚ: ‚Äúorg.bahmni.registration.patient.next‚ÄĚ, ‚Äúdescription‚ÄĚ: ‚ÄúAfter Bahmni Patient Registration, forward url configuration‚ÄĚ } ], ‚ÄúcontextModel‚ÄĚ: [ ‚ÄúpatientUuid‚ÄĚ, ‚ÄúactiveVisitUuid‚ÄĚ ], ‚Äúconfig‚ÄĚ : { ‚ÄúpatientInformation‚ÄĚ: { ‚ÄúadditionalPatientInformation‚ÄĚ: { ‚Äútitle‚ÄĚ: ‚ÄúAdditional Patient Information‚ÄĚ, ‚Äúattributes‚ÄĚ: [ ‚ÄúdistanceFromCenter‚ÄĚ, ‚ÄúisUrban‚ÄĚ, ‚Äúcluster‚ÄĚ, ‚ÄúRationCard‚ÄĚ, ‚ÄúfamilyIncome‚ÄĚ, ‚Äúdebt‚ÄĚ, ‚Äúcluster‚ÄĚ ] }, ‚Äúhidden‚ÄĚ: { ‚Äúattributes‚ÄĚ: [ ‚ÄúprimaryContact‚ÄĚ ] }, ‚Äúdefaults‚ÄĚ: { ‚Äúclass‚ÄĚ: ‚ÄúGeneral‚ÄĚ, ‚ÄúlandHolding‚ÄĚ: 2 } }, ‚ÄúaddressHierarchy‚ÄĚ: { ‚ÄúshowAddressFieldsTopDown‚ÄĚ: false, ‚ÄústrictAutocompleteFromLevel‚ÄĚ: ‚ÄústateProvince‚ÄĚ }, ‚ÄúrelationshipTypeMap‚ÄĚ: { ‚ÄúDoctor‚ÄĚ:‚Äúprovider‚ÄĚ, ‚ÄúParent‚ÄĚ:‚Äúpatient‚ÄĚ },

        "autoCompleteFields":["familyName", "caste"],
        "defaultIdentifierPrefix": "GAN",
        "defaultVisitType": "OPD",
        "searchByIdForwardUrl": "/patient/{{patientUuid}}",
        "showMiddleName": true,
        "showBirthTime": true,
        "showCasteSameAsLastNameCheckbox": false,
        "printOptions": [
            {
                "translationKey": "REGISTRATION_PRINT_REG_CARD_LOCAL_KEY",
                "templateUrl": "/bahmni_config/openmrs/apps/registration/registrationCardLayout/print_local.html",
                "shortcutKey": "l"
            },
            {
                "translationKey": "REGISTRATION_PRINT_REG_CARD_KEY",
                "templateUrl": "/bahmni_config/openmrs/apps/registration/registrationCardLayout/print.html",
                "shortcutKey": "p"
            },
            {
                "translationKey": "REGISTRATION_PRINT_SUPPLEMENTAL_PAPER",
                "templateUrl": "/bahmni_config/openmrs/apps/registration/supplementalPaperLayout/print.html",
                "shortcutKey": "r"
            }
        ],
        "conceptSetUI": {
            "REGISTRATION FEES": {
                "required": true,
                "label": "Fee"
            },
            "FHS": {
                "buttonSelect": true
            },
            "defaults":{
                "FHS": "Present"
            }
        },
        "fieldValidation" : {
            "primaryContact" : {"pattern" : "[0-9]{8,10}", "errorMessage" : "Should be 12 characters starting with 91 (country code)"},
            "landHolding" : {"pattern" : "[0-9]{0,3}", "errorMessage" : "Should be between 1 to 999 acres"},
            "familyName" : {"pattern" : "[a-zA-Z]{0,}", "errorMessage" : "Should contain characters"},
            "givenName" : {"pattern" : "[a-zA-Z]{0,}", "errorMessage" : "Should contain characters"},
            "middleName" : {"pattern" : "[a-zA-Z]{0,}", "errorMessage" : "Should contain characters"},
            "address1" : {"pattern" : "[a-zA-Z0-9]{3}", "errorMessage" : "Should contain 3 characters"}
        },
        "patientSearch": {
            "address": {
                "label": "Rural Ward",
                "placeholder": "Enter ward",
                "field": "address2"
            },
            "customAttributes": {
                "label": "ŗ§įŗ•Āŗ§óŗ•ćŗ§£ŗ§ĺŗ§öŗ•á ŗ§®ŗ§ĺŗ§Ķ",
                "placeholder": "ŗ§įŗ•Āŗ§óŗ•ćŗ§£ŗ§ĺŗ§öŗ•á ŗ§®ŗ§ĺŗ§Ķ",
                "fields": ["givenNameLocal", "middleNameLocal", "familyNameLocal"]
            }
        }
    }

}

Hi Patricio,

Looks like the new Spanish translations added in the locale_es.json in config is having a syntax issue. Can you please check what translation is added for ‚ÄúREGISTRATION_START_VISIT‚ÄĚ. Can you attach your locale_es.json

I think its about the patient name validation.

This should be changed to accept the spanish charaters also.

Please refer http://www.rexegg.com/regex-interesting-character-classes.html

@sravanthi17, FYI, we discussed what should be our default regexs for patient names for the underlying OpenMRS platform, and we decided that out of the box we should not do any validation, but leave this for implementations to restrict if they feel it’s required for their use case.

I think we should do the same for Bahmni (i.e. the default config should not be limiting in this way). What do you think?

Conversation thread here:

I agree with you that we should not provide any validations… But, as part of installation packaged with some default config (usually default-config ) and database… some of these validations are by default available.

@sravanthi17, I’m suggesting that we should change default-config so that it does not validate the name fields.

@darius default_config is used for demo purpose… that is why it has all possible configurations included… I would suggest we should provide minimum configuration zip (required for bahmni to run), this can be used during installation as mentioned in step-3 How to start with a fresh / clean database for Bahmni? what do think ?

thanks for your help, i edit the Field validation but still having same Problem

"fieldValidation" : {
            "primaryContact" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}" , "errorMessage" : "Should be 12 characters starting with 91 (country code)"},
            "landHolding" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}" , "errorMessage" : "Should be between 1 to 999 acres"},
            "familyName" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}", "errorMessage" : "Should contain characters"},
            "givenName" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}", "errorMessage" : "Should contain characters"},
            "middleName" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}", "errorMessage" : "Should contain characters"},
            "address1" : {"pattern" : "(?i)(?:(?![√ó√ě√ü√∑√ĺ√ł])[a-zA-Z√°√©√≠√Ī√≥√ļ√ľ√Ā√Č√ć√Ď√ď√ö√ú]){0,}", "errorMessage" : "Should contain 3 characters"}
        },

herir is the translation:

{ ‚ÄúREGISTRATION_TITLE_KEY‚ÄĚ: ‚ÄúRegistro de Pacientes‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SCANNED‚ÄĚ: ‚ÄúEscaneada‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PAPER‚ÄĚ: ‚ÄúPapel‚ÄĚ, ‚ÄúREGISTRATION_LABEL_REGISTRATION_DATE‚ÄĚ: ‚ÄúFecha de Registro‚ÄĚ, ‚ÄúREGISTRATION_LABEL_LOGOUT‚ÄĚ: ‚ÄúCerrar sesi√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SYNC‚ÄĚ: ‚ÄúSincronizar‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NEW_PATIENT‚ÄĚ: ‚ÄúNUEVO PACIENTE‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_IDENTIFIER‚ÄĚ: ‚ÄúIdentificador del paciente‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ENTER_ID‚ÄĚ: ‚ÄúIntroduzca la ID‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NO_PRINT_LAYOUT‚ÄĚ: ‚ÄúNo se encontr√≥ dise√Īo de impresi√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_FEATURE_NOT_IMPLEMENTED‚ÄĚ: ‚ÄúLa funci√≥n que est√° pidiendo a√ļn no est√° implementado .‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_NAME‚ÄĚ: ‚ÄúNombre del paciente‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_FIRSTNAME‚ÄĚ: ‚ÄúNombre‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_MIDDLE_NAME‚ÄĚ: ‚ÄúSegundo nombre‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_LAST_NAME‚ÄĚ: ‚ÄúApellido‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_ENTER_NAME‚ÄĚ: ‚ÄúIntroduzca el nombre del paciente.‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_ENTER_MIDDLE_NAME‚ÄĚ: ‚ÄúIngrese el medio nombre del paciente.‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_ENTER_LAST_NAME‚ÄĚ: ‚ÄúIngrese el apellido del paciente.‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_ENTER_REGISTRATION‚ÄĚ: ‚ÄúIntroduzca n√ļmero de registro de pacientes‚ÄĚ, ‚ÄúREGISTRATION_LABEL_CASTE_SAME_LAST_NAME‚ÄĚ: ‚ÄúCasta igual que el apellido‚ÄĚ, ‚ÄúREGISTRATION_LABEL_GENDER‚ÄĚ: ‚ÄúG√©nero‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SELECT_GENDER‚ÄĚ: ‚ÄúSeleccione g√©nero‚ÄĚ, ‚ÄúREGISTRATION_LABEL_AGE‚ÄĚ: ‚ÄúEdad‚ÄĚ, ‚ÄúOBS_UNKNOWN_TRANSLATE_KEY‚ÄĚ: "Desconocido ", ‚ÄúREGISTRATION_LABEL_CITY‚ÄĚ: ‚ÄúPueblo‚ÄĚ, ‚ÄúREGISTRATION_LABEL_YEARS‚ÄĚ: ‚ÄúA√Īos‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NUMERIC_YEARS‚ÄĚ: ‚ÄúA√Īos deben ser un n√ļmero‚ÄĚ, ‚ÄúREGISTRATION_LABEL_MONTHS‚ÄĚ: ‚ÄúMeses‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NUMERIC_MONTHS‚ÄĚ: ‚ÄúMeses deben estar 0-12‚ÄĚ, ‚ÄúREGISTRATION_LABEL_DAYS‚ÄĚ: ‚ÄúD√≠as‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NUMERIC_DAYS‚ÄĚ: ‚ÄúD√≠as deben estar 0-31‚ÄĚ, ‚ÄúREGISTRATION_LABEL_DOB‚ÄĚ: ‚ÄúFecha de nacimiento‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ESTIMATE‚ÄĚ: ‚ÄúEstimado‚ÄĚ, ‚ÄúREGISTRATION_LABEL_BIRTH_TIME‚ÄĚ: ‚ÄúTiempo de nacimiento‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ADDRESS_INFO‚ÄĚ: ‚ÄúInformaci√≥n de direcci√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_OTHER_INFO‚ÄĚ: ‚ÄúOtra informaci√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_DEATH_INFO‚ÄĚ: ‚ÄúInformaci√≥n de Muerte‚ÄĚ, ‚ÄúREGISTRATION_LABEL_REASON_FOR_DEATH‚ÄĚ: ‚ÄúRaz√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_CHOOSE_VALUE‚ÄĚ: ‚ÄúEscoger valor‚ÄĚ, ‚ÄúREGISTRATION_LABEL_IS_DEAD‚ÄĚ: ‚ÄúEst√° muerto‚ÄĚ, ‚ÄúREGISTRATION_LABEL_DATE_DEATH‚ÄĚ: ‚ÄúFecha de muerte‚ÄĚ, ‚ÄúREGISTRATION_LABEL_TILL‚ÄĚ: ‚ÄúHasta‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SELECT_RELATIONSHIP_TYPE‚ÄĚ: ‚ÄúSeleccionar el tipo de relaci√≥n‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ENTER_NAME_ID‚ÄĚ: ‚ÄúIntroduzca el nombre o ID‚ÄĚ, ‚ÄúREGISTRATION_LABEL_VALID_PATIENT_IDENTIFIER‚ÄĚ: ‚ÄúPor favor, introduzca un identificador v√°lido paciente‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PROVIDER_AUTOCOMPLETE_LIST‚ÄĚ: ‚ÄúPor favor, seleccione un proveedor de la lista de autocompletar‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ENTER_NAME‚ÄĚ: ‚ÄúIngrese su nombre‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PERSON_NOT_FOUND‚ÄĚ: ‚ÄúPersona que no se encuentra‚ÄĚ, ‚ÄúREGISTRATION_LABEL_PATIENT_ID‚ÄĚ: ‚ÄúID‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SEARCH‚ÄĚ: ‚ÄúBuscar‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NAME‚ÄĚ: ‚ÄúNombre‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ID‚ÄĚ: ‚ÄúID‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NO_RESULTS‚ÄĚ: ‚ÄúNo hay m√°s resultados‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SUMMARY‚ÄĚ: ‚ÄúResumen‚ÄĚ, ‚ÄúREGISTRATION_LABEL_CLOSE_VISIT‚ÄĚ: ‚ÄúCerrar Visita‚ÄĚ, ‚ÄúREGISTRATION_LABEL_YES‚ÄĚ: ‚ÄúS√≠‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NO‚ÄĚ: ‚ÄúNo‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SAVE‚ÄĚ: ‚ÄúSalvar‚ÄĚ, ‚ÄúREGISTRATION_LABEL_BACK‚ÄĚ: ‚ÄúEspalda‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ENTER_VISIT‚ÄĚ: ‚ÄúIntroduzca\ndetalles de la Visita‚ÄĚ, ‚ÄúREGISTRATION_TITLE_ADDITIONAL_PATIENT‚ÄĚ: "informacion Adicional del Paciente ", ‚ÄúREGISTRATION_TITLE_RELATIONSHIPS‚ÄĚ: ‚ÄúRelaciones‚ÄĚ, ‚ÄúREGISTRATION_CONTENT_ENTERING_ID‚ÄĚ: ‚ÄúEst√° ingresando ID(s) que est√°n fuera de la secuencia. Crear√° una brecha en la secuencia. ¬ŅDesea continuar?‚ÄĚ, ‚ÄúREGISTRATION_LABEL_SAVED‚ÄĚ: ‚ÄúSalvado‚ÄĚ, ‚ÄúREGISTRATION_NO_RESULTS_FOUND‚ÄĚ: ‚ÄúNo se han encontrado resultados‚ÄĚ, ‚ÄúREGISTRATION_INSUFFICIENT_PRIVILEGE‚ÄĚ: ‚ÄúUsted no tiene el privilegio de hacer esta acci√≥n.‚ÄĚ, ‚ÄúREGISTRATION_LABEL_COULD_NOT_FIND_PATIENT‚ÄĚ: ‚ÄúNo se pudo encontrar paciente con esa identificacion {{patientidentifier}}. Por favor verifique el ID de paciente ingresado o crear un nuevo record con este ID‚ÄĚ, ‚ÄúREGISTRATION_VISIT_CANNOT_BE_CLOSED‚ÄĚ: ‚ÄúVisita del paciente ingresado no se puede cerrar. Dar de alta al paciente y vuelva a intentarlo.‚ÄĚ, ‚ÄúREGISTRATION_CONFIRM_CLOSE_VISIT‚ÄĚ: ‚Äú¬ŅSeguro que desea cerrar esta visita?‚ÄĚ, ‚ÄúREGISTRATION_LABEL_CORRECT_ERRORS‚ÄĚ: ‚ÄúPor favor, corrija los errores en el formulario. La informaci√≥n no se guard√≥‚ÄĚ, ‚ÄúREGISTRATION_LABEL_ENTER_MANDATORY_FIELDS‚ÄĚ: ‚ÄúPor favor, introduzca los datos en el campo(s) obligatorio.‚ÄĚ, ‚ÄúREGISTRATION_SAVE_ACCESS_KEY‚ÄĚ: ‚Äús‚ÄĚ, ‚ÄúREGISTRATION_ENTER_VISIT_DETAILS_ACCESS_KEY‚ÄĚ: ‚Äúv‚ÄĚ, ‚ÄúREGISTRATION_ENTER_ADDITIONAL_PATIENT_DETAILS_ACCESS_KEY‚ÄĚ: ‚Äúi‚ÄĚ, ‚ÄúREGISTRATION_RELATIONSHIPS_ACCESS_KEY‚ÄĚ: ‚Äúl‚ÄĚ, ‚ÄúREGISTRATION_BACK_ACCESS_KEY‚ÄĚ: ‚Äúb‚ÄĚ, ‚ÄúREGISTRATON_LATEST_KEY‚ÄĚ: ‚ÄúReciente‚ÄĚ, ‚ÄúDISPLAY_CONTROL_ERROR_MESSAGE_KEY‚ÄĚ: ‚ÄúNo {{ }} para este paciente‚ÄĚ, ‚ÄúREGISTRATION_LABEL_NUMBER‚ÄĚ: ‚ÄúN√ļmero de registro‚ÄĚ, ‚ÄúREGISTRATION_START_VISIT‚ÄĚ: "Empezar {{tipo de visita}} visita ", ‚ÄúMESSAGE_DIALOG_OPTION_COPY‚ÄĚ: ‚ÄúCopia error‚ÄĚ, ‚ÄúMESSAGE_DIALOG_OPTION_OKAY‚ÄĚ: ‚ÄúOK‚ÄĚ }

Hi,

The ‚Äú{{ visitType }}‚ÄĚ(Any thing in double flower braces) is a variable name from system, that is not supposed to be translated. Please change the translation to be like

"REGISTRATION_START_VISIT": "Empezar {{ visitType }} visita"

awesome now is working, thanks.

1 Like

now im having the following error

‚ÄėPatient#null‚Äô failed to validate with reason: names[0].givenName: GivenName.invalid, names[0].middleName: MiddleName.invalid, names[0].familyName: FamilyName.invalid

Can you please share a screenshot of registration page ?

anyone can help me please.