From bad3b7bca82dc6dbe53308de34e671c2b8aea464 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Mon, 20 Dec 2021 12:26:51 +0100 Subject: [PATCH] Improve execution of health care sheet v2 --- app/Http/Controllers/HealthCareSheetController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/HealthCareSheetController.php b/app/Http/Controllers/HealthCareSheetController.php index 91421f6..f69d70d 100755 --- a/app/Http/Controllers/HealthCareSheetController.php +++ b/app/Http/Controllers/HealthCareSheetController.php @@ -1003,7 +1003,8 @@ class HealthCareSheetController extends Controller return $q->with(['act:id,code,name'])->where('billed', 0); }, 'prescriptions' => function ($q) { return $q->with(['drug_or_device:id,name'])->where('billed', 0); - }])->where('user_id', $request->input('user_id')); + }])->where('state', InsuranceSubscriptionState::ACCEPTED) + ->where('user_id', $request->input('user_id')); } if (!empty($type)) {