|
@@ -270,7 +270,10 @@
|
|
|
|
|
|
<hr class="my-3">
|
|
|
<div class="pb-2 d-flex align-items-center">
|
|
|
- <span class="min-width-140px text-secondary text-sm">Logistics</span>
|
|
|
+ <span v-if="currentPrescription.erx_category === 'DRUG'" class="min-width-140px text-secondary text-sm">Pharmacy</span>
|
|
|
+ <span v-else-if="currentPrescription.erx_category === 'LAB'" class="min-width-140px text-secondary text-sm">Lab</span>
|
|
|
+ <span v-else-if="currentPrescription.erx_category === 'IMAGING'" class="min-width-140px text-secondary text-sm">Lab</span>
|
|
|
+ <span v-else class="min-width-140px text-secondary text-sm">Logistics</span>
|
|
|
<div class="d-inline-flex align-items-baseline flex-grow-1">
|
|
|
<a class="mr-2" href="#" v-on:click.prevent="editLogisticsDetails(currentPrescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
<div v-if="currentPrescription.logistics_detail_json" class="d-flex align-items-baseline">
|
|
@@ -284,7 +287,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="pb-2 d-flex align-items-center">
|
|
|
- <span class="min-width-140px text-secondary text-sm">HCP Pro</span>
|
|
|
+ <span class="min-width-140px text-secondary text-sm">Prescribed By</span>
|
|
|
<div class="d-inline-flex align-items-baseline flex-grow-1">
|
|
|
<a v-if="!currentPrescription.has_hcp_pro_signed" class="mr-2" href="#" v-on:click.prevent="editHcpPro(currentPrescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
<span v-else class="mr-2" title="Cannot edit. Prescription already signed."><i class="fa fa-edit on-hover-opaque text-secondary"></i></span>
|
|
@@ -305,7 +308,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="pb-2 d-flex align-items-center">
|
|
|
- <span class="min-width-140px text-secondary text-sm">Pro Status</span>
|
|
|
+ <span class="min-width-140px text-secondary text-sm">Prescription Status</span>
|
|
|
<div class="d-inline-flex align-items-baseline">
|
|
|
<a class="mr-2" href="#" v-on:click.prevent="editProStatus(currentPrescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
|
<div v-if="currentPrescription.pro_declared_status" class="d-flex align-items-baseline">
|
|
@@ -906,7 +909,7 @@ GROUP BY erx_category");
|
|
|
_numPages = 1;
|
|
|
_page = 1;
|
|
|
|
|
|
- $('#transmit-pdf-preview>canvas').remove();
|
|
|
+ $('#pp-transmit-pdf-preview>canvas').remove();
|
|
|
|
|
|
let url = _url;
|
|
|
let pdfjsLib = window['pdfjs-dist/build/pdf'];
|
|
@@ -928,7 +931,7 @@ GROUP BY erx_category");
|
|
|
// create canvas
|
|
|
let canvasElement = $('<canvas/>')
|
|
|
.addClass('pdf-viewer-page pdf-preview-page')
|
|
|
- .appendTo('#transmit-pdf-preview');
|
|
|
+ .appendTo('#pp-transmit-pdf-preview');
|
|
|
|
|
|
let canvas = canvasElement[0];
|
|
|
let viewport = page.getViewport({scale: 0.75});
|
|
@@ -995,17 +998,29 @@ GROUP BY erx_category");
|
|
|
return true;
|
|
|
},
|
|
|
addExistingDrugToERx: function(_uid) {
|
|
|
+ let existing = this.existingDrugs.filter(_x => {
|
|
|
+ return _x.uid === _uid;
|
|
|
+ });
|
|
|
+ if(!existing || !existing.length) return false;
|
|
|
+ existing = existing[0];
|
|
|
+
|
|
|
+ // require dispense and refills
|
|
|
+ if(!existing.data.dispense) {
|
|
|
+ toastr.error('Dispense cannot be blank');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!existing.data.refills) {
|
|
|
+ toastr.error('Refills cannot be blank');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if(!this.currentPrescription.clinical_detail_json) {
|
|
|
this.currentPrescription.clinical_detail_json = {};
|
|
|
}
|
|
|
if(!this.currentPrescription.clinical_detail_json.items) {
|
|
|
this.currentPrescription.clinical_detail_json.items = [];
|
|
|
}
|
|
|
- let existing = this.existingDrugs.filter(_x => {
|
|
|
- return _x.uid === _uid;
|
|
|
- });
|
|
|
- if(!existing || !existing.length) return false;
|
|
|
- existing = existing[0];
|
|
|
+
|
|
|
this.currentPrescription.clinical_detail_json.items.push({
|
|
|
medication: existing.data.name,
|
|
|
dispense: existing.data.dispense,
|