Skip to content

Commit

Permalink
fix: standardize terminology to 'Log Update' across patient dashboard (
Browse files Browse the repository at this point in the history
  • Loading branch information
syedfardeenjeelani committed Oct 4, 2024
1 parent f5152fc commit 3677b46
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 36 deletions.
12 changes: 6 additions & 6 deletions cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ 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",
patientCategory,
Expand Down Expand Up @@ -179,7 +179,7 @@ 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 Update").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
Expand All @@ -194,7 +194,7 @@ 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 Update").click();
patientLogupdate.clickLogUpdateUpdateLog(
"#dailyround-entry",
patientCategory,
Expand All @@ -209,7 +209,7 @@ 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 Update").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
Expand Down Expand Up @@ -284,7 +284,7 @@ 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 Update").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
Expand All @@ -308,7 +308,7 @@ 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 Update").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
Expand Down
4 changes: 2 additions & 2 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,12 @@ export const NOTIFICATION_EVENTS: NotificationEvent[] = [
},
{
id: "PATIENT_CONSULTATION_CREATED",
text: "Patient Consultation Created",
text: "Patient Log Update Created",
icon: "l-heart",
},
{
id: "PATIENT_CONSULTATION_UPDATED",
text: "Patient Consultation 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 @@ -197,7 +197,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 Update`,
);
}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
),
value: 1,
},
{ text: "Daily Rounds", value: 0 },
{ text: "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 @@ -52,8 +52,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 Update/${round.id}`
: `${consultationUrl}/Log Update/${round.id}`
}
>
<CareIcon icon="l-eye" className="text-lg" />
Expand All @@ -74,8 +74,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 Update/${round.id}/update`
: `${consultationUrl}/Log Update/${round.id}/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 @@ -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 Update/${props.id}/update`}
>
<CareIcon
icon="l-info-circle"
Expand Down Expand Up @@ -172,7 +172,7 @@ type SectionEditorProps = {
};

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

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 @@ -67,9 +67,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 Update/${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 Update/${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 }: DetailRoute) {
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 Update/${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 Update/${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 @@ -29,8 +29,8 @@ export const DailyRoundListDetails = (props: any) => {

return (
<Page
title={`Consultation Update #${id}`}
backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds`}
title={`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 @@ -49,7 +49,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 Update/${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 @@ -145,7 +145,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 ? "Add Log Update" : "Info";
const buttonText = !id
? !["VENTILATOR", "DOCTORS_LOG"].includes(state.form.rounds_type)
? t("save")
Expand Down Expand Up @@ -393,7 +393,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 Update/${obj.id}/update`,
);
}
}
Expand Down Expand Up @@ -421,7 +421,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 Update/${obj.id}/update`,
);
}
}
Expand Down Expand Up @@ -535,7 +535,7 @@ export const DailyRounds = (props: any) => {
}}
backUrl={
id
? `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds`
? `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/Log Update`
: `/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 @@ -587,7 +587,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 Update`
}
onClick={() => {
if (
Expand Down
12 changes: 6 additions & 6 deletions src/Redux/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -629,25 +629,25 @@ const routes = {
method: "DELETE",
},
createDailyRounds: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/",
path: "/api/v1/consultation/{consultationId}/Log Update/",
TBody: Type<DailyRoundsModel>(),
TRes: Type<DailyRoundsModel>(),
method: "POST",
},
updateDailyReport: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/{id}/",
path: "/api/v1/consultation/{consultationId}/Log Update/{id}/",
TBody: Type<DailyRoundsModel>(),
TRes: Type<DailyRoundsModel>(),
method: "PUT",
},
updateDailyRound: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/{id}/",
path: "/api/v1/consultation/{consultationId}/Log Update/{id}/",
method: "PATCH",
TBody: Type<Partial<DailyRoundsModel>>(),
TRes: Type<DailyRoundsModel>(),
},
getDailyReports: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/",
path: "/api/v1/consultation/{consultationId}/Log Update/",
method: "GET",
TRes: Type<PaginatedResponse<DailyRoundsModel>>(),
},
Expand All @@ -659,12 +659,12 @@ const routes = {
},

getDailyReport: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/{id}/",
path: "/api/v1/consultation/{consultationId}/Log Update/{id}/",
method: "GET",
TRes: Type<DailyRoundsModel>(),
},
dailyRoundsAnalyse: {
path: "/api/v1/consultation/{consultationId}/daily_rounds/analyse/",
path: "/api/v1/consultation/{consultationId}/Log Update/analyse/",
method: "POST",
TBody: Type<DailyRoundsBody>(),
TRes: Type<DailyRoundsRes>(),
Expand Down
4 changes: 2 additions & 2 deletions src/Routers/routes/ConsultationRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ export default {
/>
),

"/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily_rounds/:id":
"/facility/:facilityId/patient/:patientId/consultation/:consultationId/Log Update/:id":
(params: {
facilityId: string;
patientId: string;
consultationId: string;
id: string;
}) => <CriticalCarePreview {...params} />,
"/facility/:facilityId/patient/:patientId/consultation/:consultationId/daily_rounds/:id/update":
"/facility/:facilityId/patient/:patientId/consultation/:consultationId/Log Update/:id/update":
(params: {
facilityId: string;
patientId: string;
Expand Down

0 comments on commit 3677b46

Please sign in to comment.