|
@@ -24,42 +24,45 @@
|
|
|
<tr>
|
|
|
<td>{{$bdtDevice->category}}</td>
|
|
|
<td>{{$bdtDevice->imei}}</td>
|
|
|
- <td>{{$bdtDevice->clientBDTDevice ? 'Yes': 'No'}}</td>
|
|
|
+ <td>{{$bdtDevice->client_id ? 'Yes': 'No'}}</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- <a native target="_blank" href="{{route('patients.view.dashboard',$bdtDevice->clientBDTDevice->client)}}">
|
|
|
- {{$bdtDevice->clientBDTDevice->client->displayName()}}
|
|
|
+ @if($bdtDevice->client_id)
|
|
|
+ <a native target="_blank" href="{{route('patients.view.dashboard',$bdtDevice->client_uid)}}">
|
|
|
+ {{$bdtDevice->client_display_name}}
|
|
|
</a>
|
|
|
@else
|
|
|
-
|
|
|
@endif
|
|
|
</td>
|
|
|
- <td>{{@$bdtDevice->clientBDTDevice->mostRecentMeasurement ? 'Yes': 'No'}}</td>
|
|
|
+ <td>{{@$bdtDevice->most_recent_client_bdt_measurement_id ? 'Yes': 'No'}}</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice && $bdtDevice->clientBDTDevice->client && $bdtDevice->clientBDTDevice->client->mcp)
|
|
|
- {{$bdtDevice->clientBDTDevice->client->mcp->name_first}} {{$bdtDevice->clientBDTDevice->client->mcp->name_last}}
|
|
|
+ @if($bdtDevice->client_id && $bdtDevice->client_mcp_pro_id)
|
|
|
+ {{$bdtDevice->mcp_pro_display_name}}
|
|
|
@else
|
|
|
-
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- {{friendly_date_time($bdtDevice->clientBDTDevice->created_at)}}
|
|
|
+ @if($bdtDevice->client_id)
|
|
|
+ {{friendly_date_time($bdtDevice->client_bdt_created_at)}}
|
|
|
@else
|
|
|
-
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- @foreach($bdtDevice->clientBDTDevice->supplyOrders as $so)
|
|
|
+ @if($bdtDevice->client_id)
|
|
|
+ <?php
|
|
|
+ $supplyOrders = json_decode($bdtDevice->supply_orders ?? '[]');
|
|
|
+ ?>
|
|
|
+ @foreach($supplyOrders as $so)
|
|
|
<div class="card p-2 shadow m-2 border">
|
|
|
- <div>Product: {{$so->product->title}}</div>
|
|
|
+ <div>Product: {{$so->product_title}}</div>
|
|
|
<div>Is signed by pro: {{$so->is_signed_by_pro ? 'Yes' : 'No'}}</div>
|
|
|
@if($so->is_signed_by_pro)
|
|
|
- <div>Signed by: {{$so->signedPro->name_first}} {{$so->signedPro->name_last}}</div>
|
|
|
+ <div>Signed by: {{$so->signed_by_pro_name}}</div>
|
|
|
@endif
|
|
|
<div>
|
|
|
- Has shippiment: {{$so->shipment? 'Yes': 'No'}}
|
|
|
+ Has shippiment: {{$so->shipment_id? 'Yes': 'No'}}
|
|
|
</div>
|
|
|
</div>
|
|
|
@endforeach
|
|
@@ -68,9 +71,9 @@
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- @if($bdtDevice->clientBDTDevice->mostRecentMeasurement)
|
|
|
- {{friendly_date_time($bdtDevice->clientBDTDevice->mostRecentMeasurement->measurement->ts_date_time)}}
|
|
|
+ @if($bdtDevice->client_id)
|
|
|
+ @if($bdtDevice->most_recent_client_bdt_measurement_id)
|
|
|
+ {{friendly_date_time($bdtDevice->most_recent_measurement_ts_date_time)}}
|
|
|
@else
|
|
|
-
|
|
|
@endif
|
|
@@ -79,9 +82,9 @@
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- @if($bdtDevice->clientBDTDevice->mostRecentMeasurement)
|
|
|
- {{date_diff(date_create($bdtDevice->clientBDTDevice->mostRecentMeasurement->measurement->ts_date_time), date_create('now'))->days}}
|
|
|
+ @if($bdtDevice->client_id)
|
|
|
+ @if($bdtDevice->most_recent_client_bdt_measurement_id)
|
|
|
+ {{date_diff(date_create($bdtDevice->most_recent_measurement_ts_date_time), date_create('now'))->days}}
|
|
|
@else
|
|
|
-
|
|
|
@endif
|
|
@@ -90,19 +93,19 @@
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
- @if($bdtDevice->clientBDTDevice)
|
|
|
- {{$bdtDevice->clientBDTDevice->client->currentCareMonth()->number_of_days_with_remote_measurements}}
|
|
|
+ @if($bdtDevice->client)
|
|
|
+ {{$bdtDevice->current_cm_number_of_days_with_remote_measurements}}
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
|
@if($bdtDevice->clientBDTDevice)
|
|
|
- {{$bdtDevice->clientBDTDevice->client->previousCareMonth()->number_of_days_with_remote_measurements}}
|
|
|
+ {{$bdtDevice->prev_cm_number_of_days_with_remote_measurements}}
|
|
|
@endif
|
|
|
</td>
|
|
|
- <td>{{@$bdtDevice->clientBDTDevice->client->client_engagement_status_category}}
|
|
|
- <td>{{@$bdtDevice->clientBDTDevice->client->adminEngagementAssessmentStatus->status_category}}
|
|
|
- <td>{{@$bdtDevice->clientBDTDevice->client->mcpEngagementAssessmentStatus->status_category}}
|
|
|
- <td>{{@$bdtDevice->clientBDTDevice->client->defaultNaEngagementAssessmentStatus->status_category}}
|
|
|
+ <td>{{@$bdtDevice->client_engagement_status_category}}
|
|
|
+ <td>{{@$bdtDevice->admin_engagement_assessment_status}}
|
|
|
+ <td>{{@$bdtDevice->mcp_engagement_assessment_status}}
|
|
|
+ <td>{{@$bdtDevice->default_na_engagement_assessment_status}}
|
|
|
</tr>
|
|
|
@endforeach
|
|
|
|