Просмотр исходного кода

New unified segments for meds, probs, etc. (edit/summary source)

Vijayakrishnan 3 лет назад
Родитель
Сommit
75130c05ff

+ 0 - 0
resources/views/app/patient/segment-templates/allergies/edit.blade.php


+ 82 - 0
resources/views/app/patient/segment-templates/allergies/summary.blade.php

@@ -0,0 +1,82 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getUnifiedPointsOfCategory($patient, 'ALLERGY', $note);
+$tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER');
+$numRelevant = 0;
+$numVisible = 0;
+$plural = 'Allergies';
+?>
+
+<?php if($tracker && @($tracker->data->no_known_drug_allergies)): ?>
+    <div class="text-secondary mb-2"><span>-</span></div>
+<?php endif; ?>
+<?php if($tracker && @($tracker->data->no_known_allergies_of_any_type)): ?>
+    <div class="text-secondary mb-2"><span>-</span></div>
+<?php endif; ?>
+
+<?php if(!$tracker || !@($tracker->data->no_known_allergies_of_any_type)): ?>
+<?php if (!count($points)): ?>
+    <div class="text-secondary">-</div>
+<?php else: ?>
+    <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-40px px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @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>
+                </div>
+            </td>
+            <td class="px-2 width-300px">
+                <div>
+                    <?php if(!!$plan): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $plan->data->value !!}</span>
+                        </div>
+                    <?php elseif($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="d-flex align-items-baseline">
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 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="ml-2 text-sm text-success">* Diagnosed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+            <td></td>
+        </tr>
+    <?php endforeach; ?>
+    </table>
+    @if(!$numVisible)
+        <div class="d-flex align-items-baseline mr-1">
+            <span class="text-secondary">-</span>
+        </div>
+    @endif
+<?php endif; ?>
+<?php endif; ?>

+ 0 - 0
resources/views/app/patient/segment-templates/behavior/edit.blade.php


+ 41 - 0
resources/views/app/patient/segment-templates/behavior/summary.blade.php

@@ -0,0 +1,41 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$selfMonitoring = Point::getOnlyPointOfCategory($patient, 'SELF_MONITORING');
+$foodTriggers = Point::getOnlyPointOfCategory($patient, 'FOOD_TRIGGERS');
+$cravings = Point::getOnlyPointOfCategory($patient, 'CRAVINGS');
+$sleepHabits = Point::getOnlyPointOfCategory($patient, 'SLEEP_HABITS');
+
+$points = [
+    ["category" => 'SELF_MONITORING', "name" => 'Self Monitoring', "point" => $selfMonitoring],
+    ["category" => 'FOOD_TRIGGERS', "name" => 'Food Triggers', "point" => $foodTriggers],
+    ["category" => 'CRAVINGS', "name" => 'Cravings', "point" => $cravings],
+    ["category" => 'SLEEP_HABITS', "name" => 'Sleep Habits', "point" => $sleepHabits],
+];
+?>
+<table class="table table-bordered table-sm mb-0 table-cage">
+    <?php foreach ($points as $p): ?>
+    <?php $point = $p['point']; ?>
+    <?php if(!!$point): ?>
+    <?php $plan = $point->lastChildPlan; ?>
+    <?php if ($plan && @($plan->data)) $plan->data = json_decode($plan->data); ?>
+    <tr>
+        <td class="width-300px">
+            <?= $p['name'] ?>
+        </td>
+        <td class="width-300px">
+            <?php if(!!$plan): ?>
+            <div class="ml-3 inline-html-container">
+                <?php $plan = $plan->data; ?>
+                <?php include(resource_path('views/app/patient/segment-templates/_child_plan/behavior/' . $p['category'] . '/view-plan.php')); ?>
+            </div>
+            <?php endif; ?>
+        </td>
+        <td></td>
+    </tr>
+    <?php endif; ?>
+    <?php endforeach; ?>
+</table>

+ 0 - 0
resources/views/app/patient/segment-templates/care_team/edit.blade.php


+ 77 - 0
resources/views/app/patient/segment-templates/care_team/summary.blade.php

@@ -0,0 +1,77 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getUnifiedPointsOfCategory($patient, 'CARE_TEAM_MEMBER', $note);
+$numRelevant = 0;
+$numVisible = 0;
+$plural = 'Care team members';
+?>
+
+<?php if (!count($points)): ?>
+    <div class="text-secondary">-</div>
+<?php else: ?>
+    <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-40px px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @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) ? '/&nbsp;' . @($point->data->specialty) . '' : '' ?>
+                    <?= !!@($point->data->organization) ? '/&nbsp;' . @($point->data->organization) . '' : '' ?><br>
+                    <?= !!@($point->data->phone) ? 'Ph: ' . @($point->data->phone) . '' : '' ?>
+                    <?= !!@($point->data->fax) ? '&nbsp;/&nbsp;Fax: ' . @($point->data->fax) . '<br>' : '' ?>
+                    <?= !!@($point->data->date) ? '&nbsp;/&nbsp;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($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>
+    @if(!$numVisible)
+        <div class="d-flex align-items-baseline mr-1">
+            <span class="text-secondary">-</span>
+        </div>
+    @endif
+<?php endif; ?>

