Add GET /consultations/{uuid}/assessments for consultation-scoped forms.
Deploy Ladill Care / deploy (push) Successful in 50s
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user