- Facility
+ Facility
setFacility(obj, "facility")}
className="shifting-page-filter-dropdown"
- errors={""}
/>
- Facility type
- Facility type
+ o.text}
+ optionValue={(o) => o.text}
value={filterState.facility_type}
- options={[
- { id: "", text: "Show All" },
- ...FACILITY_TYPES.map(({ id, text }) => {
- return {
- id: text,
- text,
- };
- }),
- ]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) =>
+ setFilterState({ ...filterState, facility_type: v })
+ }
+ optionIcon={() => }
/>
- Gender
- Gender
+ o.text}
+ optionIcon={(o) => {o.icon}}
+ optionValue={(o) => o.id}
value={filterState.gender}
- options={[{ id: "", text: "Show All" }, ...GENDER_TYPES]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) => setFilterState({ ...filterState, gender: v })}
/>
- Is Antenatal
- Is Antenatal
+ (o ? "Antenatal" : "Non-antenatal")}
value={filterState.is_antenatal}
- options={[
- { id: "", text: "Show All" },
- { id: "true", text: "antenatal" },
- { id: "false", text: "non antenatal" },
- ]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) =>
+ setFilterState({ ...filterState, is_antenatal: v })
+ }
/>
-
{KASP_ENABLED && (
- {KASP_STRING}
- {KASP_STRING}
+
+ o ? `Show ${KASP_STRING}` : `Show Non ${KASP_STRING}`
+ }
value={filterState.is_kasp}
- options={[
- { id: "", text: "Show All" },
- { id: "true", text: `Show ${KASP_STRING}` },
- { id: "false", text: `Show Non ${KASP_STRING}` },
- ]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) => setFilterState({ ...filterState, is_kasp: v })}
/>
)}
- Category
- Category
+ o.text}
+ optionValue={(o) => o.id}
value={filterState.category}
- options={[
- { id: "", text: "Show All" },
- ...PATIENT_FILTER_CATEGORIES,
- ]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) => setFilterState({ ...filterState, category: v })}
/>
- Disease Status
- Disease Status
+ o}
value={filterState.disease_status}
- options={["Show All", ...DISEASE_STATUS]}
- onChange={handleChange}
- className="bg-white h-10 shadow-sm md:text-sm md:leading-5 md:h-9"
+ onChange={(v) =>
+ setFilterState({ ...filterState, disease_status: v })
+ }
/>
- Vaccinated
- Vaccinated
+ o.text}
+ optionValue={(o) => o.id}
+ value={filterState.number_of_doses}
+ onChange={(v) =>
+ setFilterState({ ...filterState, number_of_doses: v })
+ }
/>
- Declared
- Declared
+ o.text}
+ optionValue={(o) => o.id}
+ value={filterState.is_declared_positive}
+ onChange={(v) =>
+ setFilterState({ ...filterState, is_declared_positive: v })
+ }
/>
- Telemedicine
- Telemedicine
+ o.text}
+ optionValue={(o) => o.id}
+ value={filterState.last_consultation_is_telemedicine}
+ onChange={(v) =>
+ setFilterState({
+ ...filterState,
+ last_consultation_is_telemedicine: v,
+ })
+ }
/>
-
SRF ID
-
+
SRF ID}
+ value={filterState.srf_id}
+ onChange={handleFormFieldChange}
+ errorClassName="hidden"
+ />
-
COWIN ID
-
+
CoWIN ID}
+ value={filterState.covin_id}
+ onChange={handleFormFieldChange}
+ errorClassName="hidden"
+ />
-
+
Last Admitted to (Bed Type)
-
-
+
-
-
-
- handleDateRangeChange(
- "date_of_result_after",
- "date_of_result_before",
- e
- )
+ optionValue={(o) => o.id}
+ optionLabel={(o) => o.text}
+ onChange={(o) =>
+ setFilterState({
+ ...filterState,
+ last_consultation_admitted_to_list: o,
+ })
}
- endDateId={"date_of_result_before"}
- startDateId={"date_of_result_after"}
- label={"Date of result"}
- size="small"
- />
-
- handleDateRangeChange(
- "date_declared_positive_after",
- "date_declared_positive_before",
- e
- )
- }
- endDateId={"date_declared_positive_before"}
- startDateId={"date_declared_positive_after"}
- label={"Date Declared Positive"}
- size="small"
/>
+
-
- handleDateRangeChange(
- "created_date_after",
- "created_date_before",
- e
- )
- }
- endDateId={"created_date_before"}
- startDateId={"created_date_after"}
- label={"Created Date"}
- size="small"
- />
-
- handleDateRangeChange(
- "modified_date_after",
- "modified_date_before",
- e
- )
- }
- endDateId={"modified_date_before"}
- startDateId={"modified_date_after"}
- label={"Modified Date"}
- size="small"
- />
-
+
+
+
+
- handleDateRangeChange(
- "last_consultation_admission_date_after",
- "last_consultation_admission_date_before",
- e
- )
- }
- endDateId={"last_consultation_admission_date_before"}
- startDateId={"last_consultation_admission_date_after"}
- label={"Admit Date"}
- size="small"
- />
-
+
- handleDateRangeChange(
- "last_consultation_discharge_date_after",
- "last_consultation_discharge_date_before",
- e
- )
- }
- endDateId={"last_consultation_discharge_date_before"}
- startDateId={"last_consultation_discharge_date_after"}
- label={"Discharge Date"}
- size="small"
- />
-
+
- handleDateRangeChange(
- "last_consultation_symptoms_onset_date_after",
- "last_consultation_symptoms_onset_date_before",
- e
- )
- }
- endDateId={"last_consultation_symptoms_onset_date_before"}
- startDateId={"last_consultation_symptoms_onset_date_after"}
- label={"Onset of Symptoms Date"}
- size="small"
- />
-
- handleDateRangeChange(
- "last_vaccinated_date_after",
- "last_vaccinated_date_before",
- e
- )
- }
- endDateId={"last_vaccinated_date_before"}
- startDateId={"last_vaccinated_date_after"}
- label={"Vaccination Date"}
- size="small"
- />
-