Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafMd-1 committed Apr 27, 2024
1 parent 0b4ec2f commit c4decb4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
34 changes: 17 additions & 17 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export const PatientManager = () => {
let category_name;
if (qParams.category) {
category_name = PATIENT_CATEGORIES.find(
(item: any) => qParams.category === item.id
(item: any) => qParams.category === item.id,
)?.text;

return String(category_name);
Expand Down Expand Up @@ -395,14 +395,14 @@ export const PatientManager = () => {
external_id: qParams.last_consultation_current_bed__location,
},
prefetch: !!qParams.last_consultation_current_bed__location,
}
},
);

const { data: permittedFacilities } = useQuery(
routes.getPermittedFacilities,
{
query: { limit: 1 },
}
},
);

const LastAdmittedToTypeBadges = () => {
Expand Down Expand Up @@ -638,7 +638,7 @@ export const PatientManager = () => {
!patient.is_active
) &&
dayjs(patient.last_consultation?.modified_date).isBefore(
new Date().getTime() - 24 * 60 * 60 * 1000
new Date().getTime() - 24 * 60 * 60 * 1000,
) && (
<span className="relative inline-flex">
<Chip
Expand Down Expand Up @@ -666,7 +666,7 @@ export const PatientManager = () => {
(resp) =>
resp.text ===
patient.last_consultation?.last_daily_round
?.ventilator_interface
?.ventilator_interface,
)?.id
}
</div>
Expand Down Expand Up @@ -756,7 +756,7 @@ export const PatientManager = () => {
authUser.home_facility_object?.id
) {
navigate(
`/facility/${authUser.home_facility_object.id}/patient`
`/facility/${authUser.home_facility_object.id}/patient`,
);
} else setShowDialog("create");
}}
Expand Down Expand Up @@ -959,26 +959,26 @@ export const PatientManager = () => {
badge("Review Missed", "review_missed"),
badge(
"Is Medico-Legal Case",
"last_consultation_medico_legal_case"
"last_consultation_medico_legal_case",
),
value(
"Facility",
"facility",
qParams.facility ? facilityData?.name || "" : ""
qParams.facility ? facilityData?.name || "" : "",
),
value(
"Location",
"last_consultation_current_bed__location",
qParams.last_consultation_current_bed__location
? facilityAssetLocationData?.name ||
qParams.last_consultation_current_bed__locations
: ""
: "",
),
badge("Facility Type", "facility_type"),
value(
"District",
"district",
qParams.district ? districtData?.name || "" : ""
qParams.district ? districtData?.name || "" : "",
),
ordering(),
value("Category", "category", getTheCategoryFromId()),
Expand All @@ -987,12 +987,12 @@ export const PatientManager = () => {
"Respiratory Support",
"ventilator_interface",
qParams.ventilator_interface &&
t(`RESPIRATORY_SUPPORT_${qParams.ventilator_interface}`)
t(`RESPIRATORY_SUPPORT_${qParams.ventilator_interface}`),
),
value(
"Gender",
"gender",
parseOptionId(GENDER_TYPES, qParams.gender) || ""
parseOptionId(GENDER_TYPES, qParams.gender) || "",
),
{
name: "Admitted to",
Expand All @@ -1010,15 +1010,15 @@ export const PatientManager = () => {
value(
DIAGNOSES_FILTER_LABELS[key],
key,
getDiagnosisFilterValue(key).join(", ")
)
getDiagnosisFilterValue(key).join(", "),
),
),
badge("Declared Status", "is_declared_positive"),
...dateRange("Result", "date_of_result"),
...dateRange("Declared positive", "date_declared_positive"),
...dateRange(
"Symptoms onset",
"last_consultation_symptoms_onset_date"
"last_consultation_symptoms_onset_date",
),
...dateRange("Last vaccinated", "last_vaccinated_date"),
{
Expand All @@ -1030,8 +1030,8 @@ export const PatientManager = () => {
"last_consultation__new_discharge_reason",
parseOptionId(
DISCHARGE_REASONS,
qParams.last_consultation__new_discharge_reason
) || ""
qParams.last_consultation__new_discharge_reason,
) || "",
),
]}
children={
Expand Down
46 changes: 23 additions & 23 deletions src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const PatientHome = (props: any) => {
},
});
navigate(
`/facility/${shift.assigned_facility}/patient/${shift.patient}/consultation`
`/facility/${shift.assigned_facility}/patient/${shift.patient}/consultation`,
);
};

Expand Down Expand Up @@ -170,7 +170,7 @@ export const PatientHome = (props: any) => {
patient: id,
},
prefetch: isShiftClicked,
}
},
);

