error add pacient in spanish

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.

Please share logs @ /var/log/openmrs/openmrs.log

log.txt (212.1 KB)