|
@@ -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 = [
|
|
|
"next_fu" => [
|
|
|
"active" => true,
|
|
|
"date" => null
|
|
@@ -47,20 +36,20 @@ $formID = rand(0, 100000);
|
|
|
<p class="font-weight-bold">
|
|
|
<label class="m-0 d-flex align-items-center">
|
|
|
<span class="mr-2">Follow-up Appointment</span>
|
|
|
- <input type="checkbox" v-model="data['{{$sectionPro->uid}}']['next_fu']['active']">
|
|
|
+ <input type="checkbox" v-model="data['next_fu']['active']">
|
|
|
</label>
|
|
|
</p>
|
|
|
|
|
|
- <label v-if="data['{{$sectionPro->uid}}']['next_fu']['active']" class="d-flex align-items-center">
|
|
|
+ <label v-if="data['next_fu']['active']" class="d-flex align-items-center">
|
|
|
<span class="mr-2">Follow Up Date</span>
|
|
|
- <input type="date" v-model="data['{{$sectionPro->uid}}']['next_fu']['date']">
|
|
|
- <a v-if="data['{{$sectionPro->uid}}']['next_fu']['active'] && !!data['{{$sectionPro->uid}}']['next_fu']['date']" native target="_blank" href="{{route('patients.view.calendar', ['patient' => $patient])}}" class="ml-3">
|
|
|
+ <input type="date" v-model="data['next_fu']['date']">
|
|
|
+ <a v-if="data['next_fu']['active'] && !!data['next_fu']['date']" native target="_blank" href="{{route('patients.view.calendar', ['patient' => $patient])}}" class="ml-3">
|
|
|
<i class="fa fa-calendar-alt"></i>
|
|
|
Patient Calendar
|
|
|
</a>
|
|
|
</label>
|
|
|
|
|
|
- <div v-if="data['{{$sectionPro->uid}}']['next_fu']['active']" class="">
|
|
|
+ <div v-if="data['next_fu']['active']" class="">
|
|
|
<div class="mb-2">
|
|
|
<span class="font-weight-bold">Next CC</span>
|
|
|
<a href="#" class="ml-3"
|
|
@@ -75,11 +64,11 @@ $formID = rand(0, 100000);
|
|
|
<th class="px-2 text-secondary border-bottom-0">Title</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0">ICD</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0 w-35">Memo</th>
|
|
|
- <th v-if="data['{{$sectionPro->uid}}']['next_cc']['list'].length > 1" class="px-2 text-secondary border-bottom-0"></th>
|
|
|
+ <th v-if="data['next_cc']['list'].length > 1" class="px-2 text-secondary border-bottom-0"></th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-for="(item, index) in data['{{$sectionPro->uid}}']['next_cc']['list']">
|
|
|
+ <tr v-for="(item, index) in data['next_cc']['list']">
|
|
|
<td class="px-2 pt-2 text-center text-sm font-weight-bold">@{{ index + 1 }}</td>
|
|
|
<td>
|
|
|
<select class="form-control form-control-sm" v-model="item.category" required>
|
|
@@ -104,7 +93,7 @@ $formID = rand(0, 100000);
|
|
|
class="form-control form-control-sm"
|
|
|
v-model="item.memo">
|
|
|
</td>
|
|
|
- <td v-if="data['{{$sectionPro->uid}}']['next_cc']['list'].length > 1" class="px-2 text-nowrap">
|
|
|
+ <td v-if="data['next_cc']['list'].length > 1" class="px-2 text-nowrap">
|
|
|
<a href="#" v-on:click.prevent="removeNextCCItem(index)"
|
|
|
class="on-hover-opaque text-danger mt-1 d-inline-block">
|
|
|
<i class="fa fa-trash-alt"></i>
|
|
@@ -138,7 +127,7 @@ $formID = rand(0, 100000);
|
|
|
},
|
|
|
methods: {
|
|
|
addNextCCItem: function() {
|
|
|
- this.data['{{$sectionPro->uid}}']['next_cc']['list'].push({
|
|
|
+ this.data['next_cc']['list'].push({
|
|
|
"category": '',
|
|
|
"name": '',
|
|
|
"icd": '',
|
|
@@ -146,7 +135,7 @@ $formID = rand(0, 100000);
|
|
|
});
|
|
|
},
|
|
|
removeNextCCItem: function(_index) {
|
|
|
- this.data['{{$sectionPro->uid}}']['next_cc']['list'].splice(_index, 1);
|
|
|
+ this.data['next_cc']['list'].splice(_index, 1);
|
|
|
},
|
|
|
cleanArray: function(_source) {
|
|
|
let plItems = [], plObject = {};
|