Ver Fonte

Updates

Samson Mutunga há 3 anos atrás
pai
commit
06bda95874

+ 7 - 3
app/Http/Controllers/PatientController.php

@@ -8,6 +8,7 @@ use App\Models\CareMonth;
 use App\Models\Client;
 use App\Models\ClientBDTDevice;
 use App\Models\ClientInfoLine;
+use App\Models\ClientPrimaryCoverage;
 use App\Models\ClientProAccess;
 use App\Models\CompanyPro;
 use App\Models\Erx;
@@ -608,14 +609,17 @@ class PatientController extends Controller
     }
 
     public function primaryCoverageManualDeterminationModal(Request $request, Client $patient) {
+        $coverageUid = $request->get('coverageUid');
+        $coverage = ClientPrimaryCoverage::where('uid', $coverageUid)->first();
+
         if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICARE'){
-            return view('app.patient.primary-coverage-manual-determination-medicare-modal', compact('patient'));
+            return view('app.patient.primary-coverage-manual-determination-medicare-modal', compact('patient', 'coverage'));
         }
         if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICAID'){
-            return view('app.patient.primary-coverage-manual-determination-medicaid-modal', compact('patient'));
+            return view('app.patient.primary-coverage-manual-determination-medicaid-modal', compact('patient', 'coverage'));
         }
         if($patient->latestClientPrimaryCoverage->plan_type === 'COMMERCIAL'){
-            return view('app.patient.primary-coverage-manual-determination-commercial-modal', compact('patient'));
+            return view('app.patient.primary-coverage-manual-determination-commercial-modal', compact('patient', 'coverage'));
         }
 
         return "Plan Type is missing!";

+ 3 - 3
resources/views/app/patient/partials/coverage-information.blade.php

@@ -45,7 +45,7 @@
                    open-in-stag-popup
                    mc-initer="manual-determination-form-{{$patient->uid}}"
                    title="Medicare Part B (Primary)"
-                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
+                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}?coverageUid={{ $cpc->uid }}">
                     Manual Determination for Medicare Part B (Primary)
                 </a>
             @endif
@@ -56,7 +56,7 @@
                    open-in-stag-popup
                    mc-initer="manual-determination-form-{{$patient->uid}}"
                    title="Medicaid (Primary)"
-                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
+                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}?coverageUid={{ $cpc->uid }}">
                     Manual Determination for Medicaid (Primary)
                 </a>
             @endif
@@ -67,7 +67,7 @@
                    open-in-stag-popup
                    mc-initer="manual-determination-form-{{$patient->uid}}"
                    title="Commercial (Primary)"
-                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}">
+                   href="/patients/view/primary-coverage-manual-determination-modal/{{$patient->uid}}?coverageUid={{ $cpc->uid }}">
                     Manual Determination for Commercial (Primary)
                 </a>
             @endif

+ 3 - 3
resources/views/app/patient/primary-coverage-view.blade.php

@@ -266,11 +266,11 @@
 			<h4 class="font-weight-bold">Manual Determination Information</h4>
 			@if($cpc->creation_strategy === 'MANUAL_DETERMINATION')
 				@if($cpc->plan_type == 'MEDICARE')
-					@include('app.patient.primary-coverage-manual-determination-view-medicare')
+					@include('app.patient.primary-coverage-manual-determination-view-medicare', ['coverage' => $patient->getPrimaryCoverage()])
 				@elseif($cpc->plan_type == 'MEDICAID')
-				@include('app.patient.primary-coverage-manual-determination-view-medicaid')
+				@include('app.patient.primary-coverage-manual-determination-view-medicaid', ['coverage' => $patient->getPrimaryCoverage()])
 				@elseif($cpc->plan_type == 'COMMERCIAL')
-				@include('app.patient.primary-coverage-manual-determination-view-commercial')
+				@include('app.patient.primary-coverage-manual-determination-view-commercial', ['coverage' => $patient->getPrimaryCoverage()])
 				@else
 					No plan Type specified.
 				@endif