Commit 59a9ef05 by 赵增煜

开方增加日志

parent b2e72082
......@@ -16,7 +16,7 @@
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
// 问诊人控制器
class PrescriptionController extends BaseApiController
{
......@@ -98,6 +98,7 @@ public function detail(Request $request)
public function create(Request $request)
{
$authInfo = auth('api')->user();
Log::info("开方请求参数:" . json_encode($request->all()));
$pharmacy_id = $request->input('pharmacy_id', 0);
$patient_id = $request->input('patient_id');
$diagnosis_id = $request->input('diagnosis_id');
......@@ -209,7 +210,8 @@ public function create(Request $request)
} else {
$randomDoctor = DoctorModel::inRandomOrder()->where('status', DoctorModel::STATUS_TRUE)->first();
}
# 记录开方医师信息
Log::info("医师:" . json_encode($randomDoctor));
$prescription->doctor_id = $randomDoctor->id;
$prescription->doctor_name = $randomDoctor->name;
$prescription->doctor_online_hospital_name = $randomDoctor->online_hospital_name;
......@@ -230,6 +232,7 @@ public function create(Request $request)
})
->inRandomOrder()
->first();
Log::info("药师:" . json_encode($pharmacist));
$prescription->pharmacist_id = $pharmacist->id;
$prescription->pharmacist_name = $pharmacist->name;
$prescription->pharmacist_license_number = $pharmacist->license_number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment