|
@@ -121,13 +121,13 @@ class Registerlist extends Base
|
|
|
$list = DB::query($sql);
|
|
|
foreach ($list as $k => $v) {
|
|
|
$report_info = DB::table('report')->where('exam_id',$v['id'])->field(['report_datetime','report_doctor_id'])->find();
|
|
|
- $list[$k]['report_datetime'] = $report_info['report_datetime'];
|
|
|
+ $list[$k]['report_datetime'] = $report_info['report_datetime'] ?? null;
|
|
|
$project = DB::table('exam_project')->where('id',$v['exam_project'])->field('name')->find();
|
|
|
- $list[$k]['exam_project_name'] = $project['name'];
|
|
|
+ $list[$k]['exam_project_name'] = $project['name'] ?? null;
|
|
|
$dinfo = DB::table('doctors')->where('id',$report_info['report_doctor_id'])->field('realname,institution_id')->find();
|
|
|
- $list[$k]['report_doctor'] = $dinfo['realname'];
|
|
|
+ $list[$k]['report_doctor'] = $dinfo['realname'] ?? null;
|
|
|
$institution_name = DB::table('institution')->where('id',$dinfo['institution_id'])->cache(300)->field('name')->find();
|
|
|
- $list[$k]['institution_name'] = $institution_name['name'];
|
|
|
+ $list[$k]['institution_name'] = $institution_name['name'] ?? null;
|
|
|
}
|
|
|
$sql1 = "SELECT count(1) from exams as e ,patient_infos as p where e.institution_id='".$doctor['institution_id']."' and p.id=e.patient_id and e.status!=0 ".$where;
|
|
|
$count = DB::query($sql1);
|