Skip to content

Commit

Permalink
Update antental filter logic to filter by last menstruation start dat…
Browse files Browse the repository at this point in the history
…e within 9 months (#7797)

Co-authored-by: Mohammed Nihal <[email protected]>
  • Loading branch information
rithviknishad and nihal467 authored May 14, 2024
1 parent 599fe5d commit 8ede3f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 7 additions & 2 deletions src/Components/Patient/PatientFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,20 +432,25 @@ export default function PatientFilter(props: any) {
}
/>
</div>
{/* <div className="w-full flex-none">
<div className="w-full flex-none">
<FieldLabel className="text-sm">Is Antenatal</FieldLabel>
<SelectMenuV2
placeholder="Show all"
options={["true", "false"]}
optionLabel={(o) =>
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 })
}
/>
</div> */}
</div>
<div className="w-full flex-none">
<FieldLabel className="text-sm">Review Missed</FieldLabel>
<SelectMenuV2
Expand Down

0 comments on commit 8ede3f5

Please sign in to comment.