|
@@ -510,13 +510,21 @@ GROUP BY erx_category");
|
|
|
|
|
|
?>
|
|
|
|
|
|
+ var DEFAULTLOGISTICSDETAILS = {
|
|
|
+ facilityName: '{{ @$defaultFacility->name ?? '' }}',
|
|
|
+ facilityCity: '{{ @$defaultFacility->address_city ?? '' }}',
|
|
|
+ facilityState: '{{ @$defaultFacility->address_state ?? '' }}',
|
|
|
+ facilityAddressMemo: '',
|
|
|
+ facilityPhone: '{{ @$defaultFacility->phone ?? '' }}',
|
|
|
+ facilityFax: '{{ @$defaultFacility->fax ?? '' }}',
|
|
|
+ facilityZip: '{{ @$defaultFacility->address_zip ?? '' }}',
|
|
|
+ };
|
|
|
function init() {
|
|
|
|
|
|
window.eRxApp = new Vue({
|
|
|
el: '#prescriptions-{{$patient->id}}',
|
|
|
delimiters: ['@{{', '}}'],
|
|
|
data: {
|
|
|
-
|
|
|
includeCancelled: '',
|
|
|
|
|
|
prescriptions: <?= json_encode($prescriptions) ?>,
|
|
@@ -695,28 +703,12 @@ GROUP BY erx_category");
|
|
|
// for editing logistics - common
|
|
|
currentPrescriptionLogistics: {
|
|
|
uid: '',
|
|
|
- logisticsDetailJson: {
|
|
|
- facilityName: '',
|
|
|
- facilityCity: '',
|
|
|
- facilityState: '',
|
|
|
- facilityAddressMemo: '',
|
|
|
- facilityPhone: '',
|
|
|
- facilityFax: '',
|
|
|
- facilityZip: '',
|
|
|
- }
|
|
|
+ logisticsDetailJson: DEFAULTLOGISTICSDETAILS
|
|
|
},
|
|
|
|
|
|
newPrescriptionLogistics: {
|
|
|
uid: '',
|
|
|
- logisticsDetailJson: {
|
|
|
- facilityName: '',
|
|
|
- facilityCity: '',
|
|
|
- facilityState: '',
|
|
|
- facilityAddressMemo: '',
|
|
|
- facilityPhone: '',
|
|
|
- facilityFax: '',
|
|
|
- facilityZip: '',
|
|
|
- }
|
|
|
+ logisticsDetailJson: DEFAULTLOGISTICSDETAILS
|
|
|
},
|
|
|
|
|
|
// for editing hcp, sign, pro status & client status - common
|
|
@@ -847,18 +839,11 @@ GROUP BY erx_category");
|
|
|
}
|
|
|
this.newPrescriptionLogistics = {
|
|
|
uid: '',
|
|
|
- logisticsDetailJson: {
|
|
|
- facilityName: '',
|
|
|
- facilityCity: '',
|
|
|
- facilityState: '',
|
|
|
- facilityAddressMemo: '',
|
|
|
- facilityPhone: '',
|
|
|
- facilityFax: '',
|
|
|
- facilityZip: '',
|
|
|
- }
|
|
|
+ logisticsDetailJson: DEFAULTLOGISTICSDETAILS
|
|
|
};
|
|
|
this.currentPrescriptionType = _type;
|
|
|
Vue.nextTick(() => {
|
|
|
+ console.log({n: this.newPrescriptionLogistics, DEFAULTLOGISTICSDETAILS});
|
|
|
showStagPopup('new-prescription-popup-' + _type, true);
|
|
|
$('[stag-popup-key="new-prescription-popup-' + _type + '"] [stag-suggest-initialized]').removeAttr('stag-suggest-initialized');
|
|
|
initStagSuggest();
|
|
@@ -1163,15 +1148,7 @@ GROUP BY erx_category");
|
|
|
this.currentPrescriptionAction = 'EDIT_LOGISTICS';
|
|
|
this.currentPrescriptionLogistics = {
|
|
|
uid: _prescription.uid,
|
|
|
- logisticsDetailJson: _prescription.logistics_detail_json ? JSON.parse(JSON.stringify(_prescription.logistics_detail_json)) : {
|
|
|
- facilityName: '',
|
|
|
- facilityCity: '',
|
|
|
- facilityState: '',
|
|
|
- facilityAddressMemo: '',
|
|
|
- facilityPhone: '',
|
|
|
- facilityFax: '',
|
|
|
- facilityZip: '',
|
|
|
- }
|
|
|
+ logisticsDetailJson: _prescription.logistics_detail_json ? JSON.parse(JSON.stringify(_prescription.logistics_detail_json)) : DEFAULTLOGISTICSDETAILS
|
|
|
}
|
|
|
Vue.nextTick(() => {
|
|
|
showStagPopup('logistics-popup', true);
|