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: Renaming patient categorisation #7811 #7820

Closed
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: 5 additions & 5 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,16 +375,16 @@ export const RESPIRATORY_SUPPORT = [
{ id: "NONE", text: "UNKNOWN" },
];

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

export const PATIENT_CATEGORIES: {
id: PatientCategoryID;
text: PatientCategory;
twClass: string;
}[] = [
{ id: "Comfort", text: "Comfort Care", twClass: "patient-comfort" },
{ id: "Stable", text: "Stable", twClass: "patient-stable" },
{ id: "Moderate", text: "Abnormal", twClass: "patient-abnormal" },
{ id: "Mild", text: "Mild", twClass: "patient-mild" },
{ id: "Moderate", text: "Moderate", twClass: "patient-moderate" },
Comment on lines +386 to +387
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need not change the ID' and tailwind classess. You can just change the labels (text)

{ id: "Critical", text: "Critical", twClass: "patient-critical" },
];

Expand Down Expand Up @@ -683,8 +683,8 @@ export const MOTOR_RESPONSE_SCALE = [
{ value: 6, text: "Obeying commands/Normal acrivity" },
{ value: 5, text: "Moves to localized pain" },
{ value: 4, text: "Flexion/Withdrawal from pain" },
{ value: 3, text: "Abnormal Flexion(decorticate)" },
{ value: 2, text: "Abnormal Extension(decerebrate)" },
{ value: 3, text: "Moderate Flexion(decorticate)" },
{ value: 2, text: "Moderate Extension(decerebrate)" },
Comment on lines +686 to +687
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed? Totally unrelated to patient category.

{ value: 1, text: "No Response" },
];
export const CONSULTATION_TABS = [
Expand Down
6 changes: 1 addition & 5 deletions src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ export interface OptionsType {
disabled?: boolean;
}

export type PatientCategory =
| "Comfort Care"
| "Stable"
| "Abnormal"
| "Critical";
export type PatientCategory = "Comfort Care" | "Mild" | "Moderate" | "Critical";

export interface ConsultationModel {
encounter_date: string;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function TabPanel(props: TabPanelProps) {

const PatientCategoryDisplayText: Record<PatientCategory, string> = {
"Comfort Care": "COMFORT CARE",
Stable: "STABLE",
Abnormal: "ABNORMAL",
Mild: "MILD",
Moderate: "MODERATE",
Comment on lines +82 to +83
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keys need not be changed. Just display text needs to be changed

Critical: "CRITICAL",
};

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Patient/PatientCategorySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function PatientCategorySelect(
"h-2 w-2 rounded-full",
{
Comfort: "bg-patient-comfort",
Stable: "bg-patient-stable",
Mild: "bg-patient-stable",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here too

Moderate: "bg-patient-abnormal",
Critical: "bg-patient-critical",
}[option.id],
Expand Down
Loading