From b3bbfb3f50d08ce0cdde0793b55e3d2a55791aad Mon Sep 17 00:00:00 2001 From: Jose Francisco <94977371+icrc-jofrancisco@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:56:07 +0000 Subject: [PATCH] (chore) Sort person attributes list in Patient Registration page (#983) --- ...coded-person-attribute-field.component.tsx | 4 +- .../translations/es.json | 48 +++++------ .../translations/fr.json | 84 +++++++++---------- 3 files changed, 69 insertions(+), 67 deletions(-) diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx index f1975993b..5a2a5e02d 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx @@ -77,7 +77,9 @@ export function CodedPersonAttributeField({ } return isLoadingConceptAnswers || !conceptAnswers ? [] - : conceptAnswers.map((answer) => ({ ...answer, label: answer.display })); + : conceptAnswers + .map((answer) => ({ ...answer, label: answer.display })) + .sort((a, b) => a.label.localeCompare(b.label)); }, [customConceptAnswers, conceptAnswers, isLoadingConceptAnswers]); if (error) { diff --git a/packages/esm-patient-registration-app/translations/es.json b/packages/esm-patient-registration-app/translations/es.json index d32758ff4..4993f873e 100644 --- a/packages/esm-patient-registration-app/translations/es.json +++ b/packages/esm-patient-registration-app/translations/es.json @@ -8,12 +8,12 @@ "birthFieldLabelText": "Nacimiento", "cancel": "Cancelar", "causeOfDeathInputLabel": "Causa de defunción", - "closeOverlay": "Close overlay", - "codedPersonAttributeAnswerSetEmpty": "The coded person attribute field '{{codedPersonAttributeFieldId}}' has been defined with an answer concept set UUID '{{answerConceptSetUuid}}' that does not have any concept answers.", - "codedPersonAttributeAnswerSetInvalid": "The coded person attribute field '{{codedPersonAttributeFieldId}}' has been defined with an invalid answer concept set UUID '{{answerConceptSetUuid}}'.", - "codedPersonAttributeNoAnswerSet": "The person attribute field '{{codedPersonAttributeFieldId}}' is of type 'coded' but has been defined without an answer concept set UUID. The 'answerConceptSetUuid' key is required.", + "closeOverlay": "Cerrar superposición", + "codedPersonAttributeAnswerSetEmpty": "El campo de atributo de persona codificado '{{codedPersonAttributeFieldId}}' se ha definido con un conjunto de conceptos de respuesta UUID '{{answerConceptSetUuid}}' que no tiene respuestas de concepto.", + "codedPersonAttributeAnswerSetInvalid": "El campo de atributo de persona codificado '{{codedPersonAttributeFieldId}}' se ha definido con un UUID de conjunto de conceptos de respuesta no válido '{{answerConceptSetUuid}}'.", + "codedPersonAttributeNoAnswerSet": "El campo de atributo de persona '{{codedPersonAttributeFieldId}}' es de tipo 'codificado' pero se ha definido sin UUID de conjunto de conceptos de respuesta. La clave 'answerConceptSetUuid' es requerida.", "configure": "Configurar", - "configureIdentifiers": "Configure identifiers", + "configureIdentifiers": "Configurar identificadores", "contactSection": "Detalles de Contacto", "createNew": "Crear Nuevo/a", "dateOfBirthLabelText": "Fecha de Nacimiento", @@ -25,14 +25,14 @@ "demographicsSection": "Información Básica", "discard": "Descartar", "discardModalBody": "Los cambios realizados en los datos de este paciente no se han guardado. ¿Descartar cambios?", - "discardModalHeader": "Confirmar cambios de descarte", + "discardModalHeader": "Confirmar descarte de cambios", "dobToggleLabelText": "¿Se conoce la fecha de nacimiento?", "edit": "Editar", "editIdentifierTooltip": "Editar", "editPatientDetails": "Modificar los datos del paciente", - "editPatientDetailsBreadcrumb": "Edit patient details", + "editPatientDetailsBreadcrumb": "Editar detalles del paciente", "error": "Error", - "errorFetchingOrderedFields": "Error ocurrió al obtener campos ordenados para la jerarquía de direcciones", + "errorFetchingOrderedFields": "Ocurrió un error al obtener campos ordenados para la jerarquía de direcciones", "estimatedAgeInMonthsLabelText": "Edad estimada en meses", "estimatedAgeInYearsLabelText": "Edad estimada en años", "familyNameLabelText": "Apellidos", @@ -46,7 +46,7 @@ "givenNameRequired": "El nombre es obligatorio", "identifierValueRequired": "El valor del identificador es obligatorio", "idFieldLabelText": "Identificadores", - "IDInstructions": "Select the identifiers you'd like to add for this patient:", + "IDInstructions": "Selecciona los identificadores que te gustaría agregar para este paciente:", "incompleteForm": "Formulario incompleto", "invalidEmail": "Debe indicar un email válido", "invalidInput": "Entrada no válida", @@ -58,40 +58,40 @@ "negativeYears": "Años negativos", "no": "No", "numberInNameDubious": "Número en nombre es dudoso", - "obsFieldUnknownDatatype": "Concept for obs field '{{fieldDefinitionId}}' has unknown datatype '{{datatypeName}}'", - "optional": "opcional", + "obsFieldUnknownDatatype": "El concepto para el campo de observación '{{fieldDefinitionId}}' tiene un tipo de datos desconocido '{{datatypeName}}'", + "optional": "Opcional", "other": "Otro", "patient": "Paciente", "patientNameKnown": "¿Se sabe el nombre del paciente?", - "patientRegistrationBreadcrumb": "Patient Registration", + "patientRegistrationBreadcrumb": "Registro de Pacientes", "registerPatient": "Registrar paciente", - "registerPatientSuccessSnackbarSubtitle": "The patient can now be found by searching for them using their name or ID number", - "registerPatientSuccessSnackbarTitle": "New Patient Created", - "registrationErrorSnackbarTitle": "Patient Registration Failed", + "registerPatientSuccessSnackbarSubtitle": "El paciente ahora se puede encontrar buscándolo por su nombre o número de identificación", + "registerPatientSuccessSnackbarTitle": "Nuevo paciente creado", + "registrationErrorSnackbarTitle": "Error en el registro del paciente", "relationship": "Relación", - "relationshipPersonMustExist": "Related person must be an existing person", + "relationshipPersonMustExist": "La persona relacionada debe ser una persona existente", "relationshipPlaceholder": "Relación", "relationshipRemovedText": "Relación eliminada", "relationshipsSection": "Relaciones", "relationshipToPatient": "Relación con el paciente", "relativeFullNameLabelText": "Nombre y Apellidos", "relativeNamePlaceholder": "Nombre Apellido", - "resetIdentifierTooltip": "resetear", + "resetIdentifierTooltip": "Resetear", "restoreRelationshipActionButton": "Deshacer", "searchAddress": "Buscar dirección", - "searchIdentifierPlaceholder": "Search identifier", + "searchIdentifierPlaceholder": "Buscar identificador", "selectAnOption": "Seleccionar una opción", "sexFieldLabelText": "Sexo", - "source": "Source", + "source": "Fuente", "stroke": "Ictus", - "submitting": "Submitting", + "submitting": "Enviando", "unableToFetch": "No se puede obtener el tipo de atributo de persona {{personattributetype}}", "unknown": "Desconocido", - "unknownPatientAttributeType": "Patient attribute type has unknown format {{personAttributeTypeFormat}}", + "unknownPatientAttributeType": "El tipo de atributo del paciente tiene un formato desconocido {{personAttributeTypeFormat}}", "updatePatient": "Paciente Actualizado", - "updatePatientErrorSnackbarTitle": "Patient Details Update Failed", - "updatePatientSuccessSnackbarSubtitle": "The patient's information has been successfully updated", - "updatePatientSuccessSnackbarTitle": "Patient Details Updated", + "updatePatientErrorSnackbarTitle": "Error al actualizar los detalles del paciente", + "updatePatientSuccessSnackbarSubtitle": "La información del paciente se ha actualizado correctamente", + "updatePatientSuccessSnackbarTitle": "Detalles del paciente actualizados", "yearsEstimateRequired": "Estimación de años obligatoria", "yes": "Sí" } diff --git a/packages/esm-patient-registration-app/translations/fr.json b/packages/esm-patient-registration-app/translations/fr.json index 2ce2f4654..d539c4256 100644 --- a/packages/esm-patient-registration-app/translations/fr.json +++ b/packages/esm-patient-registration-app/translations/fr.json @@ -2,96 +2,96 @@ "addRelationshipButtonText": "Ajouter un lien de parenté", "addressHeader": "Adresse", "allFieldsRequiredText": "Tous les champs sont requis sauf si explicitement indiqués facultatifs", - "autoGeneratedPlaceholderText": "Auto-generé", + "autoGeneratedPlaceholderText": "Auto-généré", "birthdayNotInTheFuture": "La date de naissance ne peut pas être dans le futur", "birthdayRequired": "La date de naissance est requise", "birthFieldLabelText": "Naissance", - "cancel": "Annuller", + "cancel": "Annuler", "causeOfDeathInputLabel": "Cause de décès", - "closeOverlay": "Close overlay", - "codedPersonAttributeAnswerSetEmpty": "The coded person attribute field '{{codedPersonAttributeFieldId}}' has been defined with an answer concept set UUID '{{answerConceptSetUuid}}' that does not have any concept answers.", - "codedPersonAttributeAnswerSetInvalid": "The coded person attribute field '{{codedPersonAttributeFieldId}}' has been defined with an invalid answer concept set UUID '{{answerConceptSetUuid}}'.", - "codedPersonAttributeNoAnswerSet": "The person attribute field '{{codedPersonAttributeFieldId}}' is of type 'coded' but has been defined without an answer concept set UUID. The 'answerConceptSetUuid' key is required.", + "closeOverlay": "Fermer la superposition", + "codedPersonAttributeAnswerSetEmpty": "Le champ d'attribut de personne codé '{{codedPersonAttributeFieldId}}' a été défini avec un ensemble de concepts de réponse UUID '{{answerConceptSetUuid}}' qui n'a pas de réponses de concept.", + "codedPersonAttributeAnswerSetInvalid": "Le champ d'attribut de personne codé '{{codedPersonAttributeFieldId}}' a été défini avec un UUID d'ensemble de concepts de réponse invalide '{{answerConceptSetUuid}}'.", + "codedPersonAttributeNoAnswerSet": "Le champ d'attribut de personne '{{codedPersonAttributeFieldId}}' est de type 'codé' mais a été défini sans UUID d'ensemble de concepts de réponse. La clé 'answerConceptSetUuid' est requise.", "configure": "Configurer", - "configureIdentifiers": "Configure identifiers", - "contactSection": "Contact Details", + "configureIdentifiers": "Configurer les identifiants", + "contactSection": "Détails de contact", "createNew": "Créer un nouveau", "dateOfBirthLabelText": "Date de naissance", "deathDateInputLabel": "Date de décès", "deathdayNotInTheFuture": "Le décès ne peut pas être dans le futur", - "deathSection": "Death Info", - "deleteIdentifierTooltip": "Effacer", - "deleteRelationshipTooltipText": "Effacer", - "demographicsSection": "Basic Info", + "deathSection": "Informations sur le décès", + "deleteIdentifierTooltip": "Supprimer", + "deleteRelationshipTooltipText": "Supprimer", + "demographicsSection": "Informations de base", "discard": "Abandonner", "discardModalBody": "Les modifications que vous avez apportées aux données de ce patient n'ont pas été enregistrées. Annuler les modifications?", "discardModalHeader": "Confirmer l'abandon des modifications", "dobToggleLabelText": "Date de naissance connue?", - "edit": "Editer", - "editIdentifierTooltip": "Editer", - "editPatientDetails": "Editer les données du patient", - "editPatientDetailsBreadcrumb": "Edit patient details", - "error": "Error", - "errorFetchingOrderedFields": "Error occured fetching ordered fields for address hierarchy", + "edit": "Éditer", + "editIdentifierTooltip": "Éditer", + "editPatientDetails": "Modifier les détails du patient", + "editPatientDetailsBreadcrumb": "Modifier les détails du patient", + "error": "Erreur", + "errorFetchingOrderedFields": "Une erreur s'est produite lors de la récupération des champs ordonnés pour la hiérarchie d'adresse", "estimatedAgeInMonthsLabelText": "Âge estimé en mois", "estimatedAgeInYearsLabelText": "Âge estimé en années", "familyNameLabelText": "Nom de famille", "familyNameRequired": "Le nom de famille est requis", "female": "Femme", - "fullNameLabelText": "Nom et Prénom", + "fullNameLabelText": "Nom et prénom", "genderLabelText": "Sexe", "genderRequired": "Le genre est requis", "genderUnspecified": "Le genre n'est pas spécifié", "givenNameLabelText": "Prénom", - "givenNameRequired": "Le nom donné est requis", + "givenNameRequired": "Le prénom est requis", "identifierValueRequired": "La valeur de l'identifiant est requise", "idFieldLabelText": "Identifiants", - "IDInstructions": "Select the identifiers you'd like to add for this patient:", + "IDInstructions": "Sélectionnez les identifiants que vous souhaitez ajouter pour ce patient:", "incompleteForm": "Formulaire incomplet", - "invalidEmail": "Un email valide est requis", + "invalidEmail": "Une adresse e-mail valide est requise", "invalidInput": "Entrée invalide", "isDeadInputLabel": "Est décédé", - "jumpTo": "Passer à", + "jumpTo": "Aller à", "male": "Homme", - "middleNameLabelText": "Deuxième nom", + "middleNameLabelText": "Deuxième prénom", "negativeMonths": "Mois négatifs", "negativeYears": "Années négatives", "no": "Non", "numberInNameDubious": "Le chiffre dans le nom est suspect", - "obsFieldUnknownDatatype": "Concept for obs field '{{fieldDefinitionId}}' has unknown datatype '{{datatypeName}}'", + "obsFieldUnknownDatatype": "Le concept pour le champ d'observation '{{fieldDefinitionId}}' a un type de données inconnu '{{datatypeName}}'", "optional": "Optionnel", "other": "Autre", "patient": "Patient", "patientNameKnown": "Le nom du patient est connu?", - "patientRegistrationBreadcrumb": "Patient Registration", + "patientRegistrationBreadcrumb": "Enregistrement du patient", "registerPatient": "Enregistrer un patient", - "registerPatientSuccessSnackbarSubtitle": "The patient can now be found by searching for them using their name or ID number", - "registerPatientSuccessSnackbarTitle": "New Patient Created", - "registrationErrorSnackbarTitle": "Patient Registration Failed", + "registerPatientSuccessSnackbarSubtitle": "Le patient peut maintenant être trouvé en le recherchant par son nom ou son numéro d'identification", + "registerPatientSuccessSnackbarTitle": "Nouveau patient créé", + "registrationErrorSnackbarTitle": "Échec de l'enregistrement du patient", "relationship": "Relation", "relationshipPersonMustExist": "La personne liée doit être une personne existante", "relationshipPlaceholder": "Relation", "relationshipRemovedText": "Relation supprimée", - "relationshipsSection": "Relationships", + "relationshipsSection": "Relations", "relationshipToPatient": "Relation avec le patient", "relativeFullNameLabelText": "Personne liée", - "relativeNamePlaceholder": "Prénom Nom de famile", + "relativeNamePlaceholder": "Prénom Nom de famille", "resetIdentifierTooltip": "Réinitialiser", - "restoreRelationshipActionButton": "Annuler", - "searchAddress": "Chercher l'adresse", - "searchIdentifierPlaceholder": "Search identifier", - "selectAnOption": "Select an option", + "restoreRelationshipActionButton": "Restaurer", + "searchAddress": "Rechercher une adresse", + "searchIdentifierPlaceholder": "Rechercher un identifiant", + "selectAnOption": "Sélectionner une option", "sexFieldLabelText": "Sexe", "source": "Source", - "stroke": "Accident", - "submitting": "Submitting", - "unableToFetch": "Unable to fetch person attribute type - {{personattributetype}}", + "stroke": "Accident vasculaire cérébral", + "submitting": "En cours de soumission", + "unableToFetch": "Impossible de récupérer le type d'attribut de personne - {{personattributetype}}", "unknown": "Inconnu", - "unknownPatientAttributeType": "Patient attribute type has unknown format {{personAttributeTypeFormat}}", + "unknownPatientAttributeType": "Le type d'attribut de patient a un format inconnu {{personAttributeTypeFormat}}", "updatePatient": "Mettre à jour le patient", - "updatePatientErrorSnackbarTitle": "Patient Details Update Failed", - "updatePatientSuccessSnackbarSubtitle": "The patient's information has been successfully updated", - "updatePatientSuccessSnackbarTitle": "Patient Details Updated", + "updatePatientErrorSnackbarTitle": "Échec de la mise à jour des détails du patient", + "updatePatientSuccessSnackbarSubtitle": "Les informations du patient ont été mises à jour avec succès", + "updatePatientSuccessSnackbarTitle": "Détails du patient mis à jour", "yearsEstimateRequired": "Estimation du nombre d'années requise", "yes": "Oui" }