|
@@ -38,7 +38,7 @@
|
|
<tbody>
|
|
<tbody>
|
|
<tr v-for="(prescription, index) in prescriptions" :class="currentPrescription && currentPrescription.id === prescription.id ? 'bg-aliceblue' : ''">
|
|
<tr v-for="(prescription, index) in prescriptions" :class="currentPrescription && currentPrescription.id === prescription.id ? 'bg-aliceblue' : ''">
|
|
<td class="width-150px" :class="currentPrescription && currentPrescription.id === prescription.id ? 'row-selection-highlight' : ''">
|
|
<td class="width-150px" :class="currentPrescription && currentPrescription.id === prescription.id ? 'row-selection-highlight' : ''">
|
|
- <a href="#" v-on:click.prevent="currentPrescription=prescription; setAddMode('')"
|
|
|
|
|
|
+ <a href="#" v-on:click.prevent="setCurrentPrescription(prescription, '');"
|
|
class="text-nowrap"
|
|
class="text-nowrap"
|
|
:class="currentPrescription && currentPrescription.id === prescription.id ? 'font-weight-bold' : ''">
|
|
:class="currentPrescription && currentPrescription.id === prescription.id ? 'font-weight-bold' : ''">
|
|
@{{prescription.created_at_friendly_short}}
|
|
@{{prescription.created_at_friendly_short}}
|
|
@@ -105,7 +105,7 @@
|
|
<h3 class="font-size-16 m-0">
|
|
<h3 class="font-size-16 m-0">
|
|
<b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly_short }}</span></b>
|
|
<b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly_short }}</span></b>
|
|
</h3>
|
|
</h3>
|
|
- <a class="ml-auto" href="#" v-on:click.prevent="currentPrescription=null">
|
|
|
|
|
|
+ <a class="ml-auto" href="#" v-on:click.prevent="setCurrentPrescription(null);">
|
|
<i class="fa fa-times-circle on-hover-opaque"></i>
|
|
<i class="fa fa-times-circle on-hover-opaque"></i>
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@@ -726,7 +726,6 @@ GROUP BY erx_category");
|
|
}, 'json');
|
|
}, 'json');
|
|
},
|
|
},
|
|
|
|
|
|
- // new eRx (only for popup-list)
|
|
|
|
newERx: function(_type) {
|
|
newERx: function(_type) {
|
|
if(!!this.numUnsigned[_type]) {
|
|
if(!!this.numUnsigned[_type]) {
|
|
toastr.error('There is already an unsigned ERx of type ' + _type + ' in this note.');
|
|
toastr.error('There is already an unsigned ERx of type ' + _type + ' in this note.');
|
|
@@ -1418,8 +1417,15 @@ GROUP BY erx_category");
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
},
|
|
},
|
|
- setCurrentPrescription: function(_prescription) {
|
|
|
|
|
|
+ setCurrentPrescription: function(_prescription, _addMode = false) {
|
|
this.currentPrescription = _prescription;
|
|
this.currentPrescription = _prescription;
|
|
|
|
+ if(_addMode !== false) {
|
|
|
|
+ this.setAddMode(_addMode);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @if(@$note)
|
|
|
|
+ localStorage['currentErx_{{$note->id}}'] = _prescription.id;
|
|
|
|
+ @endif
|
|
},
|
|
},
|
|
setAddMode: function(_mode) {
|
|
setAddMode: function(_mode) {
|
|
let self = this;
|
|
let self = this;
|
|
@@ -1577,6 +1583,17 @@ GROUP BY erx_category");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ @if(@$note)
|
|
|
|
+ if(!!localStorage['currentErx_{{$note->id}}']) {
|
|
|
|
+ for(let x in this.prescriptions) {
|
|
|
|
+ if(this.prescriptions[x].id === +(localStorage['currentErx_{{$note->id}}'])) {
|
|
|
|
+ this.currentPrescription = this.prescriptions[x];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ @endif
|
|
|
|
+
|
|
$('[stag-popup-key="logistics-popup"] .facility-search').off('stag-suggest-selected');
|
|
$('[stag-popup-key="logistics-popup"] .facility-search').off('stag-suggest-selected');
|
|
$('[stag-popup-key="logistics-popup"] .facility-search').on('stag-suggest-selected', (_e, _input, _data) => {
|
|
$('[stag-popup-key="logistics-popup"] .facility-search').on('stag-suggest-selected', (_e, _input, _data) => {
|
|
if(self.currentPrescriptionLogistics && self.currentPrescriptionLogistics.logisticsDetailJson) {
|
|
if(self.currentPrescriptionLogistics && self.currentPrescriptionLogistics.logisticsDetailJson) {
|