无纸化佛山3院修改

master
xuhaoxiang 4 years ago
parent fec1c6eef5
commit 09a6e400f7

@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
@ -239,6 +240,22 @@ public class FontController {
return "font/showRecordIframe";
}
/**
* recordPage
* */
@RequestMapping("recordPage")
public String recordPage(){
return "font/recordPage";
}
/**
* recordPage
* */
@RequestMapping("showRecord")
public String showRecord(){
return "font/showRecord";
}
/**
*
* @param masterId
@ -693,4 +710,39 @@ public class FontController {
archiveOtherExtService.updateOtherDomForStatusFlag(jzh,detailIds);
return Msg.success();
}
/**
* statusFlag -1
* @return
* @throws Exception
*/
@RequestMapping(value="getMaster")
@ResponseBody
public OffsetLimitPage getMaster(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit, HttpServletRequest request) throws Exception{
//如果前端主管医生字段有选全部选项,则查全部数据
String[] doctorInCharge=archiveMasterVo.getDoctorInCharge().split(",");
int i=doctorInCharge.length;
if(doctorInCharge.length>1&&StringUtils.isBlank(doctorInCharge[0])&&StringUtils.isNotBlank(doctorInCharge[1])){
archiveMasterVo.setDoctorInCharge("");
}
return archiveMasterService.selectMasterByColumn(archiveMasterVo, offset, limit,request);
}
/**
* statusFlag -1
* @return
* @throws Exception
*/
@RequestMapping(value="getAssortIds")
@ResponseBody
public String getAssortIds(String masterId) throws Exception{
String ids=archiveMasterService.selectAssortIdsByMasterId(masterId);
if(StringUtils.isNotBlank(ids)){
HashMap returnMap=new HashMap();
returnMap.put("assortIds",ids.substring(0, ids.length() - 1));
return JSON.toJSONString(returnMap);
}else{
return null;
}
}
}

@ -2,20 +2,24 @@ package com.emr.controller;
import com.alibaba.fastjson.JSONObject;
import com.emr.entity.Power_User;
import com.emr.service.ipml.CommomService;
import com.emr.util.ActionScopeUtils;
import com.emr.util.HttpClientUtils;
import com.emr.vo.User;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author HJL
@ -42,11 +46,15 @@ public class LoginController {
return "redirect:/login.jsp";
}
@Autowired
private CommomService commomService;
//实现用户登录@PathVariable("username")
@RequestMapping(value = "/login")
public String login(Model model, HttpServletRequest request) throws Exception{
String token = request.getParameter("token");
String userName = request.getParameter("userName");
String flag = request.getParameter("flag");
if(StringUtils.isNoneBlank(token)){
//高明归档特殊token=1462903487866169011
if("1462903487866169011".equals(token)){
@ -94,8 +102,12 @@ public class LoginController {
}
String contextPath = request.getScheme()+"://"+request.getServerName()+":"
+request.getServerPort() + request.getContextPath();
return "redirect:"+contextPath+"/index";
}
if("1".equals(flag)){
return "redirect:" + contextPath + "/font/recordPage";
}else {
return "redirect:" + contextPath + "/index";
}
}
@RequestMapping(value = "/index")
public String index() {

@ -291,6 +291,13 @@ public class beHospitaledController {
List<Archive_Master> list = archiveMasterService.loadOverTimeDoctorInCharge();
return Msg.success().add("list",list);
}
@ResponseBody
@RequestMapping(value = "/getDoctorInCharge")
public List<Archive_Master> getDoctorInCharge(HttpServletResponse response, Archive_Master archiveMaster,HttpServletRequest request) throws Exception {
//根据目前账号所在科室获取主管医生列表
return archiveMasterService.getDoctorInCharge(archiveMaster,request);
}
}

@ -41,6 +41,13 @@ public interface Archive_DetailMapper {
* @return
*/
List<Archive_Detail> selectAssortIdsByMasterIds(@Param("masterIds") String masterIds);
/**
* masterIdassortId
* @param masterId
* @return
*/
List<Archive_Detail> selectAssortIdsByMasterId(@Param("masterId") String masterId);
/**
* masterIdMID
* @param masterIds

@ -20,6 +20,8 @@ public interface Archive_MasterMapper {
List<Archive_Master_Vo> selectByColumn(Archive_Master_Vo record);
List<Archive_Master_Vo> selectMasterByColumn(Archive_Master_Vo record);
List<Archive_Master_Vo> selectByLast(Archive_Master_Vo record);
List<Archive_Master_Vo> selectByUnfile(Archive_Master_Vo record);
@ -60,4 +62,12 @@ public interface Archive_MasterMapper {
*
*/
List<Archive_Master_Vo> selectCompleteMasterIds(Archive_Master_Vo master);
/**
*
* @param record
* @return
*/
List<Archive_Master> getDoctorInCharge(Archive_Master record);
}

@ -57,6 +57,14 @@ public interface Archive_MasterService {
*/
OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,HttpServletRequest request);
/**
*
*
* @param archiveMasterVo
* @return
*/
OffsetLimitPage selectMasterByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,HttpServletRequest request);
/**
*
@ -124,6 +132,16 @@ public interface Archive_MasterService {
List<String> selectOracleGetSignList(StringBuilder patientIdStr, List<String> selectList);
String selectAssortIdsByMasterId(String masterId);
/**
*
* @param record
* @return
*/
List<Archive_Master> getDoctorInCharge(Archive_Master record,HttpServletRequest request)throws Exception;
//String selectLockInfoByMasterId(String archiveDetailId);
}

