|
@@ -438,53 +438,55 @@ class Dcquery extends Controller
|
|
|
// 某天检查数量
|
|
|
$studies_num = DB::table('studies')->where('institution_id',$v['id'])->where('studydate',$date)->count();
|
|
|
$study_id = DB::table('studies')->where('institution_id',$v['id'])->where('studydate',$date)->column('id');
|
|
|
- // exams检查的数量
|
|
|
- $exam_num = DB::table('exams')->where('study_id','in',$study_id)->count();
|
|
|
+ /*// exams检查的数量
|
|
|
+// $exam_num = DB::table('exams')->where('study_id','in',$study_id)->count();
|
|
|
// 序列数量
|
|
|
// $series_num = DB::table('series')->where('study_id','in',$study_id)->count();
|
|
|
// $series_id = DB::table('series')->where('study_id','in',$study_id)->column('id');
|
|
|
// 影像数量
|
|
|
-// $image_num = DB::table('images')->where('series_id','in',$series_id)->count();
|
|
|
+// $image_num = DB::table('images')->where('series_id','in',$series_id)->count();*/
|
|
|
$doctor_id = DB::table('doctors')->where('institution_id',$v['id'])->column('id');
|
|
|
// 某天报告数量
|
|
|
$report_num = DB::table('report')->where('report_doctor_id','in',$doctor_id)->where('report_datetime','between',$timedate)->count();
|
|
|
// 某天发起的远程申请单数量
|
|
|
$application_num = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->count();
|
|
|
// 各个状态的数量
|
|
|
- $exams3 = DB::table('exams')->where('study_id','in',$study_id)->where('exam_status',3)->count(); //检查完毕
|
|
|
+ /*$exams3 = DB::table('exams')->where('study_id','in',$study_id)->where('exam_status',3)->count(); //检查完毕
|
|
|
$exams7 = DB::table('exams')->where('study_id','in',$study_id)->where('exam_status',7)->count(); //已写报告
|
|
|
$exams8 = DB::table('exams')->where('study_id','in',$study_id)->where('exam_status',8)->count(); //已审报告
|
|
|
$exams9 = DB::table('exams')->where('study_id','in',$study_id)->where('exam_status',9)->count(); //已确认报告
|
|
|
$appliaction3 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status','')->count();
|
|
|
- $appliaction4 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',4)->count();
|
|
|
+ $appliaction4 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',4)->count();*/
|
|
|
$appliaction5 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',5)->count();
|
|
|
- $appliaction6 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',6)->count();
|
|
|
+ /*$appliaction6 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',6)->count();
|
|
|
$appliaction7 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',7)->count();
|
|
|
$appliaction8 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',8)->count();
|
|
|
$appliaction9 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',9)->count();
|
|
|
- $appliaction12 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status',12)->count();
|
|
|
+ $appliaction12 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status','12')->count();*/
|
|
|
+ $appliaction10 = DB::table('remote_application')->where('local_institution_id',$v['id'])->where('req_date_time','between',$timedate)->where('report_status','in','7,8,9')->count();
|
|
|
$info[] = [
|
|
|
'institution_id'=>$v['id'],//医院id
|
|
|
'institution_name'=>$v['name'],//医院名称
|
|
|
'patient'=>$patient_num, //患者数量
|
|
|
'studies'=>$studies_num, //检查数量
|
|
|
- 'exams' =>$exam_num, //检查数量
|
|
|
- 'exams3'=>$exams3, //检查完毕
|
|
|
- 'exams7'=>$exams7, //已写报告
|
|
|
- 'exams8'=>$exams8, //已审报告
|
|
|
- 'exams9'=>$exams9, //已确认报告
|
|
|
-// 'series'=>$series_num, //序列数量
|
|
|
-// 'images'=>$image_num, //影像数量
|
|
|
'report'=>$report_num, //报告数量
|
|
|
'application'=>$application_num, //申请数量
|
|
|
- 'application3'=>$appliaction3, //保存申请数量
|
|
|
- 'application4'=>$appliaction4, //发起申请数量
|
|
|
'application5'=>$appliaction5, //驳回申请数量
|
|
|
- 'application6'=>$appliaction6, //接收申请数量
|
|
|
- 'application7'=>$appliaction7, //写报告数量
|
|
|
- 'application8'=>$appliaction8, //审核报告数量
|
|
|
- 'application9'=>$appliaction9, //确认报告数量
|
|
|
- 'application12'=>$appliaction12, //撤回数量
|
|
|
+ 'application10'=>$appliaction10, //申请完成数量
|
|
|
+// 'exams' =>$exam_num, //检查数量
|
|
|
+// 'exams3'=>$exams3, //检查完毕
|
|
|
+// 'exams7'=>$exams7, //已写报告
|
|
|
+// 'exams8'=>$exams8, //已审报告
|
|
|
+// 'exams9'=>$exams9, //已确认报告
|
|
|
+// 'series'=>$series_num, //序列数量
|
|
|
+// 'images'=>$image_num, //影像数量
|
|
|
+// 'application3'=>$appliaction3, //保存申请数量
|
|
|
+// 'application4'=>$appliaction4, //发起申请数量
|
|
|
+// 'application6'=>$appliaction6, //接收申请数量
|
|
|
+// 'application7'=>$appliaction7, //写报告数量
|
|
|
+// 'application8'=>$appliaction8, //审核报告数量
|
|
|
+// 'application9'=>$appliaction9, //确认报告数量
|
|
|
+// 'application12'=>$appliaction12, //撤回数量
|
|
|
];
|
|
|
}
|
|
|
return json_encode($info);
|