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

Support for tracking consultation readmissions #6239

Merged
merged 4 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions src/Components/Facility/ConsultationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ButtonV2 from "../Common/components/ButtonV2";
import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor";
import RelativeDateUserMention from "../Common/RelativeDateUserMention";
import useConfig from "../../Common/hooks/useConfig";
import Chip from "../../CAREUI/display/Chip";

interface ConsultationProps {
itemData: ConsultationModel;
Expand Down Expand Up @@ -70,6 +71,15 @@ export const ConsultationCard = (props: ConsultationProps) => {
</div>
<div className="mt-1 overflow-x-scroll whitespace-normal break-words text-sm font-medium leading-5">
{formatDateTime(itemData.admission_date)}
{itemData.is_readmission && (
<Chip
size="small"
variant="custom"
className="ml-4 border-blue-600 bg-blue-100 text-blue-600"
startIcon="l-repeat"
text="Readmission"
/>
)}
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export interface ConsultationModel {
cause_of_death?: string;
death_datetime?: string;
death_confirmed_doctor?: string;
is_readmission?: boolean;
}
export interface PatientStatsModel {
id?: number;
Expand Down
9 changes: 9 additions & 0 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,15 @@ export const PatientManager = () => {
text="Review Missed"
/>
)}
{patient.last_consultation?.is_readmission && (
<Chip
size="small"
variant="custom"
className="border-blue-600 bg-blue-100 text-blue-600"
startIcon="l-repeat"
text="Readmission"
/>
)}
{patient.disease_status === "POSITIVE" && (
<Chip
size="small"
Expand Down
17 changes: 13 additions & 4 deletions src/Components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function PatientInfoCard(props: {
</div>
)}
</div>
<div className="flex flex-col items-center gap-1 sm:flex-row lg:mb-2">
<div className="flex flex-col items-center gap-2 sm:flex-row lg:mb-2">
<Link
href={`/facility/${consultation?.facility}`}
className="font-semibold text-black hover:text-primary-600"
Expand Down Expand Up @@ -177,9 +177,18 @@ export default function PatientInfoCard(props: {
{consultation?.suggestion === "DC" && (
<>
<span className="mx-2">•</span>
<span className="space-x-2">
Domiciliary Care{" "}
<CareIcon className="care-l-estate text-base text-gray-700" />
<span>
<CareIcon icon="l-estate" className="mr-1 text-gray-700" />
Domiciliary Care
</span>
</>
)}
{consultation?.is_readmission && (
<>
<span className="mx-2">•</span>
<span>
<CareIcon icon="l-repeat" className="mr-1 text-gray-600" />
Readmitted
</span>
</>
)}
Expand Down