|
@@ -145,8 +145,8 @@
|
|
<div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'DRUG'">
|
|
<div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'DRUG'">
|
|
<b class="mr-2">@{{currentPrescription.clinical_detail_json.medication ?? '-'}}</b>
|
|
<b class="mr-2">@{{currentPrescription.clinical_detail_json.medication ?? '-'}}</b>
|
|
<span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.strength ?? '-'}}</span>
|
|
<span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.strength ?? '-'}}</span>
|
|
- <span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.amount ?? '-'}}</span>
|
|
|
|
- <span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.route ?? '-'}}</span>
|
|
|
|
|
|
+ <span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.dispense ?? '-'}}</span>
|
|
|
|
+ <span class="text-secondary mr-1">@{{currentPrescription.clinical_detail_json.refills ?? '-'}}</span>
|
|
</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" v-if="currentPrescription.erx_category === 'LAB' || currentPrescription.erx_category === 'IMAGING'">
|
|
<b class="mr-2">@{{currentPrescription.clinical_detail_json.test ?? '-'}}</b>
|
|
<b class="mr-2">@{{currentPrescription.clinical_detail_json.test ?? '-'}}</b>
|
|
@@ -297,13 +297,20 @@
|
|
erxCategory: 'DRUG',
|
|
erxCategory: 'DRUG',
|
|
clinicalDetailJson: {
|
|
clinicalDetailJson: {
|
|
medication: '',
|
|
medication: '',
|
|
- strength: '',
|
|
|
|
- amount: '',
|
|
|
|
route: '',
|
|
route: '',
|
|
|
|
+ dose: '',
|
|
|
|
+ strength: '',
|
|
frequency: '',
|
|
frequency: '',
|
|
dispense: '',
|
|
dispense: '',
|
|
refills: '',
|
|
refills: '',
|
|
purpose: '',
|
|
purpose: '',
|
|
|
|
+
|
|
|
|
+ // fdb specific
|
|
|
|
+ medNameID: '',
|
|
|
|
+ routedMedID: '',
|
|
|
|
+ dosageFormMedID: '',
|
|
|
|
+ gcnSeqno: '',
|
|
|
|
+ medId: '',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
currentPrescription_LAB: {
|
|
currentPrescription_LAB: {
|
|
@@ -427,13 +434,20 @@
|
|
erxCategory: _type,
|
|
erxCategory: _type,
|
|
clinicalDetailJson: {
|
|
clinicalDetailJson: {
|
|
medication: '',
|
|
medication: '',
|
|
- strength: '',
|
|
|
|
- amount: '',
|
|
|
|
route: '',
|
|
route: '',
|
|
|
|
+ dose: '',
|
|
|
|
+ strength: '',
|
|
frequency: '',
|
|
frequency: '',
|
|
dispense: '',
|
|
dispense: '',
|
|
refills: '',
|
|
refills: '',
|
|
purpose: '',
|
|
purpose: '',
|
|
|
|
+
|
|
|
|
+ // fdb specific
|
|
|
|
+ medNameID: '',
|
|
|
|
+ routedMedID: '',
|
|
|
|
+ dosageFormMedID: '',
|
|
|
|
+ gcnSeqno: '',
|
|
|
|
+ medId: '',
|
|
}
|
|
}
|
|
};
|
|
};
|
|
break;
|
|
break;
|
|
@@ -495,6 +509,11 @@
|
|
}
|
|
}
|
|
Vue.nextTick(() => {
|
|
Vue.nextTick(() => {
|
|
showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
|
|
showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
|
|
|
|
+ $('[stag-suggest][stag-suggest-initialized]').removeAttr('stag-suggest-initialized');
|
|
|
|
+ if(_type === 'DRUG') {
|
|
|
|
+ initStagSuggest();
|
|
|
|
+ this.initFdbMedSuggest();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
editClinicalDetails: function(_prescription) {
|
|
editClinicalDetails: function(_prescription) {
|
|
@@ -756,6 +775,110 @@
|
|
|
|
|
|
// cancel, etc.
|
|
// cancel, etc.
|
|
|
|
|
|
|
|
+ initFdbMedSuggest: function() {
|
|
|
|
+
|
|
|
|
+ let self = this;
|
|
|
|
+
|
|
|
|
+ let parentSegment = $('#prescriptions-{{$patient->id}} [stag-popup-key="prescription-popup-DRUG"]>form').first();
|
|
|
|
+
|
|
|
|
+ parentSegment.find('input.prescription-medication').off('stag-suggest-selected');
|
|
|
|
+ parentSegment.find('input.prescription-medication').on('stag-suggest-selected', (_e, _input, _data) => {
|
|
|
|
+
|
|
|
|
+ // _input is the textbox
|
|
|
|
+ // _data is {med_name_id: "50567", text: "Children's Tylenol"}
|
|
|
|
+
|
|
|
|
+ // set vue values
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.medication = _data.text;
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.medNameID = _data.med_name_id;
|
|
|
|
+
|
|
|
|
+ let routeSelect = parentSegment.find('.prescription-route').empty().prop('disabled', true);
|
|
|
|
+ let dosageSelect = parentSegment.find('.prescription-dose').empty().prop('disabled', true);
|
|
|
|
+ let strengthSelect = parentSegment.find('.prescription-strength').empty().prop('disabled', true);
|
|
|
|
+
|
|
|
|
+ $.get('/fdb-routed-meds?med-name-id=' + _data.med_name_id, _data => {
|
|
|
|
+ routeSelect
|
|
|
|
+ .empty()
|
|
|
|
+ .append('<option value="">-- select --</option>');
|
|
|
|
+ for (let i = 0; i < _data.length; i++) {
|
|
|
|
+ routeSelect.append('<option value="' + _data[i].routed_med_id + '">' + _data[i].med_routed_med_id_desc + '</option>')
|
|
|
|
+ }
|
|
|
|
+ routeSelect.prop('disabled', false);
|
|
|
|
+ if (_data.length === 1) {
|
|
|
|
+ routeSelect.val(_data[0].routed_med_id).trigger('change');
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // on route selection
|
|
|
|
+ parentSegment.find('select.prescription-route').off('change');
|
|
|
|
+ parentSegment.find('select.prescription-route').on('change', function () {
|
|
|
|
+
|
|
|
|
+ let elem = $(this);
|
|
|
|
+
|
|
|
|
+ // set vue values
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.routedMedID = elem.val();
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.route = elem.find('option:selected').text();
|
|
|
|
+
|
|
|
|
+ // clear
|
|
|
|
+ let dosageSelect = parentSegment.find('.prescription-dose').empty().prop('disabled', true);
|
|
|
|
+ let strengthSelect = parentSegment.find('.prescription-strength').empty().prop('disabled', true);
|
|
|
|
+
|
|
|
|
+ $.get('/fdb-routed-dosages?routed-med-id=' + self.currentPrescription_DRUG.clinicalDetailJson.routedMedID, _data => {
|
|
|
|
+ dosageSelect
|
|
|
|
+ .empty()
|
|
|
|
+ .append('<option value="">-- select --</option>');
|
|
|
|
+ for (let i = 0; i < _data.length; i++) {
|
|
|
|
+ dosageSelect.append('<option value="' + _data[i].routed_dosage_form_med_id + '">' + _data[i].med_routed_df_med_id_desc + '</option>')
|
|
|
|
+ }
|
|
|
|
+ dosageSelect.prop('disabled', false);
|
|
|
|
+ if(_data.length === 1) {
|
|
|
|
+ dosageSelect.val(_data[0].routed_dosage_form_med_id).trigger('change');
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // on dosage selection
|
|
|
|
+ parentSegment.find('select.prescription-dose').off('change');
|
|
|
|
+ parentSegment.find('select.prescription-dose').on('change', function () {
|
|
|
|
+
|
|
|
|
+ let elem = $(this);
|
|
|
|
+
|
|
|
|
+ // set vue values
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.dosageFormMedID = elem.val();
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.dose = elem.find('option:selected').text();
|
|
|
|
+
|
|
|
|
+ // clear
|
|
|
|
+ let strengthSelect = parentSegment.find('.prescription-strength').empty().prop('disabled', true);
|
|
|
|
+
|
|
|
|
+ $.get('/fdb-meds?dosage-form-med-id=' + self.currentPrescription_DRUG.clinicalDetailJson.dosageFormMedID, _data => {
|
|
|
|
+ strengthSelect
|
|
|
|
+ .empty()
|
|
|
|
+ .append('<option value="">-- select --</option>');
|
|
|
|
+ for (let i = 0; i < _data.length; i++) {
|
|
|
|
+ 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) {
|
|
|
|
+ strengthSelect.val(_data[0].gcn_seqno).trigger('change');
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // on strength (medid) selection
|
|
|
|
+ parentSegment.find('select.prescription-strength').off('change');
|
|
|
|
+ parentSegment.find('select.prescription-strength').on('change', function () {
|
|
|
|
+
|
|
|
|
+ let elem = $(this);
|
|
|
|
+
|
|
|
|
+ // set vue values
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.gcnSeqno = $(this).val();
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.medId = $(this).find('option:selected').attr('data-medid');
|
|
|
|
+ self.currentPrescription_DRUG.clinicalDetailJson.strength = $(this).find('option:selected').text();
|
|
|
|
+
|
|
|
|
+ console.log(self.currentPrescription_DRUG.clinicalDetailJson);
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted: function() {
|
|
mounted: function() {
|
|
let self = this;
|
|
let self = this;
|