Commit 32e823ff authored by wangxinghua's avatar wangxinghua

只有陪住医嘱 陪住人员的二维码才长期有效

后台设置医嘱的时候 如果住院号未入库 那么先入库
parent 8e9b38b9
...@@ -115,7 +115,7 @@ class Authority extends Model ...@@ -115,7 +115,7 @@ class Authority extends Model
->join('__OBJECT_AUTHORITY__ oa', 'a.id=oa.authority_id') ->join('__OBJECT_AUTHORITY__ oa', 'a.id=oa.authority_id')
->where("oa.object_id={$did} and oa.type=3{$auth_id}") ->where("oa.object_id={$did} and oa.type=3{$auth_id}")
->value('rule'); ->value('rule');
if($result['d'] && $pa['pz_status'] == 1) if($result['d'] && $pa['pz_status'] == 1 && $patientInfo['VISIT_SPECIAL']['YNSTAY'] == 1)
$result['p'] = 1; $result['p'] = 1;
} }
} }
......
...@@ -50,11 +50,12 @@ class HospitalAction extends CommonAction ...@@ -50,11 +50,12 @@ class HospitalAction extends CommonAction
{ {
/* /*
//测试数据 //测试数据
$list[0] = array('ZHUYUANHAO'=>'1','BEDNO'=>'2','PAT_NAME'=>'张三','SHENFENZHENG'=>'13102219880318913','TELPHONE'=>'1352179****'); $list[0] = array('ZHUYUANHAO'=>'1','BEDNO'=>'2','PAT_NAME'=>'张三','SHENFENZHENG'=>'13102219880318913','TELPHONE'=>'1352179****','status'=>1);
$list[1] = array('ZHUYUANHAO'=>'2','BEDNO'=>'2','PAT_NAME'=>'张三','SHENFENZHENG'=>'13102219880318913','TELPHONE'=>'1352179****','status'=>1);
$this->assign('list',$list); $this->assign('list',$list);
$this->display(); $this->display();
exit; exit;
*/ //*/
import ( '@.ORG.Oracle' ); import ( '@.ORG.Oracle' );
import("ORG.Page"); import("ORG.Page");
...@@ -325,8 +326,13 @@ class HospitalAction extends CommonAction ...@@ -325,8 +326,13 @@ class HospitalAction extends CommonAction
$Object_authority->addAll($oaData); $Object_authority->addAll($oaData);
} }
//启用停用 //启用停用
M("Patient_authority")->where("zhuyuanhao=$zhuyuanhao")->save($pa_data); $Patient_authority = M("Patient_authority");
$vo = $Patient_authority->where("zhuyuanhao='$zhuyuanhao'")->field('id')->find();
if(empty($vo))
{
$this->addPatientAut($Patient_authority,$zhuyuanhao);
}
$Patient_authority->where("zhuyuanhao=$zhuyuanhao")->save($pa_data);
$result = true; $result = true;
}catch(Exception $e){ }catch(Exception $e){
$result = false; $result = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment