Skip to content

Commit

Permalink
Show standardized labels for patient categorization (#7875)
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar authored May 22, 2024
1 parent 599359e commit 1554ef2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
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

0 comments on commit 1554ef2

Please sign in to comment.