无纸化归档功能修改

master
xuhx 4 years ago
parent 07abe76f07
commit 4b456a3dd2

@ -671,21 +671,27 @@ public class signListController {
signList.setMasterID(id);
int num=0;
switch (flagNum){
//体温单
case 1:
num=-401;
break;
//护理记录
case 2:
num=-402;
break;
//首页
case 3:
num=-403;
break;
//医生文书
case 4:
num=-404;
break;
//评估单
case 5:
num=-405;
break;
//护士文书
case 6:
num=-406;
break;

@ -111,9 +111,9 @@
<if test="masterid != null and masterid != ''">
and id=#{masterid,jdbcType=VARCHAR}
</if>)+'%'
and visit_id=(select visit_id from Archive_Master where 1=1
<if test="masterid != null and masterid != ''">
and id=#{masterid,jdbcType=VARCHAR}
and admission_date_time=(select admission_date_time from Archive_Master where 1=1
<if test="patientId != null and patientId != ''">
and id=#{patientId,jdbcType=VARCHAR}
</if>)
and patindex('%B%',inp_no) != 0
and id!=#{masterid,jdbcType=VARCHAR}

@ -1369,8 +1369,14 @@
<select id="selectOverdue" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select m.id,m.patient_id, m.inp_no,m.visit_id,m.name,m.discharge_date_time
,CONVERT(varchar(10),m.admission_date_time, 120)admission_date_time,t.name dept_admission_to,g.name dept_name,m.DOCTOR_IN_CHARGE,m.death_flag,
d.*,[dbo].[getWorkday](m.discharge_date_time,d.create_time) overdue from archive_master m
LEFT JOIN(select master_id archive_detail_id,handle_time create_time,handle_name first_instance from (
d.*,[dbo].[getWorkday](m.discharge_date_time,d.create_time) overdue from
(select
id, patient_id, inp_no, visit_id, name, sex, dept_name, CONVERT(varchar(10),discharge_date_time, 120)discharge_date_time, ArchiveState,
admission_date_time, dept_admission_to, check_doctor, check_datetime, checked_doctor, transfer_dept,
checked_datetime, LockInfo, DOCTOR_IN_CHARGE, ID_NO, DISCHARGE_DISPOSITION, dept_code_lend,isscaned,is_scanning,
cmt_doctor,cmt_nurse,doctor_name,nurse_name,cmt_doctor_date,cmt_nurse_date,emr_doctor_cmt,emr_nure_cmt,death_flag,
bed_number,is_sign,signer,sign_time from archive_master) m
LEFT JOIN(select master_id archive_detail_id,CONVERT(varchar(10),handle_time, 120) create_time,handle_name first_instance from (
select ROW_NUMBER() over(partition by master_id order by handle_time asc) RowNum
,Archive_Master_Following.*
from Archive_Master_Following where 1=1 and following_type ='5' ) as t1 where 1=1 and RowNum = 1
@ -1437,17 +1443,88 @@
and d.create_time &lt;= #{createTimeEnd,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="deathFlag != null and deathFlag != ''">
and m.death_flag = #{deathFlag,jdbcType=NVARCHAR}
<if test="deathFlag == '0'.toString()">
and [dbo].[getWorkday](m.discharge_date_time,d.create_time)>3
</if>
<if test="deathFlag == '1'.toString()">
and [dbo].[getWorkday](m.discharge_date_time,d.create_time)>7
</if>
</if>
<if test="overdueDays != null and overdueDays != ''">
and m.death_flag ='0'
and convert(int,[dbo].[getWorkday](m.discharge_date_time,d.create_time))-convert(int,#{overdueDays,jdbcType=INTEGER})>0
union
select m.id,m.patient_id, m.inp_no,m.visit_id,m.name,m.discharge_date_time
,CONVERT(varchar(10),m.admission_date_time, 120)admission_date_time,t.name dept_admission_to,g.name dept_name,m.DOCTOR_IN_CHARGE,m.death_flag,
d.*,[dbo].[getWorkday](m.discharge_date_time,d.create_time) overdue from
(select
id, patient_id, inp_no, visit_id, name, sex, dept_name, CONVERT(varchar(10),discharge_date_time, 120)discharge_date_time, ArchiveState,
admission_date_time, dept_admission_to, check_doctor, check_datetime, checked_doctor, transfer_dept,
checked_datetime, LockInfo, DOCTOR_IN_CHARGE, ID_NO, DISCHARGE_DISPOSITION, dept_code_lend,isscaned,is_scanning,
cmt_doctor,cmt_nurse,doctor_name,nurse_name,cmt_doctor_date,cmt_nurse_date,emr_doctor_cmt,emr_nure_cmt,death_flag,
bed_number,is_sign,signer,sign_time from archive_master) m
LEFT JOIN(select master_id archive_detail_id,CONVERT(varchar(10),handle_time, 120) create_time,handle_name first_instance from (
select ROW_NUMBER() over(partition by master_id order by handle_time asc) RowNum
,Archive_Master_Following.*
from Archive_Master_Following where 1=1 and following_type ='5' ) as t1 where 1=1 and RowNum = 1
) d
on m.id=d.archive_detail_id
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) t
on m.dept_admission_to=t.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) g
on m.dept_name=g.code
where 1=1
and m.death_flag ='1'
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to in
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and m.discharge_date_time between CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120) and
#{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDate != null and startDate != ''">
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and m.discharge_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="createTime != null">
and d.create_time = #{createTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="createTimeStart != null and createTimeStart != '' and createTimeEnd != null and createTimeEnd != ''">
and d.create_time between CONVERT(VARCHAR(10),#{createTimeStart,jdbcType=NCHAR},120) and
#{createTimeEnd,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="createTimeStart != null and createTimeStart != ''">
and d.create_time >= CONVERT(VARCHAR(10),#{createTimeStart,jdbcType=NCHAR},120)
</when>
<when test="createTimeEnd != null and createTimeEnd != ''">
and d.create_time &lt;= #{createTimeEnd,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
and [dbo].[getWorkday](m.discharge_date_time,d.create_time)>7
</if>
</select>
<!--封存日志-->

@ -501,8 +501,6 @@
</head>
<body>
<input type="text" value="" id="collectionID" hidden>
<input type="text" value="" id="pid" hidden>
<div id="mb"></div>
<div style="margin-left:30px;margin-right:10px;height:auto">
@ -743,7 +741,6 @@
<input type="checkbox" id="flag" value="1">只显示作废</input>
</div>
<div class="col-sm-9 btnGroupCss">
<button type="button" class="btn btn-primary btn-sm" id="collectionBtn">按需采集</button>
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
@ -855,7 +852,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">护士文书:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button5" id="button5" name="button5"style="width:100">护士文书采集 </button>
<button type="button" class="btn btn-info btn-sm button5" id="button5" name="button5"style="width:"100>护士文书采集 </button>
</div>
</div>
</div>
@ -4088,9 +4085,6 @@
},
'click .selInfo': function (e, value, row, index) {
//ID供按需采集使用
$("#collectionID").val(row.id);
$("#pid").val(row.patientId);
$("#printTableFlag").hide();
if (row.printNum != 0) {
$("#printTableFlag").show();
@ -5098,95 +5092,6 @@
}
});
//采集体温单
$("#button1").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 1,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//采集护理记录
$("#button2").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 2,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//采集首页
$("#button3").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 3,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集医生文书
$("#button4").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 4,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集护士文书
$("#button5").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 6,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集评估单
$("#button6").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 5,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//添加pdf记录
$("#collectionBtn").click(function () {
$('#collectionModal').modal({

@ -422,6 +422,8 @@
</head>
<body>
<input type="text" value="" id="collectionID" hidden>
<input type="text" value="" id="pid" hidden>
<div id="mb"></div>
<div style="margin-left:30px;margin-right:10px;height:auto">
<!--搜索-->
@ -648,6 +650,7 @@
<input type="checkbox" id="flag" value="1">只显示作废</input>
</div>
<div class="col-sm-9 btnGroupCss">
<button type="button" class="btn btn-primary btn-sm" id="collectionBtn">按需采集</button>
<button type="button" class="btn btn-primary btn-sm" id="viewBtn">患者统一视图</button>
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
@ -710,6 +713,74 @@
</div>
</div>
<%--按需采集弹窗--%>
<div class="modal fade" id="collectionModal" tabindex="2" role="dialog" aria-hidden="true">
<div class="modal-dialog"style="width:300px">
<div class="modal-content">
<div class="modal-header2">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
按需采集详情
</h4>
</div>
<div class="modal-body">
<!--通过审批且未过期的patientId集合-->
<%--<form class="form-horizontal" id="logForm">--%>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">体温单:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button1" id="button1" name="button1"style="width:100px">体温单采集 </button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">护理记录:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button2" id="button2" name="button2"style="width:100px">护理记录采集 </button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">首页:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button3" id="button3" name="button3"style="width:100px">首页采集 </button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">医生文书:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button4" id="button4" name="button4"style="width:100px">医生文书采集 </button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">护士文书:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button5" id="button5" name="button5"style="width:100px">护士文书采集 </button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="form-group">
<label class="col-sm-3 control-label">评估单:</label>
<div class="col-sm-7">
<button type="button" class="btn btn-info btn-sm button6" id="button6" name="button6" style="width:100px">评估单采集</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 模态框3Modal分段信息 -->
<div class="modal fade" id="assortModal" tabindex="2" role="dialog" aria-hidden="true">
<div class="modal-dialog">
@ -3714,6 +3785,9 @@
},
'click .selInfo': function (e, value, row, index) {
$("#printTableFlag").hide();
//ID供按需采集使用
$("#collectionID").val(row.id);
$("#pid").val(row.patientId);
if(row.printNum!=0){
$("#printTableFlag").show();
}
@ -4381,6 +4455,94 @@
}
});
//采集体温单
$("#button1").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 1,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//采集护理记录
$("#button2").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 2,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//采集首页
$("#button3").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 3,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集医生文书
$("#button4").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 4,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集护士文书
$("#button5").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 6,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
toastr.success(result);
}
});
});
//采集评估单
$("#button6").click(function () {
$.ajax({
url: "${path}/signList/collection",
type: "POST",
data: {flagNum: 5,id:$("#collectionID").val(),pid:$("#pid").val()},
success: function (result) {
if (result != null) {
toastr.success(result);
}
}
});
});
//查询
$('#searchBtn').click(function () {
if (tipLoad == 0) {
@ -4390,6 +4552,15 @@
}
});
//添加pdf记录
$("#collectionBtn").click(function () {
$('#collectionModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
});
//添加pdf记录
$("#addPdfBtn").click(function () {

@ -281,17 +281,17 @@
</div>
</div>
<div class="form-group divCss8">
<label>超期天数>=</label>
<label>超期天数></label>
<input type="text" class="input-sm form-control" id="overdueDays" placeholder="请输入超期天数">
</div>
<div class="form-group divCss">
<%--<div class="form-group divCss">
<label>是否死亡:</label>
<select class="input-sm form-control" id="deathFlag">
<option value="">全部</option>
<option value="0">否</option>
<option value="1">是</option>
</select>
</div>
</div>--%>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>

Loading…
Cancel
Save