Skip to content

Commit

Permalink
Remove unwanted covid fields (#7870)
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar authored May 21, 2024
1 parent 2c34d5f commit f71075d
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 464 deletions.
7 changes: 2 additions & 5 deletions cypress/e2e/shifting_spec/filter.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Shifting section filter", () => {
shiftingPage.filterByFacility(
"Dummy Shifting",
"Dummy Shifting",
"District"
"District",
);

shiftingPage.facilityAssignedBadge().should("exist");
Expand All @@ -32,13 +32,10 @@ describe("Shifting section filter", () => {
"ASC Created Date",
"yes",
"yes",
"POSITIVE",
"no",
"MODERATE",
"9999999999"
"9999999999",
);

shiftingPage.diseaseStatusBadge().should("exist");
shiftingPage.orderingBadge().should("exist");
shiftingPage.breathlessnessLevelBadge().should("exist");
shiftingPage.phoneNumberBadge().should("exist");
Expand Down
18 changes: 3 additions & 15 deletions cypress/pageobject/Shift/ShiftFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class ShiftingPage {
return cy.get("#is-up-shift");
}

diseaseStatusInput() {
return cy.get("#disease-status");
}

isAntenatalInput() {
return cy.get("#is-antenatal");
}
Expand Down Expand Up @@ -63,10 +59,6 @@ class ShiftingPage {
return cy.get("[data-testid='Current facility']");
}

diseaseStatusBadge() {
return cy.get("[data-testid='Disease status']");
}

orderingBadge() {
return cy.get("[data-testid='Ordering']");
}
Expand Down Expand Up @@ -98,7 +90,7 @@ class ShiftingPage {
filterByFacility(
origin_facility: string,
assigned_facility: string,
assigned_to: string
assigned_to: string,
) {
this.originFacilityInput().click().type(origin_facility);
cy.get("[role='option']").contains(origin_facility).click();
Expand All @@ -116,10 +108,9 @@ class ShiftingPage {
ordering: string,
emergency: string,
is_up_shift: string,
disease_status: string,
is_antenatal: string,
breathlessness_level: string,
patient_phone_number: string
patient_phone_number: string,
) {
this.orderingInput().click();
cy.get("[role='option']").contains(ordering).click();
Expand All @@ -130,9 +121,6 @@ class ShiftingPage {
this.isUpShiftInput().click();
cy.get("[role='option']").contains(is_up_shift).click();

this.diseaseStatusInput().click();
cy.get("[role='option']").contains(disease_status).click();

this.isAntenatalInput().click();
cy.get("[role='option']").contains(is_antenatal).click();

Expand All @@ -148,7 +136,7 @@ class ShiftingPage {
created_date_start: string,
created_date_end: string,
modified_date_start: string,
modified_date_end: string
modified_date_end: string,
) {
this.createdDateStartInput().click();
cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b")
Expand Down
7 changes: 0 additions & 7 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,6 @@ export const SAMPLE_FLOW_RULES = {
RECEIVED_AT_LAB: ["COMPLETED"],
};

export const DISEASE_STATUS = [
"POSITIVE",
"SUSPECTED",
"NEGATIVE",
"RECOVERED",
];

export const TEST_TYPE = [
"UNK",
"ANTIGEN",
Expand Down
24 changes: 0 additions & 24 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export const PatientManager = () => {
is_active:
!qParams.last_consultation__new_discharge_reason &&
(qParams.is_active || "True"),
disease_status: qParams.disease_status || undefined,
phone_number: qParams.phone_number
? parsePhoneNumber(qParams.phone_number)
: undefined,
Expand All @@ -189,8 +188,6 @@ export const PatientManager = () => {
qParams.date_declared_positive_before || undefined,
date_declared_positive_after:
qParams.date_declared_positive_after || undefined,
date_of_result_before: qParams.date_of_result_before || undefined,
date_of_result_after: qParams.date_of_result_after || undefined,
last_consultation_medico_legal_case:
qParams.last_consultation_medico_legal_case || undefined,
last_consultation_encounter_date_before:
Expand All @@ -207,7 +204,6 @@ export const PatientManager = () => {
qParams.last_consultation__new_discharge_reason || undefined,
last_consultation_current_bed__location:
qParams.last_consultation_current_bed__location || undefined,
srf_id: qParams.srf_id || undefined,
number_of_doses: qParams.number_of_doses || undefined,
covin_id: qParams.covin_id || undefined,
is_kasp: qParams.is_kasp || undefined,
Expand Down Expand Up @@ -259,7 +255,6 @@ export const PatientManager = () => {
[params.created_date_before, params.created_date_after],
[params.modified_date_before, params.modified_date_after],
[params.date_declared_positive_before, params.date_declared_positive_after],
[params.date_of_result_before, params.date_of_result_after],
[params.last_vaccinated_date_before, params.last_vaccinated_date_after],
[
params.last_consultation_encounter_date_before,
Expand Down Expand Up @@ -595,14 +590,6 @@ export const PatientManager = () => {
text={`IP Days: ${dayjs().diff(patient.last_consultation.encounter_date, "day")}`}
/>
)}
{patient.disease_status === "POSITIVE" && (
<Chip
size="small"
variant="danger"
startIcon="l-coronavirus"
text="Positive"
/>
)}
{patient.gender === 2 &&
patient.is_antenatal &&
isAntenatal(patient.last_menstruation_start_date) &&
Expand All @@ -624,14 +611,6 @@ export const PatientManager = () => {
text="Medical Worker"
/>
)}
{patient.disease_status === "EXPIRED" && (
<Chip
size="small"
variant="warning"
startIcon="l-exclamation-triangle"
text="Patient Expired"
/>
)}
{(!patient.last_consultation ||
patient.last_consultation?.facility !== patient.facility ||
(patient.last_consultation?.discharge_date &&
Expand Down Expand Up @@ -1009,7 +988,6 @@ export const PatientManager = () => {
),
ordering(),
value("Category", "category", getTheCategoryFromId()),
badge("Disease Status", "disease_status"),
value(
"Respiratory Support",
"ventilator_interface",
Expand All @@ -1027,7 +1005,6 @@ export const PatientManager = () => {
paramKey: "last_consultation_admitted_to",
},
...range("Age", "age"),
badge("SRF ID", "srf_id"),
{
name: "LSG Body",
value: qParams.lsgBody ? LocalBodyData?.name || "" : "",
Expand All @@ -1041,7 +1018,6 @@ export const PatientManager = () => {
),
),
badge("Declared Status", "is_declared_positive"),
...dateRange("Result", "date_of_result"),
...dateRange("Declared positive", "date_declared_positive"),
...dateRange(
"Symptoms onset",
Expand Down
51 changes: 0 additions & 51 deletions src/Components/Patient/PatientFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover";
import {
ADMITTED_TO,
DISCHARGE_REASONS,
DISEASE_STATUS,
FACILITY_TYPES,
GENDER_TYPES,
PATIENT_FILTER_CATEGORIES,
Expand Down Expand Up @@ -51,18 +50,14 @@ export default function PatientFilter(props: any) {
district_ref: null,
date_declared_positive_before: filter.date_declared_positive_before || null,
date_declared_positive_after: filter.date_declared_positive_after || null,
date_of_result_before: filter.date_of_result_before || null,
date_of_result_after: filter.date_of_result_after || null,
created_date_before: filter.created_date_before || null,
created_date_after: filter.created_date_after || null,
modified_date_before: filter.modified_date_before || null,
modified_date_after: filter.modified_date_after || null,
category: filter.category || null,
gender: filter.gender || null,
disease_status: filter.disease_status || null,
age_min: filter.age_min || null,
age_max: filter.age_max || null,
date_of_result: filter.date_of_result || null,
date_declared_positive: filter.date_declared_positive || null,
last_consultation_medico_legal_case:
filter.last_consultation_medico_legal_case || null,
Expand All @@ -82,7 +77,6 @@ export default function PatientFilter(props: any) {
filter.last_consultation_current_bed__location || "",
last_consultation__new_discharge_reason:
filter.last_consultation__new_discharge_reason || null,
srf_id: filter.srf_id || null,
number_of_doses: filter.number_of_doses || null,
covin_id: filter.covin_id || null,
is_kasp: filter.is_kasp || null,
Expand Down Expand Up @@ -169,18 +163,14 @@ export default function PatientFilter(props: any) {
lsgBody,
date_declared_positive_before,
date_declared_positive_after,
date_of_result_before,
date_of_result_after,
created_date_before,
created_date_after,
modified_date_before,
modified_date_after,
category,
gender,
disease_status,
age_min,
age_max,
date_of_result,
last_consultation_medico_legal_case,
last_consultation_encounter_date_before,
last_consultation_encounter_date_after,
Expand All @@ -191,7 +181,6 @@ export default function PatientFilter(props: any) {
last_consultation_current_bed__location,
number_of_doses,
covin_id,
srf_id,
is_kasp,
is_declared_positive,
last_consultation_symptoms_onset_date_before,
Expand Down Expand Up @@ -221,13 +210,10 @@ export default function PatientFilter(props: any) {
date_declared_positive_after: dateQueryString(
date_declared_positive_after,
),
date_of_result_before: dateQueryString(date_of_result_before),
date_of_result_after: dateQueryString(date_of_result_after),
created_date_before: dateQueryString(created_date_before),
created_date_after: dateQueryString(created_date_after),
modified_date_before: dateQueryString(modified_date_before),
modified_date_after: dateQueryString(modified_date_after),
date_of_result: dateQueryString(date_of_result),
last_consultation_medico_legal_case:
last_consultation_medico_legal_case || "",
last_consultation_encounter_date_before: dateQueryString(
Expand All @@ -244,15 +230,12 @@ export default function PatientFilter(props: any) {
),
category: category || "",
gender: gender || "",
disease_status:
(disease_status == "Show All" ? "" : disease_status) || "",
age_min: age_min || "",
age_max: age_max || "",
last_consultation_admitted_bed_type_list:
last_consultation_admitted_bed_type_list || [],
last_consultation__new_discharge_reason:
last_consultation__new_discharge_reason || "",
srf_id: srf_id || "",
number_of_doses: number_of_doses || "",
covin_id: covin_id || "",
is_kasp: is_kasp || "",
Expand Down Expand Up @@ -680,18 +663,6 @@ export default function PatientFilter(props: any) {
</div>
)}

<div className="w-full flex-none">
<FieldLabel className="text-sm">COVID Disease status</FieldLabel>
<SelectMenuV2
placeholder="Show all"
options={DISEASE_STATUS}
optionLabel={(o) => o}
value={filterState.disease_status}
onChange={(v) =>
setFilterState({ ...filterState, disease_status: v })
}
/>
</div>
<div className="w-full flex-none">
<FieldLabel className="text-sm">COVID Vaccinated</FieldLabel>
<SelectMenuV2
Expand Down Expand Up @@ -727,17 +698,6 @@ export default function PatientFilter(props: any) {
/>
</div>

<div className="w-full flex-none">
<TextFormField
id="srf_id"
name="srf_id"
placeholder="Filter by SRF ID"
label={<span className="text-sm">SRF ID</span>}
value={filterState.srf_id}
onChange={handleFormFieldChange}
errorClassName="hidden"
/>
</div>
<div className="w-full flex-none">
<TextFormField
id="covin_id"
Expand All @@ -750,17 +710,6 @@ export default function PatientFilter(props: any) {
/>
</div>

<DateRangeFormField
labelClassName="text-sm"
name="date_of_result"
label="Date of result of COVID Test"
value={{
start: getDate(filterState.date_of_result_after),
end: getDate(filterState.date_of_result_before),
}}
onChange={handleDateRangeChange}
errorClassName="hidden"
/>
<DateRangeFormField
labelClassName="text-sm"
name="date_declared_positive"
Expand Down
23 changes: 1 addition & 22 deletions src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,20 +387,6 @@ export const PatientHome = (props: any) => {
)}
</>
)}
{patientData.contact_with_confirmed_carrier && (
<Chip
variant="danger"
startIcon="l-exclamation-triangle"
text="Contact with confirmed carrier"
/>
)}
{patientData.contact_with_suspected_carrier && (
<Chip
variant="warning"
startIcon="l-exclamation-triangle"
text="Contact with suspected carrier"
/>
)}
{patientData.past_travel && (
<Chip
variant="warning"
Expand Down Expand Up @@ -747,14 +733,7 @@ export const PatientHome = (props: any) => {
activeShiftingData.results.map((shift: any) => (
<div key={`shift_${shift.id}`} className="mx-2 ">
<div className="h-full overflow-hidden rounded-lg bg-white shadow">
<div
className={
"flex h-full flex-col justify-between p-4 " +
(shift.patient_object.disease_status === "POSITIVE"
? "bg-red-600/5"
: "")
}
>
<div className="flex h-full flex-col justify-between p-4">
<div>
<div className="mt-1 flex justify-between">
<div>
Expand Down
Loading

0 comments on commit f71075d

Please sign in to comment.