diff --git a/cypress/e2e/patient_spec/patient_logupdate.cy.ts b/cypress/e2e/patient_spec/patient_logupdate.cy.ts index 562e430a9ad..cd7e30e1575 100644 --- a/cypress/e2e/patient_spec/patient_logupdate.cy.ts +++ b/cypress/e2e/patient_spec/patient_logupdate.cy.ts @@ -59,7 +59,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.typeRhythm(patientRhythm); cy.get("#consciousness_level-2").click(); cy.submitButton("Save"); - cy.verifyNotification("Tele-medicine log update created successfully"); + cy.verifyNotification("Telemedicine log created successfully"); }); it("Create a new log normal update for a domicilary care patient and edit it", () => { @@ -84,7 +84,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.typeRhythm(patientRhythm); cy.get("#consciousness_level-2").click(); cy.submitButton("Save"); - cy.verifyNotification("Normal log update created successfully"); + cy.verifyNotification("Brief Update log created successfully"); cy.closeNotification(); // edit the card and verify the data. cy.contains("Daily Rounds").click(); @@ -107,7 +107,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.clickClearButtonInElement("#diastolic"); patientLogupdate.typeDiastolic(patientModifiedDiastolic); cy.submitButton("Continue"); - cy.verifyNotification("Normal log update details updated successfully"); + cy.verifyNotification("Brief Update log updated successfully"); cy.contains("Daily Rounds").click(); patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); cy.verifyContentPresence("#consultation-preview", [ @@ -140,7 +140,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.get("#consciousness_level-2").click(); cy.submitButton("Save"); cy.wait(2000); - cy.verifyNotification("Normal log update created successfully"); + cy.verifyNotification("Brief Update log created successfully"); // Verify the card content cy.get("#basic-information").scrollIntoView(); cy.verifyContentPresence("#encounter-symptoms", [additionalSymptoms]); @@ -163,7 +163,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.typeRespiratory(patientRespiratory); cy.get("#consciousness_level-2").click(); cy.submitButton("Save"); - cy.verifyNotification("Normal log update created successfully"); + cy.verifyNotification("Brief Update log created successfully"); cy.closeNotification(); cy.verifyContentPresence("#consultation-buttons", ["9"]); // Verify the Incomplete data will give blank info @@ -173,7 +173,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.typeDiastolic(patientDiastolic); patientLogupdate.typePulse(patientPulse); cy.submitButton("Save"); - cy.verifyNotification("Normal log update created successfully"); + cy.verifyNotification("Brief Update log created successfully"); cy.closeNotification(); cy.verifyContentPresence("#consultation-buttons", ["-"]); }); diff --git a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res index e8bfb91e21c..d919215071e 100644 --- a/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res +++ b/src/Components/CriticalCareRecording/Recording/CriticalCare__Recording.res @@ -240,7 +240,7 @@ let make = (~id, ~facilityId, ~patientId, ~consultationId, ~dailyRound) => { href={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`}> diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index 5d407a09fea..e147b2ec3a4 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "react-i18next"; import PatientCategoryBadge from "../../../Common/PatientCategoryBadge"; import { BloodPressure, @@ -15,6 +16,8 @@ const LogUpdateCardAttribute = ({ attributeKey, attributeValue, }: Props) => { + const { t } = useTranslation(); + switch (attributeKey) { // case "id": // case "external_id": @@ -67,11 +70,7 @@ const LogUpdateCardAttribute = ({
- {(attributeValue as string) === "VENTILATOR" - ? "CRITICAL CARE" - : (attributeValue as string) === "DOCTORS_LOG" - ? "PROGRESS NOTE" - : (attributeValue as string)} + {t(attributeValue)}
); diff --git a/src/Components/Facility/Consultations/DailyRoundsFilter.tsx b/src/Components/Facility/Consultations/DailyRoundsFilter.tsx index 430154d6689..829c085a840 100644 --- a/src/Components/Facility/Consultations/DailyRoundsFilter.tsx +++ b/src/Components/Facility/Consultations/DailyRoundsFilter.tsx @@ -73,9 +73,7 @@ export default function DailyRoundsFilter(props: Props) { label={t("Round Type")} options={DailyRoundTypes} placeholder={t("show_all")} - optionLabel={(o) => - o === "DOCTORS_LOG" ? "Progress Note" : t(o) - } + optionLabel={(o) => t(o)} optionValue={(o) => o} /> { if (obj) { dispatch({ type: "set_form", form: initForm }); Notification.Success({ - msg: `${obj.rounds_type === "DOCTORS_LOG" ? "Progress Notes" : (obj.rounds_type === "VENTILATOR" ? "Critical Care" : capitalize(obj.rounds_type)) + " log update"} details updated successfully`, + msg: `${t(obj.rounds_type as string)} log updated successfully`, }); if ( ["NORMAL", "TELEMEDICINE", "DOCTORS_LOG"].includes( @@ -366,24 +365,19 @@ export const DailyRounds = (props: any) => { setIsLoading(false); if (obj) { dispatch({ type: "set_form", form: initForm }); - if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) { - Notification.Success({ - msg: `${state.form.rounds_type === "NORMAL" ? "Normal" : "Tele-medicine"} log update created successfully`, - }); - navigate( - `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, - ); - } else if (state.form.rounds_type === "DOCTORS_LOG") { - Notification.Success({ - msg: "Progress Note update created successfully", - }); + Notification.Success({ + msg: `${t(state.form.rounds_type)} log created successfully`, + }); + + if ( + ["NORMAL", "TELEMEDICINE", "DOCTORS_LOG"].includes( + state.form.rounds_type, + ) + ) { navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, ); } else { - Notification.Success({ - msg: "Critical Care log update created successfully", - }); navigate( `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily_rounds/${obj.id}/update`, ); @@ -436,16 +430,16 @@ export const DailyRounds = (props: any) => { authUser.user_type, ) ) { - roundTypes.push({ id: "DOCTORS_LOG", text: "Progress Note" }); + roundTypes.push({ id: "DOCTORS_LOG", text: t("DOCTORS_LOG") }); } roundTypes.push( - { id: "NORMAL", text: "Normal" }, - { id: "VENTILATOR", text: "Critical Care" }, + { id: "NORMAL", text: t("NORMAL") }, + { id: "VENTILATOR", text: t("VENTILATOR") }, ); if (consultationSuggestion === "DC") { - roundTypes.push({ id: "TELEMEDICINE", text: "Telemedicine" }); + roundTypes.push({ id: "TELEMEDICINE", text: t("TELEMEDICINE") }); } const submitButtonDisabled = (() => { if (buttonText !== "Save") { diff --git a/src/Locale/en/Consultation.json b/src/Locale/en/Consultation.json index fc1b5ae5f7d..4df1a4de9a3 100644 --- a/src/Locale/en/Consultation.json +++ b/src/Locale/en/Consultation.json @@ -13,8 +13,9 @@ "download_discharge_summary": "Download discharge summary", "email_discharge_summary_description": "Enter your valid email address to receive the discharge summary", "generated_summary_caution": "This is a computer generated summary using the information captured in the CARE system.", - "NORMAL": "Normal", - "VENTILATOR": "Critical Care", + "NORMAL": "Brief Update", + "VENTILATOR": "Detailed Update", + "DOCTORS_LOG": "Progress Note", "AUTOMATED": "Automated", "TELEMEDICINE": "Telemedicine", "investigations": "Investigations",