Allow specialty doctors to open patient charts and order labs.
Deploy Ladill Care / deploy (push) Successful in 1m18s
Deploy Ladill Care / deploy (push) Successful in 1m18s
Branch-scoped staff could 404 on charts when the patient's home branch differed from the visit site; Orders also linked doctors to a lab index they could not access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Http\Controllers\Care\Concerns\ScopesToAccount;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Appointment;
|
||||
use App\Models\Department;
|
||||
use App\Models\InvestigationType;
|
||||
use App\Models\PatientAttachment;
|
||||
use App\Models\Visit;
|
||||
use App\Services\Care\AppointmentService;
|
||||
@@ -507,6 +508,7 @@ class SpecialtyModuleController extends Controller
|
||||
$clinicalFields = [];
|
||||
$clinicalAlerts = [];
|
||||
$visitDocuments = collect();
|
||||
$investigationTypes = collect();
|
||||
$dentalChart = null;
|
||||
$dentalTeethMap = [];
|
||||
$dentalPlan = null;
|
||||
@@ -529,9 +531,9 @@ class SpecialtyModuleController extends Controller
|
||||
'patient.emergencyContacts',
|
||||
'patient.attachments',
|
||||
'appointment.practitioner',
|
||||
'appointment.consultation',
|
||||
'appointment.consultation.investigationRequests.investigationType',
|
||||
'bill.lineItems',
|
||||
'consultations',
|
||||
'consultations.investigationRequests.investigationType',
|
||||
]);
|
||||
$workspaceVisit = $visit;
|
||||
if ($visit->patient) {
|
||||
@@ -549,9 +551,9 @@ class SpecialtyModuleController extends Controller
|
||||
'patient.emergencyContacts',
|
||||
'patient.attachments',
|
||||
'appointment.practitioner',
|
||||
'appointment.consultation',
|
||||
'appointment.consultation.investigationRequests.investigationType',
|
||||
'bill.lineItems',
|
||||
'consultations',
|
||||
'consultations.investigationRequests.investigationType',
|
||||
]);
|
||||
$workspaceVisit = $first;
|
||||
$patientHeader = array_merge(
|
||||
@@ -624,6 +626,14 @@ class SpecialtyModuleController extends Controller
|
||||
->limit(20)
|
||||
->get()
|
||||
: collect();
|
||||
|
||||
if ($activeTab === 'orders' && $canConsult) {
|
||||
$investigationTypes = InvestigationType::query()
|
||||
->where('organization_id', $organization->id)
|
||||
->where('is_active', true)
|
||||
->orderBy('name')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
||||
return view('care.specialty.shell', [
|
||||
@@ -650,6 +660,7 @@ class SpecialtyModuleController extends Controller
|
||||
'clinicalFields' => $clinicalFields,
|
||||
'clinicalAlerts' => $clinicalAlerts,
|
||||
'visitDocuments' => $visitDocuments,
|
||||
'investigationTypes' => $investigationTypes,
|
||||
'dentalChart' => $dentalChart,
|
||||
'dentalTeethMap' => $dentalTeethMap,
|
||||
'dentalPlan' => $dentalPlan,
|
||||
|
||||
Reference in New Issue
Block a user