@ -6,13 +6,16 @@
*/
package com.emr.service.ipml;
import com.alibaba.fastjson.JSONObject;
import com.emr.dao.*;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.HttpClientUtils;
import com.emr.util.Msg;
import com.emr.util.OracleConnect;
import com.emr.vo.User;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
@ -21,6 +24,7 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
@ -56,6 +60,10 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
private Emr_DictionaryMapper dictionaryMapper;
@Autowired
private PaperPostionService paperPostionService;
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private CommomService commomService;
/**
*
* */
@ -83,6 +91,51 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return new OffsetLimitPage((Page) list);
}
@Override
public OffsetLimitPage selectMasterByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,HttpServletRequest request) {
//设置查询条件审核角色
//setInfoId(archiveMasterVo);
//设置登录用户
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//查该登录工号绑定的科室下面的患者,且只能查在院患者
String requestUrl =POWER_URLHEAD + "/ssoLogin/getUser?userName="+user.getUserName();
JSONObject obj = HttpClientUtils.httpGet(requestUrl);
if(obj!=null) {
archiveMasterVo.setDeptName(obj.getString("deptCode"));
}
//查询
List<Archive_Master_Vo> list = selectByColumn(offset, limit,archiveMasterVo,request);
return new OffsetLimitPage((Page) list);
}
@Override
public List<Archive_Master> getDoctorInCharge(Archive_Master record,HttpServletRequest request)throws Exception {
//设置登录用户
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//查该登录工号绑定的科室下面的患者,且只能查在院患者
String requestUrl =POWER_URLHEAD + "/ssoLogin/getUser?userName="+user.getUserName();
//List<User> userList = commomService.getUserList();
JSONObject obj = HttpClientUtils.httpGet(requestUrl);
if(obj!=null) {
record.setDeptName(obj.getString("deptCode"));
}
List<Archive_Master> returnList=archiveMasterMapper.getDoctorInCharge(record);
/*//替换姓名
for (Archive_Master archiveMasterList : returnList) {
if (!CollectionUtils.isEmpty(userList)) {
//转换姓名
String userName = archiveMasterList.getDoctorInCharge();
for (User userDetail : userList) {
if (StringUtils.isNotBlank(userName) && userName.equals(userDetail.getUserName())) {
archiveMasterList.setDoctorInCharge(userDetail.getName());
break;
}
}
}
}*/
return archiveMasterMapper.getDoctorInCharge(record);
}
/**
* //循环遍历list集合判断是否完整完整isCheck赋值1且批量更新LockInfo字段为完整
* @param list
@ -266,13 +319,14 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
if(null != offset && null != limit) {
PageHelper.offsetPage(offset, limit);
}
list = archiveMasterMapper.selectByColumn(archiveMasterVo);
archiveMasterVo.setIsSuccess(null);
list = archiveMasterMapper.selectMasterByColumn(archiveMasterVo);
//组织完整性字段并完整的更新archive_master表的完整性字段值为完整LockInfo='完整'
//updateMasterBySuccess(list);
//转换科室与赋值超期天数
selectByColumnChange(list);
// selectByColumnChange(list);
//根据状态code转换状态及判断显示按钮
if(null != list && !list.isEmpty()){
/*if(null != list && !list.isEmpty()){
//查询流转角色集合
List<ArchiveFlowRole> flowRoles = flowRoleMapper.selectAll();
//计算属于哪种审核角色
@ -299,7 +353,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
}
}
}*/
return list;
}
@ -1278,6 +1332,18 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public String selectLockInfoByMasterId(String archiveDetailId) {
return null;
}*/
@Override
public String selectAssortIdsByMasterId(String masterId) {
//按masterId分组查询需要已采集的分类集合
List<Archive_Detail> details = detailMapper.selectAssortIdsByMasterId(masterId.toString());
String assortIdStr ="";
for (Archive_Detail detail : details) {
if(StringUtils.isNotBlank(detail.getAssortid())){
assortIdStr+=detail.getAssortid()+",";
}
}
return assortIdStr;
}
}

