Skip to content

Commit

Permalink
added actively dying
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Jul 9, 2024
1 parent 52f3a69 commit d895fe9
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 8 deletions.
13 changes: 12 additions & 1 deletion src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,12 @@ export const RESPIRATORY_SUPPORT = [
{ id: "NONE", text: "UNKNOWN" },
];

export type PatientCategoryID = "Comfort" | "Stable" | "Moderate" | "Critical";
export type PatientCategoryID =
| "Comfort"
| "Stable"
| "Moderate"
| "Critical"
| "ActivelyDying";

export const PATIENT_CATEGORIES: {
id: PatientCategoryID;
Expand Down Expand Up @@ -419,6 +424,12 @@ export const PATIENT_CATEGORIES: {
twClass: "patient-critical",
description: "Immediate: life-threatening",
},
{
id: "ActivelyDying",
text: "Actively Dying",
twClass: "patient-activelydying",
description: "",
},
];

export const PATIENT_FILTER_CATEGORIES = PATIENT_CATEGORIES;
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ export interface OptionsType {
disabled?: boolean;
}

export type PatientCategory = "Comfort Care" | "Mild" | "Moderate" | "Critical";
export type PatientCategory =
| "Comfort Care"
| "Mild"
| "Moderate"
| "Critical"
| "Actively Dying";

export interface PatientConsentModel {
id: string;
Expand Down
4 changes: 3 additions & 1 deletion src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ export const PatientManager = () => {
<div
className={`absolute inset-y-0 left-0 flex h-full w-1 items-center rounded-l-lg transition-all duration-200 ease-in-out group-hover:w-5 ${categoryClass}`}
>
<span className="absolute -inset-x-32 inset-y-0 flex -rotate-90 items-center justify-center text-center text-xs font-bold uppercase tracking-widest opacity-0 transition-all duration-200 ease-in-out group-hover:opacity-100">
<span
className={`absolute -inset-x-32 inset-y-0 flex -rotate-90 items-center justify-center text-center ${category === "Actively Dying" ? "text-[10px]" : "text-xs"} font-bold uppercase tracking-widest opacity-0 transition-all duration-200 ease-in-out group-hover:opacity-100`}
>
{category || "UNKNOWN"}
</span>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Patient/PatientCategorySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default function PatientCategorySelect(
<SelectFormField
{...props}
required={props.required ?? true}
options={PATIENT_CATEGORIES}
options={
props.value === "Comfort"
? PATIENT_CATEGORIES
: PATIENT_CATEGORIES.filter((c) => c.id !== "Comfort")
} // Comfort Care is discontinued
optionValue={(option) => option.id}
optionLabel={(option) => option.text}
optionDescription={(option) => option.description}
Expand All @@ -28,6 +32,7 @@ export default function PatientCategorySelect(
Stable: "bg-patient-stable",
Moderate: "bg-patient-abnormal",
Critical: "bg-patient-critical",
ActivelyDying: "bg-patient-activelydying",
}[option.id],
)}
/>
Expand Down
10 changes: 6 additions & 4 deletions src/Components/Scribe/formDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ export const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [
example: "Comfort Care",
default: "",
description: "A string to categorize the patient.",
options: PATIENT_CATEGORIES.map((category) => ({
id: category.id,
text: category.text,
})),
options: PATIENT_CATEGORIES.filter((c) => c.id !== "Comfort").map(
(category) => ({
id: category.id,
text: category.text,
}),
),
},
{
friendlyName: "Actions",
Expand Down
10 changes: 10 additions & 0 deletions src/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ button:disabled,
@apply bg-patient-unknown text-patient-unknown-fore
}

.patient-activelydying {
@apply bg-patient-activelydying text-patient-activelydying-fore
}

.patient-comfort-ring {
@apply ring-patient-comfort
}
Expand All @@ -727,6 +731,9 @@ button:disabled,
.patient-unknown-ring {
@apply ring-patient-unknown
}
.patient-activelydying-ring {
@apply ring-patient-activelydying
}

.patient-comfort-profile {
@apply border-2 border-patient-comfort rounded-t
Expand All @@ -743,6 +750,9 @@ button:disabled,
.patient-unknown-profile {
@apply border border-patient-unknown rounded
}
.patient-activelydying-profile {
@apply border-2 border-patient-activelydying rounded-t
}

/* for gmaps search dropdown */
.pac-container {
Expand Down
4 changes: 4 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ module.exports = {
DEFAULT: gray[400],
fore: gray[800],
},
activelydying: {
DEFAULT: colors.red[800],
fore: colors.red[100],
},
},
},
padding: {
Expand Down

0 comments on commit d895fe9

Please sign in to comment.