Commit 26fca44f by 赵增煜

fix

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