|
@@ -47,10 +47,10 @@ class Inspectregister extends Base
|
|
|
$doctor = Cache::get($sessionid);
|
|
|
$info = array();
|
|
|
// 科室
|
|
|
- $department = DB::table('department')->where('institution_id',$doctor['institution_id'])->cache(300)->field('id','department_name')->select();
|
|
|
+ $department = DB::table('department')->where('institution_id',$doctor['institution_id'])->field('id','department_name')->select();
|
|
|
$info['department'] = $department;
|
|
|
// 机构
|
|
|
- $doctor_department = DB::table('department')->where('id',$doctor['department_id'])->cache(300)->field('id,department_name')->find();
|
|
|
+ $doctor_department = DB::table('department')->where('id',$doctor['department_id'])->field('id,department_name')->find();
|
|
|
$info['execute_department'] = $doctor_department;
|
|
|
log::record('--------返回信息-----------------');
|
|
|
log::record($info);
|
|
@@ -288,10 +288,17 @@ class Inspectregister extends Base
|
|
|
public function department(){
|
|
|
$sessionid = $_REQUEST['sessionid'];
|
|
|
$doctor = Cache::get($sessionid);
|
|
|
- $department = DB::table('department')->where('is_report',1)->where('institution_id',$doctor['institution_id'])->cache(300)->select();
|
|
|
+ $department = DB::table('department')->where('institution_id',$doctor['institution_id'])->field('id,department_name')->select();
|
|
|
return json_encode(['status'=>'ok','code'=>'0000','info'=>$department]);
|
|
|
}
|
|
|
|
|
|
+ public function doctors()
|
|
|
+ {
|
|
|
+ $param = $_REQUEST['param'];
|
|
|
+ $doctor = DB::table('doctors')->where('department_id',$param['id'])->field('realname')->select();
|
|
|
+ return $doctor;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 预约登记保存
|
|
|
*
|
|
@@ -378,9 +385,9 @@ class Inspectregister extends Base
|
|
|
}
|
|
|
if(isset($param['exam_id']) && !empty($param['exam_id'])){
|
|
|
$pid = DB::table('exams')->where('id',$param['exam_id'])->field('patient_id,exam_status')->find();
|
|
|
- if($pid['exam_status'] >= 3){
|
|
|
+ /*if($pid['exam_status'] >= 3){
|
|
|
return json_encode(['status'=>'fail','code'=>'1130','msg'=>'已经检查完毕,不允许在此修改']);
|
|
|
- }
|
|
|
+ }*/
|
|
|
//存在并且有值 则修改
|
|
|
$patient = DB::table('patient_infos')->where('temp_patient_id',$pid['patient_id'])->update($patient_info);
|
|
|
}else{
|
|
@@ -420,6 +427,8 @@ class Inspectregister extends Base
|
|
|
$exam_info['clin_diag'] = isset($param['clin_diag']) ? $param['clin_diag'] : '';
|
|
|
$exam_info['register'] = $doctor['id'];
|
|
|
$exam_info['createdAt'] = date('Y-m-d H:i:s',time());
|
|
|
+ $exam_info['application_department'] = isset($param['application_department']) ? $param['application_department'] : '';
|
|
|
+ $exam_info['application_doctor'] = isset($param['application_doctor']) ? $param['application_doctor'] : '';
|
|
|
if(isset($param['exam_id']) && !empty($param['exam_id'])){
|
|
|
$exam = DB::table('exams')->where('id',$param['exam_id'])->update($exam_info);
|
|
|
}else{
|
|
@@ -597,4 +606,5 @@ class Inspectregister extends Base
|
|
|
$illness = DB::table('constant')->where('parent_id','illness')->cache(300)->field('constant_key,constant_value')->select();
|
|
|
return json_encode(['status'=>'ok','code'=>'0000','info'=>$illness]);
|
|
|
}
|
|
|
+
|
|
|
}
|