Skip to content

Commit

Permalink
Show icu admission date on consultations dashboard (#6779)
Browse files Browse the repository at this point in the history
* show icu admission date

* refactor

* handle case when data isn't present

* fix padding

* update variable to encounter_date

* show admission date in banner

* fix placement
  • Loading branch information
Pranshu1902 authored Jan 4, 2024
1 parent f8a979b commit 1a0bd2c
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/Components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default function PatientInfoCard(props: {
);
})}
</div>
{!!consultation?.discharge_date && (
{consultation?.discharge_date ? (
<div className="mt-3 flex gap-4 bg-cyan-300 px-3 py-1 text-sm font-medium">
<div>
<span>
Expand All @@ -346,6 +346,23 @@ export default function PatientInfoCard(props: {
</span>
</div>
</div>
) : (
<div className="mt-3 flex gap-4 bg-cyan-300 px-3 py-1 text-sm font-medium">
<span className="flex">
{consultation?.encounter_date && (
<div>
Admission on{" "}
{formatDateTime(consultation?.encounter_date)}
</div>
)}
{consultation?.icu_admission_date && (
<div>
, ICU Admission on{" "}
{formatDateTime(consultation?.icu_admission_date)}
</div>
)}
</span>
</div>
)}
</div>
</div>
Expand Down

0 comments on commit 1a0bd2c

Please sign in to comment.