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

Fix: Discharge patient showing live #9415

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5a2824c
Fix: Discharge patient showing live
AdityaJ2305 Dec 14, 2024
00fb42b
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 14, 2024
ce95370
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 15, 2024
38dda12
last consultation for specific facility
AdityaJ2305 Dec 15, 2024
dc2b994
Merge branch 'issue/9289/discharge_patient_showing_status_live' of ht…
AdityaJ2305 Dec 15, 2024
d269ce3
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 16, 2024
5f6119e
updated to discharge date
AdityaJ2305 Dec 16, 2024
a38dd84
Merge branch 'issue/9289/discharge_patient_showing_status_live' of ht…
AdityaJ2305 Dec 16, 2024
b1c49cd
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 16, 2024
a4c61b9
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 17, 2024
bd240e9
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 17, 2024
ac9b08f
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 17, 2024
0a0424f
update size to small
AdityaJ2305 Dec 17, 2024
9b4111d
Merge branch 'issue/9289/discharge_patient_showing_status_live' of ht…
AdityaJ2305 Dec 17, 2024
1b6f46b
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 18, 2024
be04b48
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
nihal467 Dec 18, 2024
8920e17
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 18, 2024
7abb9fd
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
nihal467 Dec 19, 2024
8299735
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 19, 2024
62af0c2
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
nihal467 Dec 20, 2024
19b2ee9
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 20, 2024
2be74ef
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 21, 2024
c705506
Merge branch 'develop' into issue/9289/discharge_patient_showing_stat…
AdityaJ2305 Dec 22, 2024
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
44 changes: 34 additions & 10 deletions src/components/Facility/ConsultationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const ConsultationCard = (props: ConsultationProps) => {
: !itemData.current_bed
? t("assign_bed")
: t("switch_bed");

return (
<>
<DialogModal
Expand All @@ -53,16 +54,39 @@ export const ConsultationCard = (props: ConsultationProps) => {
)}
</DialogModal>
<div className="pb-16 block relative cursor-pointer border-l-2 px-4 border-l-secondary-300 hover:border-primary-500 transition-all before:absolute before:-left-[7px] before:top-0 before:w-3 before:aspect-square before:bg-secondary-400 before:rounded-full hover:before:bg-primary-500 before:transition-all">
<Chip
size="small"
variant={itemData.suggestion === "A" ? "alert" : "primary"}
text={
itemData.suggestion === "A" ? t("ip_encounter") : t("op_encounter")
}
className="-translate-y-2"
/>
<div className="text-sm">
{dayjs(itemData.created_date).format("DD/MM/YYYY")}
<div className="flex flex-wrap items-center gap-4 mt-4">
<div className="flex flex-col gap-1">
<Chip
size="small"
variant={itemData.suggestion === "A" ? "alert" : "primary"}
text={
itemData.suggestion === "A"
? t("ip_encounter")
: t("op_encounter")
}
className="-translate-y-2"
/>
<div className="text-sm">
{dayjs(itemData.created_date).format("DD/MM/YYYY")}
</div>
</div>

{/* Patient Status Section */}
<div className="flex items-center gap-2 -translate-y-5 ">
<div className="text-sm font-normal leading-5">
{t("patient_status")}
</div>
<Chip
size="small"
variant="custom"
className={
!itemData.discharge_date
? "bg-blue-100 text-blue-800"
: "bg-red-100 text-red-800"
}
text={!itemData.discharge_date ? "LIVE" : "DISCHARGED"}
/>
</div>
</div>

{itemData.is_kasp && (
Expand Down
18 changes: 0 additions & 18 deletions src/components/Patient/PatientDetailsTab/Demography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { navigate } from "raviger";
import { Fragment, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";

import Chip from "@/CAREUI/display/Chip";
import CareIcon from "@/CAREUI/icons/CareIcon";
import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild";

Expand Down Expand Up @@ -356,23 +355,6 @@ export const Demography = (props: PatientProps) => {

<div className="lg:basis-4/5">
<div className="mb-2 flex flex-row justify-between">
<div className="w-1/2">
<div className="text-sm font-normal leading-5 text-secondary-700">
{t("patient_status")}
</div>
<div className="mt-1 text-xl font-semibold leading-5 text-secondary-900">
<Chip
size="medium"
variant="custom"
className={
patientData.is_active
? "bg-blue-100 text-blue-800"
: "bg-red-100 text-red-800"
}
text={patientData.is_active ? "LIVE" : "DISCHARGED"}
/>
</div>
</div>
<div>
<AuthorizedChild authorizeFor={NonReadOnlyUsers}>
{({ isAuthorized }) => (
Expand Down
Loading