Skip to content

Commit

Permalink
OH2-251 | Fix visit filter not working correctly (#532)
Browse files Browse the repository at this point in the history
* fix(OH2-251): Fix visit newPatient not being set correctly

* update(OH2-251): Rename 'new admittance' to 'new attendance'

* style: Remove unused imports
  • Loading branch information
SteveGT96 authored Nov 10, 2023
1 parent cc4a7d7 commit 6f076ca
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/components/accessories/opds/filter/OpdFilterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -311,11 +311,11 @@ export const OpdFilterForm: FC<IOpdFilterProps> = ({
const newPatientOptions = [
{
label: t("opd.all"),
value: "",
value: "A",
},
{
label: t("opd.newadmittance"),
value: "A",
label: t("opd.newattendance"),
value: "N",
},
{
label: t("opd.reattendance"),
Expand Down
2 changes: 1 addition & 1 deletion src/components/accessories/opds/table/OpdTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const OpdTable: FC<IOpdTableProps> = ({ data }) => {
newPatient:
e.newPatient === "R"
? t("opd.reattendance")
: t("opd.newadmittance"),
: t("opd.newattendance"),
note: e.note ?? "",
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ const PatientOPDForm: FunctionComponent<TProps> = ({
<FormControlLabel
value="N"
control={<Radio />}
label={t("opd.newadmittance")}
label={t("opd.newattendance")}
checked={formik.values["newPatient"] === "N"}
/>
</RadioGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/sq.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/i18n/sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6f076ca

Please sign in to comment.