|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
- $categories = ['erx', 'lab', 'imaging', 'equipment'];
|
|
|
|
|
|
+ $categories = ['erx', 'lab', 'imaging', 'other'];
|
|
|
|
|
|
function adjustBrightness($hex, $steps) {
|
|
function adjustBrightness($hex, $steps) {
|
|
$steps = max(-255, min(255, $steps));
|
|
$steps = max(-255, min(255, $steps));
|
|
@@ -60,6 +60,7 @@
|
|
<option value="erx" {{$type === 'erx' ? 'selected' : ''}}>ERx</option>
|
|
<option value="erx" {{$type === 'erx' ? 'selected' : ''}}>ERx</option>
|
|
<option value="lab" {{$type === 'lab' ? 'selected' : ''}}>Lab Orders</option>
|
|
<option value="lab" {{$type === 'lab' ? 'selected' : ''}}>Lab Orders</option>
|
|
<option value="imaging" {{$type === 'imaging' ? 'selected' : ''}}>Imaging Orders</option>
|
|
<option value="imaging" {{$type === 'imaging' ? 'selected' : ''}}>Imaging Orders</option>
|
|
|
|
+ <option value="other" {{$type === 'other' ? 'selected' : ''}}>Other Orders</option>
|
|
</select>
|
|
</select>
|
|
<select class="hide-inside-ticket-popup ml-2 max-width-200px form-control form-control-sm pr-2"
|
|
<select class="hide-inside-ticket-popup ml-2 max-width-200px form-control form-control-sm pr-2"
|
|
v-model="statusFilter">
|
|
v-model="statusFilter">
|
|
@@ -78,6 +79,9 @@
|
|
@if($type === '' || $type === 'imaging')
|
|
@if($type === '' || $type === 'imaging')
|
|
@include('app.patient.tickets.imaging')
|
|
@include('app.patient.tickets.imaging')
|
|
@endif
|
|
@endif
|
|
|
|
+ @if($type === '' || $type === 'other')
|
|
|
|
+ @include('app.patient.tickets.other')
|
|
|
|
+ @endif
|
|
|
|
|
|
@include('app.patient.tickets.ticket_send_fax_form')
|
|
@include('app.patient.tickets.ticket_send_fax_form')
|
|
</div>
|
|
</div>
|
|
@@ -103,7 +107,7 @@
|
|
"erx" => [],
|
|
"erx" => [],
|
|
"lab" => [],
|
|
"lab" => [],
|
|
"imaging" => [],
|
|
"imaging" => [],
|
|
- "equipment" => [],
|
|
|
|
|
|
+ "other" => []
|
|
];
|
|
];
|
|
|
|
|
|
$ticketsArray = [];
|
|
$ticketsArray = [];
|
|
@@ -162,7 +166,7 @@
|
|
@include('app.patient.tickets.erx-data')
|
|
@include('app.patient.tickets.erx-data')
|
|
@include('app.patient.tickets.lab-data')
|
|
@include('app.patient.tickets.lab-data')
|
|
@include('app.patient.tickets.imaging-data')
|
|
@include('app.patient.tickets.imaging-data')
|
|
- @include('app.patient.tickets.equipment-data')
|
|
|
|
|
|
+ @include('app.patient.tickets.other-data')
|
|
|
|
|
|
// common
|
|
// common
|
|
currentCategory: '',
|
|
currentCategory: '',
|
|
@@ -335,12 +339,12 @@
|
|
this.postShowPopup('imaging', _item);
|
|
this.postShowPopup('imaging', _item);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- equipmentShowPopup: function(_item) {
|
|
|
|
- this.preparePopup('equipment', _item);
|
|
|
|
|
|
+ otherShowPopup: function(_item) {
|
|
|
|
+ this.preparePopup('other', _item);
|
|
Vue.nextTick(() => {
|
|
Vue.nextTick(() => {
|
|
- showStagPopup('equipment-popup', true);
|
|
|
|
|
|
+ showStagPopup('other-popup', true);
|
|
this.reinitProSuggest();
|
|
this.reinitProSuggest();
|
|
- this.postShowPopup('equipment', _item);
|
|
|
|
|
|
+ this.postShowPopup('other', _item);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -525,8 +529,8 @@
|
|
this.imagingSavePopupItem(true);
|
|
this.imagingSavePopupItem(true);
|
|
},
|
|
},
|
|
|
|
|
|
- equipmentSavePopupItem: function(_autoSave = false) {
|
|
|
|
- let form = $('#ticketsApp [stag-popup-key="equipment-popup"] form').first();
|
|
|
|
|
|
+ otherSavePopupItem: function(_autoSave = false) {
|
|
|
|
+ let form = $('#ticketsApp [stag-popup-key="other-popup"] form').first();
|
|
if(!_autoSave) {
|
|
if(!_autoSave) {
|
|
if(!form[0].checkValidity()) {
|
|
if(!form[0].checkValidity()) {
|
|
form[0].reportValidity();
|
|
form[0].reportValidity();
|
|
@@ -535,24 +539,24 @@
|
|
}
|
|
}
|
|
if(!_autoSave) showMask();
|
|
if(!_autoSave) showMask();
|
|
let payload = {};
|
|
let payload = {};
|
|
- if(this.equipmentPopupMode === 'add') {
|
|
|
|
|
|
+ if(this.otherPopupMode === 'add') {
|
|
payload.clientUid = '{{ $patient->uid }}';
|
|
payload.clientUid = '{{ $patient->uid }}';
|
|
- payload.category = 'equipment';
|
|
|
|
|
|
+ payload.category = 'other';
|
|
payload.assignedProUid = '{{ $pro->uid }}';
|
|
payload.assignedProUid = '{{ $pro->uid }}';
|
|
payload.managerProUid = '{{ $pro->uid }}';
|
|
payload.managerProUid = '{{ $pro->uid }}';
|
|
payload.orderingProUid = '{{ $pro->uid }}';
|
|
payload.orderingProUid = '{{ $pro->uid }}';
|
|
payload.initiatingProUid = '{{ $pro->uid }}';
|
|
payload.initiatingProUid = '{{ $pro->uid }}';
|
|
- payload.data = JSON.stringify(this.equipmentPopupItem.data);
|
|
|
|
|
|
+ payload.data = JSON.stringify(this.otherPopupItem.data);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- payload.uid = this.equipmentPopupItem.uid;
|
|
|
|
- payload.newData = JSON.stringify(this.equipmentPopupItem.data);
|
|
|
|
|
|
+ payload.uid = this.otherPopupItem.uid;
|
|
|
|
+ payload.newData = JSON.stringify(this.otherPopupItem.data);
|
|
}
|
|
}
|
|
@if(request()->input('note-uid'))
|
|
@if(request()->input('note-uid'))
|
|
payload.noteUid = '{{request()->input('note-uid')}}';
|
|
payload.noteUid = '{{request()->input('note-uid')}}';
|
|
@endif
|
|
@endif
|
|
$.post(
|
|
$.post(
|
|
- '/api/ticket/' + (this.equipmentPopupMode === 'add' ? 'create' : 'updateData'),
|
|
|
|
|
|
+ '/api/ticket/' + (this.otherPopupMode === 'add' ? 'create' : 'updateData'),
|
|
payload,
|
|
payload,
|
|
(_data) => {
|
|
(_data) => {
|
|
if(hasResponseError(_data)) {
|
|
if(hasResponseError(_data)) {
|
|
@@ -561,29 +565,29 @@
|
|
}
|
|
}
|
|
if(!_autoSave) {
|
|
if(!_autoSave) {
|
|
if(_data.data) {
|
|
if(_data.data) {
|
|
- window.localStorage.autoOpen = 'equipment|' + _data.data;
|
|
|
|
|
|
+ window.localStorage.autoOpen = 'other|' + _data.data;
|
|
fastReload();
|
|
fastReload();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- this.reloadPopupItem('equipment');
|
|
|
|
|
|
+ this.reloadPopupItem('other');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
'json');
|
|
'json');
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
- equipmentSaveComment: function() {
|
|
|
|
|
|
+ otherSaveComment: function() {
|
|
if(!this.comment) return;
|
|
if(!this.comment) return;
|
|
let comment = {
|
|
let comment = {
|
|
pro_id: this.own_pro_id,
|
|
pro_id: this.own_pro_id,
|
|
created_at: new Date().toLocaleString(),
|
|
created_at: new Date().toLocaleString(),
|
|
message: this.comment
|
|
message: this.comment
|
|
};
|
|
};
|
|
- if(!this.equipmentPopupItem.data.comments) {
|
|
|
|
- this.equipmentPopupItem.data.comments = [];
|
|
|
|
|
|
+ if(!this.otherPopupItem.data.comments) {
|
|
|
|
+ this.otherPopupItem.data.comments = [];
|
|
}
|
|
}
|
|
- this.equipmentPopupItem.data.comments.push(comment);
|
|
|
|
- this.equipmentSavePopupItem(true);
|
|
|
|
|
|
+ this.otherPopupItem.data.comments.push(comment);
|
|
|
|
+ this.otherSavePopupItem(true);
|
|
},
|
|
},
|
|
|
|
|
|
// common
|
|
// common
|