|
@@ -2,19 +2,19 @@
|
|
|
|
|
|
@section('inner-content')
|
|
@section('inner-content')
|
|
<div id="prescriptions-{{$patient->id}}">
|
|
<div id="prescriptions-{{$patient->id}}">
|
|
- <div class="d-flex align-items-baseline pt-2">
|
|
|
|
|
|
+ <div class="d-flex align-items-baseline py-2">
|
|
<h6 class="my-0 font-weight-bold text-secondary font-size-14">Prescriptions</h6>
|
|
<h6 class="my-0 font-weight-bold text-secondary font-size-14">Prescriptions</h6>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('DRUG')">+ Drug</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('DRUG')">+ Drug</a>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('LAB')">+ Lab</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('LAB')">+ Lab</a>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('IMAGING')">+ Imaging</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('IMAGING')">+ Imaging</a>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('REFERRAL')">+ Referral</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('REFERRAL')">+ Referral</a>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('SUPPLY')">+ Supply</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('SUPPLY')">+ Supply</a>
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
|
|
|
+ <span class="mx-2 text-secondary on-hover-opaque">|</span>
|
|
<a href="#" v-on:click.prevent="newPrescription('OTHER')">+ Other</a>
|
|
<a href="#" v-on:click.prevent="newPrescription('OTHER')">+ Other</a>
|
|
</div>
|
|
</div>
|
|
<table class="table table-striped table-sm table-bordered mt-2 mb-0">
|
|
<table class="table table-striped table-sm table-bordered mt-2 mb-0">
|
|
@@ -98,8 +98,23 @@
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
- <td class="px-2">@{{prescription.pro_declared_status}}</td>
|
|
|
|
- <td class="px-2">@{{prescription.client_declared_status}}</td>
|
|
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
|
+ <a class="mr-2" href="#" v-on:click.prevent="editProStatus(prescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
|
+ <div v-if="prescription.pro_declared_status" class="d-flex align-items-baseline">
|
|
|
|
+ @{{ sanitizeStatus(prescription.pro_declared_status) }}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>-</div>
|
|
|
|
+ </div>
|
|
|
|
+ <td class="px-2">
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
|
+ <a class="mr-2" href="#" v-on:click.prevent="editClientStatus(prescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
|
+ <div v-if="prescription.client_declared_status" class="d-flex align-items-baseline">
|
|
|
|
+ @{{ sanitizeStatus(prescription.client_declared_status) }}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>-</div>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
<td class="px-2"></td>
|
|
<td class="px-2"></td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
@@ -113,6 +128,8 @@
|
|
@include('app.patient.prescriptions.logistics-form')
|
|
@include('app.patient.prescriptions.logistics-form')
|
|
@include('app.patient.prescriptions.hcp-pro-form')
|
|
@include('app.patient.prescriptions.hcp-pro-form')
|
|
@include('app.patient.prescriptions.sign-as-hcp-form')
|
|
@include('app.patient.prescriptions.sign-as-hcp-form')
|
|
|
|
+ @include('app.patient.prescriptions.pro-status-form')
|
|
|
|
+ @include('app.patient.prescriptions.client-status-form')
|
|
</div>
|
|
</div>
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
@@ -432,7 +449,7 @@
|
|
}, 'json');
|
|
}, 'json');
|
|
},
|
|
},
|
|
|
|
|
|
- // edit sign
|
|
|
|
|
|
+ // sign
|
|
signAsHcpPro: function(_prescription) {
|
|
signAsHcpPro: function(_prescription) {
|
|
this.currentPrescriptionAction = 'SIGN_AS_HCP';
|
|
this.currentPrescriptionAction = 'SIGN_AS_HCP';
|
|
this.currentPrescriptionType = _prescription.erx_category;
|
|
this.currentPrescriptionType = _prescription.erx_category;
|
|
@@ -456,21 +473,60 @@
|
|
},
|
|
},
|
|
|
|
|
|
// edit pro status
|
|
// edit pro status
|
|
- editHcpProStatus: function(_prescription) {
|
|
|
|
-
|
|
|
|
|
|
+ editProStatus: function(_prescription) {
|
|
|
|
+ this.currentPrescriptionAction = 'EDIT_PRO_DECLARED_STATUS';
|
|
|
|
+ this.currentPrescriptionType = _prescription.erx_category;
|
|
|
|
+ this.currentPrescriptionProStatus = {
|
|
|
|
+ uid: _prescription.uid,
|
|
|
|
+ status: _prescription.pro_declared_status,
|
|
|
|
+ memo: _prescription.pro_declared_status_memo,
|
|
|
|
+ };
|
|
|
|
+ Vue.nextTick(() => {
|
|
|
|
+ showStagPopup('pro-status-popup', true);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- saveHcpProStatus: function() {
|
|
|
|
-
|
|
|
|
|
|
+ saveProStatus: function() {
|
|
|
|
+ let payload = JSON.parse(JSON.stringify(this.currentPrescriptionProStatus));
|
|
|
|
+ $.post('/api/erx/updateProDeclaredStatus', payload, _data => {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ toastr.success('Pro declared status updated');
|
|
|
|
+ closeStagPopup();
|
|
|
|
+ fastReload();
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
},
|
|
},
|
|
|
|
|
|
- // edit sign
|
|
|
|
- editHcpClientStatus: function(_prescription) {
|
|
|
|
-
|
|
|
|
|
|
+ // edit client status
|
|
|
|
+ editClientStatus: function(_prescription) {
|
|
|
|
+ this.currentPrescriptionAction = 'EDIT_CLIENT_DECLARED_STATUS';
|
|
|
|
+ this.currentPrescriptionType = _prescription.erx_category;
|
|
|
|
+ this.currentPrescriptionClientStatus = {
|
|
|
|
+ uid: _prescription.uid,
|
|
|
|
+ status: _prescription.client_declared_status,
|
|
|
|
+ memo: _prescription.client_declared_status_memo,
|
|
|
|
+ };
|
|
|
|
+ Vue.nextTick(() => {
|
|
|
|
+ showStagPopup('client-status-popup', true);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- saveHcpClientStatus: function() {
|
|
|
|
-
|
|
|
|
|
|
+ saveClientStatus: function() {
|
|
|
|
+ let payload = JSON.parse(JSON.stringify(this.currentPrescriptionClientStatus));
|
|
|
|
+ $.post('/api/erx/updateClientDeclaredStatus', payload, _data => {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ toastr.success('Client declared status updated');
|
|
|
|
+ closeStagPopup();
|
|
|
|
+ fastReload();
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // sane display status
|
|
|
|
+ sanitizeStatus: function(_s) {
|
|
|
|
+ _s = _s.toLowerCase().replaceAll('_', ' ');
|
|
|
|
+ _s = _s[0].toUpperCase() + _s.substr(1);
|
|
|
|
+ return _s;
|
|
|
|
+ }
|
|
|
|
+
|
|
// cancel, etc.
|
|
// cancel, etc.
|
|
|
|
|
|
},
|
|
},
|