浏览代码

添加 机构

刘桂岩 5 年之前
父节点
当前提交
7975038d06
共有 2 个文件被更改,包括 16 次插入6 次删除
  1. 1 1
      application/index/controller/Index.php
  2. 15 5
      application/inter/controller/Inspectregister.php

+ 1 - 1
application/index/controller/Index.php

@@ -19,7 +19,7 @@ class Index extends Controller
     }
     public function get_studiesinfo(){
         $study_id = $_REQUEST['study_id'];
-        /*if(isset($_REQUEST['address']) && !empty($_REQUEST['address'])){
+        /*if(isset($_REQUEST['address']) && !empty($_   REQUEST['address'])){
             $url = "dicomweb://".$_REQUEST['address']."/";
         }else{
             $url = '';

+ 15 - 5
application/inter/controller/Inspectregister.php

@@ -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]);
     }
+
 }