|
@@ -191,16 +191,22 @@
|
|
|
<?php } ?>
|
|
|
|
|
|
<?php
|
|
|
- $contentData = false;
|
|
|
- if ($patient->canvas_data) {
|
|
|
- $canvasData = json_decode($patient->canvas_data, true);
|
|
|
- if (isset($canvasData['rx'])) {
|
|
|
- $contentData = $canvasData['rx'];
|
|
|
+ $contentData = $patient->firstPageByCategoryAndKey('CANVAS', 'rx');
|
|
|
+ if ($contentData) {
|
|
|
+ $contentData = json_decode($contentData);
|
|
|
+ if($contentData && $contentData->data) {
|
|
|
+ $contentData = json_decode($contentData->data);
|
|
|
}
|
|
|
+ else {
|
|
|
+ $contentData = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $contentData = false;
|
|
|
}
|
|
|
?>
|
|
|
|
|
|
- patientRx: <?= $contentData ? json_encode($contentData['items']) : '[]' ?>,
|
|
|
+ patientRx: <?= $contentData ? json_encode($contentData->items) : '[]' ?>,
|
|
|
},
|
|
|
computed: {
|
|
|
numAll: function() {
|