Commit aada78c0 by 赵增煜

增加问诊人判断

parent 6aae8790
......@@ -131,6 +131,9 @@ public function create(Request $request)
$prescription->user_id = $authInfo->id; // 获取当前用户ID
// 问诊人信息
$patient = PatientModel::find($patient_id);
if (! $patient) {
return $this->failed('问诊人不存在,请选择正确的问诊人');
}
$prescription->patient_id = $patient_id; // 问诊人编号
$prescription->patient_name = $patient->name; // 问诊人姓名
$prescription->patient_age = getAgeByIdCard($patient->id_card); // 问诊人年龄
......
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