Improve method get health care sheet
This commit is contained in:
parent
edf205a374
commit
7547d9dd55
|
@ -781,7 +781,7 @@ class HealthCareSheetController extends Controller
|
|||
'prescriptions.*.id' => 'required|integer|exists:nh_medical_prescriptions,id',
|
||||
'prescriptions.*.unit_price' => 'required|numeric',
|
||||
'exams' => 'nullable|array',
|
||||
'exams.*.id' => 'nullable|integer|exists:nh_exams,id',
|
||||
'exams.*.id' => 'required|integer|exists:nh_exams,id',
|
||||
'exams.*.unit_price' => 'required|numeric',
|
||||
]);
|
||||
|
||||
|
@ -1018,10 +1018,13 @@ class HealthCareSheetController extends Controller
|
|||
|
||||
if (!empty($user_id)) {
|
||||
$query = NhInfosHealthCareSheets::where('user_id', $user_id);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!empty($network_agent_id)) {
|
||||
$query = NhInfosHealthCareSheets::where('network_agent_id', $network_agent_id);
|
||||
}
|
||||
|
||||
|
||||
$query = $query->with(['performances.act:id,code,name', 'exams.act:id,code,name', 'prescriptions.drug_or_device:id,name']);
|
||||
|
||||
if (!empty($state) && $state == 'TO_BILL') {
|
||||
|
|
Loading…
Reference in New Issue