|
@@ -1 +1,42 @@
|
|
-<h1>omega_plan_system</h1>
|
|
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+use App\Models\Point;
|
|
|
|
+
|
|
|
|
+/** @var \App\Models\Client $patient */
|
|
|
|
+/** @var \App\Models\Note $note */
|
|
|
|
+
|
|
|
|
+$points = Point::getPlanPoints($patient, $note);
|
|
|
|
+
|
|
|
|
+$topLevelPointToRendererMap = [
|
|
|
|
+ 'HIGH_SUGAR_BEVERAGES' => 'nutrition',
|
|
|
|
+ 'WATER_INTAKE' => 'nutrition',
|
|
|
|
+ 'FAST_FOOD' => 'nutrition',
|
|
|
|
+ 'SNACKS' => 'nutrition',
|
|
|
|
+ 'VEGETABLES' => 'nutrition',
|
|
|
|
+ 'PORTION_SIZES' => 'nutrition',
|
|
|
|
+ 'DAILY_INTAKE_CARBOHYDRATES' => 'nutrition',
|
|
|
|
+ 'DAILY_INTAKE_CALORIES' => 'nutrition',
|
|
|
|
+ 'AEROBIC_ACTIVITY' => 'exercise',
|
|
|
|
+ 'STRENGTH_TRAINING' => 'exercise',
|
|
|
|
+ 'NEAT,' => 'exercise',
|
|
|
|
+ 'SELF_MONITORING' => 'behavior',
|
|
|
|
+ 'FOOD_TRIGGERS' => 'behavior',
|
|
|
|
+ 'CRAVINGS' => 'behavior',
|
|
|
|
+ 'SLEEP_HABITS' => 'behavior',
|
|
|
|
+];
|
|
|
|
+
|
|
|
|
+$pointMap = [];
|
|
|
|
+
|
|
|
|
+foreach($points as $point){
|
|
|
|
+ if(!isset($topLevelPointToRendererMap[$point->category])) continue;
|
|
|
|
+ $renderer = $topLevelPointToRendererMap[$point->category];
|
|
|
|
+ if(!isset($pointMap[$renderer])) $pointMap[$renderer] = [];
|
|
|
|
+ $pointMap[$renderer][] = $point;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+foreach ($pointMap as $renderer => $points) {
|
|
|
|
+?>
|
|
|
|
+@include('app.patient.module-specific-summary-renderers.' . $renderer . '.plan', compact('points'))
|
|
|
|
+<?php
|
|
|
|
+}
|
|
|
|
+
|