|
@@ -862,8 +862,10 @@ class Writereport extends Base
|
|
|
$info['sex'] = $patient_info['sex'];
|
|
|
$info['age'] = $patient_info['age'];
|
|
|
// 申请医生
|
|
|
- $application_name = DB::table('doctors')->where('id',$remote['req_doctor_id'])->field('realname,department_id')->find();
|
|
|
+ $application_name = DB::table('doctors')->where('id',$remote['req_doctor_id'])->field('realname,department_id,autograph,is_use_autograph')->find();
|
|
|
$info['application_name'] = $application_name['realname'];
|
|
|
+ $info['application_use_autograph'] = $application_name['is_use_autograph'];
|
|
|
+ $info['application_autograph'] = $application_name['autograph'];
|
|
|
// 申请科室
|
|
|
$department = DB::table('department')->where('id',$application_name['department_id'])->field('department_name')->find();
|
|
|
$info['department_name'] = $department['department_name'];
|
|
@@ -879,11 +881,15 @@ class Writereport extends Base
|
|
|
$info['description'] = $report['description'];
|
|
|
$info['qr_code'] = $report['qr_code'];
|
|
|
// 报告医生
|
|
|
- $report_doctor = DB::table('doctors')->where('id',$report['report_doctor_id'])->field('realname')->find();
|
|
|
+ $report_doctor = DB::table('doctors')->where('id',$report['report_doctor_id'])->field('realname,autograph,is_use_autograph')->find();
|
|
|
$info['report_doctor'] = $report_doctor['realname'];
|
|
|
+ $info['report_use_autograph'] = $report_doctor['is_use_autograph'];
|
|
|
+ $info['report_autograph'] = $report_doctor['autograph'];
|
|
|
//审核医生
|
|
|
- $review_doctor = DB::table('doctors')->where('id',$report['review_doctor_id'])->field('realname')->find();
|
|
|
+ $review_doctor = DB::table('doctors')->where('id',$report['review_doctor_id'])->field('realname,autograph,is_use_autograph')->find();
|
|
|
$info['review_doctor'] = $review_doctor['realname'];
|
|
|
+ $info['review_use_autograph'] = $review_doctor['is_use_autograph'];
|
|
|
+ $info['review_autograph'] = $review_doctor['autograph'];
|
|
|
$hospital = DB::table('institution')->where('id',$doctor['institution_id'])->field('name')->find();
|
|
|
$info['hospital'] = $hospital['name'];
|
|
|
return json_encode(['status'=>'ok','code'=>'0000','info'=>$info,'sessionid'=>$sessionid]);
|
|
@@ -1173,7 +1179,7 @@ class Writereport extends Base
|
|
|
**/
|
|
|
public function get_report_list(){
|
|
|
$sessionid = $_REQUEST['sessionid'];
|
|
|
- $doctor = Cache::get($sessionid);
|
|
|
+ $doctor = Cache::get($sessionid);
|
|
|
$param = $_REQUEST['param'];
|
|
|
$rinfo = DB::table('report')->where('exam_id',$param['id'])->where('type','<>',1)->select();
|
|
|
$pinfo = DB::table('patient_infos')->where('temp_patient_id',$param['pid'])->field('name,temp_patient_id,sex,age,phone')->find();
|
|
@@ -1198,7 +1204,8 @@ class Writereport extends Base
|
|
|
$arr['exam_sub_class'] = $einfo['exam_sub_class'];
|
|
|
$arr['exam_datetime'] = $einfo['exam_datetime'];
|
|
|
$arr['report_status'] = $remote_info['report_status'];
|
|
|
- $info[] = $arr;
|
|
|
+ $arr['hospital_name'] = DB::table('institution')->where('id',$remote_info['remote_institution_id'])->value('name');
|
|
|
+ $info = $arr;
|
|
|
}elseif($remote_info['report_status'] == 4){
|
|
|
//申请中
|
|
|
return json_encode(['status'=>'fail','code'=>'0125','msg'=>'申请单正在申请中,暂无医生接收远程报告']);
|
|
@@ -1218,4 +1225,29 @@ class Writereport extends Base
|
|
|
}
|
|
|
return json_encode(['status'=>'ok','info'=>$info,'code'=>'0000']);
|
|
|
}
|
|
|
+
|
|
|
+ public function reject_examine()
|
|
|
+ {
|
|
|
+ $sessionid = $_REQUEST['sessionid'];
|
|
|
+ //传值报告id
|
|
|
+ $report_id = $_REQUEST['report_id'];
|
|
|
+ $reason = $_REQUEST['reason'];
|
|
|
+ $is_remote = $_REQUEST['is_remote'];
|
|
|
+ $report = DB::table('report')->where('id',$report_id)->field('remote_application_id,exam_id,report_doctor_id')->find();
|
|
|
+ $exam = DB::table('exams')->where('id',$report['exam_id'])->value('exam_class');
|
|
|
+ if($is_remote == 1){
|
|
|
+ //远程
|
|
|
+ DB::table('remote_application')->where('id',$report['remote_application_id'])->update(['report_status'=>13]);
|
|
|
+ }else{
|
|
|
+ // 本地
|
|
|
+ DB::table('exams')->where('id',$report['exam_id'])->update(['exam_status'=>13]);
|
|
|
+ }
|
|
|
+ $url = Message::url($sessionid,$report['exam_id'],0,$exam,$report_id,$report['remote_application_id']);
|
|
|
+ $t = '您的报告在审核步骤已被驳回';
|
|
|
+ $c = '您保存的报告在审核步骤已被驳回,驳回的原因是:'.$reason.',请您重新更改您的报告';
|
|
|
+ $d = $report['report_doctor_id'];
|
|
|
+ $type = '8';
|
|
|
+ Message::insert($t,$c,$d,$type,$url,1,$report['remote_application_id']);
|
|
|
+ return json_encode(['status'=>'ok','msg'=>'审核已驳回','code'=>'0000']);
|
|
|
+ }
|
|
|
}
|