|
@@ -1,20 +1,9 @@
|
|
|
<?php
|
|
|
-/** @var \App\Models\Pro $sectionPro */
|
|
|
-/** @var \App\Models\Pro $pro */
|
|
|
-/** @var \App\Models\Note $note */
|
|
|
|
|
|
-if(!@$sectionPro) {
|
|
|
- if(@$note) {
|
|
|
- $sectionPro = $note->hcpPro;
|
|
|
- }
|
|
|
- else {
|
|
|
- $sectionPro = $pro; // should never get here
|
|
|
- }
|
|
|
-}
|
|
|
+// $contentData is already pro-scoped by this point!
|
|
|
|
|
|
-if(!$contentData) $contentData = [];
|
|
|
-if(!isset($contentData[$sectionPro->uid])) {
|
|
|
- $contentData[$sectionPro->uid] = [
|
|
|
+if(!$contentData) {
|
|
|
+ $contentData = [
|
|
|
'prescription' => [
|
|
|
'seated' => [
|
|
|
'active' => false,
|
|
@@ -137,42 +126,42 @@ $formID = rand(0, 100000);
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-2 mt-1 width-200px d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['seated']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['seated']['active']" class="mr-2">
|
|
|
<span>Seated Exercises</span>
|
|
|
</label>
|
|
|
- <input v-if="data['{{$sectionPro->uid}}']['prescription']['seated']['active']" type="text"
|
|
|
- v-model="data['{{$sectionPro->uid}}']['prescription']['seated']['memo']"
|
|
|
+ <input v-if="data['prescription']['seated']['active']" type="text"
|
|
|
+ v-model="data['prescription']['seated']['memo']"
|
|
|
placeholder="Details" class="form-control form-control-sm ml-3">
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-2 mt-1 width-200px d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['arm']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['arm']['active']" class="mr-2">
|
|
|
<span>Arm Exercises</span>
|
|
|
</label>
|
|
|
- <input v-if="data['{{$sectionPro->uid}}']['prescription']['arm']['active']" type="text"
|
|
|
- v-model="data['{{$sectionPro->uid}}']['prescription']['arm']['memo']"
|
|
|
+ <input v-if="data['prescription']['arm']['active']" type="text"
|
|
|
+ v-model="data['prescription']['arm']['memo']"
|
|
|
placeholder="Details" class="form-control form-control-sm ml-3">
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-2 mt-1 width-200px d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aquatic']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aquatic']['active']" class="mr-2">
|
|
|
<span>Aquatic Exercises</span>
|
|
|
</label>
|
|
|
- <input v-if="data['{{$sectionPro->uid}}']['prescription']['aquatic']['active']" type="text"
|
|
|
- v-model="data['{{$sectionPro->uid}}']['prescription']['aquatic']['memo']"
|
|
|
+ <input v-if="data['prescription']['aquatic']['active']" type="text"
|
|
|
+ v-model="data['prescription']['aquatic']['memo']"
|
|
|
placeholder="Details" class="form-control form-control-sm ml-3">
|
|
|
</div>
|
|
|
|
|
|
<div class="my-2">
|
|
|
<label class="m-0 width-200px d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['active']" class="mr-2">
|
|
|
<span class="font-weight-bold text-secondary">Aerobic Activity</span>
|
|
|
</label>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="data['{{$sectionPro->uid}}']['prescription']['aerobic']['active']" class="pl-3">
|
|
|
+ <div v-if="data['prescription']['aerobic']['active']" class="pl-3">
|
|
|
<table class="table table-sm table-bordered mb-2 table-edit-sheet">
|
|
|
<thead>
|
|
|
<tr class="bg-light">
|
|
@@ -187,17 +176,17 @@ $formID = rand(0, 100000);
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td class="px-2 align-middle">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['walk']['active']" class="align-middle">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['walk']['active']" class="align-middle">
|
|
|
</td>
|
|
|
<td class="px-2 align-middle">Walk</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['walk']['days_per_week']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['walk']['days_per_week']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['walk']['minutes_per_day']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['walk']['minutes_per_day']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <select v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['walk']['intensity']" class="form-control form-control-sm">
|
|
|
+ <select v-model="data['prescription']['aerobic']['walk']['intensity']" class="form-control form-control-sm">
|
|
|
<option value="">-- select --</option>
|
|
|
<option value="Light">Light</option>
|
|
|
<option value="Moderate">Moderate</option>
|
|
@@ -205,22 +194,22 @@ $formID = rand(0, 100000);
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['walk']['memo']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['walk']['memo']">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="px-2 align-middle">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['jog']['active']" class="align-middle">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['jog']['active']" class="align-middle">
|
|
|
</td>
|
|
|
<td class="px-2 align-middle">Jog</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['jog']['days_per_week']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['jog']['days_per_week']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['jog']['minutes_per_day']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['jog']['minutes_per_day']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <select v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['jog']['intensity']" class="form-control form-control-sm">
|
|
|
+ <select v-model="data['prescription']['aerobic']['jog']['intensity']" class="form-control form-control-sm">
|
|
|
<option value="">-- select --</option>
|
|
|
<option value="Light">Light</option>
|
|
|
<option value="Moderate">Moderate</option>
|
|
@@ -228,22 +217,22 @@ $formID = rand(0, 100000);
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['jog']['memo']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['jog']['memo']">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="px-2 align-middle">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['elliptical']['active']" class="align-middle">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['elliptical']['active']" class="align-middle">
|
|
|
</td>
|
|
|
<td class="px-2 align-middle">Elliptical</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['elliptical']['days_per_week']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['elliptical']['days_per_week']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['elliptical']['minutes_per_day']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['elliptical']['minutes_per_day']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <select v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['elliptical']['intensity']" class="form-control form-control-sm">
|
|
|
+ <select v-model="data['prescription']['aerobic']['elliptical']['intensity']" class="form-control form-control-sm">
|
|
|
<option value="">-- select --</option>
|
|
|
<option value="Light">Light</option>
|
|
|
<option value="Moderate">Moderate</option>
|
|
@@ -251,22 +240,22 @@ $formID = rand(0, 100000);
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['elliptical']['memo']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['elliptical']['memo']">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="px-2 align-middle">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['swim']['active']" class="align-middle">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['swim']['active']" class="align-middle">
|
|
|
</td>
|
|
|
<td class="px-2 align-middle">Swim</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['swim']['days_per_week']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['swim']['days_per_week']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['swim']['minutes_per_day']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['swim']['minutes_per_day']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <select v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['swim']['intensity']" class="form-control form-control-sm">
|
|
|
+ <select v-model="data['prescription']['aerobic']['swim']['intensity']" class="form-control form-control-sm">
|
|
|
<option value="">-- select --</option>
|
|
|
<option value="Light">Light</option>
|
|
|
<option value="Moderate">Moderate</option>
|
|
@@ -274,22 +263,22 @@ $formID = rand(0, 100000);
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['swim']['memo']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['swim']['memo']">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="px-2 align-middle">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['bike']['active']" class="align-middle">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['aerobic']['bike']['active']" class="align-middle">
|
|
|
</td>
|
|
|
<td class="px-2 align-middle">Bike</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['bike']['days_per_week']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['bike']['days_per_week']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['bike']['minutes_per_day']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['bike']['minutes_per_day']">
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <select v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['bike']['intensity']" class="form-control form-control-sm">
|
|
|
+ <select v-model="data['prescription']['aerobic']['bike']['intensity']" class="form-control form-control-sm">
|
|
|
<option value="">-- select --</option>
|
|
|
<option value="Light">Light</option>
|
|
|
<option value="Moderate">Moderate</option>
|
|
@@ -297,7 +286,7 @@ $formID = rand(0, 100000);
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="px-0 align-middle">
|
|
|
- <input type="text" class="form-control form-control-sm" v-model="data['{{$sectionPro->uid}}']['prescription']['aerobic']['bike']['memo']">
|
|
|
+ <input type="text" class="form-control form-control-sm" v-model="data['prescription']['aerobic']['bike']['memo']">
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
@@ -306,17 +295,17 @@ $formID = rand(0, 100000);
|
|
|
|
|
|
<div class="mt-3 mb-2">
|
|
|
<label class="m-0 d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['strength']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['strength']['active']" class="mr-2">
|
|
|
<span class="font-weight-bold text-secondary">Strength Training</span>
|
|
|
</label>
|
|
|
- <a v-if="data['{{$sectionPro->uid}}']['prescription']['strength']['active']"
|
|
|
+ <a v-if="data['prescription']['strength']['active']"
|
|
|
href="#" class="ml-3"
|
|
|
- v-on:click.prevent="data['{{$sectionPro->uid}}']['prescription']['strength']['exercises'].push({name: '', days_per_week: '', reps: '', intensity: '', memo: ''})">
|
|
|
+ v-on:click.prevent="data['prescription']['strength']['exercises'].push({name: '', days_per_week: '', reps: '', intensity: '', memo: ''})">
|
|
|
+ Add Exercise
|
|
|
</a>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="data['{{$sectionPro->uid}}']['prescription']['strength']['active']" class="pl-3">
|
|
|
+ <div v-if="data['prescription']['strength']['active']" class="pl-3">
|
|
|
<table class="table table-sm table-bordered mb-2 table-edit-sheet">
|
|
|
<thead>
|
|
|
<tr class="bg-light">
|
|
@@ -325,11 +314,11 @@ $formID = rand(0, 100000);
|
|
|
<th class="px-2 text-secondary border-bottom-0 width-100px text-nowrap">Reps</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0">Intensity</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0 w-35">Details</th>
|
|
|
- <th v-if="data['{{$sectionPro->uid}}']['prescription']['strength']['exercises'].length > 1"></th>
|
|
|
+ <th v-if="data['prescription']['strength']['exercises'].length > 1"></th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-for="(exercise, exIndex) in data['{{$sectionPro->uid}}']['prescription']['strength']['exercises']">
|
|
|
+ <tr v-for="(exercise, exIndex) in data['prescription']['strength']['exercises']">
|
|
|
<td class="px-0 align-middle">
|
|
|
<input type="text" class="form-control form-control-sm" v-model="exercise.name">
|
|
|
</td>
|
|
@@ -350,8 +339,8 @@ $formID = rand(0, 100000);
|
|
|
<td class="px-0 align-middle">
|
|
|
<input type="text" class="form-control form-control-sm" v-model="exercise.memo">
|
|
|
</td>
|
|
|
- <td class="px-2" v-if="data['{{$sectionPro->uid}}']['prescription']['strength']['exercises'].length > 1" class="px-0 align-middle">
|
|
|
- <a href="#" v-on:click.prevent="data['{{$sectionPro->uid}}']['prescription']['strength']['exercises'].splice(exIndex, 1)"
|
|
|
+ <td class="px-2" v-if="data['prescription']['strength']['exercises'].length > 1" class="px-0 align-middle">
|
|
|
+ <a href="#" v-on:click.prevent="data['prescription']['strength']['exercises'].splice(exIndex, 1)"
|
|
|
class="on-hover-opaque text-danger mt-1 d-inline-block">
|
|
|
<i class="fa fa-trash-alt"></i>
|
|
|
</a>
|
|
@@ -363,30 +352,30 @@ $formID = rand(0, 100000);
|
|
|
|
|
|
<div class="mt-3 mb-2">
|
|
|
<label class="m-0 d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['active']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['neat']['active']" class="mr-2">
|
|
|
<span class="font-weight-bold text-secondary">Non-Exercise Activity Time (NEAT)</span>
|
|
|
</label>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="data['{{$sectionPro->uid}}']['prescription']['neat']['active']" class="pl-3">
|
|
|
+ <div v-if="data['prescription']['neat']['active']" class="pl-3">
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-0 mt-1 d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['recommendations']['park_farther']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['neat']['recommendations']['park_farther']" class="mr-2">
|
|
|
<span>Park farther away from entrances</span>
|
|
|
</label>
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-0 mt-1 d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['recommendations']['steps_instead_of_elevator']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['neat']['recommendations']['steps_instead_of_elevator']" class="mr-2">
|
|
|
<span>Take the stairs instead of escalator/elevator</span>
|
|
|
</label>
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-1 d-flex align-items-center">
|
|
|
<label class="mb-0 mt-1 d-inline-flex align-items-start">
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['recommendations']['stand_instead_of_sit']" class="mr-2">
|
|
|
+ <input type="checkbox" v-model="data['prescription']['neat']['recommendations']['stand_instead_of_sit']" class="mr-2">
|
|
|
<span>Stand instead of sit</span>
|
|
|
</label>
|
|
|
</div>
|
|
@@ -396,7 +385,7 @@ $formID = rand(0, 100000);
|
|
|
<span>Steps goal / day:</span>
|
|
|
</label>
|
|
|
<input type="text"
|
|
|
- v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['recommendations']['steps_goal_per_day']"
|
|
|
+ v-model="data['prescription']['neat']['recommendations']['steps_goal_per_day']"
|
|
|
placeholder="Details" class="form-control form-control-sm ml-3">
|
|
|
</div>
|
|
|
|
|
@@ -405,7 +394,7 @@ $formID = rand(0, 100000);
|
|
|
<span>Other:</span>
|
|
|
</label>
|
|
|
<input type="text"
|
|
|
- v-model="data['{{$sectionPro->uid}}']['prescription']['neat']['recommendations']['other']"
|
|
|
+ v-model="data['prescription']['neat']['recommendations']['other']"
|
|
|
placeholder="Details" class="form-control form-control-sm ml-3">
|
|
|
</div>
|
|
|
|
|
@@ -434,7 +423,7 @@ $formID = rand(0, 100000);
|
|
|
},
|
|
|
methods: {
|
|
|
addItem: function() {
|
|
|
- this.data['{{$sectionPro->uid}}']['current_cch']['list'].push({
|
|
|
+ this.data['current_cch']['list'].push({
|
|
|
"category": '',
|
|
|
"name": '',
|
|
|
"icd": '',
|
|
@@ -445,7 +434,7 @@ $formID = rand(0, 100000);
|
|
|
});
|
|
|
},
|
|
|
removeItem: function(_index) {
|
|
|
- this.data['{{$sectionPro->uid}}']['current_cch']['list'].splice(_index, 1);
|
|
|
+ this.data['current_cch']['list'].splice(_index, 1);
|
|
|
},
|
|
|
cleanArray: function(_source) {
|
|
|
let plItems = [], plObject = {};
|