|
@@ -647,7 +647,31 @@ GROUP BY erx_category");
|
|
};
|
|
};
|
|
$.post('/api/erx/create', payload, _data => {
|
|
$.post('/api/erx/create', payload, _data => {
|
|
if(!hasResponseError(_data)) {
|
|
if(!hasResponseError(_data)) {
|
|
- fastReload();
|
|
|
|
|
|
+ // fastReload();
|
|
|
|
+
|
|
|
|
+ // don't reload the page; add new obj to list and open it's edit-clinical
|
|
|
|
+ if(!this.prescriptions) {
|
|
|
|
+ this.prescriptions = [];
|
|
|
|
+ }
|
|
|
|
+ this.prescriptions.unshift({
|
|
|
|
+ clinical_detail_json: null,
|
|
|
|
+ created_at_friendly: "{{friendly_date(date('Y-m-d'))}}",
|
|
|
|
+ created_at_friendly_short: "{{friendly_date(date('Y-m-d'))}}",
|
|
|
|
+ erx_category: "LAB",
|
|
|
|
+ hcpProDisplayName: "{{$pro->displayName()}}",
|
|
|
|
+ hcpProUid: "{{$pro->uid}}",
|
|
|
|
+ hcp_pro_id: {{$pro->id}},
|
|
|
|
+ hcp_pro_signed_at: null,
|
|
|
|
+ hcp_pro_signed_by_session_id: null,
|
|
|
|
+ note_id: {{$note->id}},
|
|
|
|
+ uid: _data.data,
|
|
|
|
+ version_number: 1,
|
|
|
|
+ });
|
|
|
|
+ this.currentPrescription = this.prescriptions[0];
|
|
|
|
+
|
|
|
|
+ Vue.nextTick(() => {
|
|
|
|
+ this.editClinicalDetails(this.currentPrescription);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
return false;
|
|
return false;
|
|
@@ -930,8 +954,7 @@ GROUP BY erx_category");
|
|
// debugger
|
|
// debugger
|
|
toastr.success('Prescription updated');
|
|
toastr.success('Prescription updated');
|
|
closeStagPopup();
|
|
closeStagPopup();
|
|
- // fastReload();
|
|
|
|
-
|
|
|
|
|
|
+ fastReload();
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
break;
|
|
break;
|