Samson Mutunga 1 rok temu
rodzic
commit
8fe7e9e90f

+ 4 - 1
app/Http/Controllers/PatientController.php

@@ -131,8 +131,11 @@ class PatientController extends Controller
 
         $latestVitals = Point::where('client_id', $patient->id)->where('category', 'VITALS')->orderBy('id', 'DESC')->first();
 
+        $nonCoreVisitNotes = $patient->nonCoreVisitNotes;
+        $disallowPointEdits = $nonCoreVisitNotes && count($nonCoreVisitNotes);
+
         return view('app.patient.dashboard',
-            compact('patient', 'facilities', 'devices', 'dxInfoLines', 'clientMemos', 'shortCutsObject', 'availableDevices', 'patientDeviceIDs', 'recentMeasurements', 'latestVitals'));
+            compact('patient', 'facilities', 'devices', 'dxInfoLines', 'clientMemos', 'shortCutsObject', 'availableDevices', 'patientDeviceIDs', 'recentMeasurements', 'latestVitals', 'disallowPointEdits'));
     }
 
     public function canvasMigrate(Request $request, Client $patient )

+ 0 - 3
resources/views/app/patient/dashboard.blade.php

@@ -15,9 +15,6 @@
     <?php $vitalLabels = ['Ht. (in.)', 'Wt. (lbs.)', 'Temp. (F)', 'Pulse', 'Resp.', 'Pulse Ox.', 'SBP', 'DBP', 'Smoking Status', 'BMI']; ?>
     <?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 
-    <?php $nonCoreVisitNotes = $patient->nonCoreVisitNotes; ?>
-    <?php $disallowPointEdits = $nonCoreVisitNotes && count($nonCoreVisitNotes); ?>
-
     <div class="row client-single-dashboard">
         <div class="col-6">
             <?php