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

Fix wrong terminology used in place of Log Update #9089

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
58cb9ad
add log update message to en
yash-learner Nov 11, 2024
59ef537
Use translation key for log update
yash-learner Nov 11, 2024
07c8b86
add translation key for plural log updates
yash-learner Nov 11, 2024
656847d
Update tab text to log updates
yash-learner Nov 11, 2024
5e25f47
Add breadcrumb replacement for daily rounds
yash-learner Nov 11, 2024
bf81756
Update notification text
yash-learner Nov 12, 2024
4437778
Refactor daily rounds to log updates in URLs and update related compo…
yash-learner Nov 12, 2024
d44f5b3
Remove breadcrumb replacement for daily rounds in DailyRoundListDetai…
yash-learner Nov 12, 2024
0f3ae99
Revert renaming of notification types
yash-learner Nov 12, 2024
d60eba5
Merge branch 'develop' into issues/7350/fix-wrong-terminology
yash-learner Nov 12, 2024
732e1c8
Fix typo in notification log updates URL path
yash-learner Nov 12, 2024
465274f
Rename "Daily Rounds" to "Log Updates" in patient log update tests an…
yash-learner Nov 13, 2024
2487bd3
Rename "Daily Rounds" to "Log Update" in Scribe form and update relat…
yash-learner Nov 13, 2024
e29a2b3
Merge branch 'develop' into issues/7350/fix-wrong-terminology
yash-learner Nov 13, 2024
d2a2e05
Update terminology: replace "no_consultation_updates" with "no_log_up…
yash-learner Nov 13, 2024
79a3616
Update terminology: replace "Consultation Updates" with "Log Updates"…
yash-learner Nov 13, 2024
26ed105
Merge branch 'develop' into issues/7350/fix-wrong-terminology
yash-learner Nov 14, 2024
eccc86a
Update folder name and imports
yash-learner Nov 14, 2024
8d6edaa
Rename DailyRoundsList to LogUpdatesList and update references in Con…
yash-learner Nov 14, 2024
54c6464
Rename DailyRoundsFilter to LogUpdatesFilter and update references in…
yash-learner Nov 14, 2024
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
2 changes: 2 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@
"location_management": "Location Management",
"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",
Expand Down
10 changes: 5 additions & 5 deletions src/Routers/routes/ConsultationRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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,
Expand All @@ -92,7 +92,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 }) => (
<DailyRounds
facilityId={facilityId}
Expand All @@ -101,7 +101,7 @@ const consultationRoutes: AppRoutes = {
id={id}
/>
),
"/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily-rounds/:id":
"/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id":
({ facilityId, patientId, consultationId, id }) => (
<DailyRoundListDetails
facilityId={facilityId}
Expand All @@ -110,7 +110,7 @@ const consultationRoutes: AppRoutes = {
id={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 }) => (
<CriticalCarePreview
facilityId={facilityId}
Expand All @@ -119,7 +119,7 @@ const consultationRoutes: AppRoutes = {
id={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 }) => (
<CriticalCareEditor
facilityId={facilityId}
Expand Down
4 changes: 2 additions & 2 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,12 @@ export const NOTIFICATION_EVENTS: NotificationEvent[] = [
},
{
id: "PATIENT_CONSULTATION_UPDATE_CREATED",
text: "Patient Consultation Update Created",
text: "Patient Log Update Created",
Copy link

@coderabbitai coderabbitai bot Nov 12, 2024

Choose a reason for hiding this comment

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

💡 Codebase verification

Remaining instances of "Consultation Update" found.

Please update the following files to ensure terminology consistency:

  • src/components/Facility/ConsultationCard.tsx
  • src/common/constants.tsx
  • cypress/pageobject/Patient/PatientConsultation.ts
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
  • cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts
🔗 Analysis chain

LGTM! The terminology changes align with the PR objectives.

The text changes from "Patient Consultation Update" to "Patient Log Update" are consistent with the broader effort to standardize terminology across the application.

Let's verify that this terminology change is consistently applied across the codebase:

Also applies to: 661-661


🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for any remaining instances of "Consultation Update" that might need to be updated

# Search for "Consultation Update" in all files
echo "Searching for remaining instances of 'Consultation Update'..."
rg -i "consultation update" --type ts --type tsx

# Search for notification text usage
echo "Checking notification text usage..."
rg -i "PATIENT_CONSULTATION_UPDATE" --type ts --type tsx

Length of output: 383


Script:

#!/bin/bash
# Description: Corrected search for any remaining instances of "Consultation Update" that might need to be updated

# Search for "Consultation Update" in all .ts and .tsx files
echo "Searching for remaining instances of 'Consultation Update' in .ts and .tsx files..."
rg -i "consultation update" -g "*.ts" -g "*.tsx"

# Search for notification text usage in .ts and .tsx files
echo "Checking notification text usage in .ts and .tsx files..."
rg -i "PATIENT_CONSULTATION_UPDATE" -g "*.ts" -g "*.tsx"

Length of output: 2033

Copy link
Member Author

@yash-learner yash-learner Nov 13, 2024

Choose a reason for hiding this comment

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

@coderabbitai Addressed in 79a3616, d2a2e05

Copy link

Choose a reason for hiding this comment

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

@yash-learner, thanks for addressing the previous feedback with your recent commits. However, I have found that there are still some remaining instances of "Consultation Update" in the codebase. Specifically, the phrase appears in the following files:

  • src/common/constants.tsx:

    • Line containing text: "Patient Consultation Updated",
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts:

    • Lines containing cy.verifyNotification("Consultation updated successfully");
  • cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts:

    • Line containing cy.verifyNotification("Consultation updated successfully");

Could you please update these instances to "Log Update" to ensure consistent terminology throughout the application?

🔗 Analysis chain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that there are no remaining instances of "Consultation Update" in the codebase

# Search for "Consultation Update" in all .ts and .tsx files
rg -i "consultation update" -g "*.ts" -g "*.tsx"

Length of output: 576

icon: "l-heart",
},
{
id: "PATIENT_CONSULTATION_UPDATE_UPDATED",
text: "Patient Consultation Update Updated",
text: "Patient Log Update Updated",
icon: "l-heart-medical",
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Facility/ConsultationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const ConsultationCard = (props: ConsultationProps) => {
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/`,
);
}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,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`
}
>
<CareIcon icon="l-eye" className="text-lg" />
Expand All @@ -81,8 +81,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`
}
>
<CareIcon icon="l-pen" className="text-lg" />
Expand Down
4 changes: 2 additions & 2 deletions src/components/LogUpdate/CriticalCareEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,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`}
>
<CareIcon
icon="l-info-circle"
Expand Down Expand Up @@ -178,7 +178,7 @@ type SectionEditorProps = {
};

const SectionEditor = ({ log, onComplete, section }: SectionEditorProps) => {
const [consultationId, id] = useSlugs("consultation", "daily_rounds");
const [consultationId, id] = useSlugs("consultation", "log_updates");
const [diff, setDiff] = useState<Partial<DailyRoundsModel>>({});
const [isProcessing, setIsProcessing] = useState(false);

Expand Down
2 changes: 1 addition & 1 deletion src/components/LogUpdate/CriticalCarePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function CriticalCarePreview(props: Props) {

<Card className="md:rounded-xl lg:p-8">
<h2 className="mb-3 flex flex-col gap-4 text-black md:flex-row md:items-center">
<span>Consultation Updates</span>
<span>{t("log_updates")}</span>
<div className="max-w-min whitespace-nowrap rounded-full border border-primary-300 bg-primary-100 px-2.5 py-1.5 text-sm font-semibold text-primary-500">
<span>{t(`ROUNDS_TYPE__${data.rounds_type}`)}</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Notifications/NotificationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ const NotificationTile = ({
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}`;
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}/daily-rounds/${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":
Expand Down
4 changes: 2 additions & 2 deletions src/components/Notifications/ShowPushNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,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}`;
Copy link

@coderabbitai coderabbitai bot Nov 12, 2024

Choose a reason for hiding this comment

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

💡 Codebase verification

The parameter daily_round is used in multiple locations and should be updated consistently:

  • src/Utils/request/api.tsx
  • src/components/Notifications/ShowPushNotification.tsx
  • src/components/Patient/ManagePatients.tsx
  • src/components/Patient/DailyRounds.tsx
  • src/components/Shifting/ShiftDetailsUpdate.tsx
  • src/components/Notifications/NotificationsList.tsx
  • src/components/Scribe/formDetails.ts
🔗 Analysis chain

Consider updating the parameter name for consistency.

While the URL paths have been updated to use log_updates, the parameter daily_round in caused_objects?.daily_round still uses the old terminology. Consider updating this to maintain consistency.

-        return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.daily_round}`;
+        return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.log_update}`;

Let's check if this parameter name is used elsewhere in the codebase:

Also applies to: 29-29

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -t ts -t tsx -t js "daily_round" -A 3 -B 3

Length of output: 73


Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -t ts -t typescriptreact -t js "daily_round" -A 3 -B 3

Length of output: 97


Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -g "*.ts" -g "*.tsx" -g "*.js" "daily_round" -A 3 -B 3

Length of output: 15086

Copy link
Member Author

Choose a reason for hiding this comment

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

We still call the backend model as DailyRound and not opening an PR as we will soon revamping it according FHIR

src/Utils/request/api.tsx

Backend api routes

src/components/Notifications/ShowPushNotification.tsx

/log_updates/${caused_objects?.daily_round -> this as well coming from backend

src/components/Patient/ManagePatients.tsx

This as well from backend

src/components/Patient/DailyRounds.tsx && src/components/Scribe/formDetails.ts

This is removed as a plug.

src/components/Shifting/ShiftDetailsUpdate.tsx

This as well related to Model.

src/components/Notifications/NotificationsList.tsx

Left out is the model field coming from backend


@rithviknishad what do you think ?

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

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":
Expand Down
6 changes: 3 additions & 3 deletions src/components/Patient/DailyRoundListDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const DailyRoundListDetails = (props: any) => {

return (
<Page
title={`Consultation Update #${id}`}
backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds`}
title={t("log_update") + ` #${id}`}
backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates`}
>
<div
className="mt-4 h-full rounded-lg border bg-white p-4 text-black shadow hover:border-primary-500"
Expand All @@ -51,7 +51,7 @@ export const DailyRoundListDetails = (props: any) => {
<div>
<div className="mt-2">
<ButtonV2
href={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${id}/update`}
href={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates/${id}/update`}
>
Update Details
</ButtonV2>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Patient/DailyRounds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const DailyRounds = (props: any) => {
const [diagnoses, setDiagnoses] = useState<ConsultationDiagnosis[]>();
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")
Expand Down Expand Up @@ -413,7 +413,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`,
);
}
}
Expand Down Expand Up @@ -441,7 +441,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`,
);
}
}
Expand Down Expand Up @@ -555,7 +555,7 @@ export const DailyRounds = (props: any) => {
}}
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"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
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 (
Expand Down
Loading