Skip to content

Commit

Permalink
add readmission (ohcnetwork#6239)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Sep 12, 2023
1 parent 8c242d6 commit 87f36ba
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
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

0 comments on commit 87f36ba

Please sign in to comment.