Open Prescribe from consultation as a modal/bottomsheet.
Deploy Ladill Care / deploy (push) Successful in 46s

Reuse the shared prescription form in x-modal so desktop gets a popup and mobile gets the existing bottomsheet behavior, then return to the consultation after create.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 14:58:58 +00:00
co-authored by Cursor
parent 2b3eed8f84
commit 40325144bb
6 changed files with 106 additions and 41 deletions
@@ -216,6 +216,7 @@ class ConsultationController extends Controller
'pathwayInstruments' => $pathwayInstruments ?? collect(),
'queueIntegration' => $queueIntegration,
'queueBranchId' => $queueBranchId,
'medicationRoutes' => config('care.medication_routes'),
]);
}
@@ -187,6 +187,12 @@ class PrescriptionController extends Controller
$return = app(ConsultationReturnContext::class);
$return->remember($consultation);
if ($request->input('return_to') === 'consultation') {
return redirect()
->route('care.consultations.show', $consultation)
->with('success', 'Prescription created.');
}
return redirect()->route('care.prescriptions.show', array_filter([
'prescription' => $prescription,
...$return->query($consultation),