From 13b5e1664cb9116ace1b2d65dc9acfb7329acaeb Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Fri, 10 Nov 2023 15:30:14 +0100 Subject: [PATCH 1/3] fix(OH2-251): Fix visit newPatient not being set correctly --- src/components/accessories/opds/filter/OpdFilterForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/accessories/opds/filter/OpdFilterForm.tsx b/src/components/accessories/opds/filter/OpdFilterForm.tsx index 135ff0702..5b7c6d5c9 100644 --- a/src/components/accessories/opds/filter/OpdFilterForm.tsx +++ b/src/components/accessories/opds/filter/OpdFilterForm.tsx @@ -311,11 +311,11 @@ export const OpdFilterForm: FC = ({ const newPatientOptions = [ { label: t("opd.all"), - value: "", + value: "A", }, { label: t("opd.newadmittance"), - value: "A", + value: "N", }, { label: t("opd.reattendance"), From d22174f3076d823d6781e8d2c7fb21c4dee2f641 Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Fri, 10 Nov 2023 17:36:07 +0100 Subject: [PATCH 2/3] update(OH2-251): Rename 'new admittance' to 'new attendance' --- src/components/accessories/opds/filter/OpdFilterForm.tsx | 2 +- src/components/accessories/opds/table/OpdTable.tsx | 2 +- .../accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx | 2 +- src/resources/i18n/ar.json | 2 +- src/resources/i18n/de.json | 2 +- src/resources/i18n/en.json | 2 +- src/resources/i18n/es.json | 2 +- src/resources/i18n/fr.json | 2 +- src/resources/i18n/it.json | 2 +- src/resources/i18n/pt.json | 2 +- src/resources/i18n/sq.json | 2 +- src/resources/i18n/sw.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/accessories/opds/filter/OpdFilterForm.tsx b/src/components/accessories/opds/filter/OpdFilterForm.tsx index 5b7c6d5c9..76d5f7c80 100644 --- a/src/components/accessories/opds/filter/OpdFilterForm.tsx +++ b/src/components/accessories/opds/filter/OpdFilterForm.tsx @@ -314,7 +314,7 @@ export const OpdFilterForm: FC = ({ value: "A", }, { - label: t("opd.newadmittance"), + label: t("opd.newattendance"), value: "N", }, { diff --git a/src/components/accessories/opds/table/OpdTable.tsx b/src/components/accessories/opds/table/OpdTable.tsx index 15ff883b0..b739318f1 100644 --- a/src/components/accessories/opds/table/OpdTable.tsx +++ b/src/components/accessories/opds/table/OpdTable.tsx @@ -72,7 +72,7 @@ export const OpdTable: FC = ({ data }) => { newPatient: e.newPatient === "R" ? t("opd.reattendance") - : t("opd.newadmittance"), + : t("opd.newattendance"), note: e.note ?? "", }; }); diff --git a/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx b/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx index 3cf31ddfc..7f3ded148 100644 --- a/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx +++ b/src/components/accessories/patientOPD/patientOPDForm/PatientOPDForm.tsx @@ -412,7 +412,7 @@ const PatientOPDForm: FunctionComponent = ({ } - label={t("opd.newadmittance")} + label={t("opd.newattendance")} checked={formik.values["newPatient"] === "N"} /> diff --git a/src/resources/i18n/ar.json b/src/resources/i18n/ar.json index b501ba63d..ee8fc5c4a 100644 --- a/src/resources/i18n/ar.json +++ b/src/resources/i18n/ar.json @@ -86,7 +86,7 @@ "referralfrom": "Referral From", "referralto": "Referral To", "newpatient": "Attendance Type", - "newadmittance": "New Admittance", + "newattendance": "New Attendance", "reattendance": "Re-attendance", "addoperation": "Add operation", "addoperationdesc": "Add operation for the visit", diff --git a/src/resources/i18n/de.json b/src/resources/i18n/de.json index 4eecabff0..7a0675d88 100644 --- a/src/resources/i18n/de.json +++ b/src/resources/i18n/de.json @@ -178,7 +178,7 @@ "referralfrom": "Empfehlung von", "referralto": "Empfehlung an", "newpatient": "Anwesenheitstyp", - "newadmittance": "Neue Aufnahme", + "newattendance": "Neue Aufnahme", "reattendance": "Wiederantritt", "addoperation": "Operation hinzufügen", "addoperationdesc": "Vorgang für den Besuch hinzufügen", diff --git a/src/resources/i18n/en.json b/src/resources/i18n/en.json index 12b83f92a..078418f53 100644 --- a/src/resources/i18n/en.json +++ b/src/resources/i18n/en.json @@ -178,7 +178,7 @@ "referralfrom": "Referral From", "referralto": "Referral To", "newpatient": "Attendance Type", - "newadmittance": "New Admittance", + "newattendance": "New Attendance", "reattendance": "Re-attendance", "addoperation": "Add operation", "addoperationdesc": "Add operation for the visit", diff --git a/src/resources/i18n/es.json b/src/resources/i18n/es.json index 913d4bd12..64904d7ae 100644 --- a/src/resources/i18n/es.json +++ b/src/resources/i18n/es.json @@ -86,7 +86,7 @@ "referralfrom": "Referral From", "referralto": "Referral To", "newpatient": "Attendance Type", - "newadmittance": "New Admittance", + "newattendance": "New Attendance", "reattendance": "Re-attendance", "addoperation": "Add operation", "addoperationdesc": "Add operation for the visit", diff --git a/src/resources/i18n/fr.json b/src/resources/i18n/fr.json index 7f7974e30..9f2ba21ab 100644 --- a/src/resources/i18n/fr.json +++ b/src/resources/i18n/fr.json @@ -142,7 +142,7 @@ "referralfrom": "Visite prescrite par une autre unité hospitalière", "referralto": "Visite prescrite de l'extérieur", "newpatient": "Type de visite", - "newadmittance": "Nouvelle hospitalisation", + "newattendance": "Nouvelle hospitalisation", "reattendance": "Suite de visite ou cycle de visites", "addoperation": "Ajouter une opération", "addoperationdesc": "Ajouter une opération pour la visite", diff --git a/src/resources/i18n/it.json b/src/resources/i18n/it.json index af1f2a11b..a4e506899 100644 --- a/src/resources/i18n/it.json +++ b/src/resources/i18n/it.json @@ -178,7 +178,7 @@ "referralfrom": "Riferito", "referralto": "Rinvio ad altra struttura", "newpatient": "TIpo visita", - "newadmittance": "Nuova visita", + "newattendance": "Nuova visita", "reattendance": "Visita di controllo", "addoperation": "Aggiungi intervento", "addoperationdesc": "Aggiungi intervento per la visita", diff --git a/src/resources/i18n/pt.json b/src/resources/i18n/pt.json index 75a5ff3fe..26b65d967 100644 --- a/src/resources/i18n/pt.json +++ b/src/resources/i18n/pt.json @@ -86,7 +86,7 @@ "referralfrom": "Referral From", "referralto": "Referral To", "newpatient": "Attendance Type", - "newadmittance": "New Admittance", + "newattendance": "New Attendance", "reattendance": "Re-attendance", "addoperation": "Add operation", "addoperationdesc": "Add operation for the visit", diff --git a/src/resources/i18n/sq.json b/src/resources/i18n/sq.json index 708957738..905bc64d2 100644 --- a/src/resources/i18n/sq.json +++ b/src/resources/i18n/sq.json @@ -178,7 +178,7 @@ "referralfrom": "Referuar nga", "referralto": "Referohet tek", "newpatient": "Lloji i frekuentimit", - "newadmittance": "Pranim i ri", + "newattendance": "Pranim i ri", "reattendance": "Ri-pranim", "addoperation": "Shto operacion", "addoperationdesc": "Shto operacion për vizitën", diff --git a/src/resources/i18n/sw.json b/src/resources/i18n/sw.json index baa389b7c..4b1628d5b 100644 --- a/src/resources/i18n/sw.json +++ b/src/resources/i18n/sw.json @@ -86,7 +86,7 @@ "referralfrom": "Referral From", "referralto": "Referral To", "newpatient": "Attendance Type", - "newadmittance": "New Admittance", + "newattendance": "New Attendance", "reattendance": "Re-attendance", "addoperation": "Add operation", "addoperationdesc": "Add operation for the visit", From c72d41873979b8651bbf780712f1c08cd49e0cff Mon Sep 17 00:00:00 2001 From: SteveGT96 Date: Fri, 10 Nov 2023 17:51:46 +0100 Subject: [PATCH 3/3] style: Remove unused imports --- src/components/accessories/opds/filter/OpdFilterForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/accessories/opds/filter/OpdFilterForm.tsx b/src/components/accessories/opds/filter/OpdFilterForm.tsx index 76d5f7c80..fe5fd07be 100644 --- a/src/components/accessories/opds/filter/OpdFilterForm.tsx +++ b/src/components/accessories/opds/filter/OpdFilterForm.tsx @@ -9,10 +9,10 @@ import { differenceInSeconds } from "date-fns"; import { useFormik } from "formik"; import get from "lodash.get"; import has from "lodash.has"; -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback, useState } from "react"; import { FC, useMemo } from "react"; import { useTranslation } from "react-i18next"; -import { date, number, object, string } from "yup"; +import { number, object, string } from "yup"; import { DiseaseDTO, DiseaseTypeDTO,