From 7897b70e5fe54448914040f90d8063ac42dd60c8 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Mon, 13 May 2024 10:12:58 +0530 Subject: [PATCH] Update antental filter logic to filter by last menstruation start date within 9 months --- src/Components/Patient/ManagePatients.tsx | 4 ++++ src/Components/Patient/PatientFilter.tsx | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index ff4838c5822..dd9a58ad80d 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -222,6 +222,10 @@ export const PatientManager = () => { last_consultation_is_telemedicine: qParams.last_consultation_is_telemedicine || undefined, is_antenatal: qParams.is_antenatal || undefined, + last_menstruation_start_date_after: + (qParams.is_antenatal === "true" && + dayjs().subtract(9, "month").format("YYYY-MM-DD")) || + undefined, ventilator_interface: qParams.ventilator_interface || undefined, diagnoses: qParams.diagnoses || undefined, diagnoses_confirmed: qParams.diagnoses_confirmed || undefined, diff --git a/src/Components/Patient/PatientFilter.tsx b/src/Components/Patient/PatientFilter.tsx index ce0b576b468..7c68dce8fbc 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/Components/Patient/PatientFilter.tsx @@ -432,7 +432,7 @@ export default function PatientFilter(props: any) { } /> - {/*
+
Is Antenatal o === "true" ? "Antenatal" : "Non-antenatal" } + optionDescription={(o) => + o === "true" + ? "i.e., last menstruation start date is within the last 9 months" + : undefined + } value={filterState.is_antenatal} onChange={(v) => setFilterState({ ...filterState, is_antenatal: v }) } /> -
*/} +
Review Missed