|
@@ -44,9 +44,7 @@
|
|
|
<div v-if="prescription.clinical_detail_json" class="d-inline-flex align-items-baseline">
|
|
|
<div class="d-flex align-items-baseline" v-if="prescription.erx_category === 'DRUG'">
|
|
|
<b class="mr-2">@{{prescription.clinical_detail_json.medication ?? '-'}}</b>
|
|
|
- <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.strength ?? '-'}}</span>
|
|
|
- <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.amount ?? '-'}}</span>
|
|
|
- <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.route ?? '-'}}</span>
|
|
|
+ <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.frequency ?? ''}}</span>
|
|
|
</div>
|
|
|
<div class="d-flex align-items-baseline" v-if="prescription.erx_category === 'LAB' || prescription.erx_category === 'IMAGING'">
|
|
|
<b class="mr-2">@{{prescription.clinical_detail_json.test ?? '-'}}</b>
|
|
@@ -811,93 +809,6 @@
|
|
|
|
|
|
// 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);
|
|
|
|
|
|
});
|
|
|
}
|