+ 0 - 0
resources/views/app/patient/segment-templates/exercise/edit.blade.php


+ 43 - 0
resources/views/app/patient/segment-templates/exercise/summary.blade.php

@@ -0,0 +1,43 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$aerobicActivity = Point::getOnlyPointOfCategory($patient, 'AEROBIC_ACTIVITY');
+$strengthTraining = Point::getOnlyPointOfCategory($patient, 'STRENGTH_TRAINING');
+$neat = Point::getOnlyPointOfCategory($patient, 'NEAT');
+
+$points = [
+    ["category" => 'AEROBIC_ACTIVITY', "name" => 'Aerobic Activity', "point" => $aerobicActivity],
+    ["category" => 'STRENGTH_TRAINING', "name" => 'Strength Training', "point" => $strengthTraining],
+    ["category" => 'NEAT', "name" => 'Non-Exercise Activity Time (NEAT)', "point" => $neat],
+];
+?>
+
+<?php if(!count($points)): ?>
+    <span>-</span>
+<?php endif ?>
+<table class="table table-bordered table-sm mb-0 table-cage">
+    <?php foreach ($points as $p): ?>
+    <?php $point = $p['point']; ?>
+    <?php if(!!$point): ?>
+    <?php $plan = $point->lastChildPlan; ?>
+    <?php if ($plan && @($plan->data)) $plan->data = json_decode($plan->data); ?>
+    <tr>
+        <td class="width-300px">
+            <?= $p['name'] ?>
+        </td>
+        <td class="width-300px">
+            <?php if(!!$plan): ?>
+            <div class="ml-3 inline-html-container">
+                <?php $plan = $plan->data; ?>
+                <?php include(resource_path('views/app/patient/segment-templates/_child_plan/exercise/' . $p['category'] . '/view-plan.php')); ?>
+            </div>
+            <?php endif; ?>
+        </td>
+        <td></td>
+    </tr>
+    <?php endif; ?>
+    <?php endforeach; ?>
+</table>

+ 0 - 0
resources/views/app/patient/segment-templates/goals/edit.blade.php


+ 72 - 0
resources/views/app/patient/segment-templates/goals/summary.blade.php

