获取报告结论建议页面接口 部分字段需和思信确认

wenjuan
yanzai 1 year ago
parent 2fa5f35f2e
commit bfbe5e68d0

@ -48,6 +48,7 @@ class ApiMapController extends Controller
'GetGroupCombo' => $base_url . '/api/H5/GetGroupCombo',//获取团检套餐
'OrderCreate' => $base_url . '/api/H5/OrderCreate',//创建订单
'GetReportList' => $base_url . '/api/H5/GetReportList',//获取关联的所有体检人报告列表
'GetReportJieLunJianYi' => $base_url . '/api/H5/GetReportJieLunJianYi',//获取报告结论建议页面数据
];
}

@ -19,4 +19,35 @@ class ReportController extends Controller
$list=DB::table('report_l1_records')->select('姓名','性别','登记时间','套餐名称','体检号','体检状态','is_read')->whereIn('证件号码',$persons)->get();
return \Yz::Return(true,"查询完成",['list'=>$list]);
}
public function GetReportJieLunJianYi()
{
$tijian_num =request('tijian_num');
$report=DB::table('report_l1_records as a')->where(['a.体检号'=>$tijian_num])->first();
if(!!$report){
if($report->体检状态=='报告未出') return \Yz::echoError1("此报告暂时未出");
$items=DB::table('report_l2_items as b')->leftJoin('report_l3_base_items as c' ,'b.id','=','c.report_l2_id')->where(['b.reprort_l1_id'=>$report->id])->get();
$v_error_items=[];
$error_items=[];
foreach($items as $item){
if($item->异常标识!=null and $item->异常标识!=''){
$error_items[]=$item;
}
}
$info=[];
$info['name']=$report->姓名;
$info['base_date']=$report->姓名;
$info['items']=[
'all_count'=>count($items),
'ipt_error_count'=>count($v_error_items),//重要异常数量
'error_count'=>count($error_items),//异常数量
];
$info['content']=$report->总检建议;
return \Yz::Return(true,"查询完成",['info'=>$info]);
}else{
return \Yz::echoError1("查询报告失败");
}
}
}

@ -57,6 +57,7 @@ Route::group(['prefix' => 'api/H5'], function () {
Route::post('/GetGroupUnit', 'App\Http\Controllers\API\H5\PersonController@GetGroupUnit');//团检登记查询获取单位分组
Route::post('/GetGroupCombo', 'App\Http\Controllers\API\H5\PersonController@GetGroupCombo');//获取团检套餐
Route::post('/GetReportList', 'App\Http\Controllers\API\H5\ReportController@GetReportList');//获取关联的所有体检人报告列表
Route::post('/GetReportJieLunJianYi', 'App\Http\Controllers\API\H5\ReportController@GetReportJieLunJianYi');//获取报告结论建议页面数据

Loading…
Cancel
Save