Skip to content

Commit ee259c8

Browse files
committed
BN-64 | Fix. Rename Consultation Date As Encounter Date
1 parent df675a5 commit ee259c8

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

public/locales/locale_en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"CONFIG_ERROR_NOT_FOUND": "Configuration not found",
2525
"CONFIG_ERROR_SCHEMA_VALIDATION_FAILED": "Configuration does not match required schema",
2626
"CONFIG_ERROR_VALIDATION_FAILED": "Configuration validation failed",
27-
"CONSULTATION_DATE": "Consultation Date",
2827
"CONSULTATION_PAD_CANCEL_BUTTON": "Cancel",
2928
"CONSULTATION_PAD_DONE_BUTTON": "Done",
3029
"CONSULTATION_PAD_ERROR": "Something went wrong",
@@ -37,6 +36,7 @@
3736
"DATE_ERROR_INVALID_FORMAT": "Invalid date format",
3837
"DATE_ERROR_NULL_OR_UNDEFINED": "Date is null or undefined",
3938
"DATE_ERROR_PARSE": "Date Parse Error",
39+
"ENCOUNTER_DATE": "Encounter Date",
4040
"ENCOUNTER_TYPE": "Encounter Type",
4141
"ERROR_BAD_REQUEST_MESSAGE": "Invalid input parameters. Please check your request and try again.",
4242
"ERROR_BAD_REQUEST_TITLE": "Bad Request",
@@ -66,10 +66,10 @@
6666
"LOCATION": "Location",
6767
"NETWORK_ERROR": "A network error occurred",
6868
"NO_ALLERGIES": "No Allergies recorded for this patient.",
69+
"PARTICIPANT": "Participant(s)",
70+
"PATIENT_HEADER_ACTION_AREA_IN_PROGRESS": "Consultation in progress",
6971
"PATIENT_HEADER_LABEL": "Patient Header",
7072
"PATIENT_HEADER_SHOW_ACTION_AREA": "New Consultation",
71-
"PATIENT_HEADER_ACTION_AREA_IN_PROGRESS": "Consultation in progress",
72-
"PARTICIPANT": "Participant(s)",
7373
"REACTIONS": "Reaction(s)",
7474
"SELECT_ENCOUNTER_TYPE": "Select encounter type",
7575
"SELECT_LOCATION": "Select location",

public/locales/locale_es.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"CONFIG_ERROR_NOT_FOUND": "Configuración no encontrada",
2525
"CONFIG_ERROR_SCHEMA_VALIDATION_FAILED": "La configuración no coincide con el esquema requerido",
2626
"CONFIG_ERROR_VALIDATION_FAILED": "La validación de la configuración falló",
27-
"CONSULTATION_DATE": "Fecha de Consulta",
2827
"CONSULTATION_PAD_CANCEL_BUTTON": "Cancelar",
2928
"CONSULTATION_PAD_DONE_BUTTON": "Hecho",
3029
"CONSULTATION_PAD_ERROR": "Algo salió mal",
@@ -37,6 +36,7 @@
3736
"DATE_ERROR_INVALID_FORMAT": "Formato de fecha no válido",
3837
"DATE_ERROR_NULL_OR_UNDEFINED": "La fecha es nula o no está definida",
3938
"DATE_ERROR_PARSE": "Error al analizar la fecha",
39+
"ENCOUNTER_DATE": "Fecha de Encuentro",
4040
"ENCOUNTER_TYPE": "Tipo de encuentro",
4141
"ERROR_BAD_REQUEST_MESSAGE": "Parámetros de entrada no válidos. Por favor, verifique su solicitud e intente nuevamente.",
4242
"ERROR_BAD_REQUEST_TITLE": "Solicitud incorrecta",
@@ -66,10 +66,10 @@
6666
"LOCATION": "Ubicación",
6767
"NETWORK_ERROR": "Se produjo un error de red",
6868
"NO_ALLERGIES": "No hay alergias registradas para este paciente",
69+
"PARTICIPANT": "Partícipe(es)",
70+
"PATIENT_HEADER_ACTION_AREA_IN_PROGRESS": "Consulta en progreso",
6971
"PATIENT_HEADER_LABEL": "Cabecera del Paciente",
7072
"PATIENT_HEADER_SHOW_ACTION_AREA": "Nueva Consulta",
71-
"PATIENT_HEADER_ACTION_AREA_IN_PROGRESS": "Consulta en progreso",
72-
"PARTICIPANT": "Partícipe(es)",
7373
"REACTIONS": "Reacción(es)",
7474
"SELECT_ENCOUNTER_TYPE": "Seleccionar tipo de encuentro",
7575
"SELECT_LOCATION": "Seleccionar ubicación",

