-
Notifications
You must be signed in to change notification settings - Fork 437
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
Support for self-healing Consultation URL #6857
Support for self-healing Consultation URL #6857
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
can you please review it |
Rest LGTM |
@@ -139,6 +140,6 @@ export default { | |||
/> | |||
), | |||
"/consultation/:consultationId": ({ consultationId }: any) => ( | |||
<ConsultationDetails consultationId={consultationId} tab={"updates"} /> | |||
<Redirect to={`/facility/id/patient/id/consultation/${consultationId}/`} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id is placeholder as we don't know the facility id and patient id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? We could keep it as <ConsultationDetails consultationId={consultationId} tab={"updates"} />
itself right? ConsultationDetails component would correct the URL for us right? (correct me if I am wrong)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes two redirects now:
/consultation/<valid_id>
goes to/facility/id/patient/id/consultation/<valid_id>
goes to/facility/<valid_id>/patient/<valid_id>/consultation/<valid_id>
AppHistory stack would have unnecessary redirects + Back Button no longer works properly this way
is this expected behavior or should I create an issue in backend |
you can create an issue |
👋 Hi, @konavivekramakrishna, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
WHAT
🤖[deprecated] Generated by Copilot at 8ae6d43
Removed the dependency of
facilityId
andpatientId
from the consultation details page and related components. This allows the user to access the consultation details directly from the/consultation/:consultationId
route, and simplifies the data fetching and routing logic. Updated theConsultationRoutes
component and thepatientUrl
andconsultationUrl
variables accordingly.Proposed Changes
/consultation/:id
to the actual route #6761https://www.loom.com/share/ec93a139d22541049ea1f728cd7e7d9c?sid=e71aed25-1ab6-4eee-9b5b-12f9bf9931db
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖[deprecated] Generated by Copilot at 8ae6d43
facilityId
andpatientId
props fromConsultationTabProps
interface andConsultationDetails
component, as they are no longer needed to render the consultation tabs and fetch the consultation and patient data (link, link, link)navigate
function toConsultationDetails
component to redirect the user to the last consultation of the patient, if theconsultationId
prop is not provided or invalid (link)facilityId
parameter fortriggerGoal
function to usepatientData?.facility_object?.id
value, to track the analytics of the consultation view event with the correct facility id (link)crumbsReplacements
object forBreadCrumb
component to usepatientData?.facility_object?.id
andpatientData?.id
values, to display the correct names of the facility and patient in the breadcrumb navigation (link)navigate
function for patient notes button to usepatientData?.facility_object?.id
andpatientData?.id
values, to redirect the user to the patient notes page with the correct facility and patient ids (link)href
attribute for consultation tab buttons to usepatientData?.facility_object?.id
andpatientData?.id
values, to link the user to the correct consultation tab page with the correct facility and patient ids (link)facilityId
prop forDoctorVideoSlideover
component to useString(patientData?.facility_object?.id)
value, to render the doctor video slideover with the correct facility id (link)patientId
andfacilityId
props forPatientNotesSlideover
component to useString(patientData?.id)
andString(patientData?.facility_object?.id)
values, to render the patient notes slideover with the correct patient and facility ids (link)facilityId
andpatientId
variables fromDailyRoundsList
component, and updateconsultationUrl
variable to use/consultation/:consultationId
route, to render the daily rounds list without the facility and patient ids (link)patientUrl
variable forPatientManager
component to use/consultation/:consultationId
route, if the patient has a last consultation that is not discharged and active, to link the user to the consultation details page without the facility and patient ids (link)/consultation/:consultationId
route toConsultationRoutes
component, to render theConsultationDetails
component with theconsultationId
andupdates
props, to enable the user to access the consultation details page directly (link)