|
@@ -1,10 +1,22 @@
|
|
<?php
|
|
<?php
|
|
-/** @var \App\Models\Pro $ccPro */
|
|
|
|
|
|
+/** @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
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
if(!$contentData) $contentData = [];
|
|
if(!$contentData) $contentData = [];
|
|
-if( !isset($contentData[$ccPro->uid]) ||
|
|
|
|
- !isset($contentData[$ccPro->uid]['current_cch']) ||
|
|
|
|
- !count($contentData[$ccPro->uid]['current_cch']['list'])) {
|
|
|
|
- $contentData[$ccPro->uid] = [
|
|
|
|
|
|
+if( !isset($contentData[$sectionPro->uid]) ||
|
|
|
|
+ !isset($contentData[$sectionPro->uid]['current_cch']) ||
|
|
|
|
+ !count($contentData[$sectionPro->uid]['current_cch']['list'])) {
|
|
|
|
+ $contentData[$sectionPro->uid] = [
|
|
"current_cch" => [
|
|
"current_cch" => [
|
|
"list" => [
|
|
"list" => [
|
|
[
|
|
[
|
|
@@ -17,12 +29,6 @@ if( !isset($contentData[$ccPro->uid]) ||
|
|
],
|
|
],
|
|
]
|
|
]
|
|
]
|
|
]
|
|
- ],
|
|
|
|
- "next_fu" => [
|
|
|
|
- "date" => null
|
|
|
|
- ],
|
|
|
|
- "next_cc" => [
|
|
|
|
- "list" => []
|
|
|
|
]
|
|
]
|
|
];
|
|
];
|
|
}
|
|
}
|
|
@@ -56,11 +62,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">Title</th>
|
|
<th class="px-2 text-secondary border-bottom-0">ICD</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 class="px-2 text-secondary border-bottom-0 w-35">Memo</th>
|
|
- <th v-if="data['{{$ccPro->uid}}']['current_cch']['list'].length > 1" class="px-2 text-secondary border-bottom-0"></th>
|
|
|
|
|
|
+ <th v-if="data['{{$sectionPro->uid}}']['current_cch']['list'].length > 1" class="px-2 text-secondary border-bottom-0"></th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
- <tr v-for="(item, index) in data['{{$ccPro->uid}}']['current_cch']['list']">
|
|
|
|
|
|
+ <tr v-for="(item, index) in data['{{$sectionPro->uid}}']['current_cch']['list']">
|
|
<td class="px-2 pt-2 text-center text-sm font-weight-bold">@{{ index + 1 }}</td>
|
|
<td class="px-2 pt-2 text-center text-sm font-weight-bold">@{{ index + 1 }}</td>
|
|
<td>
|
|
<td>
|
|
<select class="form-control form-control-sm" v-model="item.category" required>
|
|
<select class="form-control form-control-sm" v-model="item.category" required>
|
|
@@ -85,7 +91,7 @@ $formID = rand(0, 100000);
|
|
class="form-control form-control-sm"
|
|
class="form-control form-control-sm"
|
|
v-model="item.memo">
|
|
v-model="item.memo">
|
|
</td>
|
|
</td>
|
|
- <td v-if="data['{{$ccPro->uid}}']['current_cch']['list'].length > 1" class="px-2 text-nowrap">
|
|
|
|
|
|
+ <td v-if="data['{{$sectionPro->uid}}']['current_cch']['list'].length > 1" class="px-2 text-nowrap">
|
|
<a href="#" v-on:click.prevent="removeItem(index)"
|
|
<a href="#" v-on:click.prevent="removeItem(index)"
|
|
class="on-hover-opaque text-danger mt-1 d-inline-block">
|
|
class="on-hover-opaque text-danger mt-1 d-inline-block">
|
|
<i class="fa fa-trash-alt"></i>
|
|
<i class="fa fa-trash-alt"></i>
|
|
@@ -95,7 +101,7 @@ $formID = rand(0, 100000);
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
|
|
|
|
- <p class="font-weight-bold mb-2">HPI</p>
|
|
|
|
|
|
+ <p class="font-weight-bold mt-3 mb-2">HPI</p>
|
|
|
|
|
|
<table class="table table-sm table-bordered mb-2 table-edit-sheet">
|
|
<table class="table table-sm table-bordered mb-2 table-edit-sheet">
|
|
<thead>
|
|
<thead>
|
|
@@ -105,7 +111,7 @@ $formID = rand(0, 100000);
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
- <tr v-for="(item, index) in data['{{$ccPro->uid}}']['current_cch']['list']">
|
|
|
|
|
|
+ <tr v-for="(item, index) in data['{{$sectionPro->uid}}']['current_cch']['list']">
|
|
<td class="align-middle px-2">
|
|
<td class="align-middle px-2">
|
|
@{{ item.category }}@{{ item.name ? ' / ' + item.name : '' }}@{{ item.icd ? ' / ' + item.icd : '' }}
|
|
@{{ item.category }}@{{ item.name ? ' / ' + item.name : '' }}@{{ item.icd ? ' / ' + item.icd : '' }}
|
|
</td>
|
|
</td>
|
|
@@ -141,7 +147,7 @@ $formID = rand(0, 100000);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
addItem: function() {
|
|
addItem: function() {
|
|
- this.data['{{$ccPro->uid}}']['current_cch']['list'].push({
|
|
|
|
|
|
+ this.data['{{$sectionPro->uid}}']['current_cch']['list'].push({
|
|
"category": '',
|
|
"category": '',
|
|
"name": '',
|
|
"name": '',
|
|
"icd": '',
|
|
"icd": '',
|
|
@@ -152,7 +158,7 @@ $formID = rand(0, 100000);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
removeItem: function(_index) {
|
|
removeItem: function(_index) {
|
|
- this.data['{{$ccPro->uid}}']['current_cch']['list'].splice(_index, 1);
|
|
|
|
|
|
+ this.data['{{$sectionPro->uid}}']['current_cch']['list'].splice(_index, 1);
|
|
},
|
|
},
|
|
cleanArray: function(_source) {
|
|
cleanArray: function(_source) {
|
|
let plItems = [], plObject = {};
|
|
let plItems = [], plObject = {};
|