feat: improve print views, SQLite config, and file upload performance
This commit is contained in:
@@ -26,8 +26,24 @@ public function printAdmission(Prescription $prescription)
|
||||
{
|
||||
$prescription->load('patientRecord');
|
||||
|
||||
$patient = $prescription->patientRecord;
|
||||
$appointment = $patient?->surgeryAppointment?->load('surgeryCenter');
|
||||
$centerName = '';
|
||||
$surgeryDate = '';
|
||||
|
||||
if ($appointment) {
|
||||
try {
|
||||
$surgeryDate = Jalalian::fromCarbon($appointment->surgery_date)->format('Y/m/d');
|
||||
} catch (\Throwable) {
|
||||
$surgeryDate = $appointment->surgery_date?->format('Y-m-d') ?? '';
|
||||
}
|
||||
$centerName = $appointment->surgeryCenter?->name ?? '';
|
||||
}
|
||||
|
||||
return view('prints.prescription-admission', [
|
||||
'prescription' => $prescription,
|
||||
'centerName' => $centerName,
|
||||
'surgeryDate' => $surgeryDate,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user