|
@@ -192,8 +192,8 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@if(@$note)
|
|
@if(@$note)
|
|
- <div class="" v-if="!currentPrescription.has_hcp_pro_signed">
|
|
|
|
- <a href="#" class="d-block mb-1" v-on:click.prevent="setAddMode('existing')">+ Existing</a>
|
|
|
|
|
|
+ <div class="d-flex align-items-center mt-3" v-if="!currentPrescription.has_hcp_pro_signed">
|
|
|
|
+ <a href="#" class="d-block mb-1 mr-2" v-on:click.prevent="setAddMode('existing')">+ Existing</a>
|
|
<a href="#" class="d-block mb-1" v-on:click.prevent="setAddMode('new')">+ New</a>
|
|
<a href="#" class="d-block mb-1" v-on:click.prevent="setAddMode('new')">+ New</a>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
@@ -374,11 +374,13 @@
|
|
</div>
|
|
</div>
|
|
<div class="pb-2 d-flex align-items-start" v-if="currentPrescription.has_hcp_pro_signed">
|
|
<div class="pb-2 d-flex align-items-start" v-if="currentPrescription.has_hcp_pro_signed">
|
|
<span class="min-width-140px text-secondary text-sm">PDF</span>
|
|
<span class="min-width-140px text-secondary text-sm">PDF</span>
|
|
- <div class="">
|
|
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
<a class="pdf-viewer-trigger d-block mb-1" native target="_blank"
|
|
<a class="pdf-viewer-trigger d-block mb-1" native target="_blank"
|
|
:href="'/prescription-download-as-pdf/' + currentPrescription.uid">View</a>
|
|
:href="'/prescription-download-as-pdf/' + currentPrescription.uid">View</a>
|
|
|
|
+ <span class="mx-2 text-sm text-secondary">|</span>
|
|
<a native target="_blank" class="d-block mb-1"
|
|
<a native target="_blank" class="d-block mb-1"
|
|
:href="'/prescription-download-as-pdf/' + currentPrescription.uid">Download</a>
|
|
:href="'/prescription-download-as-pdf/' + currentPrescription.uid">Download</a>
|
|
|
|
+ <span class="mx-2 text-sm text-secondary">|</span>
|
|
<a href="#" class="d-block mb-1"
|
|
<a href="#" class="d-block mb-1"
|
|
v-on:click.prevent="transmit(currentPrescription)">Transmit</a>
|
|
v-on:click.prevent="transmit(currentPrescription)">Transmit</a>
|
|
</div>
|
|
</div>
|
|
@@ -819,6 +821,7 @@ GROUP BY erx_category");
|
|
showStagPopup('new-prescription-popup-' + _type, true);
|
|
showStagPopup('new-prescription-popup-' + _type, true);
|
|
$('[stag-popup-key="new-prescription-popup-' + _type + '"] [stag-suggest-initialized]').removeAttr('stag-suggest-initialized');
|
|
$('[stag-popup-key="new-prescription-popup-' + _type + '"] [stag-suggest-initialized]').removeAttr('stag-suggest-initialized');
|
|
initStagSuggest();
|
|
initStagSuggest();
|
|
|
|
+ this.initICDAutoSuggest();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
@@ -839,6 +842,12 @@ GROUP BY erx_category");
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addTest: function(_item) {
|
|
addTest: function(_item) {
|
|
|
|
+ for (let i = 0; i < _item.tests.length; i++) {
|
|
|
|
+ if(!_item.tests[i].desc) {
|
|
|
|
+ toastr.error('One or more existing tests are empty/invalid!');
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
_item.tests.push({
|
|
_item.tests.push({
|
|
desc: ''
|
|
desc: ''
|
|
});
|
|
});
|
|
@@ -847,7 +856,14 @@ GROUP BY erx_category");
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addICD: function(_item) {
|
|
addICD: function(_item) {
|
|
|
|
+ for (let i = 0; i < _item.icds.length; i++) {
|
|
|
|
+ if(!_item.icds[i].code) {
|
|
|
|
+ toastr.error('One or more existing icds are empty/invalid!');
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
_item.icds.push({
|
|
_item.icds.push({
|
|
|
|
+ code: '',
|
|
desc: ''
|
|
desc: ''
|
|
});
|
|
});
|
|
Vue.nextTick(() => {
|
|
Vue.nextTick(() => {
|
|
@@ -1387,6 +1403,8 @@ GROUP BY erx_category");
|
|
this.currentPrescription = temp;
|
|
this.currentPrescription = temp;
|
|
this.setCurrentPrescription(temp);
|
|
this.setCurrentPrescription(temp);
|
|
|
|
|
|
|
|
+ showMask();
|
|
|
|
+
|
|
// save erx
|
|
// save erx
|
|
$.post('/api/erx/updateClinicalDetail', {
|
|
$.post('/api/erx/updateClinicalDetail', {
|
|
uid: this.currentPrescription.uid,
|
|
uid: this.currentPrescription.uid,
|
|
@@ -1498,6 +1516,8 @@ GROUP BY erx_category");
|
|
refills: form.find('[name="refills"]').val(),
|
|
refills: form.find('[name="refills"]').val(),
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ showMask();
|
|
|
|
+
|
|
$.post(form.attr('action'), form.serialize(), _data => {
|
|
$.post(form.attr('action'), form.serialize(), _data => {
|
|
if (!hasResponseError(_data)) {
|
|
if (!hasResponseError(_data)) {
|
|
hideMask();
|
|
hideMask();
|
|
@@ -1545,7 +1565,8 @@ GROUP BY erx_category");
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
|
|
itemIndex = $(this).attr('data-item-index'),
|
|
itemIndex = $(this).attr('data-item-index'),
|
|
icdIndex = $(this).attr('data-icd-index'),
|
|
icdIndex = $(this).attr('data-icd-index'),
|
|
- category = $(this).attr('data-category');
|
|
|
|
|
|
+ category = $(this).attr('data-category'),
|
|
|
|
+ existing = $(this).closest('[stag-popup-key]').length === 0;
|
|
$(elem).attr('id', dynID);
|
|
$(elem).attr('id', dynID);
|
|
new window.Def.Autocompleter.Search(dynID,
|
|
new window.Def.Autocompleter.Search(dynID,
|
|
'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
|
|
'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
|
|
@@ -1556,8 +1577,14 @@ GROUP BY erx_category");
|
|
);
|
|
);
|
|
window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
|
|
window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
|
|
let autocomp = elem.autocomp, acData = autocomp.getSelectedItemData();
|
|
let autocomp = elem.autocomp, acData = autocomp.getSelectedItemData();
|
|
- self['currentPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].code = acData[0].code;
|
|
|
|
- self['currentPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].desc = acData[0].data['name'];
|
|
|
|
|
|
+ if(existing) {
|
|
|
|
+ self['currentPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].code = acData[0].code;
|
|
|
|
+ self['currentPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].desc = acData[0].data['name'];
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ self['newPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].code = acData[0].code;
|
|
|
|
+ self['newPrescription_' + category].clinicalDetailJson.items[itemIndex].icds[icdIndex].desc = acData[0].data['name'];
|
|
|
|
+ }
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
$(elem).attr('ac-initialized', 1);
|
|
$(elem).attr('ac-initialized', 1);
|