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

fixes: #7813. Removed COVID Status and added Last Discharged Reason with better alignment in Patient details page #7816

Merged
Changes from all commits
Commits
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
29 changes: 25 additions & 4 deletions src/Components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,18 +591,39 @@ export const PatientHome = (props: any) => {
<div className="flex justify-between">
<div className="w-1/2 border-r-2">
<div className="text-sm font-normal leading-5 text-gray-500">
COVID Status
Status
</div>
<div className="mt-1 text-xl font-semibold leading-5 text-gray-900">
{patientData.disease_status}
{patientData.is_active ? "LIVE" : "DISCHARGED"}
</div>
</div>
<div className="w-1/2">
<div className="text-sm font-normal leading-5 text-gray-500">
Status
Last Discharged Reason
</div>
<div className="mt-1 text-xl font-semibold leading-5 text-gray-900">
{patientData.is_active ? "LIVE" : "DISCHARGED"}
{patientData.is_active ? (
"-"
) : !patientData.last_consultation
?.new_discharge_reason ? (
<span className="text-gray-800">
{patientData?.last_consultation?.suggestion === "OP"
? "OP file closed"
: "UNKNOWN"}
</span>
) : patientData.last_consultation
?.new_discharge_reason ===
DISCHARGE_REASONS.find((i) => i.text == "Expired")
?.id ? (
<span className="text-red-600">EXPIRED</span>
) : (
DISCHARGE_REASONS.find(
(reason) =>
reason.id ===
patientData.last_consultation
?.new_discharge_reason,
)?.text
)}
</div>
</div>
</div>
Expand Down
Loading