diff --git a/public/locale/en.json b/public/locale/en.json
index 75339842094..b856cbb8657 100644
--- a/public/locale/en.json
+++ b/public/locale/en.json
@@ -2374,6 +2374,7 @@
"view_consultation_and_log_updates": "View Consultation / Log Updates",
"view_dashboard": "View Dashboard",
"view_details": "View Details",
+ "view_encounter": "View Encounter",
"view_facility": "View Facility",
"view_files": "View Files",
"view_patient": "View Patient",
diff --git a/src/Routers/routes/ConsultationRoutes.tsx b/src/Routers/routes/ConsultationRoutes.tsx
index 699964122f3..119ac148aa9 100644
--- a/src/Routers/routes/ConsultationRoutes.tsx
+++ b/src/Routers/routes/ConsultationRoutes.tsx
@@ -19,30 +19,50 @@ const consultationRoutes: AppRoutes = {
({ facilityId, encounterId }) => (
),
- "/facility/:facilityId/encounter/:encounterId/:tab": ({
- facilityId,
- encounterId,
- tab,
- }) => (
-
- ),
- "/facility/:facilityId/encounter/:encounterId/:tab/:subPage": ({
+ "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire":
+ ({ facilityId, encounterId, patientId }) => (
+
+ ),
+ "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire/:slug":
+ ({ facilityId, encounterId, slug, patientId }) => (
+
+ ),
+ "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire_response/:id":
+ ({ patientId, id }) => (
+
+ ),
+ "/facility/:facilityId/patient/:patientId/encounter/:encounterId/:tab": ({
facilityId,
+ patientId,
encounterId,
tab,
- subPage,
}) => (
),
+ "/facility/:facilityId/patient/:patientId/encounter/:encounterId/:tab/:subPage":
+ ({ facilityId, encounterId, patientId, tab, subPage }) => (
+
+ ),
"/facility/:facilityId/patient/:patientId/consultation": ({
facilityId,
patientId,
@@ -63,27 +83,6 @@ const consultationRoutes: AppRoutes = {
subjectType="patient"
/>
),
- "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire":
- ({ facilityId, encounterId, patientId }) => (
-
- ),
- "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire/:slug":
- ({ facilityId, encounterId, slug, patientId }) => (
-
- ),
- "/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire_response/:id":
- ({ patientId, id }) => (
-
- ),
};
export default consultationRoutes;
diff --git a/src/components/Encounter/CreateEncounterForm.tsx b/src/components/Encounter/CreateEncounterForm.tsx
index 488cbc585fd..43dff98c8a0 100644
--- a/src/components/Encounter/CreateEncounterForm.tsx
+++ b/src/components/Encounter/CreateEncounterForm.tsx
@@ -154,7 +154,9 @@ export default function CreateEncounterForm({
form.reset();
queryClient.invalidateQueries({ queryKey: ["encounters", patientId] });
onSuccess?.();
- navigate(`/facility/${facilityId}/encounter/${data.id}/updates`);
+ navigate(
+ `/facility/${facilityId}/patient/${patientId}/encounter/${data.id}/updates`,
+ );
},
onError: (error) => {
const errorData = error.cause as { errors: { msg: string[] } };
diff --git a/src/components/Facility/EncounterCard.tsx b/src/components/Facility/EncounterCard.tsx
index 10c408a7bee..313f2be4b0c 100644
--- a/src/components/Facility/EncounterCard.tsx
+++ b/src/components/Facility/EncounterCard.tsx
@@ -92,7 +92,7 @@ export const EncounterCard = (props: EncounterCardProps) => {
{
)}
>
- {t("View Encounter")}
+ {t("view_encounter")}
>
diff --git a/src/components/Files/FilesTab.tsx b/src/components/Files/FilesTab.tsx
index e092adfcae7..8449811a1db 100644
--- a/src/components/Files/FilesTab.tsx
+++ b/src/components/Files/FilesTab.tsx
@@ -655,7 +655,7 @@ export const FilesTab = (props: FilesTabProps) => {
{t("all")}
@@ -663,7 +663,7 @@ export const FilesTab = (props: FilesTabProps) => {
{t("discharge_summary")}
diff --git a/src/components/Patient/EncounterQuestionnaire.tsx b/src/components/Patient/EncounterQuestionnaire.tsx
index 43eb6bca2bd..90de3924f2c 100644
--- a/src/components/Patient/EncounterQuestionnaire.tsx
+++ b/src/components/Patient/EncounterQuestionnaire.tsx
@@ -37,7 +37,7 @@ export default function EncounterQuestionnaire({
onSubmit={() => {
if (encounterId) {
navigate(
- `/facility/${facilityId}/encounter/${encounterId}/updates`,
+ `/facility/${facilityId}/patient/${patientId}/encounter/${encounterId}/updates`,
);
} else {
navigate(`/patient/${patientId}/updates`);
diff --git a/src/components/Patient/PatientInfoCard.tsx b/src/components/Patient/PatientInfoCard.tsx
index 18e52410b4b..1212a95300d 100644
--- a/src/components/Patient/PatientInfoCard.tsx
+++ b/src/components/Patient/PatientInfoCard.tsx
@@ -464,7 +464,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
{t("discharge_summary")}
diff --git a/src/pages/Encounters/EncounterList.tsx b/src/pages/Encounters/EncounterList.tsx
index 9af50a0ebca..18f5331bb3b 100644
--- a/src/pages/Encounters/EncounterList.tsx
+++ b/src/pages/Encounters/EncounterList.tsx
@@ -721,7 +721,7 @@ export function EncounterList({
View Details
diff --git a/src/pages/Encounters/EncounterShow.tsx b/src/pages/Encounters/EncounterShow.tsx
index 020bd8f636d..a6e8ffb5f32 100644
--- a/src/pages/Encounters/EncounterShow.tsx
+++ b/src/pages/Encounters/EncounterShow.tsx
@@ -42,14 +42,15 @@ const defaultTabs = {
} as Record>;
interface Props {
- encounterId: string;
facilityId: string;
+ patientId: string;
+ encounterId: string;
tab?: string;
subPage?: string;
}
export const EncounterShow = (props: Props) => {
- const { facilityId, encounterId, subPage } = props;
+ const { facilityId, encounterId, patientId, subPage } = props;
const { t } = useTranslation();
const pluginTabs = useCareAppConsultationTabs();
@@ -64,6 +65,7 @@ export const EncounterShow = (props: Props) => {
pathParams: { id: encounterId },
queryParams: {
facility: facilityId,
+ patient: patientId,
},
}),
enabled: !!encounterId,
@@ -169,7 +171,7 @@ export const EncounterShow = (props: Props) => {
{t(`ENCOUNTER_TAB__${tab}`)}