|
@@ -78,7 +78,12 @@
|
|
|
<div v-else>-</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td class="px-2">@{{prescription.hcpProDisplayName}}</td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
+ <a class="mr-2" href="#" v-on:click.prevent="editHcpPro(prescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
+ <div>@{{prescription.hcpProDisplayName}}</div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td class="px-2"></td>
|
|
|
<td class="px-2">@{{prescription.pro_declared_status}}</td>
|
|
|
<td class="px-2">@{{prescription.client_declared_status}}</td>
|
|
@@ -93,6 +98,7 @@
|
|
|
@include('app.patient.prescriptions.supply-form')
|
|
|
@include('app.patient.prescriptions.other-form')
|
|
|
@include('app.patient.prescriptions.logistics-form')
|
|
|
+ @include('app.patient.prescriptions.hcp-pro-form')
|
|
|
</div>
|
|
|
<script>
|
|
|
(function() {
|
|
@@ -108,12 +114,13 @@
|
|
|
}
|
|
|
$prescription->created_at_friendly = friendlier_date_time($prescription->created_at);
|
|
|
$prescription->hcpProDisplayName = $prescription->hcpPro ? $prescription->hcpPro->displayName() : '-';
|
|
|
+ $prescription->hcpProUid = $prescription->hcpPro ? $prescription->hcpPro->uid : '';
|
|
|
}
|
|
|
?>
|
|
|
|
|
|
function init() {
|
|
|
|
|
|
- new Vue({
|
|
|
+ window.booApp = new Vue({
|
|
|
el: '#prescriptions-{{$patient->id}}',
|
|
|
delimiters: ['@{{', '}}'],
|
|
|
data: {
|
|
@@ -121,6 +128,8 @@
|
|
|
|
|
|
currentPrescriptionAction: '',
|
|
|
currentPrescriptionType: '',
|
|
|
+
|
|
|
+ // for editing clinical details
|
|
|
currentPrescription_DRUG: {
|
|
|
noteUid: null, // TODO: this won't be null if created from a note
|
|
|
clientUid: '{{ $patient->uid }}',
|
|
@@ -197,7 +206,7 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+ // for editing logistics - common
|
|
|
currentPrescriptionLogistics: {
|
|
|
uid: '',
|
|
|
logisticsDetailJson: {
|
|
@@ -209,7 +218,27 @@
|
|
|
facilityFax: '',
|
|
|
facilityZip: '',
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ // for editing hcp, sign, pro status & client status - common
|
|
|
+ currentPrescriptionHcpPro: {
|
|
|
+ uid: '',
|
|
|
+ newHcpProUid: '',
|
|
|
+ },
|
|
|
+ currentPrescriptionSign: {
|
|
|
+ uid: '',
|
|
|
+ declaredVersionNumber: '',
|
|
|
+ },
|
|
|
+ currentPrescriptionProStatus: {
|
|
|
+ uid: '',
|
|
|
+ status: '',
|
|
|
+ memo: '',
|
|
|
+ },
|
|
|
+ currentPrescriptionClientStatus: {
|
|
|
+ uid: '',
|
|
|
+ status: '',
|
|
|
+ memo: '',
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -362,13 +391,65 @@
|
|
|
fastReload();
|
|
|
}
|
|
|
}, 'json');
|
|
|
- }
|
|
|
+ },
|
|
|
|
|
|
// edit hcp (ordering) pro
|
|
|
+ editHcpPro: function(_prescription) {
|
|
|
+ this.currentPrescriptionAction = 'EDIT_HCP_PRO';
|
|
|
+ this.currentPrescriptionType = _prescription.erx_category;
|
|
|
+ this.currentPrescriptionHcpPro = {
|
|
|
+ uid: _prescription.uid,
|
|
|
+ newHcpProUid: _prescription.hcpProUid
|
|
|
+ };
|
|
|
+ Vue.nextTick(() => {
|
|
|
+ showStagPopup('hcp-pro-popup', true);
|
|
|
+ $('.erx-hcp-pro-select').removeAttr('pro-suggest-initialized');
|
|
|
+ initProSuggest();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saveHcpPro: function() {
|
|
|
+ let payload = JSON.parse(JSON.stringify(this.currentPrescriptionHcpPro));
|
|
|
+ $.post('/api/erx/updateHcpPro', payload, _data => {
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
+ toastr.success('HCP Pro updated');
|
|
|
+ closeStagPopup();
|
|
|
+ fastReload();
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ },
|
|
|
+
|
|
|
+ // edit sign
|
|
|
+ editHcpProSign: function(_prescription) {
|
|
|
+
|
|
|
+ },
|
|
|
+ saveHcpProSign: function() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ // edit pro status
|
|
|
+ editHcpProStatus: function(_prescription) {
|
|
|
+
|
|
|
+ },
|
|
|
+ saveHcpProStatus: function() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ // edit sign
|
|
|
+ editHcpClientStatus: function(_prescription) {
|
|
|
+
|
|
|
+ },
|
|
|
+ saveHcpClientStatus: function() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ // cancel, etc.
|
|
|
|
|
|
},
|
|
|
mounted: function() {
|
|
|
-
|
|
|
+ let self = this;
|
|
|
+ $(document).on('pro-changed', '.erx-hcp-pro-select', function() {
|
|
|
+ self.currentPrescriptionHcpPro.newHcpProUid = this.value;
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|