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

Add Patient Filter for Review Missed #7328

Merged
merged 20 commits into from
Apr 17, 2024
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
2 changes: 2 additions & 0 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export const PatientManager = () => {
diagnoses_provisional: qParams.diagnoses_provisional || undefined,
diagnoses_unconfirmed: qParams.diagnoses_unconfirmed || undefined,
diagnoses_differential: qParams.diagnoses_differential || undefined,
review_missed: qParams.review_missed || undefined,
};

useEffect(() => {
Expand Down Expand Up @@ -944,6 +945,7 @@ export const PatientManager = () => {
kasp(),
badge("COWIN ID", "covin_id"),
badge("Is Antenatal", "is_antenatal"),
badge("Review Missed", "review_missed"),
badge(
"Is Medico-Legal Case",
"last_consultation_medico_legal_case",
Expand Down
15 changes: 15 additions & 0 deletions src/Components/Patient/PatientFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default function PatientFilter(props: any) {
diagnoses_provisional: filter.diagnoses_provisional || null,
diagnoses_unconfirmed: filter.diagnoses_unconfirmed || null,
diagnoses_differential: filter.diagnoses_differential || null,
review_missed: filter.review_missed || null,
});

useQuery(routes.getAnyFacility, {
Expand Down Expand Up @@ -203,6 +204,7 @@ export default function PatientFilter(props: any) {
diagnoses_provisional,
diagnoses_unconfirmed,
diagnoses_differential,
review_missed,
} = filterState;
const data = {
district: district || "",
Expand Down Expand Up @@ -270,6 +272,7 @@ export default function PatientFilter(props: any) {
diagnoses_provisional: diagnoses_provisional || "",
diagnoses_unconfirmed: diagnoses_unconfirmed || "",
diagnoses_differential: diagnoses_differential || "",
review_missed: review_missed || "",
};
onChange(data);
};
Expand Down Expand Up @@ -437,6 +440,18 @@ export default function PatientFilter(props: any) {
}
/>
</div>
<div className="w-full flex-none">
<FieldLabel className="text-sm">Review Missed</FieldLabel>
<SelectMenuV2
placeholder="Show all"
options={["true", "false"]}
optionLabel={(o) => (o === "true" ? "Yes" : "No")}
value={filterState.review_missed}
onChange={(v) =>
setFilterState({ ...filterState, review_missed: v })
}
/>
</div>
<div className="w-full flex-none">
<FieldLabel className="text-sm">Is Medico-Legal Case</FieldLabel>
<SelectMenuV2
Expand Down
Loading