@ -422,13 +422,31 @@
INNER JOIN
zd_assort
ON
archive_detail.AssortID = zd_assort.assort_id AND zd_assort.is_check = 1
archive_detail.AssortID = zd_assort.assort_id
WHERE
MasterID IN (${masterIds})
AND archive_detail.flag = 0
GROUP BY
AssortID,
MasterID
</select>
<!--按查询按masterId分组查询单个-->
<select id="selectAssortIdsByMasterId" resultMap="BaseResultMap" parameterType="java.lang.String">
SELECT
AssortID,
MasterID
FROM
archive_detail
INNER JOIN
zd_assort
ON
archive_detail.AssortID = zd_assort.assort_id
WHERE
MasterID =#{masterId,jdbcType=VARCHAR}
AND archive_detail.flag = 0
GROUP BY
AssortID,
MasterID
</select>
<!--按masterId分组查询是否缺少检验检查报告MID集合 有记录就是缺失-->
<select id="selectNotInspectionList" resultMap="BaseResultMap">

@ -250,7 +250,6 @@
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
WHERE
( dbo.archive_detail.flag = 0 )
GROUP BY
@ -510,6 +509,29 @@
)
</if>
</sql>
<select id="getDoctorInCharge" parameterType="com.emr.entity.Archive_Master" resultMap="BaseResultMap">
select DISTINCT m.DOCTOR_IN_CHARGE from archive_master m
where 1=1 --m.ArchiveState in('归档中','初审','提交','主任退回')
<if test="archivestate!= null and archivestate!= ''">
and m.ArchiveState in
<foreach item="item" collection="archivestate.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</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="doctorInCharge!= null and doctorInCharge!= ''">
and m.DOCTOR_IN_CHARGE in
<foreach item="item" collection="doctorInCharge.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!--自定义完整性校验查询-->
<select id="selectCompleteMasterIds" resultMap="BaseResultMap2">
SELECT
@ -630,6 +652,46 @@
ORDER BY archive_master.discharge_date_time desc
</select>
<!---出院-->
<select id="selectMasterByColumn" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select * from archive_master where 1=1
<if test="deptName!= null and deptName!= ''">
and dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="userName!= null and userName != ''">
and name=#{userName,jdbcType=NVARCHAR}
</if>
<if test="inpNo!= null and inpNo != ''">
and inp_no=#{inpNo,jdbcType=NVARCHAR}
</if>
<if test="visitId!= null and visitId != ''">
and visit_id=#{visitId,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge!= null and doctorInCharge!= ''">
and DOCTOR_IN_CHARGE in
<foreach item="item" collection="doctorInCharge.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and admission_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 admission_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and admission_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
and discharge_date_time='1801-02-03 00:00:00'
ORDER BY admission_date_time desc
</select>
<!--终审-->
<select id="selectByLast" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,

@ -442,7 +442,6 @@
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
inner join archive_master
on archive_detail.MasterID = archive_master.id
WHERE

