Ver código fonte

Lifestyle modules - omega subjective summary (plain)

Vijayakrishnan 3 anos atrás
pai
commit
7675d2e774

+ 16 - 0
resources/views/app/patient/module-specific-summary-renderers/data-dump.blade.php

@@ -0,0 +1,16 @@
+<?php
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $point->lastChildReview->data;
+    foreach ($contentData as $k => $v) {
+        if(!!$v) {
+            ?>
+            <div class="d-flex align-items-baseline">
+                <span class="text-secondary mr-2">{{sanitize_state_name($k)}}:</span>
+                <span>{{is_array($v) ? implode(", ", $v) : $v}}</span>
+            </div>
+            <?php
+        }
+    }
+}
+?>

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_general/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_general/edit"
+           mc-initer="edit-univ_sub_lifestyle_general-container-{{$note->id}}"
+           title="Lifestyle General"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle General
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_nutrition/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_nutrition/edit"
+           mc-initer="edit-univ_sub_nutrition_assessment-container-{{$note->id}}"
+           title="Lifestyle Nutrition"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Nutrition
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_physical_activity/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_physical_activity/edit"
+           mc-initer="edit-univ_sub_physical_activity_assessment-container-{{$note->id}}"
+           title="Lifestyle Physical Activity"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Physical Activity
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_sleep/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_sleep/edit"
+           mc-initer="edit-univ_sub_sleep_assessment-container-{{$note->id}}"
+           title="Lifestyle Sleep"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Sleep
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_social_relationships/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_social/edit"
+           mc-initer="edit-univ_sub_social_relationships_assessment-container-{{$note->id}}"
+           title="Lifestyle Social"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Social
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_stress/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_stress/edit"
+           mc-initer="edit-univ_sub_stress_assessment-container-{{$note->id}}"
+           title="Lifestyle Stress"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Stress
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 23 - 0
resources/views/app/patient/module-specific-summary-renderers/lifestyle_substance_use/subjective.blade.php

@@ -0,0 +1,23 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px "
+           open-in-stag-popup
+           href="/module-view/{{$note->uid}}/lifestyle_substances/edit"
+           mc-initer="edit-univ_sub_substance_use_assessment-container-{{$note->id}}"
+           title="Lifestyle Substances"
+           popup-style="stag-popup-md overflow-visible">
+            Lifestyle Substances
+        </a>
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 9 - 0
resources/views/app/patient/segment-templates/omega_subjective_system/summary.blade.php

@@ -23,6 +23,15 @@ $topLevelPointToRendererMap = [
     'FOOD_TRIGGERS' => 'behavior',
     'CRAVINGS' => 'behavior',
     'SLEEP_HABITS' => 'behavior',
+
+    // lifestyle
+    'LIFESTYLE_GENERAL' => 'lifestyle_general',
+    'LIFESTYLE_NUTRITION' => 'lifestyle_nutrition',
+    'LIFESTYLE_PHYSICAL_ACTIVITY' => 'lifestyle_physical_activity',
+    'LIFESTYLE_SLEEP' => 'lifestyle_sleep',
+    'LIFESTYLE_SOCIAL_RELATIONSHIPS' => 'lifestyle_social_relationships',
+    'LIFESTYLE_STRESS' => 'lifestyle_stress',
+    'LIFESTYLE_SUBSTANCE_USE' => 'lifestyle_substance_use',
 ];
 
 $pointMap = [];