|
@@ -15,27 +15,24 @@ if(!@$sectionPro) {
|
|
|
if(!$contentData) $contentData = [];
|
|
|
if(!isset($contentData[$sectionPro->uid])) {
|
|
|
$contentData[$sectionPro->uid] = [
|
|
|
- 'physical_activity' => [
|
|
|
- 'type' => '',
|
|
|
- 'frequency' => '',
|
|
|
- 'time' => '',
|
|
|
- 'intensity' => '',
|
|
|
- 'enjoyment' => '',
|
|
|
- ],
|
|
|
- 'barriers' => '', // free text
|
|
|
- 'assessment' => '', // Inactive, Insufficiently Active, Active, Highly Active
|
|
|
'prescription' => [
|
|
|
'seated' => [
|
|
|
'active' => false,
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'arm' => [
|
|
|
'active' => false,
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'aquatic' => [
|
|
|
'active' => false,
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'aerobic' => [
|
|
|
'active' => false,
|
|
@@ -44,35 +41,45 @@ if(!isset($contentData[$sectionPro->uid])) {
|
|
|
'days_per_week' => '',
|
|
|
'minutes_per_day' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'jog' => [
|
|
|
'active' => false,
|
|
|
'days_per_week' => '',
|
|
|
'minutes_per_day' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'elliptical' => [
|
|
|
'active' => false,
|
|
|
'days_per_week' => '',
|
|
|
'minutes_per_day' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'swim' => [
|
|
|
'active' => false,
|
|
|
'days_per_week' => '',
|
|
|
'minutes_per_day' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
'bike' => [
|
|
|
'active' => false,
|
|
|
'days_per_week' => '',
|
|
|
'minutes_per_day' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
- 'memo' => ''
|
|
|
+ 'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
],
|
|
|
],
|
|
|
'strength' => [
|
|
@@ -84,6 +91,8 @@ if(!isset($contentData[$sectionPro->uid])) {
|
|
|
'reps' => '',
|
|
|
'intensity' => '', // Light, Moderate, Vigorous
|
|
|
'memo' => '',
|
|
|
+ 'adherence' => '',
|
|
|
+ 'adherence_memo' => '',
|
|
|
]
|
|
|
]
|
|
|
],
|
|
@@ -91,10 +100,20 @@ if(!isset($contentData[$sectionPro->uid])) {
|
|
|
'active' => false,
|
|
|
'recommendations' => [
|
|
|
'park_farther' => false,
|
|
|
+ 'park_farther_adherence' => '',
|
|
|
+ 'park_farther_adherence_memo' => '',
|
|
|
'steps_instead_of_elevator' => false,
|
|
|
+ 'steps_instead_of_elevator_adherence' => '',
|
|
|
+ 'steps_instead_of_elevator_adherence_memo' => '',
|
|
|
'stand_instead_of_sit' => false,
|
|
|
+ 'stand_instead_of_sit_adherence' => '',
|
|
|
+ 'stand_instead_of_sit_adherence_memo' => '',
|
|
|
'steps_goal_per_day' => '',
|
|
|
+ 'steps_goal_per_day_adherence' => '',
|
|
|
+ 'steps_goal_per_day_adherence_memo' => '',
|
|
|
'other' => '',
|
|
|
+ 'other_adherence' => '',
|
|
|
+ 'other_adherence_memo' => '',
|
|
|
]
|
|
|
]
|
|
|
]
|
|
@@ -105,6 +124,9 @@ $formID = rand(0, 100000);
|
|
|
?>
|
|
|
|
|
|
<div id="pauSection_{{$formID}}">
|
|
|
+
|
|
|
+ <input type="hidden" name="data" value="{{json_encode($contentData)}}">
|
|
|
+
|
|
|
<h3 class="stag-popup-title mb-3 border-bottom pb-1 hide-if-note pt-1 pb-2">
|
|
|
<span>Lifestyle Rx Update</span>
|
|
|
<a href="#" onclick="return closeStagPopup()"
|
|
@@ -411,7 +433,33 @@ $formID = rand(0, 100000);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ addItem: function() {
|
|
|
+ this.data['{{$sectionPro->uid}}']['current_cch']['list'].push({
|
|
|
+ "category": '',
|
|
|
+ "name": '',
|
|
|
+ "icd": '',
|
|
|
+ "memo": '',
|
|
|
+ "hpi": {
|
|
|
+ "free_text": ''
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ removeItem: function(_index) {
|
|
|
+ this.data['{{$sectionPro->uid}}']['current_cch']['list'].splice(_index, 1);
|
|
|
+ },
|
|
|
+ cleanArray: function(_source) {
|
|
|
+ let plItems = [], plObject = {};
|
|
|
+ for (let x=0; x<_source.length; x++) {
|
|
|
+ plObject = {};
|
|
|
+ for (let y in _source[x]) {
|
|
|
+ if(_source[x].hasOwnProperty(y)) {
|
|
|
+ plObject[y] = _source[x][y];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ plItems.push(plObject);
|
|
|
+ }
|
|
|
+ return plItems;
|
|
|
+ },
|
|
|
}
|
|
|
});
|
|
|
}
|