|
@@ -12,8 +12,11 @@ if(!$contentData || !isset($contentData['items']) || !count($contentData['items'
|
|
|
"title" => "",
|
|
|
"icd" => "",
|
|
|
"coa" => "Chronic",
|
|
|
- "detail" => "",
|
|
|
+ "previous_hpi" => "",
|
|
|
+ "detail" => "", // actually HPI (name retained to avoid breakage)
|
|
|
+ "previous_plan" => "",
|
|
|
"plan" => "",
|
|
|
+ "note_uid" => "",
|
|
|
]
|
|
|
]
|
|
|
];
|
|
@@ -68,7 +71,7 @@ $formID = rand(0, 100000);
|
|
|
</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0 w-35">
|
|
|
<div class="d-flex align-items-center font-weight-normal">
|
|
|
- <span>Title</span>
|
|
|
+ <span class="font-weight-bold">Title</span>
|
|
|
<div class="hide-if-dashboard ml-auto">
|
|
|
<div v-if="favorites && favorites.length" class="d-inline-flex2">
|
|
|
<div moe relative>
|
|
@@ -112,7 +115,7 @@ $formID = rand(0, 100000);
|
|
|
v-on:change="includeChanged()">
|
|
|
</label>
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <td v-show="inclusion[index]" >
|
|
|
<input type="text" :data-index="index"
|
|
|
class="form-control form-control-sm font-weight-bold font-size-14"
|
|
|
data-field="title" placeholder="Title" v-model="item.title" autofocus required>
|
|
@@ -126,27 +129,22 @@ $formID = rand(0, 100000);
|
|
|
<option value="Acute">Acute</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
- <textarea type="text" class="form-control form-control-sm" v-model="item.detail" placeholder="Detail"></textarea>
|
|
|
- </td>
|
|
|
- {{--<td>
|
|
|
- <input type="text" :data-index="index"
|
|
|
- class="form-control form-control-sm canvas-dx-title"
|
|
|
- data-field="icd" placeholder="ICD" v-model="item.icd">
|
|
|
- <select v-model="item.coa" class="form-control form-control-sm pl-1" required>
|
|
|
- <option value="">-- select --</option>
|
|
|
- <option value="Chronic" selected>Chronic</option>
|
|
|
- <option value="Acute">Acute</option>
|
|
|
- </select>
|
|
|
+ <div class="px-2 py-1 bg-white border-bottom text-secondary" v-if="item.previous_hpi">
|
|
|
+ <b><i class="fa fa-clock mr-1 text-sm"></i>Previous HPI: </b><br>
|
|
|
+ <div v-html="item.previous_hpi"></div>
|
|
|
+ </div>
|
|
|
+ <textarea type="text" class="form-control form-control-sm" v-model="item.detail" placeholder="Updated HPI *"></textarea>
|
|
|
</td>
|
|
|
- <td><textarea type="text" class="form-control form-control-sm"
|
|
|
- dx-rte :data-index="index" data-field="detail"
|
|
|
- v-model="item.detail"></textarea>
|
|
|
- </td>--}}
|
|
|
- <td><textarea type="text" class="form-control form-control-sm"
|
|
|
+ <td v-show="inclusion[index]" >
|
|
|
+ <div class="px-2 py-1 bg-white border-bottom text-secondary" v-if="item.previous_plan">
|
|
|
+ <b><i class="fa fa-clock mr-1 text-sm"></i>Previous Plan: </b><br>
|
|
|
+ <div v-html="item.previous_plan"></div>
|
|
|
+ </div>
|
|
|
+ <textarea type="text" class="form-control form-control-sm"
|
|
|
dx-rte :data-index="index" data-field="plan"
|
|
|
v-model="item.plan"></textarea>
|
|
|
</td>
|
|
|
- <td class="px-2 text-nowrap">
|
|
|
+ <td v-show="inclusion[index]" class="px-2 text-nowrap">
|
|
|
<a href="#"
|
|
|
v-if="!isFavorite(item)" v-on:click.prevent="addToFavorites(item)"
|
|
|
class="mt-1 d-inline-block mr-1 text-secondary on-hover-opaque"
|
|
@@ -164,6 +162,9 @@ $formID = rand(0, 100000);
|
|
|
<i class="fa fa-trash-alt"></i>
|
|
|
</a>
|
|
|
</td>
|
|
|
+ <td v-show="!inclusion[index]" colspan="3" class="align-middle pl-2">
|
|
|
+ <span v-html="item.title"></span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
@@ -186,19 +187,44 @@ $formID = rand(0, 100000);
|
|
|
for (let i = 0; i < favorites.length; i++) {
|
|
|
favorites[i].data = JSON.parse(favorites[i].data);
|
|
|
}
|
|
|
+
|
|
|
+ let saved = <?= json_encode($contentData['items']) ?>;
|
|
|
+ // if FU, copy hpi into previous_hpi for each item, and empty out hpi
|
|
|
+ @if(@$note && $note->new_or_fu_or_na === 'FU')
|
|
|
+ for (let i = 0; i < saved.length; i++) {
|
|
|
+ if(saved[i].note_uid !== '{{$note->uid}}') {
|
|
|
+ if(saved[i].detail) saved[i].previous_hpi = saved[i].detail;
|
|
|
+ if(saved[i].plan) saved[i].previous_plan = saved[i].plan;
|
|
|
+ saved[i].detail = '';
|
|
|
+ saved[i].plan = '';
|
|
|
+ saved[i].note_uid = '{{$note->uid}}';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log('ALIX', saved)
|
|
|
+ @endif
|
|
|
+
|
|
|
function init() {
|
|
|
window.clientDXApp = new Vue({
|
|
|
el: '#dxSection',
|
|
|
data: {
|
|
|
includeAll: false,
|
|
|
- items: <?= json_encode($contentData['items']) ?>,
|
|
|
+ items: saved,
|
|
|
inclusion: [],
|
|
|
favorites: favorites,
|
|
|
},
|
|
|
mounted: function() {
|
|
|
this.inclusion = [];
|
|
|
for (let i = 0; i < this.items.length; i++) {
|
|
|
- this.inclusion[i] = this.items[i].included;
|
|
|
+ @if(@$note && $note->new_or_fu_or_na === 'FU')
|
|
|
+ if(this.items[i].note_uid !== '{{$note->uid}}') {
|
|
|
+ this.inclusion[i] = this.items[i].included = false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.inclusion[i] = this.items[i].included;
|
|
|
+ }
|
|
|
+ @else
|
|
|
+ this.inclusion[i] = this.items[i].included;
|
|
|
+ @endif
|
|
|
}
|
|
|
this.initRTE();
|
|
|
this.initTitleAutoSuggest();
|
|
@@ -302,6 +328,8 @@ $formID = rand(0, 100000);
|
|
|
|
|
|
var toolbar = $(qe.container).prev('.ql-toolbar');
|
|
|
|
|
|
+ toolbar.append('<b class="float-left text-secondary ml-1 mr-2 pt-1">Updated Plan *</b>');
|
|
|
+
|
|
|
// add button for new shortcut
|
|
|
var newSCButton = $('<button type="button" tabindex="-1" ' +
|
|
|
'class="btn bg-white btn-sm btn-default text-primary w-auto px-2 border py-0 ' +
|
|
@@ -314,7 +342,6 @@ $formID = rand(0, 100000);
|
|
|
'text-sm show-templates">Templates</button>');
|
|
|
templatesButton.attr('data-editor-id', editorID);
|
|
|
toolbar.append(templatesButton);
|
|
|
- // $(this).closest('tr').find('.assessment-detail-template').appendTo(templatesButton);
|
|
|
|
|
|
qe.on('text-change', function() {
|
|
|
// ti.val(qe.root.innerHTML);
|