|
@@ -197,10 +197,10 @@ class Application extends Base
|
|
|
}else{
|
|
|
$rid = '';
|
|
|
$application = DB::table('remote_application')->where('exam_id',$id)->field(['id,remote_institution_id,report_status,id,remote_doctor_id','application_desc','attachment','req_doctor_id','illness_desc','phys_sign','clin_symp','is_urgent','anamnesis','family_ill','remark','clin_diag'])->find();
|
|
|
- $aid = $application['id'];
|
|
|
+ $aid = $application['id'] ?? null;
|
|
|
}
|
|
|
$remote_order = DB::table('remote_order')
|
|
|
- ->where('application_id', $application['id'])
|
|
|
+ ->where('application_id', $application['id'] ?? null)
|
|
|
->where('status', 'neq', self::ORDER_STATUS['CANCEL'])
|
|
|
->where('status', 'neq', self::ORDER_STATUS['REDUCE'])
|
|
|
->field('id, status, exam_class, super_hospital_id, super_doctor_id')
|
|
@@ -211,14 +211,14 @@ class Application extends Base
|
|
|
if($is_remote == 1){
|
|
|
Message::read($doctor['id'],$aid,1);
|
|
|
//远程申请点击进入
|
|
|
- $dinfo = DB::table('doctors')->where('id',$application['req_doctor_id'])->field('department_id')->find();
|
|
|
- $dep = DB::table('department')->where('id',$dinfo['department_id'])->field('department_name')->find();
|
|
|
+ $dinfo = DB::table('doctors')->where('id',$application['req_doctor_id'] ?? null)->field('department_id')->find();
|
|
|
+ $dep = DB::table('department')->where('id',$dinfo['department_id'] ?? null)->field('department_name')->find();
|
|
|
}else{
|
|
|
Message::read($doctor['id'],$aid,2);
|
|
|
//本地远程申请中
|
|
|
- $dep = DB::table('department')->where('id',$doctor['department_id'])->field('department_name')->find();
|
|
|
+ $dep = DB::table('department')->where('id',$doctor['department_id'] ?? null)->field('department_name')->find();
|
|
|
}
|
|
|
- $info['department_name'] = $dep['department_name'];
|
|
|
+ $info['department_name'] = $dep['department_name'] ?? null;
|
|
|
if(empty($application)){
|
|
|
$exam_application = DB::table('exams')->where('id',$id)->field(['illness_desc','phys_sign','clin_symp','remark','clin_diag','anamnesis','family_ill'])->find();
|
|
|
if(empty($exam_application['anamnesis'])){
|
|
@@ -239,7 +239,7 @@ class Application extends Base
|
|
|
$remote_name = DB::table('doctors')->where('id',$application['remote_doctor_id'])->field('realname')->find();
|
|
|
$remote_institution = DB::table('institution')->where('id',$application['remote_institution_id'])->value('name');
|
|
|
$application['remote_institution'] = $remote_institution;
|
|
|
- $application['remote_doctor'] = $remote_name['realname'];
|
|
|
+ $application['remote_doctor'] = $remote_name['realname'] ?? null;
|
|
|
if(empty($application['anamnesis'])){
|
|
|
$application['anamnesis'] = '';
|
|
|
}else{
|