diff --git a/app/Http/Controllers/Care/ConsultationController.php b/app/Http/Controllers/Care/ConsultationController.php
index ee75cdc..d32f8fc 100644
--- a/app/Http/Controllers/Care/ConsultationController.php
+++ b/app/Http/Controllers/Care/ConsultationController.php
@@ -216,6 +216,7 @@ class ConsultationController extends Controller
'pathwayInstruments' => $pathwayInstruments ?? collect(),
'queueIntegration' => $queueIntegration,
'queueBranchId' => $queueBranchId,
+ 'medicationRoutes' => config('care.medication_routes'),
]);
}
diff --git a/app/Http/Controllers/Care/PrescriptionController.php b/app/Http/Controllers/Care/PrescriptionController.php
index 4f59d5d..98036f9 100644
--- a/app/Http/Controllers/Care/PrescriptionController.php
+++ b/app/Http/Controllers/Care/PrescriptionController.php
@@ -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),
diff --git a/resources/views/care/consultations/partials/actions-menu.blade.php b/resources/views/care/consultations/partials/actions-menu.blade.php
index bac418d..dd6fbbb 100644
--- a/resources/views/care/consultations/partials/actions-menu.blade.php
+++ b/resources/views/care/consultations/partials/actions-menu.blade.php
@@ -34,9 +34,13 @@
@endif
@if ($canPrescribe)
-
+
+
@endif
@if ($canRequestInvestigations && $investigationTypes->isNotEmpty() && ! $isCompleted)
diff --git a/resources/views/care/consultations/show.blade.php b/resources/views/care/consultations/show.blade.php
index 0e24190..bf55321 100644
--- a/resources/views/care/consultations/show.blade.php
+++ b/resources/views/care/consultations/show.blade.php
@@ -486,4 +486,20 @@
@endif
+
+ @if ($canPrescribe)
+ {{ $consultation->patient->fullName() }} ({{ $consultation->patient->patient_number }})New prescription
+
{{ $consultation->patient->fullName() }} ({{ $consultation->patient->patient_number }})
- + @include('care.prescriptions.partials.form', [ + 'consultation' => $consultation, + 'routes' => $routes, + 'compact' => false, + ]) diff --git a/resources/views/care/prescriptions/partials/form.blade.php b/resources/views/care/prescriptions/partials/form.blade.php new file mode 100644 index 0000000..9fbab6b --- /dev/null +++ b/resources/views/care/prescriptions/partials/form.blade.php @@ -0,0 +1,72 @@ +{{-- Shared prescription line-item form body (create page + consultation modal). --}} +@php + $routes = $routes ?? config('care.medication_routes', []); + $compact = $compact ?? false; +@endphp +