|
@@ -30,7 +30,7 @@
|
|
|
<tr v-for="(item, index) in allergies">
|
|
|
<td class="p-0 position-relative">
|
|
|
<input type="text" class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-allergy-suggest-search :fdb-suggest-group="index">
|
|
|
+ fdb-allergy-suggest-search :fdb-suggest-group="index" :data-index="index">
|
|
|
</td>
|
|
|
<td class="text-center">
|
|
|
<a href="#" v-on:click.prevent="allergies.splice(index, 1)"><i class="fa fa-trash-alt text-danger"></i></a>
|
|
@@ -57,7 +57,7 @@
|
|
|
<tr v-for="(item, index) in dx">
|
|
|
<td class="p-0 position-relative">
|
|
|
<input type="text" class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-dx-suggest-search :fdb-suggest-group="index">
|
|
|
+ fdb-dx-suggest-search :fdb-suggest-group="index" :data-index="index">
|
|
|
</td>
|
|
|
<td class="text-center">
|
|
|
<a href="#" v-on:click.prevent="dx.splice(index, 1)"><i class="fa fa-trash-alt text-danger"></i></a>
|
|
@@ -68,7 +68,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="bg-white p-3 border">
|
|
|
+ <div class="bg-white p-3 mb-3 border">
|
|
|
<div class="d-flex align-items-baseline mb-2">
|
|
|
<span class="font-size-14 font-weight-bold">Medications</span>
|
|
|
<a href="#" v-on:click.prevent="addRx()" class="ml-3">+ Add</a>
|
|
@@ -91,23 +91,23 @@
|
|
|
<tr v-for="(item, index) in rx">
|
|
|
<td class="p-0 position-relative">
|
|
|
<input type="text" class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-med-suggest-search :fdb-suggest-group="index">
|
|
|
+ fdb-med-suggest-search :fdb-suggest-group="index" :data-index="index">
|
|
|
</td>
|
|
|
<td class="p-0 position-relative">
|
|
|
<select class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-med-suggest-route :fdb-suggest-group="index"
|
|
|
+ fdb-med-suggest-route :fdb-suggest-group="index" v-model="item.routed_med_id"
|
|
|
disabled>
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="p-0 position-relative">
|
|
|
<select class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-med-suggest-dosage :fdb-suggest-group="index"
|
|
|
+ fdb-med-suggest-dosage :fdb-suggest-group="index" v-model="item.routed_dosage_form_med_id"
|
|
|
disabled>
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="p-0 position-relative">
|
|
|
<select class="rounded-0 border-0 form-control form-control-sm min-width-unset"
|
|
|
- fdb-med-suggest-strength :fdb-suggest-group="index"
|
|
|
+ fdb-med-suggest-strength :fdb-suggest-group="index" v-model="item.gcn_seqno"
|
|
|
disabled>
|
|
|
</select>
|
|
|
</td>
|
|
@@ -131,6 +131,23 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-6">
|
|
|
+ <div class="bg-white p-3 border">
|
|
|
+ <div class="d-flex align-items-baseline mb-2">
|
|
|
+ <span class="font-size-14 font-weight-bold">Drug Allergy Notes</span>
|
|
|
+ </div>
|
|
|
+ <div class="drug-allergies"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-6 pl-0">
|
|
|
+ <div class="bg-white p-3 border">
|
|
|
+ <div class="d-flex align-items-baseline mb-2">
|
|
|
+ <span class="font-size-14 font-weight-bold">Drug Drug Interaction Notes</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -267,7 +284,7 @@
|
|
|
|
|
|
addMCInitializer('fdb-pg', function() {
|
|
|
|
|
|
- new Vue({
|
|
|
+ window.fdbPGApp = new Vue({
|
|
|
el: '#fdb-pg',
|
|
|
delimiters: ['@{{', '}}'],
|
|
|
data: {
|
|
@@ -375,6 +392,8 @@
|
|
|
},
|
|
|
mounted: function() {
|
|
|
|
|
|
+ let vueApp = this;
|
|
|
+
|
|
|
// on auto-suggest med selection
|
|
|
$(document).off('click', '.suggest-item.fdb-suggest[data-med-name-id]');
|
|
|
$(document).on('click', '.suggest-item.fdb-suggest[data-med-name-id]', function () {
|
|
@@ -392,6 +411,10 @@
|
|
|
input.trigger('input');
|
|
|
input.trigger('change');
|
|
|
|
|
|
+ // vue value
|
|
|
+ vueApp.rx[input.attr('data-index')].rx = label;
|
|
|
+ vueApp.rx[input.attr('data-index')].med_name_id = medNameID;
|
|
|
+
|
|
|
$(document).trigger('fdb-med-changed', [group]);
|
|
|
|
|
|
return false;
|
|
@@ -414,6 +437,10 @@
|
|
|
input.trigger('input');
|
|
|
input.trigger('change');
|
|
|
|
|
|
+ // vue value
|
|
|
+ vueApp.dx[input.attr('data-index')].problem = label;
|
|
|
+ vueApp.dx[input.attr('data-index')].dxid = dxID;
|
|
|
+
|
|
|
$(document).trigger('fdb-dx-changed', [group]);
|
|
|
|
|
|
return false;
|
|
@@ -438,6 +465,11 @@
|
|
|
input.trigger('input');
|
|
|
input.trigger('change');
|
|
|
|
|
|
+ // vue value
|
|
|
+ vueApp.allergies[input.attr('data-index')].allergen = label;
|
|
|
+ vueApp.allergies[input.attr('data-index')].dam_concept_id = damConceptID;
|
|
|
+ vueApp.allergies[input.attr('data-index')].dam_concept_id_typ = damConceptIDTyp;
|
|
|
+
|
|
|
$(document).trigger('fdb-allergy-changed', [group]);
|
|
|
|
|
|
return false;
|
|
@@ -497,7 +529,7 @@
|
|
|
.empty()
|
|
|
.append('<option value="">-- select --</option>');
|
|
|
for (let i = 0; i < _data.length; i++) {
|
|
|
- strengthSelect.append('<option value="' + _data[i].gcn_seqno + '">' + _data[i].med_medid_desc + '</option>')
|
|
|
+ strengthSelect.append('<option data-medid="' + _data[i].medid + '" value="' + _data[i].gcn_seqno + '">' + _data[i].med_medid_desc + '</option>')
|
|
|
}
|
|
|
strengthSelect.prop('disabled', false);
|
|
|
if(_data.length === 1) {
|
|
@@ -509,12 +541,27 @@
|
|
|
// on strength (medid) selection
|
|
|
$(document).off('change', '[fdb-med-suggest-strength]');
|
|
|
$(document).on('change', '[fdb-med-suggest-strength]', function () {
|
|
|
+
|
|
|
+ let group = $(this).attr('fdb-suggest-group');
|
|
|
+ vueApp.rx[group].medid = $(this).find('option:selected').attr('data-medid');
|
|
|
+
|
|
|
fillSideEffects($(this).attr('fdb-suggest-group'), $(this).val());
|
|
|
fillGeriatricPrecautions($(this).attr('fdb-suggest-group'), $(this).val());
|
|
|
fillIndications($(this).attr('fdb-suggest-group'), $(this).val());
|
|
|
|
|
|
let routedMedID = $('[fdb-med-suggest-route][fdb-suggest-group='+$(this).attr('fdb-suggest-group')+']').val();
|
|
|
fillContraindications($(this).attr('fdb-suggest-group'), routedMedID);
|
|
|
+
|
|
|
+ if(vueApp.allergies && vueApp.allergies.length) {
|
|
|
+ $.get('/fdb-drug-allergies', {
|
|
|
+ data: JSON.stringify({
|
|
|
+ allergies: vueApp.allergies,
|
|
|
+ rx: vueApp.rx
|
|
|
+ })
|
|
|
+ }, _data => {
|
|
|
+ $('.drug-allergies').html(_data);
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
Vue.nextTick(() => {
|