|
@@ -0,0 +1,71 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Models\Point;
|
|
|
+
|
|
|
+/** @var \App\Models\Client $patient */
|
|
|
+
|
|
|
+$points = Point::getPlanPointsOfCategory($patient, 'CARE_TEAM_MEMBER', $note);
|
|
|
+$numRelevant = 0;
|
|
|
+$numVisible = 0;
|
|
|
+$plural = 'Care team members';
|
|
|
+?>
|
|
|
+
|
|
|
+<?php if (count($points)): ?>
|
|
|
+ <p class="mt-2 mb-1 text-secondary font-weight-bold">Care Team</p>
|
|
|
+ <table class="table table-bordered table-xs table-cage mb-0">
|
|
|
+ <?php $j = 0; foreach ($points as $point): $j++; ?>
|
|
|
+ <?php if($point->is_removed && $point->is_removed_due_to_entry_error) continue; ?>
|
|
|
+ <?php $rel = $point->relevanceToNote($note); ?>
|
|
|
+ <?php $plan = $point->lastChildPlan; ?>
|
|
|
+ <?php if($plan && @($plan->data)) $plan->data = json_decode($plan->data); ?>
|
|
|
+ <?php $numVisible++; ?>
|
|
|
+ <tr>
|
|
|
+ <td class="width-30px pr-2">
|
|
|
+ @if($rel)
|
|
|
+ <?php $numRelevant++; ?>
|
|
|
+ {{ $j }}.
|
|
|
+ @else
|
|
|
+ {{ $j }}.
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td class="px-2 width-300px">
|
|
|
+ <div class="<?= $point->is_removed ? 'strike-through' : '' ?>">
|
|
|
+ <b><?= !!@($point->data->name) ? @($point->data->name) : '-' ?></b>
|
|
|
+ <?= !!@($point->data->specialty) ? '/ ' . @($point->data->specialty) . '' : '' ?>
|
|
|
+ <?= !!@($point->data->organization) ? '/ ' . @($point->data->organization) . '' : '' ?><br>
|
|
|
+ <?= !!@($point->data->phone) ? 'Ph: ' . @($point->data->phone) . '' : '' ?>
|
|
|
+ <?= !!@($point->data->fax) ? ' / Fax: ' . @($point->data->fax) . '<br>' : '' ?>
|
|
|
+ <?= !!@($point->data->date) ? ' / Date: ' . @($point->data->date) : '' ?>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class="px-2 width-300px">
|
|
|
+ <div class="pl-3">
|
|
|
+ <?php if(!!$plan): ?>
|
|
|
+ <div class="mt-1 d-flex align-items-baseline">
|
|
|
+ <span>{!! $plan->data->value !!}</span>
|
|
|
+ </div>
|
|
|
+ <?php elseif(false && $rel): ?>
|
|
|
+ <div class="relevant-without-plan text-warning-mellow text-sm mt-1" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Plan missing</div>
|
|
|
+ <?php endif; ?>
|
|
|
+ </div>
|
|
|
+ <div class="pl-3 d-flex align-items-baseline">
|
|
|
+ <?php if ($point->is_removed): ?>
|
|
|
+ @if($point->removal_reason_category === 'DURING_VISIT')
|
|
|
+ <span class="mt-1 text-sm text-secondary">Removed during visit</span>
|
|
|
+ @elseif($point->removal_reason_category === 'ON_INTAKE')
|
|
|
+ <span class="mt-1 text-sm text-secondary">Removed on intake</span>
|
|
|
+ @endif
|
|
|
+ <?php elseif ($point->added_in_note_id === $note->id): ?>
|
|
|
+ <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
|
|
|
+ <span class="mt-1 text-sm text-success">* Added during visit</span>
|
|
|
+ <?php else: ?>
|
|
|
+ <span class="mt-1 text-sm text-info">* Added on intake</span>
|
|
|
+ <?php endif;?>
|
|
|
+ <?php endif; ?>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ <?php endforeach; ?>
|
|
|
+ </table>
|
|
|
+<?php endif; ?>
|