ソースを参照

lsrx update ==> Summary UI

Vijayakrishnan 4 年 前
コミット
12dd251b18

+ 182 - 45
resources/views/app/patient/canvas-sections/lifestyle_rx_update/summary.php

@@ -27,53 +27,190 @@ if($contentData === false || !isset($contentData[$sectionPro->uid])) {
     <?php
 }
 else {
-    print_r($contentData);
-    // $lines = $contentData[$sectionPro->uid]['current_cch']['list'];
-    /*
+    $lsRxUpdate = $contentData[$sectionPro->uid];
     ?>
-    <p class="font-weight-bold mb-2">CC</p>
-    <table class="table table-sm table-bordered mb-2 table-edit-sheet">
-        <thead>
-        <tr class="bg-light">
-            <th class="px-2 py-1 text-secondary border-bottom-0 width-30px text-center">#</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0 w-25">Category</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0">Title</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0">ICD</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0 w-35">Memo</th>
-        </tr>
-        </thead>
-        <tbody class="bg-white">
-        <?php foreach($lines as $i => $line): ?>
-        <tr class="bg-white">
-            <td class="bg-white px-2 py-1 text-center text-sm font-weight-bold"><?= ++$i ?></td>
-            <td class="bg-white px-2 py-1"><?= ucwords($line['category']) ?></td>
-            <td class="bg-white px-2 py-1"><?= $line['name'] ?></td>
-            <td class="bg-white px-2 py-1"><?= $line['icd'] ?></td>
-            <td class="bg-white px-2 py-1"><?= $line['memo'] ?></td>
-        </tr>
-        <?php endforeach; ?>
-        </tbody>
-    </table>
-    <p class="font-weight-bold mb-2">HPI</p>
-    <table class="table table-sm table-bordered mb-2 table-edit-sheet">
-        <thead>
-        <tr class="bg-light">
-            <th class="px-2 py-1 text-secondary border-bottom-0 width-30px text-center">#</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0 w-25">Issue</th>
-            <th class="px-2 py-1 text-secondary border-bottom-0">HPI</th>
-        </tr>
-        </thead>
-        <tbody class="bg-white">
-        <?php foreach($lines as $i => $line): ?>
-            <tr>
-                <td class="px-2 bg-white py-1 text-center text-sm font-weight-bold"><?= ++$i ?></td>
-                <td class="px-2 bg-white py-1"><?= ucwords($line['category']) ?><?= $line['name'] ? ' <span class="text-secondary on-hover-opaque">/</span> ' . $line['name'] : '' ?><?= $line['icd'] ? ' <span class="text-secondary on-hover-opaque">/</span> ' . $line['icd'] : ''?></td>
-                <td class="px-2 bg-white py-1"><?= $line['hpi']['free_text'] ?></td>
-            </tr>
+
+
+    <?php if($lsRxUpdate['prescription']['seated']['active']): ?>
+    <div class="mb-1 d-flex align-items-center">
+        <i class="fa fa-check mr-2 text-secondary"></i>
+        <span>Seated Exercises</span>
+        <?php if($lsRxUpdate['prescription']['seated']['memo']): ?>
+            <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['seated']['memo'] ?></span>
+        <?php endif; ?>
+    </div>
+    <?php endif; ?>
+
+    <?php if($lsRxUpdate['prescription']['arm']['active']): ?>
+        <div class="mb-1 d-flex align-items-center">
+            <i class="fa fa-check mr-2 text-secondary"></i>
+            <span>Arm Exercises</span>
+            <?php if($lsRxUpdate['prescription']['arm']['memo']): ?>
+                <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['arm']['memo'] ?></span>
+            <?php endif; ?>
+        </div>
+    <?php endif; ?>
+
+    <?php if($lsRxUpdate['prescription']['aquatic']['active']): ?>
+        <div class="mb-1 d-flex align-items-center">
+            <i class="fa fa-check mr-2 text-secondary"></i>
+            <span>Aquatic Exercises</span>
+            <?php if($lsRxUpdate['prescription']['aquatic']['memo']): ?>
+                <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aquatic']['memo'] ?></span>
+            <?php endif; ?>
+        </div>
+    <?php endif; ?>
+
+    <?php if($lsRxUpdate['prescription']['aerobic']['active']): ?>
+        <p class="font-weight-bold my-2">Aerobic Activity</p>
+        <?php if($lsRxUpdate['prescription']['aerobic']['walk']['active']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Walk</span>
+                <?php if($lsRxUpdate['prescription']['aerobic']['walk']['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['walk']['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['walk']['minutes_per_day']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['walk']['minutes_per_day'] ?> mins/day</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['walk']['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['walk']['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['walk']['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['walk']['memo'] ?></span>
+                <?php endif; ?>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['aerobic']['jog']['active']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Jog</span>
+                <?php if($lsRxUpdate['prescription']['aerobic']['jog']['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['jog']['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['jog']['minutes_per_day']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['jog']['minutes_per_day'] ?> mins/day</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['jog']['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['jog']['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['jog']['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['jog']['memo'] ?></span>
+                <?php endif; ?>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['aerobic']['elliptical']['active']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Elliptical</span>
+                <?php if($lsRxUpdate['prescription']['aerobic']['elliptical']['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['elliptical']['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['elliptical']['minutes_per_day']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['elliptical']['minutes_per_day'] ?> mins/day</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['elliptical']['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['elliptical']['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['elliptical']['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['elliptical']['memo'] ?></span>
+                <?php endif; ?>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['aerobic']['swim']['active']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Swim</span>
+                <?php if($lsRxUpdate['prescription']['aerobic']['swim']['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['swim']['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['swim']['minutes_per_day']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['swim']['minutes_per_day'] ?> mins/day</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['swim']['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['swim']['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['swim']['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['swim']['memo'] ?></span>
+                <?php endif; ?>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['aerobic']['bike']['active']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Bike</span>
+                <?php if($lsRxUpdate['prescription']['aerobic']['bike']['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['bike']['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['bike']['minutes_per_day']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['bike']['minutes_per_day'] ?> mins/day</span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['bike']['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['bike']['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($lsRxUpdate['prescription']['aerobic']['bike']['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $lsRxUpdate['prescription']['aerobic']['bike']['memo'] ?></span>
+                <?php endif; ?>
+            </div>
+        <?php endif; ?>
+    <?php endif; ?>
+
+    <?php if($lsRxUpdate['prescription']['strength']['active']): ?>
+        <p class="font-weight-bold my-2">Strength Training</p>
+        <?php foreach($lsRxUpdate['prescription']['strength']['exercises'] as $exercise): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span><?= $exercise['name'] ?></span>
+                <?php if($exercise['days_per_week']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $exercise['days_per_week'] ?> days/wk</span>
+                <?php endif; ?>
+                <?php if($exercise['reps']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $exercise['reps'] ?> reps</span>
+                <?php endif; ?>
+                <?php if($exercise['intensity']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $exercise['intensity'] ?></span>
+                <?php endif; ?>
+                <?php if($exercise['memo']): ?>
+                    <span class="text-secondary">&nbsp;/&nbsp;<?= $exercise['memo'] ?></span>
+                <?php endif; ?>
+            </div>
         <?php endforeach; ?>
-        </tbody>
-    </table>
+    <?php endif; ?>
+
+    <?php if($lsRxUpdate['prescription']['neat']['active']): ?>
+        <p class="font-weight-bold my-2">Non-Exercise Activity Time (NEAT)</p>
+        <?php if($lsRxUpdate['prescription']['neat']['recommendations']['park_farther']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Park farther away from entrances</span>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['neat']['recommendations']['steps_instead_of_elevator']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Take the stairs instead of escalator/elevator</span>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['neat']['recommendations']['stand_instead_of_sit']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Stand instead of sit</span>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['neat']['recommendations']['steps_goal_per_day']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Steps goal / day: <b><?= $lsRxUpdate['prescription']['neat']['recommendations']['steps_goal_per_day'] ?></b></span>
+            </div>
+        <?php endif; ?>
+        <?php if($lsRxUpdate['prescription']['neat']['recommendations']['other']): ?>
+            <div class="mb-1 d-flex align-items-center">
+                <i class="fa fa-check mr-2 text-secondary"></i>
+                <span>Other: <b><?= $lsRxUpdate['prescription']['neat']['recommendations']['other'] ?></b></span>
+            </div>
+        <?php endif; ?>
+
+    <?php endif; ?>
     <?php
-    */
 }
 ?>