|
@@ -35,7 +35,7 @@ use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\File;
|
|
use Illuminate\Support\Facades\File;
|
|
use App\Models\Measurement;
|
|
use App\Models\Measurement;
|
|
use App\Models\ClientReviewRequest;
|
|
use App\Models\ClientReviewRequest;
|
|
-
|
|
|
|
|
|
+use App\Models\Point;
|
|
use Illuminate\Support\Facades\Http;
|
|
use Illuminate\Support\Facades\Http;
|
|
use PDF;
|
|
use PDF;
|
|
|
|
|
|
@@ -101,6 +101,12 @@ class PatientController extends Controller
|
|
$assignedDeviceIDs = null;
|
|
$assignedDeviceIDs = null;
|
|
unset($assignedDeviceIDs);
|
|
unset($assignedDeviceIDs);
|
|
|
|
|
|
|
|
+ $availableDevices = count($devices);
|
|
|
|
+ $patientDeviceIDs = ClientBDTDevice::select('id')->where('client_id', $patient->id)->where('is_active', true)->get()->toArray();
|
|
|
|
+ $patientDeviceIDs = array_map(function ($_x) {
|
|
|
|
+ return $_x["id"];
|
|
|
|
+ }, $patientDeviceIDs);
|
|
|
|
+
|
|
$dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
|
|
$dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
|
|
->where('category', 'dx')
|
|
->where('category', 'dx')
|
|
->where('is_removed', false)
|
|
->where('is_removed', false)
|
|
@@ -120,10 +126,13 @@ class PatientController extends Controller
|
|
"value" => $shortcut->text
|
|
"value" => $shortcut->text
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ $recentMeasurements = $patient->recentMeasurements;
|
|
|
|
|
|
|
|
+ $latestVitals = Point::where('client_id', $patient->id)->where('category', 'VITALS')->orderBy('id', 'DESC')->first();
|
|
|
|
|
|
return view('app.patient.dashboard',
|
|
return view('app.patient.dashboard',
|
|
- compact('patient', 'facilities', 'devices', 'dxInfoLines', 'clientMemos', 'shortCutsObject'));
|
|
|
|
|
|
+ compact('patient', 'facilities', 'devices', 'dxInfoLines', 'clientMemos', 'shortCutsObject', 'availableDevices', 'patientDeviceIDs', 'recentMeasurements', 'latestVitals'));
|
|
}
|
|
}
|
|
|
|
|
|
public function canvasMigrate(Request $request, Client $patient )
|
|
public function canvasMigrate(Request $request, Client $patient )
|