Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OH2-251 | Fix visit filter not working correctly #532

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading