|
@@ -0,0 +1,90 @@
|
|
|
|
+@extends ('layouts/template')
|
|
|
|
+
|
|
|
|
+@section('content')
|
|
|
|
+<div class="p-3 mcp-theme-1" id="patients-list">
|
|
|
|
+ <div class="card">
|
|
|
|
+
|
|
|
|
+ <div class="card-header px-3 py-2 d-flex align-items-center">
|
|
|
|
+ <strong class="mr-4">
|
|
|
|
+ <i class="fas fa-weight"></i>
|
|
|
|
+ Clients BDT Devices
|
|
|
|
+ </strong>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="card-body p-0">
|
|
|
|
+ <div class="p-3">
|
|
|
|
+ @include('app.practice-management.clients_bdt_devices_filters')
|
|
|
|
+ </div>
|
|
|
|
+ <table class="table table-condensed p-0 m-0">
|
|
|
|
+ <thead class="bg-light">
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="px-3 border-0">IMEI</th>
|
|
|
|
+ <th class="px-3 border-0">Client</th>
|
|
|
|
+ <th class="px-3 border-0">MCP</th>
|
|
|
|
+ <th class="px-3 border-0">Created</th>
|
|
|
|
+ <th class="px-3 border-0">Category</th>
|
|
|
|
+ <th class="px-3 border-0">Last Measurement</th>
|
|
|
|
+ <th class="px-3 border-0">Status</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($devices as $device)
|
|
|
|
+ <?php
|
|
|
|
+ $mcpName = $device->client->mcp ? implode(', ', array_filter([$device->client->mcp->name_last, $device->client->mcp->name_first])) : null;
|
|
|
|
+ ?>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ <pre class="m-0">{{ $device->device->imei }}</pre>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <a target="_blank" native href="{{route('patients.view.dashboard', $device->client)}}">
|
|
|
|
+ {{$device->client->displayName()}}
|
|
|
|
+ </a>
|
|
|
|
+ </td>
|
|
|
|
+ <td>{{ $mcpName }}</td>
|
|
|
|
+ <td class="px-2 text-nowrap">{{ friendly_date_time($device->device->created_at) }}</td>
|
|
|
|
+ <td class="px-2">{{ $device->device->category }}</td>
|
|
|
|
+ <td class="px-2 d-flex align-items-center">
|
|
|
|
+ <?php $lastMeasurement = $device->lastDeviceMeasurement(); ?>
|
|
|
|
+ @if($lastMeasurement)
|
|
|
|
+ @if($lastMeasurement->is_cellular_zero)
|
|
|
|
+ <i class="font-size-11 fa fa-rss"></i>
|
|
|
|
+ @elseif($lastMeasurement->label === 'BP')
|
|
|
|
+ {{ $lastMeasurement->sbp_mm_hg }} / {{ $lastMeasurement->dbp_mm_hg }}
|
|
|
|
+ @elseif($lastMeasurement->label === 'Wt. (lbs.)')
|
|
|
|
+ {{ round($lastMeasurement->numeric_value, 2) }} lbs
|
|
|
|
+ @else
|
|
|
|
+ {{ $lastMeasurement->value }}
|
|
|
|
+ @endif
|
|
|
|
+ <div class="ml-2">
|
|
|
|
+ <i class="far fa-calendar-check"></i> <span class="text-secondary">{{ friendly_date_time($lastMeasurement->created_at) }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <small class="text-muted">-</small>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ @if($device->is_active)
|
|
|
|
+ <span class="text-success">Active</span>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-danger">Deactivated</span>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+
|
|
|
|
+ @if(count($devices) === 0)
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="7">No records found!</td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
|
|
+ </tbody>
|
|
|
|
+
|
|
|
|
+ </table>
|
|
|
|
+ <div class="ml-2 mt-2">
|
|
|
|
+ {{ $devices->appends(request()->input())->links() }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+@endsection
|