const confirmApproval = (status: number, sample: any) => {
Expand Down Expand Up @@ -208,7 +208,7 @@ export const PatientHome = (props: any) => {
}

const patientGender = GENDER_TYPES.find(
(i) => i.id === patientData.gender
(i) => i.id === patientData.gender,
)?.text;

let patientMedHis: any[] = [];
Expand Down Expand Up @@ -327,7 +327,7 @@ export const PatientHome = (props: any) => {
disabled={!patientData.is_active}
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/consultation`
`/facility/${patientData?.facility}/patient/${id}/consultation`,
)
}
>
Expand Down Expand Up @@ -657,7 +657,7 @@ export const PatientHome = (props: any) => {
});
} else {
navigate(
`/facility/${patientData?.facility}/patient/${id}/update`
`/facility/${patientData?.facility}/patient/${id}/update`,
);
}
}}
Expand Down Expand Up @@ -845,7 +845,7 @@ export const PatientHome = (props: any) => {
!shift.patient_object.allow_transfer ||
!(
["DistrictAdmin", "StateAdmin"].includes(
authUser.user_type
authUser.user_type,
) ||
authUser.home_facility_object?.id ===
shift.assigned_facility
Expand Down Expand Up @@ -958,7 +958,7 @@ export const PatientHome = (props: any) => {
!patientData.ongoing_medication &&
!(patientData.gender === 2 && patientData.is_antenatal) &&
!patientData.medical_history?.some(
(history) => history.disease !== "NO"
(history) => history.disease !== "NO",
) && (
<div className="flex w-full items-center justify-center text-xl font-bold text-gray-500">
No Medical History Available
Expand Down Expand Up @@ -1035,27 +1035,27 @@ export const PatientHome = (props: any) => {
"w-full rounded-lg border",
isPatientEligibleForNewConsultation(patientData)
? "cursor-pointer border-green-700 hover:bg-primary-400"
: "border-gray-700 text-gray-700 hover:cursor-not-allowed"
: "border-gray-700 text-gray-700 hover:cursor-not-allowed",
)}
onClick={() =>
isPatientEligibleForNewConsultation(patientData) &&
navigate(
`/facility/${patientData?.facility}/patient/${id}/consultation`
`/facility/${patientData?.facility}/patient/${id}/consultation`,
)
}
>
<div
className={classNames(
"h-full space-y-2 rounded-lg bg-white p-4 shadow",
isPatientEligibleForNewConsultation(patientData) &&
"hover:bg-gray-200"
"hover:bg-gray-200",
)}
>
<div
className={classNames(
"text-center",
isPatientEligibleForNewConsultation(patientData) &&
"text-green-700"
"text-green-700",
)}
>
<span>
Expand Down Expand Up @@ -1094,7 +1094,7 @@ export const PatientHome = (props: any) => {
className="w-full"
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/files/`
`/facility/${patientData?.facility}/patient/${id}/files/`,
)
}
>
Expand Down Expand Up @@ -1155,7 +1155,7 @@ export const PatientHome = (props: any) => {
onClick={() => {
if (!isPatientInactive(patientData, facilityId)) {
navigate(
`/facility/${patientData?.facility}/patient/${id}/sample-test`
`/facility/${patientData?.facility}/patient/${id}/sample-test`,
);
}
}}
Expand All @@ -1165,7 +1165,7 @@ export const PatientHome = (props: any) => {
"h-full space-y-2 rounded-lg border bg-white p-4 shadow",
isPatientInactive(patientData, facilityId)
? " border-gray-700 hover:cursor-not-allowed"
: " border-green-700 hover:cursor-pointer hover:bg-gray-200"
: " border-green-700 hover:cursor-pointer hover:bg-gray-200",
)}
>
<div
Expand Down Expand Up @@ -1195,7 +1195,7 @@ export const PatientHome = (props: any) => {
className="w-full"
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/notes`
`/facility/${patientData?.facility}/patient/${id}/notes`,
)
}
>
Expand Down Expand Up @@ -1225,15 +1225,15 @@ export const PatientHome = (props: any) => {
"h-full space-y-2 rounded-lg border bg-white p-4 shadow",
isPatientInactive(patientData, facilityId)
? "border-gray-700 hover:cursor-not-allowed"
: "border-green-700 hover:cursor-pointer hover:bg-gray-200"
: "border-green-700 hover:cursor-pointer hover:bg-gray-200",
)}
>
<div
className={classNames(
"text-center",
isPatientInactive(patientData, facilityId)
? "text-gray-700"
: "text-green-700"
: "text-green-700",
)}
>
<span>
Expand All @@ -1246,7 +1246,7 @@ export const PatientHome = (props: any) => {
"text-center text-sm font-medium",
isPatientInactive(patientData, facilityId)
? "text-gray-700"
: "text-black"
: "text-black",
)}
>
Assign to a volunteer
Expand All @@ -1271,7 +1271,7 @@ export const PatientHome = (props: any) => {
}
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/consultation`
`/facility/${patientData?.facility}/patient/${id}/consultation`,
)
}
>
Expand Down Expand Up @@ -1300,7 +1300,7 @@ export const PatientHome = (props: any) => {
id="upload-patient-files"
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/files`
`/facility/${patientData?.facility}/patient/${id}/files`,
)
}
>
Expand All @@ -1316,7 +1316,7 @@ export const PatientHome = (props: any) => {
disabled={isPatientInactive(patientData, facilityId)}
onClick={() =>
navigate(
`/facility/${facilityId}/patient/${id}/shift/new`
`/facility/${facilityId}/patient/${id}/shift/new`,
)
}
authorizeFor={NonReadOnlyUsers}
Expand All @@ -1333,7 +1333,7 @@ export const PatientHome = (props: any) => {
disabled={isPatientInactive(patientData, facilityId)}
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/sample-test`
`/facility/${patientData?.facility}/patient/${id}/sample-test`,
)
}
authorizeFor={NonReadOnlyUsers}
Expand All @@ -1349,7 +1349,7 @@ export const PatientHome = (props: any) => {
className="w-full"
onClick={() =>
navigate(
`/facility/${patientData?.facility}/patient/${id}/notes`
`/facility/${patientData?.facility}/patient/${id}/notes`,
)
}
>
Expand Down

0 comments on commit c4decb4

Please sign in to comment.