|
@@ -52,24 +52,15 @@
|
|
|
<link href="/select2/select2.min.css" rel="stylesheet" />
|
|
|
<script src="/select2/select2.min.js"></script>
|
|
|
|
|
|
- <div class="alert alert-warning border-warning">
|
|
|
- <b>Deprecated:</b>
|
|
|
- This ERx / Orders feature has been deprecated, and is now read-only. For new prescriptions, please use
|
|
|
- <a href="{{ route('patients.view.patient-prescriptions', ['patient' => $patient]) }}" class="font-weight-bold">ERx & Orders</a>.
|
|
|
- </div>
|
|
|
-
|
|
|
<div id="ticketsApp" v-cloak>
|
|
|
<div class="d-flex align-items-end pb-0">
|
|
|
- <h4 class="font-weight-bold m-0 font-size-16">ERx / Orders</h4>
|
|
|
+ <h4 class="font-weight-bold m-0 font-size-16">Tickets
|
|
|
+ <span v-if="statusFilter === 'open'" class="text-secondary font-weight-normal">(@{{ otherNumOpen }} open)</span>
|
|
|
+ <span v-if="statusFilter === 'closed'" class="text-secondary font-weight-normal">(@{{ otherNumClosed }} closed)</span>
|
|
|
+ <span v-if="statusFilter === 'all'" class="text-secondary font-weight-normal">(@{{ otherNumOpen }} open, @{{ otherNumClosed }} closed)</span>
|
|
|
+ </h4>
|
|
|
+ <a class="mx-4 c-pointer font-weight-bold" v-on:click.prevent="otherShowPopup()">+ New</a>
|
|
|
<select class="hide-inside-ticket-popup ml-auto max-width-200px form-control form-control-sm pr-2"
|
|
|
- onchange="return fastLoad('/patients/view/{{$patient->uid}}/tickets/' + this.value, true, false, false)">
|
|
|
- <option value="" {{$type === '' ? 'selected' : ''}}>All</option>
|
|
|
- <option value="erx" {{$type === 'erx' ? 'selected' : ''}}>ERx</option>
|
|
|
- <option value="lab" {{$type === 'lab' ? 'selected' : ''}}>Lab Orders</option>
|
|
|
- <option value="imaging" {{$type === 'imaging' ? 'selected' : ''}}>Imaging Orders</option>
|
|
|
- <option value="other" {{$type === 'other' ? 'selected' : ''}}>Other Orders</option>
|
|
|
- </select>
|
|
|
- <select class="hide-inside-ticket-popup ml-2 max-width-200px form-control form-control-sm pr-2"
|
|
|
v-model="statusFilter">
|
|
|
<option value="open">Open tickets (@{{ numOpen }})</option>
|
|
|
<option value="closed">Closed tickets (@{{ numClosed }})</option>
|
|
@@ -77,18 +68,7 @@
|
|
|
</select>
|
|
|
</div>
|
|
|
|
|
|
- @if($type === '' || $type === 'erx')
|
|
|
- @include('app.patient.tickets.erx')
|
|
|
- @endif
|
|
|
- @if($type === '' || $type === 'lab')
|
|
|
- @include('app.patient.tickets.lab')
|
|
|
- @endif
|
|
|
- @if($type === '' || $type === 'imaging')
|
|
|
- @include('app.patient.tickets.imaging')
|
|
|
- @endif
|
|
|
- @if($type === '' || $type === 'other')
|
|
|
- @include('app.patient.tickets.other')
|
|
|
- @endif
|
|
|
+ @include('app.patient.tickets.other')
|
|
|
|
|
|
@include('app.patient.tickets.ticket_send_fax_form')
|
|
|
</div>
|
|
@@ -241,15 +221,15 @@
|
|
|
<?php } ?>
|
|
|
},
|
|
|
watch: {
|
|
|
-{{-- <?php for ($i=0; $i<count($categories); $i++) { ?>--}}
|
|
|
-{{-- {{ $categories[$i] }}CurrentItemData: { // ex: erxCurrentItemData, labCurrentItemData, etc.--}}
|
|
|
-{{-- handler: function(val, oldVal) {--}}
|
|
|
-{{-- if (this.{{ $categories[$i] }}PopupMode !== 'edit' || !this.currentItemUid || this.reloading) return;--}}
|
|
|
-{{-- this.{{ $categories[$i] }}AutoSave();--}}
|
|
|
-{{-- },--}}
|
|
|
-{{-- deep: true--}}
|
|
|
-{{-- },--}}
|
|
|
-{{-- <?php } ?>--}}
|
|
|
+ <?php for ($i=0; $i<count($categories); $i++) { ?>
|
|
|
+ {{ $categories[$i] }}CurrentItemData: { // ex: erxCurrentItemData, labCurrentItemData, etc.
|
|
|
+ handler: function(val, oldVal) {
|
|
|
+ if (this.{{ $categories[$i] }}PopupMode !== 'edit' || !this.currentItemUid || this.reloading) return;
|
|
|
+ this.{{ $categories[$i] }}AutoSave();
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ <?php } ?>
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -600,7 +580,11 @@
|
|
|
this.otherPopupItem.data.comments = [];
|
|
|
}
|
|
|
this.otherPopupItem.data.comments.push(comment);
|
|
|
+ this.comment = '';
|
|
|
this.otherSavePopupItem(true);
|
|
|
+ Vue.nextTick(() => {
|
|
|
+ $('[stag-popup-key="other-popup"]>form').scrollTop(10000);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// common
|
|
@@ -630,14 +614,16 @@
|
|
|
$.post('/api/ticket/close', {
|
|
|
uid: _item.uid
|
|
|
}, (_data) => {
|
|
|
- this.reloadPopupItem(this.currentCategory, true);
|
|
|
+ // this.reloadPopupItem(this.currentCategory, true);
|
|
|
+ fastLoad('/patients/view/{{$patient->uid}}/tickets/' + this.currentCategory + '/' + this.currentItemUid);
|
|
|
}, 'json');
|
|
|
},
|
|
|
openItem: function(_item) {
|
|
|
$.post('/api/ticket/open', {
|
|
|
uid: _item.uid
|
|
|
}, (_data) => {
|
|
|
- this.reloadPopupItem(this.currentCategory);
|
|
|
+ // this.reloadPopupItem(this.currentCategory);
|
|
|
+ fastLoad('/patients/view/{{$patient->uid}}/tickets/' + this.currentCategory + '/' + this.currentItemUid);
|
|
|
}, 'json');
|
|
|
},
|
|
|
showSendFaxPopup: function() {
|
|
@@ -718,14 +704,16 @@
|
|
|
$.post('/api/ticket/signAsOrderingPro', {
|
|
|
uid: _item.uid
|
|
|
}, (_data) => {
|
|
|
- this.reloadPopupItem(this.currentCategory);
|
|
|
+ // this.reloadPopupItem(this.currentCategory);
|
|
|
+ fastLoad('/patients/view/{{$patient->uid}}/tickets/' + this.currentCategory + '/' + this.currentItemUid);
|
|
|
}, 'json');
|
|
|
},
|
|
|
undoSignAsOrderingPro: function(_item) {
|
|
|
$.post('/api/ticket/undoSignAsOrderingPro', {
|
|
|
uid: _item.uid
|
|
|
}, (_data) => {
|
|
|
- this.reloadPopupItem(this.currentCategory);
|
|
|
+ // this.reloadPopupItem(this.currentCategory);
|
|
|
+ fastLoad('/patients/view/{{$patient->uid}}/tickets/' + this.currentCategory + '/' + this.currentItemUid);
|
|
|
}, 'json');
|
|
|
},
|
|
|
toggleAddingReport: function() {
|