|
@@ -63,17 +63,17 @@ class Writereport extends Base
|
|
|
$id = $param['id'];
|
|
|
$info = DB::table('exams')->where('id',$id)->field(['id','ext','study_id','exam_class','exam_status','exam_datetime','exam_sub_class','body_part','accession_num','patient_id','film_type','patient_area','bed_no','hopitalized_no'])->find();
|
|
|
$exam_class = DB::table('constant')->where('id',$info['exam_class'])->field('constant_value')->find();
|
|
|
- $info['exam_class'] = $exam_class['constant_value'];
|
|
|
- $exam_subclass = DB::table('exam_subclass')->where('id',$info['exam_sub_class'])->field('name')->find();
|
|
|
- $info['exam_sub_class'] = $exam_subclass['name'];
|
|
|
- $patient_info = DB::table('patient_infos')->where('id',$info['patient_id'])->field(['id','temp_patient_id','name','phone','sex','age'])->find();
|
|
|
- $info['pid'] = $patient_info['temp_patient_id'];
|
|
|
- $info['name'] = $patient_info['name'];
|
|
|
- $info['sex'] = $patient_info['sex'];
|
|
|
- $info['age'] = $patient_info['age'];
|
|
|
- $info['phone'] = $patient_info['phone'];
|
|
|
- $info['hospital_name'] = $institution['name'];
|
|
|
- $info['hospital_title'] = $institution['report_subtitle'];
|
|
|
+ $info['exam_class'] = $exam_class['constant_value'] ?? null;
|
|
|
+ $exam_subclass = DB::table('exam_subclass')->where('id',$info['exam_sub_class'] ?? null)->field('name')->find();
|
|
|
+ $info['exam_sub_class'] = $exam_subclass['name'] ?? null;
|
|
|
+ $patient_info = DB::table('patient_infos')->where('id',$info['patient_id'] ?? null)->field(['id','temp_patient_id','name','phone','sex','age'])->find();
|
|
|
+ $info['pid'] = $patient_info['temp_patient_id'] ?? null;
|
|
|
+ $info['name'] = $patient_info['name'] ?? null;
|
|
|
+ $info['sex'] = $patient_info['sex'] ?? null;
|
|
|
+ $info['age'] = $patient_info['age'] ?? null;
|
|
|
+ $info['phone'] = $patient_info['phone'] ?? null;
|
|
|
+ $info['hospital_name'] = $institution['name'] ?? null;
|
|
|
+ $info['hospital_title'] = $institution['report_subtitle'] ?? null;
|
|
|
$info['images'] = isset($param['images']) ? $param['images'] : '';
|
|
|
if(isset($param['rid']) && !empty($param['rid'])){
|
|
|
$remote_id = $param['rid'];
|