From 2e2ad85d33f07b6b29025c17389ab7217c11d5e2 Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Sat, 12 Oct 2024 02:57:59 +0530 Subject: [PATCH 1/7] chore: Update PatientConsentRecords component - Added Consultation breadcrumb with URI for updating consultation - Updated backUrl for consultation update Fixes #8765 --- src/Components/Patient/PatientConsentRecords.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Components/Patient/PatientConsentRecords.tsx b/src/Components/Patient/PatientConsentRecords.tsx index 4ea9a0f294a..1c94e3054b9 100644 --- a/src/Components/Patient/PatientConsentRecords.tsx +++ b/src/Components/Patient/PatientConsentRecords.tsx @@ -107,6 +107,10 @@ export default function PatientConsentRecords(props: { crumbsReplacements={{ [facilityId]: { name: patient?.facility_object?.name }, [patientId]: { name: patient?.name }, + consultation: { + name: "Consultation", + uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`, + }, [consultationId]: { name: patient?.last_consultation?.suggestion === "A" @@ -116,7 +120,7 @@ export default function PatientConsentRecords(props: { : patient?.last_consultation?.suggestion_text, }, }} - backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/`} + backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`} > {fileUpload.Dialogues} {fileManager.Dialogues} From 11901b8729eb612c2113bdbd9eb7997c9f2d87db Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 5 Nov 2024 23:12:28 +0530 Subject: [PATCH 2/7] Update src/components/Patient/PatientConsentRecords.tsx Co-authored-by: Rithvik Nishad --- src/components/Patient/PatientConsentRecords.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx index bc9d6fdf879..bb43f636e22 100644 --- a/src/components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -109,7 +109,7 @@ export default function PatientConsentRecords(props: { [patientId]: { name: patient?.name }, consultation: { name: "Consultation", - uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`, + uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, }, [consultationId]: { name: From ed92f6abff10edbf352c40fe2b64342ab03430bc Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 5 Nov 2024 23:12:46 +0530 Subject: [PATCH 3/7] Update src/components/Patient/PatientConsentRecords.tsx Co-authored-by: Rithvik Nishad --- src/components/Patient/PatientConsentRecords.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx index bb43f636e22..e54ce69cc25 100644 --- a/src/components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -120,7 +120,7 @@ export default function PatientConsentRecords(props: { : patient?.last_consultation?.suggestion_text, }, }} - backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`} + backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`} > {fileUpload.Dialogues} {fileManager.Dialogues} From e8b006dd71581d1486dfed4f03e5c623eebae4c9 Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 19 Nov 2024 22:36:16 +0530 Subject: [PATCH 4/7] refactor: Update PatientConsentRecords component to include update URI for consultation --- src/components/Patient/PatientConsentRecords.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx index e54ce69cc25..bc9d6fdf879 100644 --- a/src/components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -109,7 +109,7 @@ export default function PatientConsentRecords(props: { [patientId]: { name: patient?.name }, consultation: { name: "Consultation", - uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`, + uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`, }, [consultationId]: { name: @@ -120,7 +120,7 @@ export default function PatientConsentRecords(props: { : patient?.last_consultation?.suggestion_text, }, }} - backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`} + backUrl={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`} > {fileUpload.Dialogues} {fileManager.Dialogues} From 18141a86a1f7319ac9273a2bff7c97f84972a9af Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 19 Nov 2024 22:46:50 +0530 Subject: [PATCH 5/7] refactor: Update ConsultationDetails component to include update URI for consultation --- src/components/Facility/ConsultationDetails/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx index 148411a6e06..f85b96536af 100644 --- a/src/components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -211,6 +211,10 @@ export const ConsultationDetails = (props: any) => { crumbsReplacements={{ [facilityId]: { name: patientData?.facility_object?.name }, [patientId]: { name: patientData?.name }, + consultation: { + name: "Consultation", + uri: `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/update`, + }, [consultationId]: { name: consultationData.suggestion === "A" From e9f04f0b2e3cbb3d03172444759053c9b394c58f Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 19 Nov 2024 23:25:30 +0530 Subject: [PATCH 6/7] resolving github actions comment --- .../Facility/ConsultationDetails/index.tsx | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx index 9f5c7cc7836..31620dcb85d 100644 --- a/src/components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -192,9 +192,10 @@ export const ConsultationDetails = (props: any) => { const SelectedTab = tabs[tab]; const tabButtonClasses = (selected: boolean) => - `capitalize min-w-max-content cursor-pointer font-bold whitespace-nowrap ${selected === true - ? "border-primary-500 hover:border-secondary-300 text-primary-600 border-b-2" - : "text-secondary-700 hover:text-secondary-700" + `capitalize min-w-max-content cursor-pointer font-bold whitespace-nowrap ${ + selected === true + ? "border-primary-500 hover:border-secondary-300 text-primary-600 border-b-2" + : "text-secondary-700 hover:text-secondary-700" }`; return ( @@ -221,8 +222,8 @@ export const ConsultationDetails = (props: any) => { name: consultationData.suggestion === "A" ? `Admitted on ${formatDateTime( - consultationData.encounter_date!, - )}` + consultationData.encounter_date!, + )}` : consultationData.suggestion_text, }, }} @@ -276,8 +277,8 @@ export const ConsultationDetails = (props: any) => { onClick={() => showPatientNotesPopup ? navigate( - `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/notes`, - ) + `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/notes`, + ) : setShowPatientNotesPopup(true) } className="btn btn-primary m-1 w-full hover:text-white" @@ -313,14 +314,14 @@ export const ConsultationDetails = (props: any) => { {(consultationData.discharge_date ?? consultationData.encounter_date) && ( -
- {relativeTime( - consultationData.discharge_date - ? consultationData.discharge_date - : consultationData.encounter_date, - )} -
- )} +
+ {relativeTime( + consultationData.discharge_date + ? consultationData.discharge_date + : consultationData.encounter_date, + )} +
+ )}
{consultationData.encounter_date && formatDateTime(consultationData.encounter_date)} @@ -420,4 +421,4 @@ export const ConsultationDetails = (props: any) => {
); -}; +}; \ No newline at end of file From 977140fc64bc98c2ffcc6d9c3fdad5d7e87d824c Mon Sep 17 00:00:00 2001 From: Shaurya Gupta Date: Tue, 19 Nov 2024 23:32:51 +0530 Subject: [PATCH 7/7] resolving github actions comment --- src/components/Facility/ConsultationDetails/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx index 31620dcb85d..e48fb3426d5 100644 --- a/src/components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -421,4 +421,4 @@ export const ConsultationDetails = (props: any) => { ); -}; \ No newline at end of file +};