|
@@ -26,12 +26,67 @@ if(!@$contentData) {
|
|
|
}else{
|
|
|
if ($patient->canvas_data) {
|
|
|
$canvasData = json_decode($patient->canvas_data, true);
|
|
|
+ if(!isset($canvasData["lifestyle_rx_update"])) $canvasData["lifestyle_rx_update"] = [];
|
|
|
$contentData = $canvasData["lifestyle_rx_update"];
|
|
|
- if(!isset($canvasData["lifestyle_rx_update"])) $contentData = [];
|
|
|
}
|
|
|
}
|
|
|
if(!isset($contentData[$hcpPro->id])) $contentData[$hcpPro->id] = [];
|
|
|
$contentData = $contentData[$hcpPro->id];
|
|
|
+
|
|
|
+ if(!isset($contentData['prescription'])) $contentData['prescription'] = [];
|
|
|
+ if(!isset($contentData['prescription']['seated'])) $contentData['prescription']['seated'] = [];
|
|
|
+ if(!isset($contentData['prescription']['seated']['memo'])) $contentData['prescription']['seated']['memo'] = "";
|
|
|
+ if(!isset($contentData['prescription']['seated']['active'])) $contentData['prescription']['seated']['active'] = false;
|
|
|
+
|
|
|
+ if(!isset($contentData['prescription']['arm'])) $contentData['prescription']['arm'] = [];
|
|
|
+ if(!isset($contentData['prescription']['arm']['active'])) $contentData['prescription']['arm']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['arm']['memo'])) $contentData['prescription']['arm']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aquatic'])) $contentData['prescription']['aquatic'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aquatic']['active'])) $contentData['prescription']['aquatic']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aquatic']['memo'])) $contentData['prescription']['aquatic']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic'])) $contentData['prescription']['aerobic'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['active'])) $contentData['prescription']['aerobic']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['walk']['active'])) $contentData['prescription']['aerobic']['walk']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['walk']['days_per_week'])) $contentData['prescription']['aerobic']['walk']['days_per_week'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['walk']['minutes_per_day'])) $contentData['prescription']['aerobic']['walk']['minutes_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['walk']['intensity'])) $contentData['prescription']['aerobic']['walk']['intensity'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['walk']['memo'])) $contentData['prescription']['aerobic']['walk']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog'])) $contentData['prescription']['aerobic']['jog'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog']['active'])) $contentData['prescription']['aerobic']['jog']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog']['days_per_week'])) $contentData['prescription']['aerobic']['jog']['days_per_week'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog']['minutes_per_day'])) $contentData['prescription']['aerobic']['jog']['minutes_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog']['intensity'])) $contentData['prescription']['aerobic']['jog']['intensity'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['jog']['memo'])) $contentData['prescription']['aerobic']['jog']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical'])) $contentData['prescription']['aerobic']['elliptical'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical']['active'])) $contentData['prescription']['aerobic']['elliptical']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical']['days_per_week'])) $contentData['prescription']['aerobic']['elliptical']['days_per_week'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical']['minutes_per_day'])) $contentData['prescription']['aerobic']['elliptical']['minutes_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical']['intensity'])) $contentData['prescription']['aerobic']['elliptical']['intensity'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['elliptical']['memo'])) $contentData['prescription']['aerobic']['elliptical']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim'])) $contentData['prescription']['aerobic']['swim'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim']['active'])) $contentData['prescription']['aerobic']['swim']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim']['days_per_week'])) $contentData['prescription']['aerobic']['swim']['days_per_week'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim']['minutes_per_day'])) $contentData['prescription']['aerobic']['swim']['minutes_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim']['intensity'])) $contentData['prescription']['aerobic']['swim']['intensity'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['swim']['memo'])) $contentData['prescription']['aerobic']['swim']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike'])) $contentData['prescription']['aerobic']['bike'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike']['active'])) $contentData['prescription']['aerobic']['bike']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike']['days_per_week'])) $contentData['prescription']['aerobic']['bike']['days_per_week'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike']['minutes_per_day'])) $contentData['prescription']['aerobic']['bike']['minutes_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike']['intensity'])) $contentData['prescription']['aerobic']['bike']['intensity'] = [];
|
|
|
+ if(!isset($contentData['prescription']['aerobic']['bike']['memo'])) $contentData['prescription']['aerobic']['bike']['memo'] = [];
|
|
|
+ if(!isset($contentData['prescription']['strength'])) $contentData['prescription']['strength'] = [];
|
|
|
+ if(!isset($contentData['prescription']['strength']['active'])) $contentData['prescription']['strength']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['strength']['exercises'])) $contentData['prescription']['strength']['exercises'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat'])) $contentData['prescription']['neat'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['active'])) $contentData['prescription']['neat']['active'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations'])) $contentData['prescription']['neat']['recommendations'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations']['park_farther'])) $contentData['prescription']['neat']['recommendations']['park_farther'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations']['steps_instead_of_elevator'])) $contentData['prescription']['neat']['recommendations']['steps_instead_of_elevator'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations']['stand_instead_of_sit'])) $contentData['prescription']['neat']['recommendations']['stand_instead_of_sit'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations']['steps_goal_per_day'])) $contentData['prescription']['neat']['recommendations']['steps_goal_per_day'] = [];
|
|
|
+ if(!isset($contentData['prescription']['neat']['recommendations']['other'])) $contentData['prescription']['neat']['recommendations']['other'] = [];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if($contentData === false) {
|