Commit 26fca44f by 赵增煜

fix

parent e40362c3
......@@ -59,6 +59,9 @@ public function autoPrescriptionGen()
// 查询对应的医师是手动并且药师为自动
// $pharmacist = PharmacyModel::where('id', $prescription->pharmacy_id)->first();
$doctor = DoctorModel::where('id', $prescription->doctor_id)->first();
if ($doctor == null) {
continue;
}
// if ($doctor->is_auto == 0 && $pharmacist->is_auto == 1) {
if ($doctor->is_auto == 1) {
// 更新处方单状态
......@@ -68,6 +71,9 @@ public function autoPrescriptionGen()
$prescriptionInfo->save();
// 获取患者信息
$patient = PatientModel::where('id', $prescriptionInfo->patient_id)->first();
if ($patient==null) {
continue;
}
// 生成审方日志
$dateTime = new DateTime($prescription->created_at);
$dateTime->modify('+3 minutes');
......@@ -112,7 +118,7 @@ public function autoPrescriptionReview()
$prescriptionInfo->save();
// 获取患者信息
$patient = PatientModel::where('id', $prescriptionInfo->patient_id)->first();
if($patient==null) {}
if($patient==null) {
continue;
}
// 生成审方日志
......
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