From 58cb9ad8ed18d7eb6de33a8dd792ff4d0f034b20 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Tue, 12 Nov 2024 00:43:31 +0530 Subject: [PATCH 01/17] add log update message to en --- src/Locale/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Locale/en.json b/src/Locale/en.json index 9a7f4d750c2..6dffd953cee 100644 --- a/src/Locale/en.json +++ b/src/Locale/en.json @@ -795,6 +795,7 @@ "location_management": "Location Management", "log_lab_results": "Log Lab Results", "log_report": "Log Report", + "log_update": "Log Update", "login": "Login", "longitude_invalid": "Longitude must be between -180 and 180", "lsg": "Lsg", From 59ef5376f7777d64b826518441994c2361010520 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Tue, 12 Nov 2024 00:44:18 +0530 Subject: [PATCH 02/17] Use translation key for log update --- src/components/Patient/DailyRoundListDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx index 727658d7146..f4cfb6875d6 100644 --- a/src/components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -28,7 +28,7 @@ export const DailyRoundListDetails = (props: any) => { return (
Date: Tue, 12 Nov 2024 01:03:05 +0530 Subject: [PATCH 03/17] add translation key for plural log updates --- src/Locale/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Locale/en.json b/src/Locale/en.json index 6dffd953cee..5cb4740ab1d 100644 --- a/src/Locale/en.json +++ b/src/Locale/en.json @@ -796,6 +796,7 @@ "log_lab_results": "Log Lab Results", "log_report": "Log Report", "log_update": "Log Update", + "log_updates": "Log Updates", "login": "Login", "longitude_invalid": "Longitude must be between -180 and 180", "lsg": "Lsg", From 656847dc2e9fad5b3d18c0f548f2275a5bd61305 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Tue, 12 Nov 2024 01:05:10 +0530 Subject: [PATCH 04/17] Update tab text to log updates --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 66cc40e4c71..4c5a610abfc 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -682,7 +682,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { ), value: 1, }, - { text: t("daily_rounds"), value: 0 }, + { text: t("log_updates"), value: 0 }, ]} onTabChange={(v) => setShowEvents(!!v)} currentTab={showEvents ? 1 : 0} From 5e25f4710392b11d306271d35b3a7e1c89bc470c Mon Sep 17 00:00:00 2001 From: yash-learner Date: Tue, 12 Nov 2024 01:38:39 +0530 Subject: [PATCH 05/17] Add breadcrumb replacement for daily rounds --- src/components/Patient/DailyRoundListDetails.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx index f4cfb6875d6..ded900d8838 100644 --- a/src/components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -30,6 +30,9 @@ export const DailyRoundListDetails = (props: any) => {
Date: Tue, 12 Nov 2024 19:25:23 +0530 Subject: [PATCH 06/17] Update notification text --- src/common/constants.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/constants.tsx b/src/common/constants.tsx index 87432fcaadb..e6ba6d9608f 100644 --- a/src/common/constants.tsx +++ b/src/common/constants.tsx @@ -651,12 +651,12 @@ export const NOTIFICATION_EVENTS: NotificationEvent[] = [ }, { id: "PATIENT_CONSULTATION_UPDATE_CREATED", - text: "Patient Consultation Update Created", + text: "Patient Log Update Created", icon: "l-heart", }, { id: "PATIENT_CONSULTATION_UPDATE_UPDATED", - text: "Patient Consultation Update Updated", + text: "Patient Log Update Updated", icon: "l-heart-medical", }, { From 443777861a631e6e2dc15573ec85fe4a26b2b1e3 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Tue, 12 Nov 2024 19:28:34 +0530 Subject: [PATCH 07/17] Refactor daily rounds to log updates in URLs and update related components --- src/Routers/routes/ConsultationRoutes.tsx | 10 +++++----- src/components/Facility/ConsultationCard.tsx | 2 +- .../Consultations/DailyRounds/DefaultLogUpdateCard.tsx | 8 ++++---- src/components/LogUpdate/CriticalCareEditor.tsx | 4 ++-- src/components/LogUpdate/CriticalCarePreview.tsx | 2 +- src/components/Notifications/NotificationsList.tsx | 8 ++++---- src/components/Notifications/ShowPushNotification.tsx | 4 ++-- src/components/Patient/DailyRoundListDetails.tsx | 4 ++-- src/components/Patient/DailyRounds.tsx | 9 +++++---- src/components/Patient/PatientInfoCard.tsx | 2 +- 10 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/Routers/routes/ConsultationRoutes.tsx b/src/Routers/routes/ConsultationRoutes.tsx index bb804bd7613..9b347bccc01 100644 --- a/src/Routers/routes/ConsultationRoutes.tsx +++ b/src/Routers/routes/ConsultationRoutes.tsx @@ -80,7 +80,7 @@ const consultationRoutes: AppRoutes = { sessionId={sessionId} /> ), - "/facility/:facilityId/patient/:patientId/consultation/:id/daily-rounds": ({ + "/facility/:facilityId/patient/:patientId/consultation/:id/log_updates": ({ facilityId, patientId, id, @@ -91,7 +91,7 @@ const consultationRoutes: AppRoutes = { consultationId={id} /> ), - "/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily-rounds/:id/update": + "/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id/update": ({ facilityId, patientId, consultationId, id }) => ( ), - "/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily-rounds/:id": + "/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id": ({ facilityId, patientId, consultationId, id }) => ( ), - "/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily_rounds/:id": + "/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id/critical_care": ({ facilityId, patientId, consultationId, id }) => ( ), - "/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily_rounds/:id/update": + "/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id/critical_care/update": ({ facilityId, patientId, consultationId, id }) => ( { setOpen(true); } else { navigate( - `/facility/${itemData.facility}/patient/${itemData.patient}/consultation/${itemData.id}/daily-rounds`, + `/facility/${itemData.facility}/patient/${itemData.patient}/consultation/${itemData.id}/log_updates/`, ); } }} diff --git a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index 467d9d980e6..aed288b62b7 100644 --- a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -56,8 +56,8 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { ["NORMAL", "TELEMEDICINE", "DOCTORS_LOG"].includes( round.rounds_type!, ) - ? `${consultationUrl}/daily-rounds/${round.id}` - : `${consultationUrl}/daily_rounds/${round.id}` + ? `${consultationUrl}/log_updates/${round.id}` + : `${consultationUrl}/log_updates/${round.id}/critical_care` } > @@ -78,8 +78,8 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { "DOCTORS_LOG", "COMMUNITY_NURSES_LOG", ].includes(round.rounds_type!) - ? `${consultationUrl}/daily-rounds/${round.id}/update` - : `${consultationUrl}/daily_rounds/${round.id}/update` + ? `${consultationUrl}/log_updates/${round.id}/update` + : `${consultationUrl}/log_updates/${round.id}/critical_care/update` } > diff --git a/src/components/LogUpdate/CriticalCareEditor.tsx b/src/components/LogUpdate/CriticalCareEditor.tsx index 5a3e7f896d4..52828913b31 100644 --- a/src/components/LogUpdate/CriticalCareEditor.tsx +++ b/src/components/LogUpdate/CriticalCareEditor.tsx @@ -89,7 +89,7 @@ export default function CriticalCareEditor(props: Props) { ghost className="w-full bg-primary-100/50 py-3" border - href={`${consultationDashboardUrl}/daily-rounds/${props.id}/update`} + href={`${consultationDashboardUrl}/log_updates/${props.id}/update`} > { - const [consultationId, id] = useSlugs("consultation", "daily_rounds"); + const [consultationId, id] = useSlugs("consultation", "log_updates"); const [diff, setDiff] = useState>({}); const [isProcessing, setIsProcessing] = useState(false); diff --git a/src/components/LogUpdate/CriticalCarePreview.tsx b/src/components/LogUpdate/CriticalCarePreview.tsx index 8546a7501f4..5d303b170bd 100644 --- a/src/components/LogUpdate/CriticalCarePreview.tsx +++ b/src/components/LogUpdate/CriticalCarePreview.tsx @@ -58,7 +58,7 @@ export default function CriticalCarePreview(props: Props) {

- Consultation Updates + {t("log_updates")}
{t(`ROUNDS_TYPE__${data.rounds_type}`)}
diff --git a/src/components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx index f15d5e8cb2a..1643aaec78d 100644 --- a/src/components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -66,10 +66,10 @@ const NotificationTile = ({ return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}`; case "PATIENT_CONSULTATION_UPDATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}`; - case "PATIENT_CONSULTATION_UPDATE_CREATED": - return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/daily-rounds/${data.daily_round}`; - case "PATIENT_CONSULTATION_UPDATE_UPDATED": - return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/daily-rounds/${data.daily_round}`; + case "PATIENT_LOG_UPDATE_CREATED": + return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_updates/${data.daily_round}`; + case "PATIENT_LOG_UPDATE_UPDATED": + return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_udpates/${data.daily_round}`; case "INVESTIGATION_SESSION_CREATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/investigation/${data.session}`; case "PATIENT_NOTE_ADDED": diff --git a/src/components/Notifications/ShowPushNotification.tsx b/src/components/Notifications/ShowPushNotification.tsx index ca465f98df7..057390331e9 100644 --- a/src/components/Notifications/ShowPushNotification.tsx +++ b/src/components/Notifications/ShowPushNotification.tsx @@ -23,9 +23,9 @@ export default function ShowPushNotification({ id }: { id: string }) { case "PATIENT_CONSULTATION_UPDATED": return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}`; case "PATIENT_CONSULTATION_UPDATE_CREATED": - return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/daily-rounds/${caused_objects?.daily_round}`; + return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.daily_round}`; case "PATIENT_CONSULTATION_UPDATE_UPDATED": - return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/daily-rounds/${caused_objects?.daily_round}`; + return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.daily_round}`; case "INVESTIGATION_SESSION_CREATED": return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/investigation/${caused_objects?.session}`; case "PATIENT_NOTE_ADDED": diff --git a/src/components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx index ded900d8838..54ef3689d5b 100644 --- a/src/components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -29,7 +29,7 @@ export const DailyRoundListDetails = (props: any) => { return ( {
Update Details diff --git a/src/components/Patient/DailyRounds.tsx b/src/components/Patient/DailyRounds.tsx index f6ac117c2ec..df8e6ed3687 100644 --- a/src/components/Patient/DailyRounds.tsx +++ b/src/components/Patient/DailyRounds.tsx @@ -142,7 +142,7 @@ export const DailyRounds = (props: any) => { const [diagnoses, setDiagnoses] = useState(); const [showDiscontinuedPrescriptions, setShowDiscontinuedPrescriptions] = useState(false); - const headerText = !id ? "Add Consultation Update" : "Info"; + const headerText = !id ? t("add") + " " + t("log_update") : "Info"; const buttonText = !id ? !["VENTILATOR", "DOCTORS_LOG"].includes(state.form.rounds_type) ? t("save") @@ -409,7 +409,7 @@ export const DailyRounds = (props: any) => { ); } else { navigate( - `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily_rounds/${obj.id}/update`, + `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates/${obj.id}/update`, ); } } @@ -437,7 +437,7 @@ export const DailyRounds = (props: any) => { ); } else { navigate( - `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily_rounds/${obj.id}/update`, + `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates/${obj.id}/critical_care/update`, ); } } @@ -548,10 +548,11 @@ export const DailyRounds = (props: any) => { crumbsReplacements={{ [facilityId]: { name: facilityName }, [patientId]: { name: patientName }, + "daily-rounds": { name: t("log_updates") }, }} backUrl={ id - ? `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds` + ? `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates` : `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}` } className="mx-auto max-w-4xl" diff --git a/src/components/Patient/PatientInfoCard.tsx b/src/components/Patient/PatientInfoCard.tsx index f5bae4aba54..beaf579b4d4 100644 --- a/src/components/Patient/PatientInfoCard.tsx +++ b/src/components/Patient/PatientInfoCard.tsx @@ -598,7 +598,7 @@ export default function PatientInfoCard(props: { href={ consultation?.admitted && !consultation?.current_bed ? undefined - : `/facility/${patient.facility}/patient/${patient.id}/consultation/${consultation?.id}/daily-rounds` + : `/facility/${patient.facility}/patient/${patient.id}/consultation/${consultation?.id}/log_updates` } onClick={() => { if ( From d44f5b3f147ad2d37395def6653484c6ea48daa0 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Wed, 13 Nov 2024 00:49:11 +0530 Subject: [PATCH 08/17] Remove breadcrumb replacement for daily rounds in DailyRoundListDetails and DailyRounds components --- src/components/Patient/DailyRoundListDetails.tsx | 3 --- src/components/Patient/DailyRounds.tsx | 1 - 2 files changed, 4 deletions(-) diff --git a/src/components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx index 54ef3689d5b..ccce9e08a6e 100644 --- a/src/components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -30,9 +30,6 @@ export const DailyRoundListDetails = (props: any) => {
{ crumbsReplacements={{ [facilityId]: { name: facilityName }, [patientId]: { name: patientName }, - "daily-rounds": { name: t("log_updates") }, }} backUrl={ id From 0f3ae990ed2f4699e178d3dfaeeaf868652a1343 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Wed, 13 Nov 2024 01:06:39 +0530 Subject: [PATCH 09/17] Revert renaming of notification types --- src/components/Notifications/NotificationsList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx index 1643aaec78d..eb2a2de1d7b 100644 --- a/src/components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -66,9 +66,9 @@ const NotificationTile = ({ return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}`; case "PATIENT_CONSULTATION_UPDATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}`; - case "PATIENT_LOG_UPDATE_CREATED": + case "PATIENT_CONSULTATION_UPDATE_CREATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_updates/${data.daily_round}`; - case "PATIENT_LOG_UPDATE_UPDATED": + case "PATIENT_CONSULTATION_UPDATE_UPDATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_udpates/${data.daily_round}`; case "INVESTIGATION_SESSION_CREATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/investigation/${data.session}`; From 732e1c810ff9e95abfb254e24991e7612e193c03 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Wed, 13 Nov 2024 03:04:23 +0530 Subject: [PATCH 10/17] Fix typo in notification log updates URL path --- src/components/Notifications/NotificationsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx index cfe73744daa..17033d67623 100644 --- a/src/components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -74,7 +74,7 @@ const NotificationTile = ({ case "PATIENT_CONSULTATION_UPDATE_CREATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_updates/${data.daily_round}`; case "PATIENT_CONSULTATION_UPDATE_UPDATED": - return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_udpates/${data.daily_round}`; + return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/log_updates/${data.daily_round}`; case "INVESTIGATION_SESSION_CREATED": return `/facility/${data.facility}/patient/${data.patient}/consultation/${data.consultation}/investigation/${data.session}`; case "PATIENT_NOTE_ADDED": From 465274fb0a9bb67ff0bcdac05a10269e8313cd4b Mon Sep 17 00:00:00 2001 From: yash-learner Date: Wed, 13 Nov 2024 23:40:09 +0530 Subject: [PATCH 11/17] Rename "Daily Rounds" to "Log Updates" in patient log update tests and components --- .../e2e/patient_spec/PatientLogUpdate.cy.ts | 24 +++++++++---------- .../DailyRounds/DefaultLogUpdateCard.tsx | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cypress/e2e/patient_spec/PatientLogUpdate.cy.ts b/cypress/e2e/patient_spec/PatientLogUpdate.cy.ts index b6d7ecbc173..b6399ff02ce 100644 --- a/cypress/e2e/patient_spec/PatientLogUpdate.cy.ts +++ b/cypress/e2e/patient_spec/PatientLogUpdate.cy.ts @@ -130,9 +130,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.verifyNotification("Progress Note Log Update filed successfully"); cy.closeNotification(); // Verify the data reflection - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateViewDetails( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); cy.verifyContentPresence("#consultation-preview", [ @@ -180,9 +180,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.submitButton("Complete"); cy.verifyNotification("Detailed Log Update filed successfully"); cy.closeNotification(); - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateViewDetails( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); cy.verifyContentPresence("#respiratory-support", [ @@ -195,9 +195,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { ]); // Go back and edit the data on a third section patientLogupdate.clickGoBackConsultation(); - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateUpdateLog( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); patientLogupdate.selectCriticalCareSection("Dialysis"); @@ -210,9 +210,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.verifyNotification("Detailed Log Update filed successfully"); cy.closeNotification(); //Reverify the editted and newly added data - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateViewDetails( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); cy.verifyContentPresence("#respiratory-support", [ @@ -285,9 +285,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.verifyNotification("Brief Update created successfully"); cy.closeNotification(); // edit the card and verify the data. - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateViewDetails( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); cy.verifyContentPresence("#consultation-preview", [ @@ -309,9 +309,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { patientLogupdate.typeDiastolic(patientModifiedDiastolic); cy.submitButton("Continue"); cy.verifyNotification("Brief Update updated successfully"); - cy.contains("button", "Daily Rounds").click(); + cy.contains("button", "Log Updates").click(); patientLogupdate.clickLogUpdateViewDetails( - "#dailyround-entry", + "#logupdate-entry", patientCategory, ); cy.verifyContentPresence("#consultation-preview", [ diff --git a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index 0bf2ed405e4..53f884be2b4 100644 --- a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -26,7 +26,7 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { return (
Date: Thu, 14 Nov 2024 00:52:14 +0530 Subject: [PATCH 12/17] Rename "Daily Rounds" to "Log Update" in Scribe form and update related references --- src/components/Patient/DailyRounds.tsx | 2 +- src/components/Scribe/formDetails.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/Patient/DailyRounds.tsx b/src/components/Patient/DailyRounds.tsx index cabe8813e20..2cd37292965 100644 --- a/src/components/Patient/DailyRounds.tsx +++ b/src/components/Patient/DailyRounds.tsx @@ -563,7 +563,7 @@ export const DailyRounds = (props: any) => {
{ setDiagnosisSuggestions([]); // Symptoms diff --git a/src/components/Scribe/formDetails.ts b/src/components/Scribe/formDetails.ts index 9c31b6aedf0..387f74c3b0f 100644 --- a/src/components/Scribe/formDetails.ts +++ b/src/components/Scribe/formDetails.ts @@ -240,10 +240,10 @@ const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [ friendlyName: "Investigations", id: "investigations", type: `{ - type: string[], - repetitive: boolean, - time?: string, - frequency?: '15 min' | '30 min' | '1 hr' | '6 hrs' | '12 hrs' | '24 hrs' | '48 hrs', + type: string[], + repetitive: boolean, + time?: string, + frequency?: '15 min' | '30 min' | '1 hr' | '6 hrs' | '12 hrs' | '24 hrs' | '48 hrs', notes?: string }[]`, default: [], @@ -252,7 +252,7 @@ const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [ type: ["Haemotology (GROUP)"], repetitive: false, time: "2024-07-31T18:10", - notes: "Patient is allergic to penicillin." + notes: "Patient is allergic to penicillin." }, { type: ["ECG", "X-Ray"], @@ -291,7 +291,7 @@ const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [ {base_dosage: "5 ampule(s)", days: 7, dosage_type: "REGULAR", frequency: "STAT", medicine: "DOLO", notes: "Give with water", route: "ORAL"}, {base_dosage: "7 ml", days: 3, dosage_type: "TITRATED", frequency: "Q4H", medicine: "Albumin", route: "INHALATION", instruction_on_titration: "Example", target_dosage: "40 ml"}, ]`, - description: `A list of objects to store the patient's prescriptions. The prescription can be regular or titrated. If titrated, the prescription should also include instruction_on_titration, and a target_dosage. NOTE: target_dosage should have the same unit as base_dosage. + description: `A list of objects to store the patient's prescriptions. The prescription can be regular or titrated. If titrated, the prescription should also include instruction_on_titration, and a target_dosage. NOTE: target_dosage should have the same unit as base_dosage. The frequency should be any of the mentioned ones. They are short for: STAT: Imediately, OD: Once daily, @@ -360,9 +360,9 @@ const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [ ]; export const SCRIBE_FORMS: { [key: string]: ScribeForm } = { - daily_round: { - id: "daily_round", - name: "Daily Round", + log_update: { + id: "log_update", + name: "Log Update", fields: async () => { const investigations = await loadInvestigations(); From d2a2e054d40c55831dc76cc92b27239dbb66a069 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Thu, 14 Nov 2024 01:52:52 +0530 Subject: [PATCH 13/17] Update terminology: replace "no_consultation_updates" with "no_log_updates" and add corresponding message in localization file --- public/locale/en.json | 1 + src/components/Facility/Consultations/DailyRoundsList.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/locale/en.json b/public/locale/en.json index 64c348f3eff..e49e302ab3c 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -903,6 +903,7 @@ "no_investigation_suggestions": "No Investigation Suggestions", "no_linked_facilities": "No Linked Facilities", "no_log_update_delta": "No changes since previous log update", + "no_log_updates": "No log updates found", "no_notices_for_you": "No notices for you.", "no_patients_to_show": "No patients to show.", "no_policy_added": "No Insurance Policy Added", diff --git a/src/components/Facility/Consultations/DailyRoundsList.tsx b/src/components/Facility/Consultations/DailyRoundsList.tsx index 037556e6dda..31b14715853 100644 --- a/src/components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/components/Facility/Consultations/DailyRoundsList.tsx @@ -37,7 +37,7 @@ export default function DailyRoundsList({ consultation, query }: Props) {
- {t("no_consultation_updates")} + {t("no_log_updates")} From 79a3616983537cdd49254914d9686c691c073437 Mon Sep 17 00:00:00 2001 From: yash-learner Date: Thu, 14 Nov 2024 02:18:45 +0530 Subject: [PATCH 14/17] Update terminology: replace "Consultation Updates" with "Log Updates" in components and localization --- cypress/pageobject/Patient/PatientConsultation.ts | 4 ++-- public/locale/en.json | 1 + src/components/Facility/ConsultationCard.tsx | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index 6f4f994b395..642eaf9e4d6 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -115,8 +115,8 @@ export class PatientConsultationPage { clickViewConsultationButton() { cy.verifyAndClickElement( - "#view_consultation_updates", - "View Consultation / Consultation Updates", + "#view_consultation_and_log_updates", + "View Consultation / Log Updates", ); } diff --git a/public/locale/en.json b/public/locale/en.json index e49e302ab3c..36c25a06682 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -1312,6 +1312,7 @@ "view_abdm_records": "View ABDM Records", "view_asset": "View Assets", "view_cns": "View CNS", + "view_consultation_and_log_updates": "View Consultation / Log Updates", "view_details": "View Details", "view_faciliy": "View Facility", "view_patients": "View Patients", diff --git a/src/components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx index fa122514230..1a2ed02d6ad 100644 --- a/src/components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -1,4 +1,5 @@ import careConfig from "@careConfig"; +import { t } from "i18next"; import { navigate } from "raviger"; import { useState } from "react"; @@ -169,7 +170,7 @@ export const ConsultationCard = (props: ConsultationProps) => {
navigate( @@ -177,7 +178,7 @@ export const ConsultationCard = (props: ConsultationProps) => { ) } > - View Consultation / Consultation Updates + {t("view_consultation_and_log_updates")} { disabled={!!itemData.discharge_date} authorizeFor={NonReadOnlyUsers} > - Add Consultation Updates + {t("add") + " " + t("log_update")} )}
From eccc86a375776fb3c7f8745e0c171649113cbe2e Mon Sep 17 00:00:00 2001 From: yash-learner Date: Thu, 14 Nov 2024 16:34:49 +0530 Subject: [PATCH 15/17] Update folder name and imports --- .../Facility/ConsultationDetails/Events/EventsList.tsx | 2 +- src/components/Facility/Consultations/DailyRoundsList.tsx | 6 +++--- .../{DailyRounds => LogUpdates}/DefaultLogUpdateCard.tsx | 2 +- .../{DailyRounds => LogUpdates}/LoadingCard.tsx | 0 .../{DailyRounds => LogUpdates}/LogUpdateCardAttribute.tsx | 0 .../VirtualNursingAssistantLogUpdateCard.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/components/Facility/Consultations/{DailyRounds => LogUpdates}/DefaultLogUpdateCard.tsx (98%) rename src/components/Facility/Consultations/{DailyRounds => LogUpdates}/LoadingCard.tsx (100%) rename src/components/Facility/Consultations/{DailyRounds => LogUpdates}/LogUpdateCardAttribute.tsx (100%) rename src/components/Facility/Consultations/{DailyRounds => LogUpdates}/VirtualNursingAssistantLogUpdateCard.tsx (97%) diff --git a/src/components/Facility/ConsultationDetails/Events/EventsList.tsx b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx index 47c68636a1a..e89f8dd8b2f 100644 --- a/src/components/Facility/ConsultationDetails/Events/EventsList.tsx +++ b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx @@ -6,7 +6,7 @@ import PaginatedList from "@/CAREUI/misc/PaginatedList"; import GenericEvent from "@/components/Facility/ConsultationDetails/Events/GenericEvent"; import { getEventIcon } from "@/components/Facility/ConsultationDetails/Events/iconMap"; import { EventGeneric } from "@/components/Facility/ConsultationDetails/Events/types"; -import LoadingLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/LoadingCard"; +import LoadingLogUpdateCard from "@/components/Facility/Consultations/LogUpdates/LoadingCard"; import { useSlugs } from "@/hooks/useSlug"; diff --git a/src/components/Facility/Consultations/DailyRoundsList.tsx b/src/components/Facility/Consultations/DailyRoundsList.tsx index 31b14715853..7bd9b1fa96b 100644 --- a/src/components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/components/Facility/Consultations/DailyRoundsList.tsx @@ -3,9 +3,9 @@ import { useTranslation } from "react-i18next"; import Timeline, { TimelineNode } from "@/CAREUI/display/Timeline"; import PaginatedList from "@/CAREUI/misc/PaginatedList"; -import DefaultLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard"; -import LoadingLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/LoadingCard"; -import VirtualNursingAssistantLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard"; +import DefaultLogUpdateCard from "@/components/Facility/Consultations/LogUpdates/DefaultLogUpdateCard"; +import LoadingLogUpdateCard from "@/components/Facility/Consultations/LogUpdates/LoadingCard"; +import VirtualNursingAssistantLogUpdateCard from "@/components/Facility/Consultations/LogUpdates/VirtualNursingAssistantLogUpdateCard"; import { ConsultationModel } from "@/components/Facility/models"; import { DailyRoundsModel } from "@/components/Patient/models"; diff --git a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/components/Facility/Consultations/LogUpdates/DefaultLogUpdateCard.tsx similarity index 98% rename from src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx rename to src/components/Facility/Consultations/LogUpdates/DefaultLogUpdateCard.tsx index 53f884be2b4..31a685cdb59 100644 --- a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/LogUpdates/DefaultLogUpdateCard.tsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; import ButtonV2 from "@/components/Common/ButtonV2"; -import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import LogUpdateCardAttribute from "@/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute"; import { ConsultationModel } from "@/components/Facility/models"; import { DailyRoundsModel } from "@/components/Patient/models"; diff --git a/src/components/Facility/Consultations/DailyRounds/LoadingCard.tsx b/src/components/Facility/Consultations/LogUpdates/LoadingCard.tsx similarity index 100% rename from src/components/Facility/Consultations/DailyRounds/LoadingCard.tsx rename to src/components/Facility/Consultations/LogUpdates/LoadingCard.tsx diff --git a/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute.tsx similarity index 100% rename from src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx rename to src/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute.tsx diff --git a/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx b/src/components/Facility/Consultations/LogUpdates/VirtualNursingAssistantLogUpdateCard.tsx similarity index 97% rename from src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx rename to src/components/Facility/Consultations/LogUpdates/VirtualNursingAssistantLogUpdateCard.tsx index b8a8e9fd814..e7229634266 100644 --- a/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/LogUpdates/VirtualNursingAssistantLogUpdateCard.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; -import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import LogUpdateCardAttribute from "@/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute"; import { DailyRoundsModel } from "@/components/Patient/models"; // TODO: remove this method once events module is ready From 8d6edaaba07ba9a7a74f496c4d537b0badfe155c Mon Sep 17 00:00:00 2001 From: yash-learner Date: Thu, 14 Nov 2024 17:23:31 +0530 Subject: [PATCH 16/17] Rename DailyRoundsList to LogUpdatesList and update references in ConsultationUpdatesTab --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 4 ++-- .../Consultations/{DailyRoundsList.tsx => LogUpdatesList.tsx} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/components/Facility/Consultations/{DailyRoundsList.tsx => LogUpdatesList.tsx} (98%) diff --git a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index bfcc5d89ed5..563a261313c 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -22,7 +22,7 @@ import Tabs from "@/components/Common/Tabs"; import EventsList from "@/components/Facility/ConsultationDetails/Events/EventsList"; import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; import DailyRoundsFilter from "@/components/Facility/Consultations/DailyRoundsFilter"; -import DailyRoundsList from "@/components/Facility/Consultations/DailyRoundsList"; +import LogUpdatesList from "@/components/Facility/Consultations/LogUpdatesList"; import { BedModel } from "@/components/Facility/models"; import PrescriptionsTable from "@/components/Medicine/PrescriptionsTable"; import EncounterSymptomsCard from "@/components/Symptoms/SymptomsCard"; @@ -756,7 +756,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { {showEvents ? ( ) : ( - diff --git a/src/components/Facility/Consultations/DailyRoundsList.tsx b/src/components/Facility/Consultations/LogUpdatesList.tsx similarity index 98% rename from src/components/Facility/Consultations/DailyRoundsList.tsx rename to src/components/Facility/Consultations/LogUpdatesList.tsx index 7bd9b1fa96b..911d32dca25 100644 --- a/src/components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/components/Facility/Consultations/LogUpdatesList.tsx @@ -21,7 +21,7 @@ interface Props { query: QueryParams; } -export default function DailyRoundsList({ consultation, query }: Props) { +export default function LogUpdatesList({ consultation, query }: Props) { const [consultationId] = useSlugs("consultation"); const { t } = useTranslation(); From 54c6464eaabf10a58642948095e79dbaccf5507e Mon Sep 17 00:00:00 2001 From: yash-learner Date: Thu, 14 Nov 2024 17:34:58 +0530 Subject: [PATCH 17/17] Rename DailyRoundsFilter to LogUpdatesFilter and update references in ConsultationUpdatesTab --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 4 ++-- .../{DailyRoundsFilter.tsx => LogUpdatesFilter.tsx} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/components/Facility/Consultations/{DailyRoundsFilter.tsx => LogUpdatesFilter.tsx} (98%) diff --git a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 563a261313c..ea7448d37b2 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -21,7 +21,7 @@ import ReadMore from "@/components/Common/Readmore"; import Tabs from "@/components/Common/Tabs"; import EventsList from "@/components/Facility/ConsultationDetails/Events/EventsList"; import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; -import DailyRoundsFilter from "@/components/Facility/Consultations/DailyRoundsFilter"; +import LogUpdatesFilter from "@/components/Facility/Consultations/LogUpdatesFilter"; import LogUpdatesList from "@/components/Facility/Consultations/LogUpdatesList"; import { BedModel } from "@/components/Facility/models"; import PrescriptionsTable from "@/components/Medicine/PrescriptionsTable"; @@ -773,7 +773,7 @@ function DailyRoundsSortDropdown({ setDailyRoundsQuery: (query: QueryParams) => void; }) { return ( - { setDailyRoundsQuery(query); }} diff --git a/src/components/Facility/Consultations/DailyRoundsFilter.tsx b/src/components/Facility/Consultations/LogUpdatesFilter.tsx similarity index 98% rename from src/components/Facility/Consultations/DailyRoundsFilter.tsx rename to src/components/Facility/Consultations/LogUpdatesFilter.tsx index 90e7908ac16..22cb357936c 100644 --- a/src/components/Facility/Consultations/DailyRoundsFilter.tsx +++ b/src/components/Facility/Consultations/LogUpdatesFilter.tsx @@ -26,7 +26,7 @@ interface Props { onApply: (filter: FilterState) => void; } -export default function DailyRoundsFilter(props: Props) { +export default function LogUpdatesFilter(props: Props) { const { t } = useTranslation(); const [filter, setFilter] = useState({});