@ -0,0 +1,199 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<%@ include file="/WEB-INF/jspf/comm.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>病案浏览</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<%--<meta name="referrer" content="never">--%>
<!-- 解决部分兼容性问题如果安装了GCF则使用GCF来渲染页面如果未安装GCF则使用最高版本的IE内核进行渲染。 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- 页面按原比例显示 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="shortcut icon" href="${path}/static/favicon.ico">
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<style>
.divCss {
margin-top: 5px;
}
#iframe{
height: 100%;
}
.divCss2 {
margin-top: 5px;
margin-left: 5px;
}
.divCss8 {
margin-top: 5px;
margin-right: 20px;
}
.divCss3 {
margin-top: 5px;
margin-left: 20px;
color: blue;
}
.divCss4 {
border-top: 1px solid #e5e5e5;
width: 97.5%;
margin-top: 10px;
margin-bottom: 5px;
}
.labCss {
color: #c1c3c4;
}
.titleCss {
text-align: left;
vertical-align: middle;
background-color: #3c8dbc;
color: #fff;
font-size: 19px;
font-weight: bold;
height: 30px;
margin-bottom: 10px;
}
.treeBtn {
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
}
.zTreeDemo {
height: auto;
min-height: 350px;
}
.divCss5 {
border-left: 2px solid #e5e5e5;
height: auto;
min-height: 350px;
}
.btnGroupCss {
text-align: right;
}
/* dataTables表头居中 */
.table > thead:first-child > tr:first-child > th {
text-align: center !important;
}
#assortModal > div > div {
width: 500px;
}
#exampleModal > div > div {
width: 400px;
}
.imgDivCss {
min-height: 400px !important;
}
.showImg {
width: 80%;
height: 100%
}
.shadeImg {
height: 950px;
}
/**
*多选下拉框
*/
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 168px !important;
}
.filter-option-inner-inner {
font-size: 12px;
}
</style>
</head>
<body>
<!--主键-->
<input type="hidden" id="patientId" value="${patientId}">
<!--记账号-->
<input type="hidden" id="accountNumber" value="${accountNumber}">
<input type="hidden" id="assortIds" value="${assortIds}">
<input type="hidden" id="visitIdFor" value="${visitId}">
<!--业务识别码1:护理按需采集预览-->
<input type="hidden" id="typeFlag" value="3">
<!--隐藏是否是初始化-->
<input type="hidden" id="isSearch" value="1">
<!--当前操作角色-->
<input type="hidden" id="checker">
<div class="main" >
<div class="headDiv"id="main1">
<div class="headSpanDiv">
<span class="headspan">
病案浏览
</span>
</div>
</div>
<div class="searchDiv" id="main">
<input type="hidden" id="admissId" value="${commom.admissId}">
<div class="mainDiv">
<!--搜索-->
<form style="margin-top:5px;margin-bottom: 0!important;">
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="inpNo">住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数"
maxlength="2">
</div>
<div class="form-group divCss">
<label>入院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDate"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDate" maxlength="10"
autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8">
<label>主管医生:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="doctorInCharge"
id="doctorInCharge" title="请输入主管医生" data-actions-box="true" data-deselect-all-text="取消全选"
data-select-all-text="全选">
<option value="">全部</option>
</select>
</div>
<%--<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10"
autocomplete="off"/>
</div>
</div>--%>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtnFor">查询</button>
<div hidden="hidden">
<label for="deptName">科室:</label>
<input type="text" class="input-sm form-control" id="deptName" placeholder="科室" maxlength="25">
</div>
</div>
</form>
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped"></table>
</div>
</div >
<div class="contentDiv">
<iframe width="100%" src="" id="iframe" frameborder="0" scrolling="no"></iframe>
</div>
</div>
</body>
<script type="text/javascript">
var path = "${path}";
</script>
<script src="${path}/static/js/record/recordPage.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-16"></script>
</html>

@ -159,9 +159,9 @@
</div>
</div>
</div>
<c:if test="${printCount != 0}">
<%--<c:if test="${printCount != 0}">
<div class="seal-result">已打印</div>
</c:if>
</c:if>--%>
<div class="row rowDiv">
<div class="col-sm-3 inputDiv">
<div class="form-group">
@ -171,14 +171,6 @@
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">出院日期:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" id="disDate">
</div>
</div>
</div>
</div>
</div>
<div class="contentDiv">

@ -73,7 +73,7 @@
<button type="button" class="btn btn-xs btn-primary" onclick="onloadPdf()">加载PDF</button>
</div>
<div class="col-md-4" style="padding:0 2px;" >
<button type="button" class="btn btn-xs btn-primary" style="display: none" onclick="flashPdf()" id="freshBtnDiv">刷新</button>
<%-- <button type="button" class="btn btn-xs btn-primary" style="display: none" onclick="flashPdf()" id="freshBtnDiv">刷新</button>--%>
<button type="button" class="btn btn-xs btn-danger" style="display: none" id="delBtnDiv">删除</button>
</div>
</div>

