Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tiantan-gate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxinghua
tiantan-gate
Commits
f84bb188
Commit
f84bb188
authored
Jun 28, 2020
by
wangxinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上次腾讯远程培训会议的新需求
1.陪住二维码长期有效 2.手术权限改成近三天有效 3.手术医嘱增加气管镜
parent
4f15562f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
18 deletions
+37
-18
Authority.php
TTYYGate/application/common/model/Authority.php
+4
-1
Oracle.php
TTYYGate/application/common/model/Oracle.php
+2
-2
Index.php
TTYYGate/application/frontend/controller/Index.php
+14
-5
HospitalAction.class.php
TTYYGate_Manage/Lib/Action/HospitalAction.class.php
+7
-0
patient.html
TTYYGate_Manage/Tpl/default/Hospital/patient.html
+2
-2
gatedb.sql
TTYYGate_Manage/docs/gatedb.sql
+8
-8
天坛住院部闸机_探视系统_流程介绍.doc
天坛住院部闸机_探视系统_流程介绍.doc
+0
-0
No files found.
TTYYGate/application/common/model/Authority.php
View file @
f84bb188
...
@@ -13,7 +13,7 @@ class Authority extends Model
...
@@ -13,7 +13,7 @@ class Authority extends Model
//查询权限信息
//查询权限信息
function
getAuthRule
(
$patientInfo
,
$ewm
)
function
getAuthRule
(
$patientInfo
,
$ewm
)
{
{
if
(
!
$patientInfo
)
return
[
'd'
=>
''
,
's'
=>
''
,
'b'
=>
''
];
if
(
!
$patientInfo
)
return
[
'd'
=>
''
,
's'
=>
''
,
'b'
=>
''
,
'p'
=>
0
];
$db
=
Db
::
connect
(
config
(
'database.db_config_mysql_1'
));
$db
=
Db
::
connect
(
config
(
'database.db_config_mysql_1'
));
...
@@ -91,6 +91,7 @@ class Authority extends Model
...
@@ -91,6 +91,7 @@ class Authority extends Model
$result
[
's'
]
=
json_encode
(
array_merge
(
$u
,
$o
));
//合并自定义权限和his对接权限
$result
[
's'
]
=
json_encode
(
array_merge
(
$u
,
$o
));
//合并自定义权限和his对接权限
//查询家属权限
//查询家属权限
$result
[
'd'
]
=
''
;
$result
[
'd'
]
=
''
;
$result
[
'p'
]
=
0
;
if
(
$pa
[
'pz_status'
]
==
1
||
$pa
[
'jc_status'
]
==
1
)
if
(
$pa
[
'pz_status'
]
==
1
||
$pa
[
'jc_status'
]
==
1
)
{
{
if
(
$pa
[
'pz_status'
]
==
1
&&
$pa
[
'jc_status'
]
==
1
)
if
(
$pa
[
'pz_status'
]
==
1
&&
$pa
[
'jc_status'
]
==
1
)
...
@@ -114,6 +115,8 @@ class Authority extends Model
...
@@ -114,6 +115,8 @@ 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
)
$result
[
'p'
]
=
1
;
}
}
}
}
return
$result
;
return
$result
;
...
...
TTYYGate/application/common/model/Oracle.php
View file @
f84bb188
...
@@ -37,7 +37,7 @@ class Oracle extends Model
...
@@ -37,7 +37,7 @@ class Oracle extends Model
}
}
//2.医嘱里特殊项目当作手术去处理
//2.医嘱里特殊项目当作手术去处理
//医嘱项目字典
//医嘱项目字典
$items
=
$db_config_oracle_zz
->
name
(
'view_rwzb_item'
)
->
where
(
"ITEMNAME in('备皮(住院)')"
)
->
column
(
'ITEMCODE'
);
$items
=
$db_config_oracle_zz
->
name
(
'view_rwzb_item'
)
->
where
(
"ITEMNAME in('备皮(住院)'
,'气管镜'
)"
)
->
column
(
'ITEMCODE'
);
$sqls
.=
'#'
;
$sqls
.=
'#'
;
$sqls
.=
$db_config_oracle_zz
->
getLastSql
();
$sqls
.=
$db_config_oracle_zz
->
getLastSql
();
$items
=
array_keys
(
$items
);
$items
=
array_keys
(
$items
);
...
@@ -50,7 +50,7 @@ class Oracle extends Model
...
@@ -50,7 +50,7 @@ class Oracle extends Model
$sqls
.=
$db_config_oracle_zz
->
getLastSql
();
$sqls
.=
$db_config_oracle_zz
->
getLastSql
();
$today
=
date
(
'Y-m-d'
);
$today
=
date
(
'Y-m-d'
);
$jcday
=
date
(
'Y-m-d'
,
strtotime
(
'-2 day'
));
$jcday
=
date
(
'Y-m-d'
,
strtotime
(
'-2 day'
));
$ssday
=
date
(
'Y-m-d'
,
strtotime
(
'-
1
day'
));
$ssday
=
date
(
'Y-m-d'
,
strtotime
(
'-
2
day'
));
foreach
(
$ipm_row
as
$ipk
=>
$ipv
)
{
foreach
(
$ipm_row
as
$ipk
=>
$ipv
)
{
//手术
//手术
if
(
$ipv
[
'USETIME_YMD'
]
>=
$ssday
)
if
(
$ipv
[
'USETIME_YMD'
]
>=
$ssday
)
...
...
TTYYGate/application/frontend/controller/Index.php
View file @
f84bb188
...
@@ -139,10 +139,6 @@ class Index extends Controller
...
@@ -139,10 +139,6 @@ class Index extends Controller
{
{
return
output
([
'code'
=>
'10'
,
'msg'
=>
'系统发生错误,找不到此二维码对应的住院号'
,
'data'
=>
[]]);
return
output
([
'code'
=>
'10'
,
'msg'
=>
'系统发生错误,找不到此二维码对应的住院号'
,
'data'
=>
[]]);
}
}
if
(
substr
(
$ewm
[
'addtime'
],
0
,
10
)
!=
date
(
'Y-m-d'
))
{
return
output
([
'code'
=>
'12'
,
'msg'
=>
'此二维码已失效'
,
'data'
=>
[]]);
}
$patientInfo
=
model
(
'Oracle'
)
->
getPatientinfo
(
$zhuyuanhao
);
$patientInfo
=
model
(
'Oracle'
)
->
getPatientinfo
(
$zhuyuanhao
);
if
(
empty
(
$patientInfo
))
if
(
empty
(
$patientInfo
))
...
@@ -167,6 +163,14 @@ class Index extends Controller
...
@@ -167,6 +163,14 @@ class Index extends Controller
{
{
return
output
([
'code'
=>
'99'
,
'msg'
=>
'系统发生错误,找不到相关的任何权限'
,
'data'
=>
[]]);
return
output
([
'code'
=>
'99'
,
'msg'
=>
'系统发生错误,找不到相关的任何权限'
,
'data'
=>
[]]);
}
}
//长期陪住,二维码可以一直使用
if
(
$rules
[
'p'
]
==
0
)
{
if
(
substr
(
$ewm
[
'addtime'
],
0
,
10
)
!=
date
(
'Y-m-d'
))
{
return
output
([
'code'
=>
'12'
,
'msg'
=>
'此二维码已失效'
,
'data'
=>
[]]);
}
}
/**
/**
* a.陪住或外出检查权限优先级最高并且不累加
* a.陪住或外出检查权限优先级最高并且不累加
* b.患者自身权限和病区权限累加
* b.患者自身权限和病区权限累加
...
@@ -301,10 +305,12 @@ class Index extends Controller
...
@@ -301,10 +305,12 @@ class Index extends Controller
{
{
return
output
([
'code'
=>
'02'
,
'msg'
=>
'住院患者不存在'
,
'data'
=>
[]]);
return
output
([
'code'
=>
'02'
,
'msg'
=>
'住院患者不存在'
,
'data'
=>
[]]);
}
}
/*
if(substr($ewm['addtime'],0,10) != date('Y-m-d'))
if(substr($ewm['addtime'],0,10) != date('Y-m-d'))
{
{
return output(['code'=>'12','msg'=>'此二维码已失效','data'=>[]]);
return output(['code'=>'12','msg'=>'此二维码已失效','data'=>[]]);
}
}
*/
$authority
=
model
(
'Authority'
);
$authority
=
model
(
'Authority'
);
$result
=
$authority
->
saoma
(
$no
,
$zhuyuanhao
,
$mid
,
1
);
$result
=
$authority
->
saoma
(
$no
,
$zhuyuanhao
,
$mid
,
1
);
if
(
$result
==
'Exit Error'
)
if
(
$result
==
'Exit Error'
)
...
@@ -331,17 +337,20 @@ class Index extends Controller
...
@@ -331,17 +337,20 @@ class Index extends Controller
//测试
//测试
public
function
test
(
$no
,
$s
=
'in'
)
public
function
test
(
$no
,
$s
=
'in'
)
{
{
//$patientInfo = array('ZHUYUANHAO'=>'1','BINGQUCODE' => '1');
/*
$patientInfo = model('Oracle')->getPatientinfo('633537');
$patientInfo = model('Oracle')->getPatientinfo('633537');
$rules = model('Authority')->getAuthRule($patientInfo,['shenfenzheng'=>'']);
$rules = model('Authority')->getAuthRule($patientInfo,['shenfenzheng'=>'']);
print_r($patientInfo);
print_r($patientInfo);
print_r($rules);exit;
print_r($rules);exit;
*/
if
(
$s
==
'in'
)
if
(
$s
==
'in'
)
$output
=
$this
->
saomain
(
$no
,
'0001'
);
$output
=
$this
->
saomain
(
$no
,
'0001'
);
else
if
(
$s
==
'out'
)
else
if
(
$s
==
'out'
)
$output
=
$this
->
saomaout
(
$no
,
'0001'
);
$output
=
$this
->
saomaout
(
$no
,
'0001'
);
header
(
'Content-Type:text/html;charset=utf8'
);
var_dump
(
$output
);
exit
;
var_dump
(
$output
);
exit
;
}
}
//找测试住院号
//找测试住院号
...
...
TTYYGate_Manage/Lib/Action/HospitalAction.class.php
View file @
f84bb188
...
@@ -48,6 +48,13 @@ class HospitalAction extends CommonAction
...
@@ -48,6 +48,13 @@ class HospitalAction extends CommonAction
*/
*/
public
function
patient
()
public
function
patient
()
{
{
/*
//测试数据
$list[0] = array('ZHUYUANHAO'=>'1','BEDNO'=>'2','PAT_NAME'=>'张三','SHENFENZHENG'=>'13102219880318913','TELPHONE'=>'13521797166');
$this->assign('list',$list);
$this->display();
exit;
*/
import
(
'@.ORG.Oracle'
);
import
(
'@.ORG.Oracle'
);
import
(
"ORG.Page"
);
import
(
"ORG.Page"
);
...
...
TTYYGate_Manage/Tpl/default/Hospital/patient.html
View file @
f84bb188
...
@@ -183,9 +183,9 @@ html{_overflow-y:scroll}
...
@@ -183,9 +183,9 @@ html{_overflow-y:scroll}
增加权限
增加权限
<?php if($rulekv[$o['ZHUYUANHAO']] != '' && $rulekv[$o['ZHUYUANHAO']] != '[]')
<?php if($rulekv[$o['ZHUYUANHAO']] != '' && $rulekv[$o['ZHUYUANHAO']] != '[]')
echo '<font color="red">(已设置)</font>';?>
echo '<font color="red">(已设置)</font>';?>
</a>
<!--
|
</a>
|
<a
href=
"javascript:setAuth('{$o.ZHUYUANHAO}',1)"
><img
src=
"__APP__/Public/images/curd/b_tblops.png"
/>
陪住权限
</a><br>
<a
href=
"javascript:setAuth('{$o.ZHUYUANHAO}',1)"
><img
src=
"__APP__/Public/images/curd/b_tblops.png"
/>
陪住权限
</a><br>
<a href="javascript:setAuth('{$o.ZHUYUANHAO}',2)"><img src="__APP__/Public/images/curd/b_tblops.png" />外出检查 |
<
!--<
a href="javascript:setAuth('{$o.ZHUYUANHAO}',2)"><img src="__APP__/Public/images/curd/b_tblops.png" />外出检查 |
<a href="javascript:otherAuth('{$o.ZHUYUANHAO}')"><img src="__APP__/Public/images/curd/b_tblops.png" />其他设置-->
<a href="javascript:otherAuth('{$o.ZHUYUANHAO}')"><img src="__APP__/Public/images/curd/b_tblops.png" />其他设置-->
</if>
</if>
</td>
</td>
...
...
TTYYGate_Manage/docs/gatedb.sql
View file @
f84bb188
...
@@ -61,14 +61,14 @@ CREATE TABLE `gate_authority` (
...
@@ -61,14 +61,14 @@ CREATE TABLE `gate_authority` (
-- ----------------------------
-- ----------------------------
-- Records of gate_authority
-- Records of gate_authority
-- ----------------------------
-- ----------------------------
INSERT
INTO
`gate_authority`
VALUES
(
'1'
,
'普通权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5
\"
,
\"
time
\"
:
\"
11:30-13:59
\"
,
\"
number
\"
:
\"
1
\"
,
\"
cishu
\"
:
\"
4
\"
},{
\"
week
\"
:
\"
1,2,3,4,5
\"
,
\"
time
\"
:
\"
13:30-19:30
\"
,
\"
number
\"
:
\"
2
\"
,
\"
cishu
\"
:
\"
1
\"
},{
\"
week
\"
:
\"
6,7,8
\"
,
\"
time
\"
:
\"
11:30-12:30
\"
,
\"
number
\"
:
\"
1
\"
,
\"
cishu
\"
:
\"
1
\"
},{
\"
week
\"
:
\"
6,7,8
\"
,
\"
time
\"
:
\"
13:30-19:30
\"
,
\"
number
\"
:
\"
2
\"
,
\"
cishu
\"
:
\"
1
\"
}]'
,
'1'
,
' <ul>
\r\n
<li>
\r\n
1.周一至周五,11:30am-12:30pm(限定一人探视,15:00pm-19:00pm(限定二人探视)</li>
\r\n
<li>2.周六、周日、法定节假日,11:30am-12:30pm(限定一人探视),14:30pm-20:00pm(限定二人探视)</li>
\r\n
</ul>'
);
INSERT
INTO
`gate_authority`
VALUES
(
'1'
,
'普通权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5
\"
,
\"
time
\"
:
\"
11:30-13:59
\"
,
\"
number
\"
:
\"
1
\"
,
\"
cishu
\"
:
\"
4
\"
},{
\"
week
\"
:
\"
1,2,3,4,5
\"
,
\"
time
\"
:
\"
13:30-19:30
\"
,
\"
number
\"
:
\"
2
\"
,
\"
cishu
\"
:
\"
1
\"
},{
\"
week
\"
:
\"
6,7,8
\"
,
\"
time
\"
:
\"
11:30-12:30
\"
,
\"
number
\"
:
\"
1
\"
,
\"
cishu
\"
:
\"
1
\"
},{
\"
week
\"
:
\"
6,7,8
\"
,
\"
time
\"
:
\"
13:30-19:30
\"
,
\"
number
\"
:
\"
2
\"
,
\"
cishu
\"
:
\"
1
\"
}]'
,
'1'
,
'
1'
,
'
<ul>
\r\n
<li>
\r\n
1.周一至周五,11:30am-12:30pm(限定一人探视,15:00pm-19:00pm(限定二人探视)</li>
\r\n
<li>2.周六、周日、法定节假日,11:30am-12:30pm(限定一人探视),14:30pm-20:00pm(限定二人探视)</li>
\r\n
</ul>'
);
INSERT
INTO
`gate_authority`
VALUES
(
'2'
,
'超级权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7,8
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"\"
,
\"
cishu
\"
:
\"\"
}]'
,
'1'
,
'不限时间,不限人数'
);
INSERT
INTO
`gate_authority`
VALUES
(
'2'
,
'超级权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7,8
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"\"
,
\"
cishu
\"
:
\"\"
}]'
,
'1'
,
'1'
,
'不限时间,不限人数'
);
INSERT
INTO
`gate_authority`
VALUES
(
'3'
,
'手术权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
3
\"
,
\"
cishu
\"
:
\"
5
\"
}]'
,
'1'
,
'限定3人,每位家属限定5次进出次数,同时开启手术等待区域门禁权限;术后次日“零”点系统自动变更为普通探视;'
);
INSERT
INTO
`gate_authority`
VALUES
(
'3'
,
'手术权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
3
\"
,
\"
cishu
\"
:
\"
5
\"
}]'
,
'1'
,
'1'
,
'限定3人,每位家属限定5次进出次数,同时开启手术等待区域门禁权限;术后次日“零”点系统自动变更为普通探视;'
);
INSERT
INTO
`gate_authority`
VALUES
(
'4'
,
'陪同患者外出检查权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
cishu
\"
:
\"
5
\"
,
\"
number
\"
:
\"\"
}]'
,
'1'
,
'限定2人,每位家属限定5次进出次数;检查后次日“零”点系统自动变更为普通探视。'
);
INSERT
INTO
`gate_authority`
VALUES
(
'4'
,
'陪同患者外出检查权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
cishu
\"
:
\"
5
\"
,
\"
number
\"
:
\"\"
}]'
,
'1'
,
'1'
,
'限定2人,每位家属限定5次进出次数;检查后次日“零”点系统自动变更为普通探视。'
);
INSERT
INTO
`gate_authority`
VALUES
(
'5'
,
'陪住家属权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
cishu
\"
:
\"
5
\"
,
\"
number
\"
:
\"\"
}]'
,
'1'
,
'限定1人,每日进出次数5次闸机,如遇特殊情况则按特殊权限流程处理; '
);
INSERT
INTO
`gate_authority`
VALUES
(
'5'
,
'陪住家属权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
cishu
\"
:
\"
5
\"
,
\"
number
\"
:
\"\"
}]'
,
'1'
,
'1'
,
'限定1人,每日进出次数5次闸机,如遇特殊情况则按特殊权限流程处理; '
);
INSERT
INTO
`gate_authority`
VALUES
(
'6'
,
'重症监护室权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
3
\"
,
\"
cishu
\"
:
\"
5
\"
}]'
,
'1'
,
'探视时间由重症监护室在系统中设定时间范围、家属数量'
);
INSERT
INTO
`gate_authority`
VALUES
(
'6'
,
'重症监护室权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
3
\"
,
\"
cishu
\"
:
\"
5
\"
}]'
,
'1'
,
'1'
,
'探视时间由重症监护室在系统中设定时间范围、家属数量'
);
INSERT
INTO
`gate_authority`
VALUES
(
'7'
,
'无任何权限'
,
'[{}]'
,
'1'
,
'没有任何权限'
);
INSERT
INTO
`gate_authority`
VALUES
(
'7'
,
'无任何权限'
,
'[{}]'
,
'1'
,
'
1'
,
'
没有任何权限'
);
INSERT
INTO
`gate_authority`
VALUES
(
'8'
,
'特殊权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7,8
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
100
\"
,
\"
cishu
\"
:
\"
100
\"
}]'
,
'1'
,
'对应HIS系统里探视设置'
);
INSERT
INTO
`gate_authority`
VALUES
(
'8'
,
'特殊权限'
,
'[{
\"
week
\"
:
\"
1,2,3,4,5,6,7,8
\"
,
\"
time
\"
:
\"
00:00-23:59
\"
,
\"
number
\"
:
\"
100
\"
,
\"
cishu
\"
:
\"
100
\"
}]'
,
'1'
,
'1'
,
'对应HIS系统里探视设置'
);
-- ----------------------------
-- ----------------------------
-- Table structure for gate_dependents
-- Table structure for gate_dependents
-- ----------------------------
-- ----------------------------
...
...
天坛住院部闸机_探视系统_流程介绍.doc
View file @
f84bb188
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment