Pārlūkot izejas kodu

Omega - subjective system > all lifestyle

Vijayakrishnan 3 gadi atpakaļ
vecāks
revīzija
9834081c3b
26 mainītis faili ar 241 papildinājumiem un 114 dzēšanām
  1. 54 12
      resources/views/app/patient/module-specific-summary-renderers/behavior/subjective.blade.php
  2. 54 12
      resources/views/app/patient/module-specific-summary-renderers/exercise/subjective.blade.php
  3. 54 12
      resources/views/app/patient/module-specific-summary-renderers/nutrition/subjective.blade.php
  4. 3 3
      resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/last-review.php
  5. 2 2
      resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/view-review.php
  6. 3 3
      resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/last-review.php
  7. 1 1
      resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/view-review.php
  8. 3 3
      resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/last-review.php
  9. 4 4
      resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/view-review.php
  10. 3 3
      resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/last-review.php
  11. 1 1
      resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/view-review.php
  12. 3 3
      resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/last-review.php
  13. 10 10
      resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/view-review.php
  14. 3 3
      resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/last-review.php
  15. 4 4
      resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/view-review.php
  16. 3 3
      resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/last-review.php
  17. 5 5
      resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/view-review.php
  18. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CALORIES/last-review.php
  19. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-review.php
  20. 4 4
      resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/last-review.php
  21. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/HIGH_SUGAR_BEVERAGES/last-review.php
  22. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/PORTION_SIZES/last-review.php
  23. 4 4
      resources/views/app/patient/segment-templates/_child_review/nutrition/SNACKS/last-review.php
  24. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/VEGETABLES/last-review.php
  25. 3 3
      resources/views/app/patient/segment-templates/_child_review/nutrition/WATER_INTAKE/last-review.php
  26. 5 4
      resources/views/app/patient/segment-templates/omega_subjective_system/summary.blade.php

+ 54 - 12
resources/views/app/patient/module-specific-summary-renderers/behavior/subjective.blade.php

@@ -1,14 +1,56 @@
-@foreach($points as $point)
-    <div class="d-flex align-items-start" data-uid="{{$point ? $point->uid : ''}}">
-        <b class="mr-2">{{ucwords(str_replace('_', ' ', strtolower($point->category)))}}</b>
-        <div class="flex-grow-1 ml-3">
-            @if($point)
-                <?php
-                include resource_path('views/app/patient/segment-templates/_child_review/last-review-flat.php');
-                ?>
-            @else
-                -
-            @endif
+@if($points && count($points))
+    <div class="d-flex pb-1 mb-1 border-bottom">
+        <b class="mr-2 min-width-110px">Behavior Rx</b>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <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' : '' ?>">
+                            {{ucwords(str_replace('_', ' ', strtolower($point->category)))}}
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="pl-3">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                                <?php
+                                $flat = true;
+                                include resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point['category'] . '/last-review.php');
+                                ?>
+                            <?php endif; ?>
+                        </div>
+                        <div class="pl-3">
+                            <?php if ($point->is_removed): ?>
+                            @if($point->removal_reason_category === 'DURING_VISIT')
+                                <span class="text-sm text-secondary">Removed during visit</span>
+                            @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                <span class="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="text-sm text-success">* Added during visit</span>
+                            <?php else: ?>
+                            <span class="text-sm text-info">* Added on intake</span>
+                            <?php endif;?>
+                            <?php endif; ?>
+                        </div>
+
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
         </div>
     </div>
-@endforeach
+@endif

+ 54 - 12
resources/views/app/patient/module-specific-summary-renderers/exercise/subjective.blade.php

@@ -1,14 +1,56 @@
-@foreach($points as $point)
-    <div class="d-flex align-items-start" data-uid="{{$point ? $point->uid : ''}}">
-        <b class="mr-2">{{ucwords(str_replace('_', ' ', strtolower($point->category)))}}</b>
-        <div class="flex-grow-1 ml-3">
-            @if($point)
-                <?php
-                include resource_path('views/app/patient/segment-templates/_child_review/last-review-flat.php');
-                ?>
-            @else
-                -
-            @endif
+@if($points && count($points))
+    <div class="d-flex pb-1 mb-1 border-bottom">
+        <b class="mr-2 min-width-110px">Exercise Rx</b>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <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' : '' ?>">
+                            {{ucwords(str_replace('_', ' ', strtolower($point->category)))}}
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="pl-3">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                                <?php
+                                $flat = true;
+                                include resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point['category'] . '/last-review.php');
+                                ?>
+                            <?php endif; ?>
+                        </div>
+                        <div class="pl-3">
+                            <?php if ($point->is_removed): ?>
+                            @if($point->removal_reason_category === 'DURING_VISIT')
+                                <span class="text-sm text-secondary">Removed during visit</span>
+                            @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                <span class="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="text-sm text-success">* Added during visit</span>
+                            <?php else: ?>
+                                <span class="text-sm text-info">* Added on intake</span>
+                            <?php endif;?>
+                            <?php endif; ?>
+                        </div>
+
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
         </div>
     </div>
-@endforeach
+@endif

+ 54 - 12
resources/views/app/patient/module-specific-summary-renderers/nutrition/subjective.blade.php

@@ -1,14 +1,56 @@
-@foreach($points as $point)
-    <div class="d-flex align-items-start" data-uid="{{$point ? $point->uid : ''}}">
-        <b class="mr-2">{{ucwords(str_replace('_', ' ', strtolower($point->category)))}}</b>
-        <div class="flex-grow-1 ml-3">
-            @if($point)
-                <?php
-                include resource_path('views/app/patient/segment-templates/_child_review/last-review-flat.php');
-                ?>
-            @else
-                -
-            @endif
+@if($points && count($points))
+    <div class="d-flex pb-1 mb-1 border-bottom">
+        <b class="mr-2 min-width-110px">Nutrition Rx</b>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                <?php $rel = $point->relevanceToNote($note); ?>
+                <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' : '' ?>">
+                            {{ucwords(str_replace('_', ' ', strtolower($point->category)))}}
+                        </div>
+                    </td>
+                    <td class="width-300px">
+                        <div class="pl-3">
+                            <?php $review = $point->childReviewAddedInNote($note); ?>
+                            <?php if(!!$review): ?>
+                                <?php
+                                $flat = true;
+                                include resource_path('views/app/patient/segment-templates/_child_review/nutrition/' . $point['category'] . '/last-review.php');
+                                ?>
+                            <?php endif; ?>
+                        </div>
+                        <div class="pl-3">
+                            <?php if ($point->is_removed): ?>
+                            @if($point->removal_reason_category === 'DURING_VISIT')
+                                <span class="text-sm text-secondary">Removed during visit</span>
+                            @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                <span class="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="text-sm text-success">* Added during visit</span>
+                            <?php else: ?>
+                                <span class="text-sm text-info">* Added on intake</span>
+                            <?php endif;?>
+                            <?php endif; ?>
+                        </div>
+
+                    </td>
+                    <td></td>
+                </tr>
+                <?php endforeach; ?>
+            </table>
+
         </div>
     </div>
-@endforeach
+@endif

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Cravings</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Cravings</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 2 - 2
resources/views/app/patient/segment-templates/_child_review/behavior/CRAVINGS/view-review.php

@@ -7,11 +7,11 @@ if (@($review->sweetDrinks)) $cravings[] = 'Sweet Drinks';
 $cravings = count($cravings) ? implode(', ', $cravings) : '-';
 if (@$review) {
     ?>
-    <div class="mb-1"><span class="text-sm">Current cravings:</span> <?= $cravings ?></div>
+    <div class=""><span class="text-sm">Current cravings:</span> <?= $cravings ?></div>
     <?php
     if (@($review->other) && @($review->otherDetail)) {
         ?>
-        <div class="mb-1"><span class="text-sm">Other cravings:</span> <?= $review->otherDetail ?></div>
+        <div class=""><span class="text-sm">Other cravings:</span> <?= $review->otherDetail ?></div>
         <?php
     }
     ?>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Food Triggers</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Food Triggers</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 1 - 1
resources/views/app/patient/segment-templates/_child_review/behavior/FOOD_TRIGGERS/view-review.php

@@ -8,7 +8,7 @@ if (@($review->relaxation)) $triggers[] = 'Relaxation';
 $triggers = count($triggers) ? implode(', ', $triggers) : '-';
 if (@$review) {
     ?>
-    <div class="mb-1"><span class="text-sm">Current food triggers:</span> <?= $triggers ?></div>
+    <div class=""><span class="text-sm">Current food triggers:</span> <?= $triggers ?></div>
     <div class="text-secondary"><?= @($review->memo) ?: '' ?></div>
     <?php
 } else {

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Behavior</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Behavior</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 4 - 4
resources/views/app/patient/segment-templates/_child_review/behavior/SELF_MONITORING/view-review.php

@@ -11,16 +11,16 @@ if (@($review->foodMonitoring->dailyFoodLog)) $foodMonitoring[] = 'Daily Food Lo
 $foodMonitoring = count($foodMonitoring) ? implode(', ', $foodMonitoring) : '-';
 if (@$review) {
     ?>
-    <div class="mb-1"><span class="text-sm">Current number of weigh-ins per week:</span> <?= @($review->weighInsPerWeek) ?: '-' ?>.</div>
-    <div class="mb-1"><span class="text-sm">Currently tracking:</span> <?= $tracking ?></div>
+    <div class=""><span class="text-sm">Current number of weigh-ins per week:</span> <?= @($review->weighInsPerWeek) ?: '-' ?>.</div>
+    <div class=""><span class="text-sm">Currently tracking:</span> <?= $tracking ?></div>
     <?php
     if (@($review->tracking->other) && @($review->tracking->otherDetail)) {
         ?>
-        <div class="mb-1"><span class="text-sm">Other tracking:</span> <?= $review->tracking->otherDetail ?></div>
+        <div class=""><span class="text-sm">Other tracking:</span> <?= $review->tracking->otherDetail ?></div>
         <?php
     }
     ?>
-    <div class="mb-1"><span class="text-sm">Current food monitoring:</span> <?= $foodMonitoring ?></div>
+    <div class=""><span class="text-sm">Current food monitoring:</span> <?= $foodMonitoring ?></div>
     <div class="text-secondary"><?= @($review->memo) ?: '' ?></div>
     <?php
 } else {

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Sleep Habits</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Sleep Habits</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/behavior/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 1 - 1
resources/views/app/patient/segment-templates/_child_review/behavior/SLEEP_HABITS/view-review.php

@@ -1,7 +1,7 @@
 <?php
 if (@$review) {
     ?>
-    <div class="mb-1"><span class="text-sm">Current hours of sleep:</span> <?= @($review->hoursOfSleep) ?: '-' ?>.</div>
+    <div class=""><span class="text-sm">Current hours of sleep:</span> <?= @($review->hoursOfSleep) ?: '-' ?>.</div>
     <div class="text-secondary"><?= @($review->memo) ?: '' ?></div>
     <?php
 } else {

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Aerobic Activity</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Aerobic Activity</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 10 - 10
resources/views/app/patient/segment-templates/_child_review/exercise/AEROBIC_ACTIVITY/view-review.php

@@ -2,8 +2,8 @@
 if(@$review && @($review->active)) {
     if (@($review->walk->active)) {
     ?>
-        <div class="mb-1 d-flex align-items-baseline">
-            <span><?= @($review->walk->intensity) ?: '-' ?> Walk</span>
+        <div class=" d-flex align-items-baseline">
+            <span><?= @($review->walk->intensity) ?: '' ?> Walk</span>
             <span class="ml-2 text-sm"><?= @($review->walk->frequency) ?: '-' ?> day(s)/week</span>
             <span class="ml-2 text-sm"><?= @($review->walk->time) ?: '-' ?> min(s)/day</span>
         </div>
@@ -11,8 +11,8 @@ if(@$review && @($review->active)) {
     }
     if (@($review->jog->active)) {
         ?>
-        <div class="mb-1 d-flex align-items-baseline">
-            <span><?= @($review->jog->intensity) ?: '-' ?> Jog</span>
+        <div class=" d-flex align-items-baseline">
+            <span><?= @($review->jog->intensity) ?: '' ?> Jog</span>
             <span class="ml-2 text-sm"><?= @($review->jog->frequency) ?: '-' ?> day(s)/week</span>
             <span class="ml-2 text-sm"><?= @($review->jog->time) ?: '-' ?> min(s)/day</span>
         </div>
@@ -20,8 +20,8 @@ if(@$review && @($review->active)) {
     }
     if (@($review->elliptical->active)) {
         ?>
-        <div class="mb-1 d-flex align-items-baseline">
-            <span><?= @($review->elliptical->intensity) ?: '-' ?> Elliptical</span>
+        <div class=" d-flex align-items-baseline">
+            <span><?= @($review->elliptical->intensity) ?: '' ?> Elliptical</span>
             <span class="ml-2 text-sm"><?= @($review->elliptical->frequency) ?: '-' ?> day(s)/week</span>
             <span class="ml-2 text-sm"><?= @($review->elliptical->time) ?: '-' ?> min(s)/day</span>
         </div>
@@ -29,8 +29,8 @@ if(@$review && @($review->active)) {
     }
     if (@($review->swim->active)) {
         ?>
-        <div class="mb-1 d-flex align-items-baseline">
-            <span><?= @($review->swim->intensity) ?: '-' ?> Swim</span>
+        <div class=" d-flex align-items-baseline">
+            <span><?= @($review->swim->intensity) ?: '' ?> Swim</span>
             <span class="ml-2 text-sm"><?= @($review->swim->frequency) ?: '-' ?> day(s)/week</span>
             <span class="ml-2 text-sm"><?= @($review->swim->time) ?: '-' ?> min(s)/day</span>
         </div>
@@ -38,8 +38,8 @@ if(@$review && @($review->active)) {
     }
     if (@($review->bike->active)) {
         ?>
-        <div class="mb-1 d-flex align-items-baseline">
-            <span><?= @($review->bike->intensity) ?: '-' ?> Bike</span>
+        <div class=" d-flex align-items-baseline">
+            <span><?= @($review->bike->intensity) ?: '' ?> Bike</span>
             <span class="ml-2 text-sm"><?= @($review->bike->frequency) ?: '-' ?> day(s)/week</span>
             <span class="ml-2 text-sm"><?= @($review->bike->time) ?: '-' ?> min(s)/day</span>
         </div>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Non-Exercise Activity Time (NEAT)</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Non-Exercise Activity Time (NEAT)</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 4 - 4
resources/views/app/patient/segment-templates/_child_review/exercise/NEAT/view-review.php

@@ -2,22 +2,22 @@
 if(@$review && @($review->active)) {
     if (@($review->parkAway)) {
     ?>
-        <div class="mb-1">Currently parks away from entrances.</div>
+        <div class="">Currently parks away from entrances.</div>
     <?php
     }
     if (@($review->stairsInsteadOfElevators)) {
         ?>
-        <div class="mb-1">Currently takes the stairs instead of elevator/escalator.</div>
+        <div class="">Currently takes the stairs instead of elevator/escalator.</div>
         <?php
     }
     if (@($review->standInsteadOfSit)) {
         ?>
-        <div class="mb-1">Currently prefers standing over sitting.</div>
+        <div class="">Currently prefers standing over sitting.</div>
         <?php
     }
     if (@($review->stepsGoals)) {
         ?>
-        <div class="mb-1">Current steps/day: <?= $review->stepsGoals ?>.</div>
+        <div class="">Current steps/day: <?= $review->stepsGoals ?>.</div>
         <?php
     }
     ?>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/last-review.php

@@ -1,10 +1,10 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Strength Training</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Strength Training</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
         <div class="inline-html-container">
             <?php $review = $parsedReview; ?>
-            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $p['category'] . '/view-review.php')); ?>
+            <?php include(resource_path('views/app/patient/segment-templates/_child_review/exercise/' . $point->category . '/view-review.php')); ?>
         </div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>

+ 5 - 5
resources/views/app/patient/segment-templates/_child_review/exercise/STRENGTH_TRAINING/view-review.php

@@ -2,27 +2,27 @@
 if(@$review && @($review->active)) {
     if (@($review->muscleStrengthening)) {
     ?>
-        <div class="mb-1">Currently doing muscle strengthening exercises on moderate or greater intensity at least two days per week.</div>
+        <div class="">Currently doing muscle strengthening exercises on moderate or greater intensity at least two days per week.</div>
     <?php
     }
     if (@($review->allMajorMuscleGroups)) {
         ?>
-        <div class="mb-1">Currently doing exercises to strengthen all major muscle groups: legs, hips, back, chest, abdomen, shoulders and arms.</div>
+        <div class="">Currently doing exercises to strengthen all major muscle groups: legs, hips, back, chest, abdomen, shoulders and arms.</div>
         <?php
     }
     if (@($review->sets)) {
         ?>
-        <div class="mb-1">Sets per exercise: <?= $review->sets ?>.</div>
+        <div class="">Sets per exercise: <?= $review->sets ?>.</div>
         <?php
     }
     if (@($review->reps)) {
         ?>
-        <div class="mb-1">Repetitions per set: <?= $review->reps ?>.</div>
+        <div class="">Repetitions per set: <?= $review->reps ?>.</div>
         <?php
     }
     if (@($review->resistanceBandsBodyWeight)) {
         ?>
-        <div class="mb-1">Currently using resistance bands or using body weight to do exercises.</div>
+        <div class="">Currently using resistance bands or using body weight to do exercises.</div>
         <?php
     }
     ?>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CALORIES/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Daily Calories</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Daily Calories</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/DAILY_INTAKE_CARBOHYDRATES/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Carbohydrate Intake (grams)</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Carbohydrate Intake (grams)</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 4 - 4
resources/views/app/patient/segment-templates/_child_review/nutrition/FAST_FOOD/last-review.php

@@ -1,9 +1,9 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Consumption</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Consumption</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container mb-1"><span class="text-sm">Meals per week:</span> <?= @$parsedReview->mealsPerWeek ? strip_tags($parsedReview->mealsPerWeek) : '' ?></div>
-        <div class="inline-html-container mb-1"><span class="text-sm">Self-prepared meals per week:</span> <?= @$parsedReview->selfPrepMealsPerWeek ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '' ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><span class="text-sm">Meals per week:</span> <?= @$parsedReview->mealsPerWeek ? strip_tags($parsedReview->mealsPerWeek) : '' ?></div>
+        <div class="inline-html-container text-dark"><span class="text-sm">Self-prepared meals per week:</span> <?= @$parsedReview->selfPrepMealsPerWeek ? strip_tags($parsedReview->selfPrepMealsPerWeek) : '' ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/HIGH_SUGAR_BEVERAGES/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Consumption</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Consumption</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/PORTION_SIZES/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current average number of servings/meal</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current average number of servings/meal</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 4 - 4
resources/views/app/patient/segment-templates/_child_review/nutrition/SNACKS/last-review.php

@@ -1,9 +1,9 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Consumption</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Consumption</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container mb-1"><span class="text-sm">Unhealthy snacks:</span> <?= @$parsedReview->unhealthySnacks ? strip_tags($parsedReview->unhealthySnacks) : '' ?></div>
-        <div class="inline-html-container mb-1"><span class="text-sm">Healthy snacks:</span> <?= @$parsedReview->healthySnacks ? strip_tags($parsedReview->healthySnacks) : '' ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><span class="text-sm">Unhealthy snacks:</span> <?= @$parsedReview->unhealthySnacks ? strip_tags($parsedReview->unhealthySnacks) : '' ?></div>
+        <div class="inline-html-container text-dark"><span class="text-sm">Healthy snacks:</span> <?= @$parsedReview->healthySnacks ? strip_tags($parsedReview->healthySnacks) : '' ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/VEGETABLES/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Consumption</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Consumption</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 3 - 3
resources/views/app/patient/segment-templates/_child_review/nutrition/WATER_INTAKE/last-review.php

@@ -1,8 +1,8 @@
-<div class="mb-1 font-weight-bold text-secondary">Current Intake (ounces per day)</div>
+<?php if(!@$flat): ?> <div class="mb-1 font-weight-bold text-secondary">Current Intake (ounces per day)</div> <?php endif; ?>
 <?php if ($point->lastChildReview): ?>
     <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
-    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
-        <div class="inline-html-container"><?= @$parsedReview->value ?></div>
+    <div class="<?= !@$flat && $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
+        <div class="inline-html-container text-dark"><?= @$parsedReview->value ?></div>
 
         <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
             <span class="text-sm">(updated on the patient's chart)</span>

+ 5 - 4
resources/views/app/patient/segment-templates/omega_subjective_system/summary.blade.php

@@ -29,13 +29,14 @@ $pointMap = [];
 
 foreach($points as $point){
     if(!isset($topLevelPointToRendererMap[$point->category])) continue;
-    if(!isset($pointMap[$point->category])) $pointMap[$point->category] = [];
-    $pointMap[$point->category][] = $point;
+    $renderer = $topLevelPointToRendererMap[$point->category];
+    if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
+    $pointMap[$renderer][] = $point;
 }
 
-foreach ($pointMap as $category => $points) {
+foreach ($pointMap as $renderer => $points) {
 ?>
-    @include('app.patient.module-specific-summary-renderers.' . $topLevelPointToRendererMap[$category] . '.subjective', compact('points'))
+    @include('app.patient.module-specific-summary-renderers.' . $renderer . '.subjective', compact('points'))
 <?php
 }