|
@@ -26,7 +26,7 @@
|
|
<a href="#" v-on:click.prevent="newERx('OTHER')">+ Other</a>
|
|
<a href="#" v-on:click.prevent="newERx('OTHER')">+ Other</a>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
- <div class="d-flex align-items-start">
|
|
|
|
|
|
+ <div class="d-flex align-items-start bg-white">
|
|
<table class="table table-striped table-sm table-bordered mb-0 flex-grow-1">
|
|
<table class="table table-striped table-sm table-bordered mb-0 flex-grow-1">
|
|
<thead>
|
|
<thead>
|
|
<tr>
|
|
<tr>
|
|
@@ -147,15 +147,26 @@
|
|
<div class="d-inline-flex align-items-baseline flex-grow-1">
|
|
<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="editClinicalDetails(currentPrescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
|
|
<a v-if="!currentPrescription.has_hcp_pro_signed" class="mr-2" href="#" v-on:click.prevent="editClinicalDetails(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>
|
|
<span v-else class="mr-2" title="Cannot edit. Prescription already signed."><i class="fa fa-edit on-hover-opaque text-secondary"></i></span>
|
|
- <div v-if="currentPrescription.clinical_detail_json" class="d-inline-flex align-items-baseline">
|
|
|
|
|
|
+ <div v-if="currentPrescription.clinical_detail_json" class="d-inline-flex align-items-baseline flex-grow-1">
|
|
<div class="" v-if="currentPrescription.erx_category === 'DRUG'">
|
|
<div class="" v-if="currentPrescription.erx_category === 'DRUG'">
|
|
<div class="d-flex align-items-baseline mb-1" v-for="drug in currentPrescription.clinical_detail_json.items">
|
|
<div class="d-flex align-items-baseline mb-1" v-for="drug in currentPrescription.clinical_detail_json.items">
|
|
<b class="mr-2">@{{drug.medication ?? '-'}}</b>
|
|
<b class="mr-2">@{{drug.medication ?? '-'}}</b>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'LAB' || currentPrescription.erx_category === 'IMAGING'">
|
|
|
|
- <div class="d-flex align-items-baseline mb-1" v-for="test in currentPrescription.clinical_detail_json.tests">
|
|
|
|
- <b class="mr-2">@{{test ?? '-'}}</b>
|
|
|
|
|
|
+ <div v-if="currentPrescription.erx_category === 'LAB' || currentPrescription.erx_category === 'IMAGING'" class="flex-grow-1">
|
|
|
|
+ <div class="border bg-light mb-1 px-2 py-1 flex-grow-1" v-for="item in currentPrescription.clinical_detail_json.items">
|
|
|
|
+ <div class="d-flex align-items-baseline mb-1">
|
|
|
|
+ <span class="text-secondary mr-2">Tests:</span>
|
|
|
|
+ <span class="flex-grow-1">
|
|
|
|
+ <b v-for="test in item.tests" class="mr-2">@{{ test.desc }}</b>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
|
+ <span class="text-secondary mr-2">ICDs:</span>
|
|
|
|
+ <span class="flex-grow-1">
|
|
|
|
+ <b v-for="icd in item.icds" class="mr-2">@{{ icd.code }}</b>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'REFERRAL'">
|
|
<div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'REFERRAL'">
|
|
@@ -472,9 +483,21 @@ GROUP BY erx_category");
|
|
hcpProUid: '{{$pro->uid}}',
|
|
hcpProUid: '{{$pro->uid}}',
|
|
erxCategory: 'LAB',
|
|
erxCategory: 'LAB',
|
|
clinicalDetailJson: {
|
|
clinicalDetailJson: {
|
|
- test: '',
|
|
|
|
- icds: '',
|
|
|
|
- memo: '',
|
|
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
currentPrescription_IMAGING: {
|
|
currentPrescription_IMAGING: {
|
|
@@ -484,9 +507,21 @@ GROUP BY erx_category");
|
|
hcpProUid: '{{$pro->uid}}',
|
|
hcpProUid: '{{$pro->uid}}',
|
|
erxCategory: 'IMAGING',
|
|
erxCategory: 'IMAGING',
|
|
clinicalDetailJson: {
|
|
clinicalDetailJson: {
|
|
- test: '',
|
|
|
|
- icds: '',
|
|
|
|
- memo: '',
|
|
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
currentPrescription_REFERRAL: {
|
|
currentPrescription_REFERRAL: {
|
|
@@ -606,6 +641,100 @@ GROUP BY erx_category");
|
|
}, 'json');
|
|
}, 'json');
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
|
|
+ addTestSet: function() {
|
|
|
|
+ this['currentPrescription_' + this.currentPrescriptionType].clinicalDetailJson.items.push({
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ addTest: function(_item) {
|
|
|
|
+ _item.tests.push({
|
|
|
|
+ desc: ''
|
|
|
|
+ });
|
|
|
|
+ Vue.nextTick(() => {
|
|
|
|
+ this.initICDAutoSuggest();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ addICD: function(_item) {
|
|
|
|
+ _item.icds.push({
|
|
|
|
+ desc: ''
|
|
|
|
+ });
|
|
|
|
+ Vue.nextTick(() => {
|
|
|
|
+ this.initICDAutoSuggest();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ deleteTest: function(_item, _index) {
|
|
|
|
+ _item.tests.splice(_index, 1);
|
|
|
|
+ },
|
|
|
|
+ deleteICD: function(_item, _index) {
|
|
|
|
+ _item.icds.splice(_index, 1);
|
|
|
|
+ },
|
|
|
|
+ getBlankPrescriptionClinicalData: function(_type) {
|
|
|
|
+ let data = null;
|
|
|
|
+ switch (_type) {
|
|
|
|
+ case 'DRUG':
|
|
|
|
+ data = {
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ medication: '',
|
|
|
|
+ dispense: '',
|
|
|
|
+ refills: '',
|
|
|
|
+ purpose: ''
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ case 'LAB':
|
|
|
|
+ case 'IMAGING':
|
|
|
|
+ data = {
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ case 'REFERRAL':
|
|
|
|
+ data = {
|
|
|
|
+ to: '',
|
|
|
|
+ memo: '',
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ case 'SUPPLY':
|
|
|
|
+ data = {
|
|
|
|
+ item: '',
|
|
|
|
+ quantity: '',
|
|
|
|
+ memo: '',
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ case 'OTHER':
|
|
|
|
+ data = {
|
|
|
|
+ title: '',
|
|
|
|
+ memo: '',
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
|
|
// new/edit/save-clinical
|
|
// new/edit/save-clinical
|
|
newPrescription: function(_type) {
|
|
newPrescription: function(_type) {
|
|
@@ -632,7 +761,6 @@ GROUP BY erx_category");
|
|
};
|
|
};
|
|
break;
|
|
break;
|
|
case 'LAB':
|
|
case 'LAB':
|
|
- case 'IMAGING':
|
|
|
|
this.currentPrescription_LAB = {
|
|
this.currentPrescription_LAB = {
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
@@ -640,14 +768,52 @@ GROUP BY erx_category");
|
|
hcpProUid: '{{$pro->uid}}',
|
|
hcpProUid: '{{$pro->uid}}',
|
|
erxCategory: _type,
|
|
erxCategory: _type,
|
|
clinicalDetailJson: {
|
|
clinicalDetailJson: {
|
|
- test: '',
|
|
|
|
- icds: '',
|
|
|
|
- memo: '',
|
|
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ break;
|
|
|
|
+ case 'IMAGING':
|
|
|
|
+ this.currentPrescription_IMAGING = {
|
|
|
|
+ noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
|
|
+ clientUid: '{{ $patient->uid }}',
|
|
|
|
+ replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
|
|
+ hcpProUid: '{{$pro->uid}}',
|
|
|
|
+ erxCategory: _type,
|
|
|
|
+ clinicalDetailJson: {
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ tests: [
|
|
|
|
+ {
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ icds: [
|
|
|
|
+ {
|
|
|
|
+ code: '',
|
|
|
|
+ desc: '',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
};
|
|
};
|
|
break;
|
|
break;
|
|
case 'REFERRAL':
|
|
case 'REFERRAL':
|
|
- this.currentPrescription_LAB = {
|
|
|
|
|
|
+ this.currentPrescription_REFERRAL = {
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
@@ -660,7 +826,7 @@ GROUP BY erx_category");
|
|
};
|
|
};
|
|
break;
|
|
break;
|
|
case 'SUPPLY':
|
|
case 'SUPPLY':
|
|
- this.currentPrescription_LAB = {
|
|
|
|
|
|
+ this.currentPrescription_SUPPLY = {
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
@@ -674,7 +840,7 @@ GROUP BY erx_category");
|
|
};
|
|
};
|
|
break;
|
|
break;
|
|
case 'OTHER':
|
|
case 'OTHER':
|
|
- this.currentPrescription_LAB = {
|
|
|
|
|
|
+ this.currentPrescription_OTHER = {
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
noteUid: '{{ @$note ? $note->uid : '' }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
clientUid: '{{ $patient->uid }}',
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
|
|
@@ -703,10 +869,7 @@ GROUP BY erx_category");
|
|
uid: _prescription.uid,
|
|
uid: _prescription.uid,
|
|
clinicalDetailJson: _prescription.clinical_detail_json ?
|
|
clinicalDetailJson: _prescription.clinical_detail_json ?
|
|
JSON.parse(JSON.stringify(_prescription.clinical_detail_json)) :
|
|
JSON.parse(JSON.stringify(_prescription.clinical_detail_json)) :
|
|
- {
|
|
|
|
- tests: [''],
|
|
|
|
- icds: ['']
|
|
|
|
- }
|
|
|
|
|
|
+ this.getBlankPrescriptionClinicalData(this.currentPrescriptionType)
|
|
};
|
|
};
|
|
Vue.nextTick(() => {
|
|
Vue.nextTick(() => {
|
|
showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
|
|
showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
|
|
@@ -1190,19 +1353,14 @@ GROUP BY erx_category");
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- addICD: function(_category) {
|
|
|
|
- this['currentPrescription_' + _category].clinicalDetailJson.icds.push('');
|
|
|
|
- Vue.nextTick(() => {
|
|
|
|
- this.initICDAutoSuggest();
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
initICDAutoSuggest: function() {
|
|
initICDAutoSuggest: function() {
|
|
let self = this;
|
|
let self = this;
|
|
let parentSegment = $('#prescriptions-{{$patient->id}}');
|
|
let parentSegment = $('#prescriptions-{{$patient->id}}');
|
|
parentSegment.find('input[type="text"][data-field="icd"]:not([ac-initialized])').each(function() {
|
|
parentSegment.find('input[type="text"][data-field="icd"]:not([ac-initialized])').each(function() {
|
|
var elem = this,
|
|
var elem = this,
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
|
|
- vueIndex = $(this).attr('data-index'),
|
|
|
|
|
|
+ itemIndex = $(this).attr('data-item-index'),
|
|
|
|
+ icdIndex = $(this).attr('data-icd-index'),
|
|
category = $(this).attr('data-category');
|
|
category = $(this).attr('data-category');
|
|
$(elem).attr('id', dynID);
|
|
$(elem).attr('id', dynID);
|
|
new window.Def.Autocompleter.Search(dynID,
|
|
new window.Def.Autocompleter.Search(dynID,
|
|
@@ -1214,9 +1372,8 @@ 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.data['next_cc']['list'][vueIndex].icd = acData[0].code;
|
|
|
|
- // self.data['next_cc']['list'][vueIndex].memo = acData[0].data['name'];
|
|
|
|
- self['currentPrescription_' + category].clinicalDetailJson.icds[vueIndex] = acData[0].code;
|
|
|
|
|
|
+ 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'];
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
$(elem).attr('ac-initialized', 1);
|
|
$(elem).attr('ac-initialized', 1);
|