Add GET /consultations/{uuid}/assessments for consultation-scoped forms.
Deploy Ladill Care / deploy (push) Successful in 50s

Only POST existed on that path, so navigating to the natural collection URL 404'd. Serve the patient assessments index with consultation return context, and cover it with a doctor feature test.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 20:39:02 +00:00
co-authored by Cursor
parent b077467c4b
commit 1128ea31cc
4 changed files with 67 additions and 3 deletions
@@ -59,6 +59,22 @@ class AssessmentController extends Controller
]);
}
/**
* Consultation-scoped assessments list (same patient forms UI with return context).
* Supports GET /consultations/{uuid}/assessments previously only POST existed.
*/
public function indexForConsultation(Request $request, Consultation $consultation): View
{
$this->authorizeConsultation($request, $consultation);
$consultation->loadMissing('patient');
$return = app(ConsultationReturnContext::class);
$return->remember($consultation);
$request->query->set(ConsultationReturnContext::QUERY_KEY, $consultation->uuid);
return $this->index($request, $consultation->patient);
}
public function create(Request $request, Patient $patient): View
{
$this->assertEngineEnabled($request);