diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index e1d982148f1..d02ee982f07 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -110,6 +110,7 @@ export const PatientManager = () => { const [districtName, setDistrictName] = useState(""); const [localbodyName, setLocalbodyName] = useState(""); const [facilityBadgeName, setFacilityBadge] = useState(""); + const [consultationFiledBadgeName, setConsultationFiledBadge] = useState(""); const [locationBadgeName, setLocationBadge] = useState(""); const [phone_number, setPhoneNumber] = useState(""); const [phoneNumberError, setPhoneNumberError] = useState(""); @@ -194,6 +195,7 @@ export const PatientManager = () => { date_of_result_after: qParams.date_of_result_after || undefined, last_consultation_medico_legal_case: qParams.last_consultation_medico_legal_case || undefined, + consultation_filed: qParams.consultation_filed || undefined, last_consultation_encounter_date_before: qParams.last_consultation_encounter_date_before || undefined, last_consultation_encounter_date_after: @@ -386,10 +388,21 @@ export const PatientManager = () => { qParams.last_vaccinated_date_before, qParams.last_vaccinated_date_after, qParams.last_consultation_is_telemedicine, + qParams.consultation_filed, qParams.is_antenatal, qParams.ventilator_interface, ]); + useEffect(() => { + if (qParams.consultation_filed != null) { + setConsultationFiledBadge( + qParams.consultation_filed === "true" ? "Filed" : "Not Filed" + ); + } else { + setConsultationFiledBadge(""); + } + }, [qParams.consultation_filed]); + const getTheCategoryFromId = () => { let category_name; if (qParams.category) { @@ -978,6 +991,11 @@ export const PatientManager = () => { "Is Medico-Legal Case", "last_consultation_medico_legal_case" ), + value( + "Consultation Status", + "consultation_filed", + consultationFiledBadgeName + ), value("Facility", "facility", facilityBadgeName), value( "Location", diff --git a/src/Components/Patient/PatientFilter.tsx b/src/Components/Patient/PatientFilter.tsx index 481d2dcc67b..0b3f075c659 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/Components/Patient/PatientFilter.tsx @@ -96,6 +96,7 @@ export default function PatientFilter(props: any) { last_vaccinated_date_after: filter.last_vaccinated_date_after || null, last_consultation_is_telemedicine: filter.last_consultation_is_telemedicine || null, + consultation_filed: filter.consultation_filed || null, is_antenatal: filter.is_antenatal || null, ventilator_interface: filter.ventilator_interface || null, }); @@ -131,6 +132,7 @@ export default function PatientFilter(props: any) { last_consultation_discharge_date_after: "", last_consultation_admitted_to_list: [], last_consultation_current_bed__location: "", + consultation_filed: null, srf_id: "", number_of_doses: null, covin_id: "", @@ -253,6 +255,7 @@ export default function PatientFilter(props: any) { last_vaccinated_date_before, last_vaccinated_date_after, last_consultation_is_telemedicine, + consultation_filed, is_antenatal, ventilator_interface, } = filterState; @@ -315,6 +318,7 @@ export default function PatientFilter(props: any) { last_vaccinated_date_after: dateQueryString(last_vaccinated_date_after), last_consultation_is_telemedicine: last_consultation_is_telemedicine || "", + consultation_filed: consultation_filed || "", is_antenatal: is_antenatal || "", ventilator_interface: ventilator_interface || "", }; @@ -501,6 +505,23 @@ export default function PatientFilter(props: any) { } /> +
+ Consultation Status + + o === "true" ? "Consultation Filed" : "No Consultation Filed" + } + value={filterState.consultation_filed} + onChange={(v) => + setFilterState({ + ...filterState, + consultation_filed: v, + }) + } + /> +