src/components/clinical/basicForm/BasicForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ const BasicForm: React.FC<BasicFormProps> = ({
124124
<Column sm={4} md={8} lg={5} className={styles.column}>
125125
<DatePicker datePickerType="single" dateFormat="d/m/Y">
126126
<DatePickerInput
127-
id="date-picker-input"
127+
id="encounter-date-picker-input"
128128
placeholder="dd/mm/yyyy"
129-
title={t('CONSULTATION_DATE')}
130-
labelText={t('CONSULTATION_DATE')}
129+
title={t('ENCOUNTER_DATE')}
130+
labelText={t('ENCOUNTER_DATE')}
131131
defaultValue={defaultDate}
132132
disabled
133133
/>

src/components/clinical/basicForm/__tests__/BasicForm.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe('BasicForm', () => {
160160
expect(screen.getByText('LOCATION')).toBeInTheDocument();
161161
expect(screen.getByText('ENCOUNTER_TYPE')).toBeInTheDocument();
162162
expect(screen.getByText('VISIT_TYPE')).toBeInTheDocument();
163-
expect(screen.getByText('CONSULTATION_DATE')).toBeInTheDocument();
163+
expect(screen.getByText('ENCOUNTER_DATE')).toBeInTheDocument();
164164
expect(screen.getByText('PARTICIPANT')).toBeInTheDocument();
165165
});
166166

@@ -179,7 +179,7 @@ describe('BasicForm', () => {
179179
const visitTypeDropdown = screen.getByRole('combobox', {
180180
name: /VISIT_TYPE/i,
181181
});
182-
const datePickerInput = screen.getByLabelText(/CONSULTATION_DATE/i);
182+
const datePickerInput = screen.getByLabelText(/ENCOUNTER_DATE/i);
183183
const practitionerDropdown = screen.getByRole('combobox', {
184184
name: /PARTICIPANT/i,
185185
});
@@ -233,7 +233,7 @@ describe('BasicForm', () => {
233233
expect(
234234
screen.getByRole('combobox', { name: /VISIT_TYPE/i }),
235235
).toHaveAttribute('disabled');
236-
expect(screen.getByLabelText(/CONSULTATION_DATE/i)).toHaveAttribute(
236+
expect(screen.getByLabelText(/ENCOUNTER_DATE/i)).toHaveAttribute(
237237
'disabled',
238238
);
239239
});

src/components/clinical/basicForm/__tests__/__snapshots__/BasicForm.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ exports[`BasicForm Rendering should match snapshot 1`] = `
117117
<label
118118
class="cds--label cds--label--disabled"
119119
dir="auto"
120-
for="date-picker-input"
120+
for="encounter-date-picker-input"
121121
>
122-
CONSULTATION_DATE
122+
ENCOUNTER_DATE
123123
</label>
124124
<div
125125
class="cds--date-picker-input__wrapper"
@@ -128,10 +128,10 @@ exports[`BasicForm Rendering should match snapshot 1`] = `
128128
<input
129129
class="cds--date-picker__input cds--date-picker__input--md flatpickr-input"
130130
disabled=""
131-
id="date-picker-input"
131+
id="encounter-date-picker-input"
132132
pattern="\\d{1,2}\\/\\d{1,2}\\/\\d{4}"
133133
placeholder="dd/mm/yyyy"
134-
title="CONSULTATION_DATE"
134+
title="ENCOUNTER_DATE"
135135
type="text"
136136
value="16/05/2025"
137137
/>

0 commit comments

Comments
 (0)