Skip to content

fix: block prescription access when consultation is active

Sahasra Reddy requested to merge feat/consultation_completed into develop

Previously, prescriptions could be accessed using the book number even when the patient's consultation was still ACTIVE. This created a workflow violation and potential data inconsistency.

Problem:

Patient under consultation could still access prescription Backend lacked consultation status validation API allowed direct fetch by book number Risk of premature prescription visibility

Root Cause:

Missing validation of consultation status before serving prescription data. Fix Implemented: Added backend check for consultation status Block prescription access when status = ACTIVE Allow access only when consultation is COMPLETED Ensured API returns proper error response when blocked

Expected Behavior Now: 🚫 ACTIVE consultation → prescription blocked COMPLETED consultation → prescription accessible

Merge request reports

Loading