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

Show standardized labels for patient categorization #7875

Merged
merged 3 commits into from
May 22, 2024
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
6 changes: 3 additions & 3 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("Patient Consultation in multiple combination", () => {
);
patientConsultationPage.typePatientWeight(patientWeight);
patientConsultationPage.typePatientHeight(patientHeight);
patientConsultationPage.selectPatientCategory("Stable");
patientConsultationPage.selectPatientCategory("Mild");
// icd 11 - 4 diagnosis with one principal
patientConsultationPage.selectPatientDiagnosis(
diagnosis1,
Expand Down Expand Up @@ -236,7 +236,7 @@ describe("Patient Consultation in multiple combination", () => {
// Asymptomatic
cy.searchAndSelectOption("#symptoms", "ASYMPTOMATIC");
// Abnormal category
patientConsultationPage.selectPatientCategory("Abnormal");
patientConsultationPage.selectPatientCategory("Moderate");
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
// one ICD-11 diagnosis
patientConsultationPage.selectPatientDiagnosis(
Expand Down Expand Up @@ -299,7 +299,7 @@ describe("Patient Consultation in multiple combination", () => {
"SORE THROAT",
]);
// Stable category
patientConsultationPage.selectPatientCategory("Stable");
patientConsultationPage.selectPatientCategory("Mild");
// Date of symptoms
patientConsultationPage.selectSymptomsDate(
"#symptoms_onset_date",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const patientPage = new PatientPage();
const patientLogupdate = new PatientLogupdate();
const domicilaryPatient = "Dummy Patient 11";
const patientCategory = "Abnormal";
const patientCategory = "Moderate";
const additionalSymptoms = "ASYMPTOMATIC";
const physicalExamination = "physical examination details";
const otherExamination = "Other";
Expand Down
4 changes: 2 additions & 2 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ export const PATIENT_CATEGORIES: {
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: "Stable", text: "Mild", twClass: "patient-stable" },
{ id: "Moderate", text: "Moderate", twClass: "patient-abnormal" },
{ id: "Critical", text: "Critical", twClass: "patient-critical" },
];

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
9 changes: 1 addition & 8 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ function TabPanel(props: TabPanelProps) {
);
}

const PatientCategoryDisplayText: Record<PatientCategory, string> = {
"Comfort Care": "COMFORT CARE",
Stable: "STABLE",
Abnormal: "ABNORMAL",
Critical: "CRITICAL",
};

export const PatientManager = () => {
const { t } = useTranslation();
const {
Expand Down Expand Up @@ -473,7 +466,7 @@ export const PatientManager = () => {
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">
{category ? PatientCategoryDisplayText[category] : "UNKNOWN"}
{category || "UNKNOWN"}
</span>
</div>
<div className="flex flex-col items-start gap-4 md:flex-row">
Expand Down
Loading