Обновление отчета

This commit is contained in:
brusnitsyn
2026-01-20 09:26:47 +09:00
parent 62d7e9efd4
commit 8a0fdf9470
12 changed files with 83 additions and 41 deletions

View File

@@ -136,9 +136,20 @@ class ReportController extends Controller
->map(function ($item, $index) {
$item->num = $index + 1;
return $item;
});;
});
} else if ($status === 'observation') {
$patients = ObservationPatient::with(['history'])
->where('rf_department_id', $misDepartmentId)
->history;
} else if ($status === 'deceased') {
$patients = MisMedicalHistory::select(...$model->getFillable())
->deceased()
->inDepartment($misDepartmentId, $startDate, $endDate)
->get()
->map(function ($item, $index) {
$item->num = $index + 1;
return $item;
});
}
$patients->load(['migrations' => function ($query) use ($startDate, $endDate, $misStationarBranchId) {