@ -0,0 +1,708 @@
var tipLoad = 1;
//列表复选框选中数组
var selects = '';
//定义表格内容最大高度
var maxHeight = 0;
//出院列表
function initTable() {
var name=$("#name").val();
var inpNo=$("#inpNo").val();
if (tipLoad == 1) {
$("#table").bootstrapTable({ // 对应table标签的id
url: path+"/font/getMaster", // 获取表格数据的url
uniqueId:"id",
contentType: "application/x-www-form-urlencoded",//一种编码。好像在post请求的时候需要用到。这里用的get请求注释掉这句话也能拿到数据
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //是否显示行间隔色
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
sidePagination: 'server', // 设置为服务器端分页 客户端client
search: false,
showColumns: true,
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
undefinedText: '---', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
//height: getHeight(220), //定义表格的高度。
searchTimeOut: 500,// 默认500 设置搜索超时时间。
toolbarAlign: 'right',// 指定 toolbar 水平方向的位置。'left' 或 'right'
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
showHeader: true,//是否显示列头。
trimOnSearch: true,//设置为 true 将自动去掉搜索字符的前后空格。
//是否显示导出按钮
showExport: true,
//导出表格方式默认basic只导出当前页的表格数据all导出所有数据selected导出选中的数据
exportDataType: "basic",
//导出文件类型
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {
fileName: document.title
},
queryParams: function (params) {
var currPageSize = this.pageSize;
if (currPageSize == 2) {
currPageSize = 10;
}
var limit = null;
var offset = params.offset;
//判断是否导出全部all
if ($("#sel_exportoption").val() == "all") {
offset = 0;
limit = this.totalRows;
this.pageSize = limit;
} else {
limit = currPageSize;
this.pageSize = currPageSize;
}
var doctorInCharge = $("#doctorInCharge").val().toString();
var temp = {
limit: limit, //页面大小
offset: offset, //页码
inpNo: "" + $("#inpNo").val(),
visitId: "" + $("#visitId").val(),
userName: "" + $("#name").val(),
startDateTo: $("#startDateTo").val(),
endDateTo: $("#endDateTo").val(),
startDate: $("#startDate").val(),
endDate: $("#endDate").val(),
doctorInCharge: doctorInCharge,
};
return temp;
},
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [{
title: '全选',
field: 'select', //复选框
checkbox: true,
width: 25,
align: 'center',
valign: 'middle'
},
{
title: '住院号',
field: 'inpNo',
align: 'left',
valign: 'middle'
},
{
title: '住院次数',
field: 'visitId',
align: 'center',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'left',
valign: 'middle'
},
{
title: '性别',
field: 'sex',
align: 'center',
valign: 'middle'
},
{
title: '主管医生',
field: 'doctorInCharge',
align: 'left'
},
{
title: '入院时间',
field: 'admissionDateTime',
align: 'left',
valign: 'middle'
},
{
title: '状态',
field: 'archivestate',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
return '<span style="color:green">在院</span>';
}
},
{
title: "操作",
align: 'left',
valign: 'middle',
formatter: function (value, row) {
var html = "";
html += '<button type="button" class="btn btn-danger btn-sm selInfo" title="查看">查看pdf信息</button>';
/*if (selectPower == 1) {
html += '<button type="button" class="btn btn-danger btn-sm selInfo" title="查看">查看</button>';
}
if (row.btns != '' && row.btns != null) {
html += row.btns;
}
if (showFlowPower == 1) {
html += '<button type="button" class="btn btn-sm btn-success showFlowInfo" title="查看流程">查看流程</button>'
}
if (otherPower == 1) {
html += '<button type="button" class="btn btn-sm btn-info showTransferDeptUser" title="跨科查阅">跨科查阅</button>'
}*/
return html;
},
events: {
//查看
'click .selInfo': function (e, value, row) {
$("#patientId").val(row.id);
$.ajax({
type:'get',
url:path+'/font/getAssortIds',
data:{masterId:row.id},
async:false,
dataType:'json',
success:function (data) {
if(null != data && data != ''){
$("#assortIds").val(data.assortIds);
}
}
})
var patientId=row.id;
//加载病案信息
loadRecord();
//加载iframe
$("#main").hide();
$("#main1").hide()
$("#iframe").prop("src",path+"/font/showRecord?patientId="+patientId+"&assortIds="+$("#assortIds").val());
},
//查看流程
'click .showFlowInfo': function (e, value, row) {
$('#showFlowInfo').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
var masterId = row.id;
var name = encodeURI(row.name);
var inpNo = row.inpNo;
var visitId = row.visitId;
var dischargeDateTime = row.dischargeDateTime;
$("#showFlowInfoIframe").prop("src",path+"/beHosp/toShowFlowInfo?id="+masterId+"&name="+name+"&inpNo="+inpNo+"&visitId="+visitId+"&dischargeDateTime="+dischargeDateTime+"&role="+$("#checker").val());
},
//跨科查阅
'click .showTransferDeptUser': function (e, value, row) {
$('#showTransferDeptUser').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
var masterId = row.id;
var deptName = row.deptName;
$("#masterId1").val(masterId);
initTree2(deptName,masterId);
},
},
cellStyle: function () {
return {classes: 'success'}
}
}
],
onLoadSuccess: function () { //加载成功时执行
$(".page-list").show();
tipLoad = 0;
reloadTableHeight("table");
},
onLoadError: function () { //加载失败时执行
tipLoad = 0
}
});
}
}
//查询
$('#searchBtnFor').click(function () {
var name=$("#name").val();
var inpNo=$("#inpNo").val();
var visitId=$("#admissTimes").val();
var tipLoad = 1;
if (tipLoad == 1) {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
} else {
toastr.warning("正在查询,请稍等...");
}
});
//格式化状态
function paramsMatter(value, row) {
var result = '';
if(row.days > 0){
result = '<span style="color:red">(超期)</span></span>';
}
if(value == null){
value = '';
}
if(result != '') {
return '<p title="' + value + '">' + result + row.currentStatus + '</p>';
}
return value;
}
//加载病案信息
function loadRecord(){
$.ajax({
type:'get',
url:path+'/font/getRecord',
data:{masterId:$("#patientId").val()},
async:false,
dataType:'json',
success:function (data) {
if(null != data && data != ''){
$("#doctorInCharge").val(data.doctorInCharge);
$("#inpatientNo").val(data.inpNo);
$("#name").val(data.name);
$("#admissTimes").val(data.visitId);
$("#disDate").val(data.dischargeDateTime);
$("#disDeptName").val(data.deptName);
$("#archivestate").val(data.archivestate);
}
}
})
}
//审核弹窗 单个审批①
function verifyInfo(role,archivestate,roleCode,masterId){
//生成表单token,防止表单重复提交
setFormToken();
//赋值审批一个
$("#approveCount").val(1);
//查询his判断医生护士是否全部提交
var result = 1;
//result = selectHis(row);
if (result == 1) {
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#verifyText").val("");
$("#archiveId").val(masterId);
$("#roleCode").val(roleCode);
$("#archivestate").val(archivestate);
$("#role").val(role);
} else if(result == -1){
toastr.warning("系统出错了请联系系统管理员");
}else {
toastr.warning("his系统医生或护士未完成提交");
}
}
//查看退回信息
$("#getRecallBtn").on('click', function () {
//退回信息保存
$('#returnModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$('#form2').find('input,textarea,checkbox').prop('readonly', true);
$('#returnBtn').hide();
//根据病案号获取缺陷信息
$.ajax({
url: path+"/lastVerify/getDetailByArchId",
type: "POST",
data: {archiveDetailId: $("#idLab").html()},
success: function (result) {
if (result != null) {
$("#content").val(result.content);
$("#backContent").val(result.backContent);
$("#score").val(result.score);
//缺陷类别的勾选
if (result.assortId != null) {
var assortArr = result.assortId.split(",");
$('input[name="Fruit"]').each(function () {//遍历每一个名字为interest的复选框其中选中的执行函数
if ($.inArray($(this).val(), assortArr) != -1) {
$(this).attr('checked', true);
} else {
$(this).attr('checked', false);
}
});
}
}
}
});
});
function getDept() {
//获取科室列表
$.ajax({
url: "${path}/inHosp/getDept",
type: "POST",
data: {effective: 1, typecode: "dept_code"},
success: function (result) {
if (result != null) {
for (var i = 0; i < result.length; i++) {
$("#deptName").append("<option value=" + result[i].code + ">" + result[i].name + "</option>");
$("#deptAdmissionTo").append("<option value=" + result[i].code + ">" + result[i].name + "</option>");
}
}
$(".selectpicker").selectpicker('refresh');
}
});
}
function getDoctorInCharge() {
var deptName = $("#doctorInCharge").val();
//获取科室列表
$.ajax({
url: path+"/beHosp/getDoctorInCharge",
type: "POST",
data: {deptName: deptName},
success: function (result) {
if (result != null) {
for (var i = 0; i < result.length; i++) {
if (result[i]!=null&&result[i].doctorInCharge != null) {
$("#doctorInCharge").append("<option value=" + result[i].doctorInCharge + ">" + result[i].doctorInCharge + "</option>");
}
}
}
$(".selectpicker").selectpicker('refresh');
}
});
}
//搜索条件需要查询审核状态的时候异步查询该审核角色拥有的code集合
function getCurrentCodes() {
//只做一次查询赋值
if($("#currentRoleIds").val() == ''){
$.ajaxSettings.async = false;
$.get(path+"/beHosp/getCurrentCodes",function(data){
$("#currentRole").val(data.code);
$("#currentRoleIds").val(data.msg);
},'json')
$.ajaxSettings.async = true;
}
}
//加载审核节点
function getApproveRoles() {
//只做一次查询赋值
$.get(path+"/beHosp/getFlowRole",function(data){
if(data.code == 100){
var flowRoles = data.extend.list;
if(null != flowRoles && flowRoles != ''){
var html = '';
var currentRoleIds = selectMaxInfoId($("#currentRoleIds").val());
//获取操作角色
var checker = $("#checker").val();
for (var i = 0; i < flowRoles.length; i++) {
var option = '<option data-role="'+flowRoles[i].role+'" value="'+flowRoles[i].id+'">'+flowRoles[i].name+'</option>';
var code = flowRoles[i].code;
//过滤病案室审核128和病案室召回1024且无效的对象
if(code != '128' && code != '1024' && flowRoles[i].effective == 1){
if(code <= 64 && code >= 2 && checker != 4){
if(currentRoleIds != '' && currentRoleIds >= flowRoles[i].id && checker == flowRoles[i].role){
html += option;
}
}else{
if(checker != 4 && flowRoles[i].role != null){
if(checker == flowRoles[i].role){
html += option;
}
}else{
html += option;
}
}
}
}
$("#infoId").append(html);
}
}else{
toastr.error(data.msg);
}
},'json')
}
//取最大的审核审核id
function selectMaxInfoId(ids){
var temp = 0;
var idArr = ids.split(',');
for (var i = 0; i < idArr.length; i++) {
if(idArr[i] != ''){
if(temp < idArr[i]){
temp = idArr[i];
}
}
}
return temp;
}
$(function () {
//加载权限科室
getPowerDept();
//赋值审核角色
getChecker();
//加载当前角色
getCurrentCodes();
//加载审核节点
//getApproveRoles();
//加载主管医生列表
getDoctorInCharge();
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
if (index != null && index != "" && index.indexOf("excel") != -1) {
$("#excelBtn").show();
$("#toolbar").show();
} else {
$("#excelBtn").hide();
$(".columns-right").hide();
}
if (index != null && index != "" && index.indexOf("upload") != -1) {
$("#uploadBtn").show();
} else {
$("#uploadBtn").hide();
}
if (index != null && index != "" && index.indexOf("pdf") != -1) {
$("#pdfBtn").show();
} else {
$("#pdfBtn").hide();
}
if (index != null && index != "" && index.indexOf("pdf2") != -1) {
$("#pdfBtn2").show();
} else {
$("#pdfBtn2").hide();
}
if (index != null && index != "" && index.indexOf("cancelAll") != -1) {
$("#updateStateBtn").show();
} else {
$("#updateStateBtn").hide();
}
if (index != null && index != "" && index.indexOf("useAll") != -1) {
$("#updateStateBtn2").show();
} else {
$("#updateStateBtn2").hide();
}
var deptAdmissionTo = url.substring(url.lastIndexOf('&') + 1).replace("depts=", "");
var deptArr = deptAdmissionTo.split(',');
if (deptAdmissionTo == null || deptAdmissionTo == '' || deptArr.length > 1) {
$('#deptDiv').show();
} else {
$('#deptDiv').hide();
}
});
/**
* 校验完整性
* */
$("#checkSuccessBtn").click(function(){
var masterId = $("#masterId").val();
var result = checkSuccessMethod(masterId);
if(result != ''){
$("#wzContent").text(result);
//增加完整性刷新后高亮状态
$("#wzContent").addClass("wzContent");
toastr.success("完整性状态已刷新");
//刷新表格
$('#table').bootstrapTable('updateByUniqueId', {
id: masterId,
row: {
lockinfo: result
}
});
}else{
toastr.warning("校验失败,校验程序未启动或出错!");
}
})
/*******************************跨科查询*****************************************/
var zNodes = [];
var key2 = $("#key2");
key2.bind("focus", focusKey2)
.bind("blur", blurKey2)
.bind("input", searchNode2);
var opts = {
lines: 13, // The number of lines to draw |小长条的数量
length: 20, // The length of each line |小长条的长度
width: 5, // The line thickness |小长条的宽度
radius: 15, // The radius of the inner circle |内环的半径长
corners: 1, // Corner roundness (0..1)
rotate: 0, // The rotation offset |旋转角度
direction: 1, // 1: clockwise, -1: counterclockwise |1顺时针方向 -1逆时针方向
color: '#000', // #rgb or #rrggbb or array of colors |颜色
speed: 1, // Rounds per second |每秒转多少圈
trail: 60, // Afterglow percentage |余晖效果百分比
shadow: false, // Whether to render a shadow |渲染阴影
hwaccel: false, // Whether to use hardware acceleration |加速
className: 'spinner', // The CSS class to assign to the spinner |类名spinner
zIndex: 2e9, // The z-index (defaults to 2000000000) |显示在最顶层
top: '150px' // Top position relative to parent in px |相对父元素的top
};
var spinner = new Spinner(opts);
//获取所有分段列表
function initTree2(deptName,masterId) {
zNodes = []
$.ajax({
url: path+"/transferDeptUser/selectTranferDeptUserTree",
type: "POST",
data:{deptName:deptName,masterId:masterId},
success: function (result) {
var rootChecked = true;
if (result != null) {
for(var ele in result){
zNodes.push(result[ele]);
if(result[ele].checked == null){
rootChecked = false;
}
}
}
//判断是否根节点选中
if(rootChecked && result != null){
zNodes.push({id: 0, parentId: 0, name: '用户列表', open: true,checked:"true"});
}else{
zNodes.push({id: 0, parentId: 0, name: '用户列表', open: true});
}
$.fn.zTree.init($("#ztree2"), setting1, zNodes);
}, error: function () {
}
});
}
var setting1 = {
view: {
addHoverDom: false,
removeHoverDom: false,
selectedMulti: false,
autoCancelSelected: false,
fontCss: getFontCss
},
check: {
enable: true
},
data: {
simpleData: {
chkStyle: "checkbox",
enable: true,
idKey: "id",
pIdKey: "parentId",
rootPId: "0"
}
},
edit: {
enable: false
}
};
function focusKey2() {
var key = $("#key2");
if (key.hasClass("empty")) {
key.removeClass("empty");
}
}
function blurKey2() {
var key = $("#key2");
if (key.get(0).value === "") {
key.addClass("empty");
}
}
function getFontCss(treeId, treeNode) {
return (!!treeNode.highlight) ? {color: "#A60000", "font-weight": "bold"} : {
color: "#333",
"font-weight": "normal"
};
}
/**
* 遍历树节点
* 1.自身不满足搜索条件
*
* 2.其子节点不包含有满足条件的节点
* 的节点加入到filterResult中
*
* @param node 查询的节点
* @param inputStr 搜索条件
* @param filterResult 过滤的结果集
* @return 该节点是否满足条件
*/
function filterNodes(node, inputStr, filterResult) {
if (node != null) {
//自身是否符合搜索条件
var selfMatch = node.name.indexOf(inputStr) > -1;
//子节点是否有满足的条件的节点
var childMatch = false;
var children = node.children;
if (children != undefined) {
for (index in children) {
childMatch = filterNodes(children[index], inputStr, filterResult) || childMatch;
}
}
//自身不满足搜索条件 且其子节点不包含有满足条件的节点
if (!selfMatch && !childMatch) {
filterResult.push(node);
}
return selfMatch || childMatch;
} else {
return true;
}
}
function searchNode2() {
var zTree = $.fn.zTree.getZTreeObj("ztree2");
var value = $("#key2").val();
if (value == "") {
//显示隐藏的节点
var nodes = zTree.getNodesByParam("isHidden", true);
zTree.showNodes(nodes);
} else {
//显示隐藏的节点
nodes = zTree.getNodesByParam("isHidden", true);
zTree.showNodes(nodes);
var root = zTree.getNodeByParam("level", "0");
var hiddenNodes = new Array();
filterNodes(root, value, hiddenNodes);
zTree.hideNodes(hiddenNodes);
}
zTree.expandAll(true);
}
//展开
function expandAll2(num) {
var treeObj = $.fn.zTree.getZTreeObj("ztree"+num);
treeObj.expandAll(true);
}
//收缩
function collapseAll2(num) {
var treeObj = $.fn.zTree.getZTreeObj("ztree"+num);
treeObj.expandAll(false);
}
//保存
$("#transferDeptUserBtn").click(function(){
var saveNodes = [];
var zTree = $.fn.zTree.getZTreeObj("ztree2");
var nodes=zTree.getCheckedNodes(true);
for (var i = 0; i < nodes.length; i++) {
if(nodes[i].level == 3){
var obj = new Map();
obj['deptCode'] = nodes[i].code;
obj['userName'] = nodes[i].realName;
obj['masterId'] = $("#masterId1").val();
saveNodes.push(obj);
}
}
$.ajax({
type:'post',
url:path+'/transferDeptUser/updateTransferDeptUserSet',
data:{jsonStr:JSON.stringify(saveNodes)},
dateType:'json',
success:function(data){
if(data.code == 100){
toastr.success("保存成功");
}else{
toastr.error(data.msg);
}
}
})
});
//主管医生下拉框修改即查询
function doctorOnChange(){
//标识为按条件查询
$("#isSearch").val(1);
if(tipLoad==0) {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
}else{
toastr.warning("正在查询,请稍等...");
}
}

@ -1,5 +1,9 @@
//初始化函数
$(function(){
var patientId = parent.$("#patientId").val();
var assortIds = parent.$("#assortIds").val();
$("#patientId").val(patientId)
$("#assortIds").val(assortIds)
//加载病案信息
loadRecord();
//加载iframe
@ -23,6 +27,7 @@ function loadRecord(){
$("#disDate").val(data.dischargeDateTime);
$("#disDeptName").val(data.deptName);
$("#archivestate").val(data.archivestate);
$("#accountNumber").val(data.patientId);
}
}
})

Loading…
Cancel
Save