@@ -0,0 +1,72 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getUnifiedPointsOfCategory($patient, 'GOAL', $note);
+$numRelevant = 0;
+$numVisible = 0;
+$plural = 'Goals';
+?>
+
+<?php if (!count($points)): ?>
+    <div class="text-secondary">-</div>
+<?php else: ?>
+    <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-40px px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @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->goal) ? @($point->data->goal) : '-' ?></b>
+                </div>
+            </td>
+            <td class="px-2 width-300px">
+                <div>
+                    <?php if(!!$plan): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $plan->data->value !!}</span>
+                        </div>
+                    <?php elseif($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="d-flex align-items-baseline">
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 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="ml-2 text-sm text-success">* Prescribed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+            <td></td>
+        </tr>
+    <?php endforeach; ?>
+    </table>
+    @if(!$numVisible)
+        <div class="d-flex align-items-baseline mr-1">
+            <span class="text-secondary">-</span>
+        </div>
+    @endif
+<?php endif; ?>

+ 0 - 0
resources/views/app/patient/segment-templates/medications/edit.blade.php


+ 78 - 0
resources/views/app/patient/segment-templates/medications/summary.blade.php

@@ -0,0 +1,78 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getUnifiedPointsOfCategory($patient, 'MEDICATION', $note);
+$tracker = Point::getGlobalSingletonOfCategory($patient, 'NO_KNOWN_TRACKER');
+$numRelevant = 0;
+$numVisible = 0;
+$plural = 'Medications';
+?>
+
+<?php if($tracker && @($tracker->data->no_known_medications)): ?>
+    <div class="text-secondary"><span>-</span></div>
+<?php endif; ?>
+<?php if(!$tracker || !@($tracker->data->no_known_medications)): ?>
+<?php if (!count($points)): ?>
+    <div class="text-secondary">-</div>
+<?php else: ?>
+    <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-40px px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @if($rel)
+                    <?php $numRelevant++; ?>
+                    {{ $j }}.*
+                @else
+                    {{ $j }}.
+                @endif
+            </td>
+            <td class="px-2 width-300px">
+                <div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
+                    <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                </div>
+            </td>
+            <td class="px-2 width-300px">
+                <div>
+                    <?php if(!!$plan): ?>
+                    <div class="pl-3 mt-1 d-flex align-items-baseline">
+                        <span>{!! $plan->data->value !!}</span>
+                    </div>
+                    <?php elseif($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="d-flex align-items-baseline">                
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 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="ml-2 text-sm text-success">* Prescribed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+            <td></td>
+        </tr>
+    <?php endforeach; ?>
+    </table>
+    @if(!$numVisible)
+        <div class="d-flex align-items-baseline mr-1">
+            <span class="text-secondary">-</span>
+        </div>
+    @endif
+<?php endif; ?>
+<?php endif; ?>

+ 0 - 0
resources/views/app/patient/segment-templates/nutrition/edit.blade.php


+ 52 - 0
resources/views/app/patient/segment-templates/nutrition/summary.blade.php

@@ -0,0 +1,52 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$highSugarBeverages = Point::getOnlyPointOfCategory($patient, 'HIGH_SUGAR_BEVERAGES');
+$waterIntake = Point::getOnlyPointOfCategory($patient, 'WATER_INTAKE');
+$fastFood = Point::getOnlyPointOfCategory($patient, 'FAST_FOOD');
+$snacks = Point::getOnlyPointOfCategory($patient, 'SNACKS');
+$vegetables = Point::getOnlyPointOfCategory($patient, 'VEGETABLES');
+$portionSizes = Point::getOnlyPointOfCategory($patient, 'PORTION_SIZES');
+$dailyIntakeCarbohydrates = Point::getOnlyPointOfCategory($patient, 'DAILY_INTAKE_CARBOHYDRATES');
+$dailyIntakeCalories = Point::getOnlyPointOfCategory($patient, 'DAILY_INTAKE_CALORIES');
+
+$points = [
+    ["category" => 'HIGH_SUGAR_BEVERAGES', "name" => 'High Sugar Beverages', "point" => $highSugarBeverages],
+    ["category" => 'WATER_INTAKE', "name" => 'Water Intake', "point" => $waterIntake],
+    ["category" => 'FAST_FOOD', "name" => 'Fast Food', "point" => $fastFood],
+    ["category" => 'SNACKS', "name" => 'Snacks', "point" => $snacks],
+    ["category" => 'VEGETABLES', "name" => 'Vegetables', "point" => $vegetables],
+    ["category" => 'PORTION_SIZES', "name" => 'Portion Sizes', "point" => $portionSizes],
+    ["category" => 'DAILY_INTAKE_CARBOHYDRATES', "name" => 'Daily Intake Carbohydrates', "point" => $dailyIntakeCarbohydrates],
+    ["category" => 'DAILY_INTAKE_CALORIES', "name" => 'Daily Intake Calories', "point" => $dailyIntakeCalories],
+];
+?>
+
+<?php if(!count($points)): ?>
+    <span>-</span>
+<?php endif ?>
+<table class="table table-bordered table-sm mb-0 table-cage">
+    <?php foreach ($points as $p): ?>
+    <?php $point = $p['point']; ?>
+    <?php if(!!$point): ?>
+    <?php $plan = $point->lastChildPlan; ?>
+    <?php if ($plan && @($plan->data)) $plan->data = json_decode($plan->data); ?>
+    <tr>
+        <td class="width-300px">
+            <?= $p['name'] ?>
+        </td>
+        <td class="width-300px">
+            <?php if(!!$plan): ?>
+            <div class="ml-3">
+                <span>{!! $plan->data->value ? strip_tags($plan->data->value) : '-' !!}</span>
+            </div>
+            <?php endif; ?>
+        </td>
+        <td></td>
+    </tr>
+    <?php endif; ?>
+    <?php endforeach; ?>
+</table>

+ 0 - 0
resources/views/app/patient/segment-templates/problems/edit.blade.php


+ 73 - 0
resources/views/app/patient/segment-templates/problems/summary.blade.php

@@ -0,0 +1,73 @@
+<?php
+
+use App\Models\Point;
+
+/** @var \App\Models\Client $patient */
+
+$points = Point::getUnifiedPointsOfCategory($patient, 'PROBLEM', $note);
+$numRelevant = 0;
+$numVisible = 0;
+$plural = 'Problems';
+?>
+
+<?php if (!count($points)): ?>
+    <div class="text-secondary">-</div>
+<?php else: ?>
+    <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-40px px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @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>
+                </div>
+            </td>
+            <td class="px-2 width-300px">
+                <div>
+                    <?php if(!!$plan): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $plan->data->value !!}</span>
+                        </div>
+                    <?php elseif($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="d-flex align-items-baseline">
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 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="ml-2 text-sm text-success">* Diagnosed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+            <td></td>
+        </tr>
+    <?php endforeach; ?>
+    </table>
+    @if(!$numVisible)
+        <div class="d-flex align-items-baseline mr-1">
+            <span class="text-secondary">-</span>
+        </div>
+    @endif
+<?php endif; ?>
+