ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
225 stars 407 forks source link

Breadcrumbs redirection to patient edit consultation form is not working as expected #8759

Open nihal467 opened 5 days ago

nihal467 commented 5 days ago

Describe the bug

from the patient consent record page, when we click on the consultation, in the breadcrumbs, we are taken to a new consultation form,not the existing consultation of the patient

To Reproduce Steps to reproduce the behavior:

  1. Go to any active consultation
  2. Click on manage patients and click on the consent records
  3. view the breadcrumbs on the left side and click on the consultation
  4. See error

Expected behavior

Screenshots

Image

noufalrahim commented 4 days ago

@nihal467 can u assign this to me

shauryag2002 commented 4 days ago

Hi @nihal467 , Can i work on this issue?

ahmedobaid23 commented 1 day ago

@nihal467 is someone working on this?

ahmedobaid23 commented 19 hours ago

@nihal467

First of all, these are the breadcrumbs:

Image

and these are the URIs linked to each of the breadcrumb:

Image

As you can see, no matter which page you are on, whenever you click on Consultation from the breadcrumbs, you will always be redirected to Create Consultation page because the URI linked to Consultation corresponds to that page in the routing. However if you click on Admitted on 03:54 PM; 10/12/2023 (which is unclickable from the Patient Consent Records page), you will be redirected to the consultation of the patient because of its URI.

Similar is the case for when you click on Patient from the breadcrumbs, you will be redirected to Create Patient page because the URI linked to Patient corresponds to that page in the routing. But when you click on the name of the patient (Anjali Krishnan in this case), you will be redirected to her page.

Actually, in many pages like Patient Dashboard and Patient Consent Records page, the patientId and consultationId are replaced by patient's name and encounter date respectively as you can see in the picture below:

Image

Also, on every page, the last two crumbs were rendered unclickable (as a span) because of the logic issue. Shouldn't only the last crumb be rendered as unclickable and the rest as a Link? In this way, clicking on the Admitted on 03:54 PM; 10/12/2023 navigates the user to the consultation of the patient.

The solution I have in my mind is to change Admitted on 03:54 PM; 10/12/2023 back to consultationId on all these pages and make it clickable so that clicking it navigates the user back to consultation of the patient.

If you have some other solution, kindly suggest me.