优化开发

master
zengwh 4 years ago
parent a351fe2b3b
commit 3eecb50035

Binary file not shown.

@ -34,7 +34,6 @@
<servlet.version>2.4</servlet.version>
<jsp.version>2.1</jsp.version>
<jstl.version>1.2</jstl.version>
<c3p0.version>0.9.5.2</c3p0.version>
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
<postgresql.version>9.2-1004-jdbc4</postgresql.version>
<activiti.version>5.17.0</activiti.version>
@ -377,12 +376,6 @@
<version>${groovy.version}</version>
</dependency>-->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>${c3p0.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>

@ -0,0 +1,51 @@
package com.emr.controller;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.CXFBusFactory;
import org.apache.cxf.endpoint.EndpointImplFactory;
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
import org.apache.cxf.jaxws.support.JaxWsEndpointImplFactory;
import java.util.List;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2019/9/11 16:15
* @UpdateUser:
* @UpdateDate: 2019/9/11 16:15
* @UpdateRemark:
* @Version: 1.0
*/
public class JAXDynamicClientFactory extends DynamicClientFactory {
protected JAXDynamicClientFactory(Bus bus) {
super(bus);
}
@Override
protected EndpointImplFactory getEndpointImplFactory() {
return JaxWsEndpointImplFactory.getSingleton();
}
@Override
protected boolean allowWrapperOps() {
return true;
}
public static JAXDynamicClientFactory newInstance() {
Bus bus = CXFBusFactory.getThreadDefaultBus();
return new JAXDynamicClientFactory(bus);
}
@Override
public boolean compileJavaSrc(String classPath, List srcList, String dest) {
org.apache.cxf.common.util.Compiler javaCompiler
= new org.apache.cxf.common.util.Compiler();
javaCompiler.setEncoding("UTF-8");
javaCompiler.setClassPath(classPath);
javaCompiler.setOutputDir(dest);
javaCompiler.setTarget("1.8");
return javaCompiler.compileFiles(srcList);
}
}

@ -1,12 +1,11 @@
package com.emr.controller;
import com.alibaba.fastjson.JSONObject;
import com.emr.util.ActionScopeUtils;
import com.emr.entity.Power_User;
import com.emr.util.HttpClientUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.cxf.endpoint.Client;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
@ -14,12 +13,9 @@ 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 org.springframework.web.bind.annotation.RequestParam;
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;
/**
@ -53,18 +49,32 @@ public class LoginController {
//实现用户登录@PathVariable("username")
@RequestMapping(value = "/login")
public String login(Model model, HttpServletRequest request) {
public String login(Model model, HttpServletRequest request) throws Exception{
String token = request.getParameter("token");
String userName = request.getParameter("userName");
String name = request.getParameter("name");
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "456789");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
model.addAttribute("POWER_URLHEAD", POWER_JSP);
request.getSession().setAttribute("token", token);
// request.getSession().setAttribute("userName", userName);
// request.getSession().setAttribute("userName", "123");
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session
request.getSession().setAttribute("CURRENT_USER", powerUser);
String url = powerUrl+"?sysFlag=emr_medical_record&userName="+ userName;
JSONObject obj = HttpClientUtils.httpGet(url);
if(obj!=null) {
if ((obj.getString("code")).equals("100")) {
//当验证都通过后,把用户信息放在 session 里
Session session = SecurityUtils.getSubject().getSession();
//session.setTimeout(4 * 3600);//以秒为单位即在没有活动4小时后session将失效
session.setTimeout(-1);//以秒为单位session将失效
session.setAttribute("menuList", obj);
}
}
return "index";
}
@ -73,7 +83,6 @@ public class LoginController {
return "index";
}
@RequestMapping(value = "/toError")
public String error(Model model) {
// 从session获取用户名

@ -10,6 +10,7 @@ import com.emr.annotation.OptionalLog;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.ThreadExcelUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
@ -102,6 +103,10 @@ public class MedicalRecallController {
@ResponseBody
@RequestMapping(value = "/updateState")
public int updateState(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) throws UnsupportedEncodingException {
String inpatientNo = emrFaultDetail.getContent();
if(StringUtils.isBlank(inpatientNo)){
return 0;
}
response.setCharacterEncoding("utf-8");
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
@ -131,17 +136,22 @@ public class MedicalRecallController {
emrFaultDetail.setFirstTrial(null);
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
//2021-01-30 初审成功日志
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录
archive_master_following.setFollowingType("10");
archive_master_following.setFollowingContent("病案召回");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
String lgFlag = inpatientNo.substring(0,2);
if(!"LG".equals(lgFlag)) {
//2021-01-30 初审成功日志
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录
archive_master_following.setFollowingType("10");
archive_master_following.setFollowingContent("病案召回");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}else{
//留观号召回推送第三方
archiveMasterService.requestObservationRecord(inpatientNo,"RETURNED",emrFaultDetail.getRecallReason());
}
}
return bol;
}

@ -0,0 +1,60 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Archive_Master_FollowingService;
import com.emr.service.ipml.ObservationRecordService;
import com.emr.util.Msg;
import com.emr.util.ThreadExcelUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@PropertySource(value = "classpath:config/jdbc.properties", encoding = "UTF-8")
@Controller
@RequestMapping("/observationRecord")
public class ObservationRecordController {
@Autowired
private ObservationRecordService observationRecordService;
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Archive_Master_FollowingService archiveMasterFollowingService;
@ResponseBody
@RequestMapping(value = "/getObservationRecordList")
public OffsetLimitPage getObservationRecordList(Archive_Master_Vo master, Integer offset, Integer limit) {
OffsetLimitPage result = observationRecordService.getObservationRecordList(master, offset, limit);
return result;
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response,Archive_Master_Vo master) throws Exception {
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
String[] header = {"患者ID","留观号","留观次数","姓名","留观开始日期","留观结束日期","归档状态","是否死亡"};
String[] fileNames = {"patientId","inpNo","visitId","name","admissionDateTime","dischargeDateTime","archivestate","deathFlag"};
//文件名
String fileName = "留观病历信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//构造excel的数据
List<Archive_Master> list = observationRecordService.getList(master);
ThreadExcelUtils utils = new ThreadExcelUtils(fileName, "", header, fileNames);
utils.exportExcelToFilePath(response,utils.listConvert(list));
}
}

@ -6,7 +6,10 @@
*/
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.emr.entity.Power_User;
import com.emr.util.HttpClientTool;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
@ -22,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.Map;
public class UrlInterceptor implements HandlerInterceptor {
@Value("${POWER_URLHEAD}")
@ -72,21 +77,19 @@ public class UrlInterceptor implements HandlerInterceptor {
String token = (String) request.getSession().getAttribute("token");
if (!"/login".equals(url) && StringUtils.isNoneBlank(token)) {
try {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session
request.getSession().setAttribute("CURRENT_USER", powerUser);
if (null == powerUser.getUserId()) {
response.sendRedirect( "/emr_medical_record/error.jsp");
//request.setAttribute("param", "重新登录");
// 创建url
String requestUrl = POWER_URLHEAD + "/font/checkToken";
// 执行请求
Map<String, String> params = new HashMap<>();
params.put("token", token);
String resultString = HttpClientTool.doPost(requestUrl, params);
String code = JSONArray.toJSONString(JSON.parseObject(resultString).get("code"));
if ("200".equals(code)) {
response.sendRedirect(POWER_URLHEAD + "/login");
return false;
}
} catch (Exception e) {
response.sendRedirect("/emr_medical_record/error.jsp");
response.sendRedirect(POWER_URLHEAD + "/login");
e.printStackTrace();
// response.sendRedirect(POWER_URLHEAD + "/login");
//request.setAttribute("param", "重新登录");

@ -64,7 +64,7 @@ public class beHospitaledController {
@ResponseBody
@RequestMapping(value = "/beHospList")
public OffsetLimitPage beHospList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
public OffsetLimitPage beHospList( Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
OffsetLimitPage result = archiveMasterService.selectByColumn(archiveMasterVo, offset, limit);
return result;
}
@ -73,12 +73,12 @@ public class beHospitaledController {
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
String[] header = {"病历清单id","住院号","住院次数","","性别","身份证","出院科室","出院日期","主管医生","状态","医生是否提交","医生","医生提交日期","护士是否提交","护士","护士提交日期","电子病历医生提交","电子病历护士提交","是否死亡"};
String[] fileNames = {"id","inpNo","visitId","name","sex","idNo","deptName","dischargeDateTime","doctorInCharge","archivestate","cmtDoctor","doctorName","cmtDoctorDate","cmtNurse","nurseName","cmtDurseDate","emrDoctorCmt","emrNureCmt","deathFlag"};
String[] header = {"住院号","住院次数","名","性别","床号","出院科室","出院日期","归档医生是否提交","医生","医生提交日期","归档护士是否提交","护士","护士提交日期","电子病历医生提交","电子病历护士提交","是否死亡","是否打印"};
String[] fileNames = {"inpNo","visitId","name","sex","bedNumber","deptName","dischargeDateTime","doctorInCharge","archivestate","cmtDoctor","doctorName","cmtDoctorDate","cmtNurse","nurseName","cmtDurseDate","emrDoctorCmt","emrNureCmt","deathFlag","printNum"};
//文件名
String fileName = "出院浏览" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//构造excel的数据beHospList
List<Archive_Master_Vo> list = archiveMasterService.selectByColumn(archiveMasterVo);
List<Archive_Master_Vo> list = archiveMasterService.selectBeHospitalByColumn(archiveMasterVo,null,null);
ThreadExcelUtils utils = new ThreadExcelUtils(fileName, "", header, fileNames);
String result=utils.exportExcelToFilePath(response,utils.listConvert(list));
}
@ -161,7 +161,6 @@ public class beHospitaledController {
archiveMaster.setCmtDoctor(1);
archiveMaster.setCmtNurse(1);
int bol = archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if (bol == 1) {
//参数输入

@ -12,9 +12,11 @@ import com.emr.util.ThreadExcelUtils;
import com.emr.util.XMLUtil;
import com.emr.webservice.MedicalRecordShowBackContent.MR_FILE_CALLBACK_RECORD;
import com.emr.webservice.MedicalRecordShowBackContent.MR_FILE_INDEX_CALLBACK;
import lombok.extern.slf4j.Slf4j;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.shiro.SecurityUtils;
@ -41,7 +43,6 @@ import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("lastVerify")
public class lastVerifyController {
@ -53,9 +54,6 @@ public class lastVerifyController {
@Autowired
private Archive_MasterService archiveMasterService;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private Emr_Fault_TypeService emrFaultTypeService;
@ -124,77 +122,77 @@ public class lastVerifyController {
Archive_Master archiveMaster = archiveMasterService.selectById(emrFaultDetail.getArchiveDetailId());
if(archiveMaster!=null) {
archiveMaster.setArchivestate(emrFaultDetail.getState());
//查询该病案号缺陷,如果有医生就退回医生如果有护士则退回护士否则不退回提示
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();
entityFault.setArchiveDetailId(emrFaultDetail.getArchiveDetailId());
List<Emr_Fault_Detail> list=emrFaultDetailService.selectByArchiveId(entityFault);
int doctorFlagNum=0;
int nurseFlagNum=0;
if(list!=null && list.size()>0){
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//工号
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//2021-01-30
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")) {
//1医生 2护士
for (int k = 0; k < list.size(); k++) {
if ("1".equals(list.get(k).getBackFlag()) || "5".equals(list.get(k).getBackFlag())) {
doctorFlagNum+=1;
}
if ("2".equals(list.get(k).getBackFlag()) || "6".equals(list.get(k).getBackFlag())) {
nurseFlagNum+=1;
}
}
if(doctorFlagNum>0){
archiveMaster.setCmtDoctor(0);
archiveMaster.setDoctorName("");
archiveMaster.setCmtDoctorDate("");
//2021-01-30 following表中添加科主任退回主管医生操作记录
archive_master_following.setFollowingType("7");
archive_master_following.setFollowingContent("科主任退回主管医生");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
if(nurseFlagNum>0){
archiveMaster.setCmtNurse(0);
archiveMaster.setNurseName("");
archiveMaster.setCmtNurseDate("");
//2021-01-30 following表中添加科主任退回护士长操作记录
archive_master_following.setFollowingType("6");
archive_master_following.setFollowingContent("科主任退回护士长");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
//查询该病案号缺陷,如果有医生就退回医生如果有护士则退回护士否则不退回提示
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();
entityFault.setArchiveDetailId(emrFaultDetail.getArchiveDetailId());
List<Emr_Fault_Detail> list=emrFaultDetailService.selectByArchiveId(entityFault);
int doctorFlagNum=0;
int nurseFlagNum=0;
if(list!=null && list.size()>0){
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
String username = user.getUserName();//工号
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//2021-01-30
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")) {
//1医生 2护士
for (int k = 0; k < list.size(); k++) {
if ("1".equals(list.get(k).getBackFlag()) || "5".equals(list.get(k).getBackFlag())) {
doctorFlagNum+=1;
}
//修改复审内容
if (bol == 1) {
//判断缺陷记录是否有医生或护士有则退回状态改1
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
//插入缺陷记录
bol = emrFaultDetailService.insertSel(emrFaultDetail);
if ("2".equals(list.get(k).getBackFlag()) || "6".equals(list.get(k).getBackFlag())) {
nurseFlagNum+=1;
}
}
if(doctorFlagNum==0 && nurseFlagNum==0){
archiveMaster.setCmtDoctor(1);
archiveMaster.setCmtNurse(1);
if(doctorFlagNum>0){
archiveMaster.setCmtDoctor(0);
archiveMaster.setDoctorName("");
archiveMaster.setCmtDoctorDate("");
//2021-01-30 following表中添加科主任退回主管医生操作记录
archive_master_following.setFollowingType("7");
archive_master_following.setFollowingContent("科主任退回主管医生");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
if(nurseFlagNum>0){
archiveMaster.setCmtNurse(0);
archiveMaster.setNurseName("");
archiveMaster.setCmtNurseDate("");
//2021-01-30 following表中添加科主任退回护士长操作记录
archive_master_following.setFollowingType("6");
archive_master_following.setFollowingContent("科主任退回护士长");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
//修改复审内容
if (bol == 1) {
//判断缺陷记录是否有医生或护士有则退回状态改1
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
//插入缺陷记录
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
bol = archiveMasterService.updateByClo(archiveMaster);
if (emrFaultDetail.getState().equals("复审退回")){
}
if(doctorFlagNum==0 && nurseFlagNum==0){
archiveMaster.setCmtDoctor(1);
archiveMaster.setCmtNurse(1);
}
bol = archiveMasterService.updateByClo(archiveMaster);
String inpatientNo = archiveMaster.getInpNo();
//获取留观标识“LG”
String lgFlag = inpatientNo.substring(0,2);
if(!"LG".equals(lgFlag)) {
if (emrFaultDetail.getState().equals("复审退回")) {
//2021-01-30 following表中添加病案室退回操作记录
archive_master_following.setFollowingType("9");
archive_master_following.setFollowingContent("病案室退回科主任");
@ -203,9 +201,13 @@ public class lastVerifyController {
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
}else{
bol=2;
}else {
//留观号审核推送第三方
archiveMasterService.requestObservationRecord(inpatientNo, "RETURNED", emrFaultDetail.getBackContent());
}
}else{
bol=2;
}
}
return bol;
}
@ -214,6 +216,11 @@ public class lastVerifyController {
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")
public int updateStateByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) throws UnsupportedEncodingException {
String inpatientNo = emrFaultDetail.getContent();
if(StringUtils.isBlank(inpatientNo)){
Archive_Master archiveMaster = archiveMasterService.selectById(emrFaultDetail.getArchiveDetailId());
inpatientNo = archiveMaster.getInpNo();
}
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
//修改病案归档状态
@ -223,7 +230,6 @@ public class lastVerifyController {
archiveMaster.setCmtDoctor(1);
archiveMaster.setCmtNurse(1);
int bol = archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if (bol == 1) {
// 从session获取用户名
@ -250,19 +256,24 @@ public class lastVerifyController {
}else{
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
//初审成功日志
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录
archive_master_following.setFollowingType("8");
archive_master_following.setFollowingContent("病案室审核(已归档)");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
//获取留观标识“LG”
String lgFlag = inpatientNo.substring(0,2);
if(!"LG".equals(lgFlag)) {
//初审成功日志
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
//following表中添加病案室审核操作记录
archive_master_following.setFollowingType("8");
archive_master_following.setFollowingContent("病案室审核(已归档)");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}else{
//留观号审核推送第三方
archiveMasterService.requestObservationRecord(inpatientNo,"AUDITED",null);
}
}
return bol;
}

@ -0,0 +1,22 @@
package com.emr.dao;
import com.emr.entity.ArchivePrintinfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ArchivePrintinfoMapper {
int deleteByPrimaryKey(Long id);
int insert(ArchivePrintinfo record);
int insertSelective(ArchivePrintinfo record);
ArchivePrintinfo selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(ArchivePrintinfo record);
int updateByPrimaryKey(ArchivePrintinfo record);
List<ArchivePrintinfo> selectPrintCountByMasterId(@Param("masterIds") String masterIds);
}

@ -142,4 +142,11 @@ public interface Archive_MasterMapper {
*
* */
List<Archive_Master> selectByObject(@Param(value = "patientId") String patientId,@Param(value = "visitId")String visitId);
/**
*
* @param master
* @return
*/
List<Archive_Master> getObservationRecordList(Archive_Master_Vo master);
}

@ -0,0 +1,249 @@
package com.emr.entity;
import java.io.Serializable;
import java.util.Date;
public class ArchivePrintinfo implements Serializable {
private Long id;
private String printUserid;
private String printUsername;
private Date printCreatetime;
private String archiveDetailId;
private String masterid;
private String patientId;
private String name;
private String admissId;
private Integer admissTimes;
private String assortId;
private String assortName;
private String filetitle;
private Integer pagecount;
private String sys;
private String c1;
private String c2;
private Integer d1;
private Integer d2;
private Date t1;
private Date t2;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPrintUserid() {
return printUserid;
}
public void setPrintUserid(String printUserid) {
this.printUserid = printUserid == null ? null : printUserid.trim();
}
public String getPrintUsername() {
return printUsername;
}
public void setPrintUsername(String printUsername) {
this.printUsername = printUsername == null ? null : printUsername.trim();
}
public Date getPrintCreatetime() {
return printCreatetime;
}
public void setPrintCreatetime(Date printCreatetime) {
this.printCreatetime = printCreatetime;
}
public String getArchiveDetailId() {
return archiveDetailId;
}
public void setArchiveDetailId(String archiveDetailId) {
this.archiveDetailId = archiveDetailId == null ? null : archiveDetailId.trim();
}
public String getMasterid() {
return masterid;
}
public void setMasterid(String masterid) {
this.masterid = masterid == null ? null : masterid.trim();
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getAdmissId() {
return admissId;
}
public void setAdmissId(String admissId) {
this.admissId = admissId == null ? null : admissId.trim();
}
public Integer getAdmissTimes() {
return admissTimes;
}
public void setAdmissTimes(Integer admissTimes) {
this.admissTimes = admissTimes;
}
public String getAssortId() {
return assortId;
}
public void setAssortId(String assortId) {
this.assortId = assortId == null ? null : assortId.trim();
}
public String getAssortName() {
return assortName;
}
public void setAssortName(String assortName) {
this.assortName = assortName == null ? null : assortName.trim();
}
public String getFiletitle() {
return filetitle;
}
public void setFiletitle(String filetitle) {
this.filetitle = filetitle == null ? null : filetitle.trim();
}
public Integer getPagecount() {
return pagecount;
}
public void setPagecount(Integer pagecount) {
this.pagecount = pagecount;
}
public String getSys() {
return sys;
}
public void setSys(String sys) {
this.sys = sys == null ? null : sys.trim();
}
public String getC1() {
return c1;
}
public void setC1(String c1) {
this.c1 = c1 == null ? null : c1.trim();
}
public String getC2() {
return c2;
}
public void setC2(String c2) {
this.c2 = c2 == null ? null : c2.trim();
}
public Integer getD1() {
return d1;
}
public void setD1(Integer d1) {
this.d1 = d1;
}
public Integer getD2() {
return d2;
}
public void setD2(Integer d2) {
this.d2 = d2;
}
public Date getT1() {
return t1;
}
public void setT1(Date t1) {
this.t1 = t1;
}
public Date getT2() {
return t2;
}
public void setT2(Date t2) {
this.t2 = t2;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", printUserid=").append(printUserid);
sb.append(", printUsername=").append(printUsername);
sb.append(", printCreatetime=").append(printCreatetime);
sb.append(", archiveDetailId=").append(archiveDetailId);
sb.append(", masterid=").append(masterid);
sb.append(", patientId=").append(patientId);
sb.append(", name=").append(name);
sb.append(", admissId=").append(admissId);
sb.append(", admissTimes=").append(admissTimes);
sb.append(", assortId=").append(assortId);
sb.append(", assortName=").append(assortName);
sb.append(", filetitle=").append(filetitle);
sb.append(", pagecount=").append(pagecount);
sb.append(", sys=").append(sys);
sb.append(", c1=").append(c1);
sb.append(", c2=").append(c2);
sb.append(", d1=").append(d1);
sb.append(", d2=").append(d2);
sb.append(", t1=").append(t1);
sb.append(", t2=").append(t2);
sb.append("]");
return sb.toString();
}
}

@ -93,6 +93,13 @@ public interface Archive_MasterService {
*/
OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
* '','退'
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master_Vo> selectBeHospitalByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit);
/**
*
@ -208,7 +215,7 @@ public interface Archive_MasterService {
/**
*
*
* @param record
* @param
* @return
*/
List<Archive_Master_Vo> selectByFollowinglog(Archive_Master_Vo archiveMasterVo);
@ -217,6 +224,8 @@ public interface Archive_MasterService {
*
* */
List<Archive_Master> selectByObject(String patientId,String visitId);
void requestObservationRecord(String inpatientNo, String status,String reason);
}

@ -8,38 +8,47 @@ package com.emr.service.ipml;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.ArchivePrintinfoMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.MedicalRecordHomepageCacheMapper;
import com.emr.util.HttpClientTool;
import com.emr.vo.Power_User_Dto;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.service.PowerUserService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.google.common.base.Function;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.google.common.collect.Maps;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.util.*;
@Slf4j
@Service
public class Archive_MasterServiceImpl implements Archive_MasterService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private Emr_DictionaryService emrDictionaryService;
@Autowired
private PowerUserService powerUserService;
@Autowired
private MedicalRecordHomepageCacheMapper medicalRecordHomepageCacheMapper;
@Autowired
private ArchivePrintinfoMapper archivePrintinfoMapper;
@Value("${observationRecordRequestUrl}")
private String observationRecordRequestUrl;
@Override
public Archive_Master selectById(String id) {
return archiveMasterMapper.selectById(id);
@ -122,70 +131,146 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
@Override
public OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByColumn(archiveMasterVo);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null){
Map<String,JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject,String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}});
List<Archive_Master_Vo> list = selectBeHospitalByColumn(archiveMasterVo,offset,limit);
return new OffsetLimitPage((Page) list);
}
for (Archive_Master_Vo archive_master : list) {
JSONObject userInfo = mappedMovies.get(archive_master.getDoctorName());
if (userInfo==null){
archive_master.setDoctorName(archive_master.getDoctorName());
}else {
archive_master.setDoctorName(userInfo.getString("name"));
/**
* id
* @param archiveMasterVo
*/
private void setIdByPrintNum(Archive_Master_Vo archiveMasterVo){
//是否查询打印情况
if(StringUtils.isNotBlank(archiveMasterVo.getPrintNum())){
List<ArchivePrintinfo> archivePrintinfos = archivePrintinfoMapper.selectPrintCountByMasterId(null);
//定义masterIds
StringBuilder masterIds = new StringBuilder();
if(!CollectionUtils.isEmpty(archivePrintinfos)){
for(ArchivePrintinfo archivePrintinfo : archivePrintinfos){
if(StringUtils.isNotBlank(masterIds)){
masterIds.append(",");
}
masterIds.append(archivePrintinfo.getMasterid());
}
}else{
masterIds = new StringBuilder("notAll");
}
archiveMasterVo.setId(masterIds.toString());
}
}
userInfo = mappedMovies.get(archive_master.getNurseName());
if (userInfo==null){
archive_master.setNurseName(archive_master.getNurseName());
}else {
archive_master.setNurseName(userInfo.getString("name"));
@Override
public List<Archive_Master_Vo> selectBeHospitalByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
setIdByPrintNum(archiveMasterVo);
//根据条件查询记录
if(null != offset && null != limit) {
PageHelper.offsetPage(offset, limit);
}
List<Archive_Master_Vo> list = archiveMasterMapper.selectByColumn(archiveMasterVo);
if(!CollectionUtils.isEmpty(list)) {
//查询用户集合
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<Power_User_Dto> powerUserList = null;
if(!CollectionUtils.isEmpty(powerUsers)) {
//转换对象
powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), Power_User_Dto.class);
}
//定义查询的masterId集合
StringBuilder masterIds = new StringBuilder();
//遍历赋值
for (Archive_Master_Vo archiveMaster : list) {
if(null != powerUserList) {
//获取医生工号
String doctorName = archiveMaster.getDoctorName();
//获取护士工号
String nurseName = archiveMaster.getNurseName();
//遍历匹配工号赋值姓名
for(Power_User_Dto powerUserDto : powerUserList){
String name = powerUserDto.getName();
if(StringUtils.isNotBlank(doctorName) && powerUserDto.getUserName().equals(doctorName)){
archiveMaster.setDoctorName(name);
}
if(StringUtils.isNotBlank(nurseName) && powerUserDto.getUserName().equals(nurseName)){
archiveMaster.setNurseName(name);
}
}
}
//是否打印条件不为空,直接赋值打印标识
if(StringUtils.isNotBlank(archiveMasterVo.getPrintNum())){
String printFlag = "未打印";
if("1".equals(archiveMasterVo.getPrintNum())){
printFlag = "已打印";
}
archiveMaster.setPrintNum(printFlag);
}else{
if(StringUtils.isNotBlank(masterIds)){
masterIds.append(",");
}
masterIds.append(archiveMaster.getId());
}
}
//查询打印情况
if(StringUtils.isNotBlank(masterIds)){
List<ArchivePrintinfo> archivePrintinfos = archivePrintinfoMapper.selectPrintCountByMasterId(masterIds.toString());
//定义初始化打印状态
String printFlag = "未打印";
for (Archive_Master_Vo archiveMaster : list) {
if(!CollectionUtils.isEmpty(archivePrintinfos)){
for(ArchivePrintinfo archivePrintinfo : archivePrintinfos){
if(archivePrintinfo.getMasterid().equals(archiveMaster.getId())){
printFlag = "已打印";
break;
}
}
}
archiveMaster.setPrintNum(printFlag);
}
}
}
return list;
}
/**
*
* @param list
*/
private void setDoctorAndNurseName(List<Archive_Master_Vo> list){
if(!CollectionUtils.isEmpty(list)) {
//查询用户集合
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<Power_User_Dto> powerUserList = null;
if (!CollectionUtils.isEmpty(powerUsers)) {
//转换对象
powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), Power_User_Dto.class);
}
//遍历赋值
for (Archive_Master_Vo archiveMaster : list) {
if (null != powerUserList) {
//获取医生工号
String doctorName = archiveMaster.getDoctorName();
//获取护士工号
String nurseName = archiveMaster.getNurseName();
//遍历匹配工号赋值姓名
for (Power_User_Dto powerUserDto : powerUserList) {
String name = powerUserDto.getName();
if (StringUtils.isNotBlank(doctorName) && powerUserDto.getUserName().equals(doctorName)) {
archiveMaster.setDoctorName(name);
}
if (StringUtils.isNotBlank(nurseName) && powerUserDto.getUserName().equals(nurseName)) {
archiveMaster.setNurseName(name);
}
}
}
}
}
return new OffsetLimitPage((Page) list);
}
@Override
public OffsetLimitPage selectByUnfile(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByUnfileNew(archiveMasterVo);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null){
Map<String,JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject,String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}});
for (Archive_Master_Vo archive_master : list) {
JSONObject userInfo = mappedMovies.get(archive_master.getDoctorName());
if (userInfo==null){
archive_master.setDoctorName(archive_master.getDoctorName());
}else {
archive_master.setDoctorName(userInfo.getString("name"));
}
userInfo = mappedMovies.get(archive_master.getNurseName());
if (userInfo==null){
archive_master.setNurseName(archive_master.getNurseName());
}else {
archive_master.setNurseName(userInfo.getString("name"));
}
}
}
//设置医生和护士姓名
setDoctorAndNurseName(list);
return new OffsetLimitPage((Page) list);
}
@ -193,38 +278,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public OffsetLimitPage selectByLast(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByLast(archiveMasterVo);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null) {
Map<String, JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, temp -> temp.getString("userName"));
for (Archive_Master_Vo archive_master : list) {
JSONObject userInfo = mappedMovies.get(archive_master.getDoctorName());
if (userInfo == null) {
archive_master.setDoctorName(archive_master.getDoctorName());
} else {
archive_master.setDoctorName(userInfo.getString("name"));
}
userInfo = mappedMovies.get(archive_master.getNurseName());
if (userInfo == null) {
archive_master.setNurseName(archive_master.getNurseName());
} else {
archive_master.setNurseName(userInfo.getString("name"));
}
userInfo = mappedMovies.get(archive_master.getFirstInstance());
if (userInfo == null) {
archive_master.setFirstInstance(archive_master.getFirstInstance());
} else {
archive_master.setFirstInstance(userInfo.getString("name"));
}
}
}
//设置医生和护士姓名
setDoctorAndNurseName(list);
return new OffsetLimitPage((Page) list);
}
@ -232,34 +287,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public OffsetLimitPage selectByCmtCol(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByCmtCol(archiveMasterVo);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null){
Map<String,JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject,String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}});
for (Archive_Master_Vo archive_master : list) {
JSONObject userInfo = mappedMovies.get(archive_master.getDoctorName());
if (userInfo==null){
archive_master.setDoctorName(archive_master.getDoctorName());
}else {
archive_master.setDoctorName(userInfo.getString("name"));
}
userInfo = mappedMovies.get(archive_master.getNurseName());
if (userInfo==null){
archive_master.setNurseName(archive_master.getNurseName());
}else {
archive_master.setNurseName(userInfo.getString("name"));
}
}
}
//设置医生和护士姓名
setDoctorAndNurseName(list);
return new OffsetLimitPage((Page) list);
}
@ -381,6 +410,26 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return archiveMasterMapper.selectByObject(patientId,visitId);
}
@Override
public void requestObservationRecord(String inpatientNo, String status,String reason) {
//留观推送第三方 http://10.162.0.51:8091/sanshuyun-ems-function/file/away/updateStatus
Map<String,String> params = new HashMap<>();
//留观号
params.put("watchNo",inpatientNo);
//status状态 AUDITED审核RETURNED 退回
params.put("status",status);
if (StringUtils.isNotBlank(reason)) {
params.put("reason",reason);
}
try {
HttpClientTool.doPost(observationRecordRequestUrl,params);
} catch (IOException e) {
e.printStackTrace();
String errorStr = "留观病历操作推送第三方失败,inpatientNo:" + inpatientNo + ";status:" + status;
System.out.println(errorStr);
log.error(errorStr);
}
}
}

@ -0,0 +1,76 @@
package com.emr.service.ipml;
import com.emr.dao.ArchivePrintinfoMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.ArchivePrintinfo;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2021/11/15 14:19
* @UpdateUser:
* @UpdateDate: 2021/11/15 14:19
* @UpdateRemark:
* @Version: 1.0
*/
@Service
@Transactional
public class ObservationRecordService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private ArchivePrintinfoMapper archivePrintinfoMapper;
public OffsetLimitPage getObservationRecordList(Archive_Master_Vo master, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master> list = getList(master);
//查询打印次数
selectPrintCountByMasterId(list);
return new OffsetLimitPage((Page) list);
}
/**
*
* @param list
*/
private void selectPrintCountByMasterId(List<Archive_Master> list) {
if(!CollectionUtils.isEmpty(list)){
StringBuilder masterIds = new StringBuilder();
for(Archive_Master master : list){
if(StringUtils.isNotBlank(masterIds)){
masterIds.append(",");
}
masterIds.append(master.getId());
}
List<ArchivePrintinfo> archivePrintinfos = archivePrintinfoMapper.selectPrintCountByMasterId(masterIds.toString());
if(!CollectionUtils.isEmpty(archivePrintinfos)){
for(Archive_Master master : list){
for(ArchivePrintinfo archivePrintinfo :archivePrintinfos){
if(master.getId().equals(archivePrintinfo.getMasterid())){
master.setPrintNum(archivePrintinfo.getAdmissTimes().toString());
break;
}
}
}
}
}
}
public List<Archive_Master> getList(Archive_Master_Vo master){
return archiveMasterMapper.getObservationRecordList(master);
}
}

@ -84,36 +84,7 @@ public class MyRealm extends AuthorizingRealm {
//通过表单接收的用户名
String username = token.getUsername();
String userpwd = String.valueOf(token.getPassword());
if (username != null && !"".equals(username)) {
/*User user = userService.getUserByUsername(username);
if (user != null) {
return new SimpleAuthenticationInfo(user.getUsername(), user.getPassword(), getName());
}
http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag?sysFlag=emr_medical_record&userName=admin*/
String url = powerUrl+"?sysFlag=emr_medical_record&userName="+ username;
JSONObject obj = HttpClientUtils.httpGet(url);
if(obj!=null){
if((obj.getString("code")).equals("100")){
//当验证都通过后,把用户信息放在 session 里
Session session = SecurityUtils.getSubject().getSession();
//session.setTimeout(4 * 3600);//以秒为单位即在没有活动4小时后session将失效
session.setTimeout(-1);//以秒为单位session将失效
session.setAttribute("menuList", obj);
//session.setAttribute("userSession",username);
//session.setAttribute("userSessionId", users.get(0).getId());
//session.setAttribute("userRoles", org.apache.commons.lang.StringUtils.join(roleList, ","));
//当验证都通过后,把用户信息放在 session 里
JSONObject list= (JSONObject) obj.getJSONObject("extend");
//System.out.println(list);
session.setAttribute("userSession", username);
return new SimpleAuthenticationInfo(username, userpwd, getName());
}
}
}
return null;
return new SimpleAuthenticationInfo(username, userpwd, getName());
}
}

@ -0,0 +1,139 @@
package com.emr.util;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* httpclient 4.5 http
*
* @author
*
*/
public class HttpClientTool {
private static final CloseableHttpClient httpClient;
public static final String CHARSET = "UTF-8";
// 采用静态代码块初始化超时时间配置再根据配置生成默认httpClient对象
static {
RequestConfig config = RequestConfig.custom().setConnectTimeout(60000).setSocketTimeout(15000).build();
httpClient = HttpClientBuilder.create().setDefaultRequestConfig(config).build();
}
public static String doGet(String url, Map<String, String> params) {
return doGet(url, params, CHARSET);
}
public static String doPost(String url, Map<String, String> params) throws IOException {
return doPost(url, params, CHARSET);
}
/**
* HTTP Get
* @param url url ?
* @param params
* @param charset
* @return
*/
public static String doGet(String url, Map<String, String> params, String charset) {
if (StringUtils.isBlank(url)) {
return null;
}
try {
if (params != null && !params.isEmpty()) {
List<NameValuePair> pairs = new ArrayList<NameValuePair>(params.size());
for (Map.Entry<String, String> entry : params.entrySet()) {
String value = entry.getValue();
if (value != null) {
pairs.add(new BasicNameValuePair(entry.getKey(), value));
}
}
// 将请求参数和url进行拼接
url += "?" + EntityUtils.toString(new UrlEncodedFormEntity(pairs, charset));
}
HttpGet httpGet = new HttpGet(url);
CloseableHttpResponse response = httpClient.execute(httpGet);
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != 200) {
httpGet.abort();
throw new RuntimeException("HttpClient,error status code :" + statusCode);
}
HttpEntity entity = response.getEntity();
String result = null;
if (entity != null) {
result = EntityUtils.toString(entity, "utf-8");
}
EntityUtils.consume(entity);
response.close();
return result;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* HTTP Post
* @param url url ?
* @param params
* @param charset
* @return
* @throws IOException
*/
public static String doPost(String url, Map<String, String> params, String charset)
throws IOException {
if (StringUtils.isBlank(url)) {
return null;
}
List<NameValuePair> pairs = null;
if (params != null && !params.isEmpty()) {
pairs = new ArrayList<NameValuePair>(params.size());
for (Map.Entry<String, String> entry : params.entrySet()) {
String value = entry.getValue();
if (value != null) {
pairs.add(new BasicNameValuePair(entry.getKey(), value));
}
}
}
HttpPost httpPost = new HttpPost(url);
if (pairs != null && pairs.size() > 0) {
httpPost.setEntity(new UrlEncodedFormEntity(pairs, CHARSET));
}
CloseableHttpResponse response = null;
try {
response = httpClient.execute(httpPost);
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != 200) {
httpPost.abort();
throw new RuntimeException("HttpClient,error status code :" + statusCode);
}
HttpEntity entity = response.getEntity();
String result = null;
if (entity != null) {
result = EntityUtils.toString(entity, "utf-8");
}
EntityUtils.consume(entity);
return result;
} catch (ParseException e) {
e.printStackTrace();
} finally {
if (response != null)
response.close();
}
return null;
}
}

@ -0,0 +1,32 @@
package com.emr.vo;
import lombok.Data;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2021/11/16 10:36
* @UpdateUser:
* @UpdateDate: 2021/11/16 10:36
* @UpdateRemark:
* @Version: 1.0
*/
@Data
public class Power_User_Dto {
private Integer roleId;
private String roleName;
private String deptId;
private String name;
private String userName;
private Integer userId;
private String deptCode;
}

@ -30,19 +30,32 @@
<!--启动任务定时器-->
<task:annotation-driven/>
<context:property-placeholder location="classpath:config/jdbc.properties" />
<context:property-placeholder location="classpath:config/*.properties" />
<!--配置数据源-->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.driver}"/> <!--数据库连接驱动-->
<property name="jdbcUrl" value="${jdbc.url}"/> <!--数据库地址-->
<property name="user" value="${jdbc.username}"/> <!--用户名-->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driver}"/> <!--数据库连接驱动-->
<property name="url" value="${jdbc.url}"/> <!--数据库地址-->
<property name="username" value="${jdbc.username}"/> <!--用户名-->
<property name="password" value="${jdbc.password}"/> <!--密码-->
<property name="maxPoolSize" value="40"/> <!-- 最大连接数-->
<property name="minPoolSize" value="1"/> <!--最小连接数-->
<property name="initialPoolSize" value="10"/> <!-- 初始化连接池内的数据库连接-->
<property name="maxIdleTime" value="20"/> <!--最大空闲时间-->
<property name="initialSize" value="100"/> <!-- 初始化连接池内的数据库连接-->
<property name="maxActive" value="1000"/>
<property name="maxWait" value="60000"/>
<property name="minEvictableIdleTimeMillis" value="300000"/>
<property name="timeBetweenEvictionRunsMillis" value="-1"/>
<property name="minIdle" value="20"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="180"/>
<property name="logAbandoned" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="validationQuery" value="SELECT 'x'"/>
<property name="testOnBorrow" value="false"/>
<property name="testOnReturn" value="false"/>
<property name="poolPreparedStatements" value="true"/>
<property name="maxPoolPreparedStatementPerConnectionSize" value="20"/>
<property name="filters" value="stat,wall,slf4j"/>
<property name="connectionProperties" value="druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000"/>
</bean>
<!-- ====================== 配置和MyBatis的整合 ======================== -->

@ -0,0 +1,2 @@
#留观推送第三方接口地址
observationRecordRequestUrl = http://10.162.0.51:8091/sanshuyun-ems-function/file/away/updateStatus

@ -1,8 +1,8 @@
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://120.27.212.36:1433;databaseName=emr_recode_test
#jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=emr_recode_test
#jdbc.url=jdbc:sqlserver://120.27.212.36:1433;databaseName=emr_recode_test
jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=zj_record_new
jdbc.username=sa
jdbc.password=docus@702
jdbc.password=docus702
#hibernate config
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.show_sql=true

@ -1,38 +0,0 @@
#Debug,info,warning,error
#log4j.rootLogger=debug,stdout,logfile
#log4j.addivity.org.apache=true
# \u5E94\u7528\u4E8E\u63A7\u5236\u53F0
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.Threshold=DEBUG
#log4j.appender.CONSOLE.Target=System.out
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %l %m%n
#log4j.appender.CONSOLE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} - %c -%-4r [%t] %-5p %c %x - %m%n
#log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %X{ClientIPAddress} %c{1}(%M) %L %m%n
#log4j.appender.FILE=org.apache.log4j.FileAppender
#log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.FILE.BufferSize=10
#log4j.appender.FILE.File=C\:\\Users\\WQ\\webApp-Logs\\log4j.Log
#log4j.appender.FILE.File=logs/customer.log
#log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
#log4j.appender.FILE.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} - %c -%-4r [%t] %-5p %c %x - %m%n
#log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %X{ClientIPAddress} %l %m%n
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
#log4j.logger.com.ibatis=DEBUG
#log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
#log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
#log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
#log4j.logger.Java.sql.Connection=DEBUG
#log4j.logger.java.sql.Statement=DEBUG
#log4j.logger.java.sql.PreparedStatement=DEBUG
# General Apache libraries
#log4j.logger.org.apache=WARN
# Spring
#log4j.logger.org.springframework=WARN
# Default Shiro logging
#log4j.logger.org.apache.shiro=TRACE
# Disable verbose logging
#log4j.logger.org.apache.shiro.util.ThreadContext=WARN
#log4j.logger.org.apache.shiro.cache.ehcache.EhCache=WARN

@ -0,0 +1,27 @@
log4j.logger.myLog=debug,myLog
log4j.appender.myLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.myLog.File=D:\\logs\\emr_medical_record\\info\\info_log
log4j.appender.myLog.DatePattern=-yyyy-MM-dd'.log'
log4j.appender.myLog.Append = true
log4j.appender.myLog.Threshold = info
log4j.appender.myLog.layout=org.apache.log4j.PatternLayout
log4j.appender.myLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}:%m%n
log4j.logger.errorMsg=error,errorMsg
log4j.appender.errorMsg=org.apache.log4j.DailyRollingFileAppender
log4j.appender.errorMsg.File=D:\\logs\\emr_medical_record\\error\\error_log
log4j.appender.errorMsg.DatePattern=-yyyy-MM-dd'.log'
log4j.appender.errorMsg.Append = true
log4j.appender.errorMsg.Threshold = error
log4j.appender.errorMsg.layout=org.apache.log4j.PatternLayout
log4j.appender.errorMsg.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}:%m%n
#Console sql
#log4j.rootLogger=debug,myLog,errorMsg,compeleteMsg,CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern =%d %-5p [%c{5}] - %m%n
log4j.logger.com.emr=debug
log4j.logger.com.alibaba=error
log4j.logger.org=error

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.emr.dao.ArchivePrintinfoMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.ArchivePrintinfo" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="print_userid" property="printUserid" jdbcType="NVARCHAR" />
<result column="print_username" property="printUsername" jdbcType="NVARCHAR" />
<result column="print_createtime" property="printCreatetime" jdbcType="TIMESTAMP" />
<result column="archive_detail_id" property="archiveDetailId" jdbcType="NVARCHAR" />
<result column="MasterID" property="masterid" jdbcType="NVARCHAR" />
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
<result column="name" property="name" jdbcType="NVARCHAR" />
<result column="admiss_id" property="admissId" jdbcType="NVARCHAR" />
<result column="admiss_times" property="admissTimes" jdbcType="INTEGER" />
<result column="assort_id" property="assortId" jdbcType="NVARCHAR" />
<result column="assort_name" property="assortName" jdbcType="NVARCHAR" />
<result column="FileTitle" property="filetitle" jdbcType="NVARCHAR" />
<result column="PageCount" property="pagecount" jdbcType="INTEGER" />
<result column="sys" property="sys" jdbcType="NVARCHAR" />
<result column="C1" property="c1" jdbcType="NVARCHAR" />
<result column="C2" property="c2" jdbcType="NVARCHAR" />
<result column="D1" property="d1" jdbcType="INTEGER" />
<result column="D2" property="d2" jdbcType="INTEGER" />
<result column="T1" property="t1" jdbcType="TIMESTAMP" />
<result column="T2" property="t2" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
ID, print_userid, print_username, print_createtime, archive_detail_id, MasterID,
patient_id, name, admiss_id, admiss_times, assort_id, assort_name, FileTitle, PageCount,
sys, C1, C2, D1, D2, T1, T2
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from archive_printInfo
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from archive_printInfo
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.emr.entity.ArchivePrintinfo" >
insert into archive_printInfo (ID, print_userid, print_username,
print_createtime, archive_detail_id, MasterID,
patient_id, name, admiss_id,
admiss_times, assort_id, assort_name,
FileTitle, PageCount, sys,
C1, C2, D1, D2,
T1, T2)
values (#{id,jdbcType=BIGINT}, #{printUserid,jdbcType=NVARCHAR}, #{printUsername,jdbcType=NVARCHAR},
#{printCreatetime,jdbcType=TIMESTAMP}, #{archiveDetailId,jdbcType=NVARCHAR}, #{masterid,jdbcType=NVARCHAR},
#{patientId,jdbcType=NVARCHAR}, #{name,jdbcType=NVARCHAR}, #{admissId,jdbcType=NVARCHAR},
#{admissTimes,jdbcType=INTEGER}, #{assortId,jdbcType=NVARCHAR}, #{assortName,jdbcType=NVARCHAR},
#{filetitle,jdbcType=NVARCHAR}, #{pagecount,jdbcType=INTEGER}, #{sys,jdbcType=NVARCHAR},
#{c1,jdbcType=NVARCHAR}, #{c2,jdbcType=NVARCHAR}, #{d1,jdbcType=INTEGER}, #{d2,jdbcType=INTEGER},
#{t1,jdbcType=TIMESTAMP}, #{t2,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.ArchivePrintinfo" >
insert into archive_printInfo
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="printUserid != null" >
print_userid,
</if>
<if test="printUsername != null" >
print_username,
</if>
<if test="printCreatetime != null" >
print_createtime,
</if>
<if test="archiveDetailId != null" >
archive_detail_id,
</if>
<if test="masterid != null" >
MasterID,
</if>
<if test="patientId != null" >
patient_id,
</if>
<if test="name != null" >
name,
</if>
<if test="admissId != null" >
admiss_id,
</if>
<if test="admissTimes != null" >
admiss_times,
</if>
<if test="assortId != null" >
assort_id,
</if>
<if test="assortName != null" >
assort_name,
</if>
<if test="filetitle != null" >
FileTitle,
</if>
<if test="pagecount != null" >
PageCount,
</if>
<if test="sys != null" >
sys,
</if>
<if test="c1 != null" >
C1,
</if>
<if test="c2 != null" >
C2,
</if>
<if test="d1 != null" >
D1,
</if>
<if test="d2 != null" >
D2,
</if>
<if test="t1 != null" >
T1,
</if>
<if test="t2 != null" >
T2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="printUserid != null" >
#{printUserid,jdbcType=NVARCHAR},
</if>
<if test="printUsername != null" >
#{printUsername,jdbcType=NVARCHAR},
</if>
<if test="printCreatetime != null" >
#{printCreatetime,jdbcType=TIMESTAMP},
</if>
<if test="archiveDetailId != null" >
#{archiveDetailId,jdbcType=NVARCHAR},
</if>
<if test="masterid != null" >
#{masterid,jdbcType=NVARCHAR},
</if>
<if test="patientId != null" >
#{patientId,jdbcType=NVARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=NVARCHAR},
</if>
<if test="admissId != null" >
#{admissId,jdbcType=NVARCHAR},
</if>
<if test="admissTimes != null" >
#{admissTimes,jdbcType=INTEGER},
</if>
<if test="assortId != null" >
#{assortId,jdbcType=NVARCHAR},
</if>
<if test="assortName != null" >
#{assortName,jdbcType=NVARCHAR},
</if>
<if test="filetitle != null" >
#{filetitle,jdbcType=NVARCHAR},
</if>
<if test="pagecount != null" >
#{pagecount,jdbcType=INTEGER},
</if>
<if test="sys != null" >
#{sys,jdbcType=NVARCHAR},
</if>
<if test="c1 != null" >
#{c1,jdbcType=NVARCHAR},
</if>
<if test="c2 != null" >
#{c2,jdbcType=NVARCHAR},
</if>
<if test="d1 != null" >
#{d1,jdbcType=INTEGER},
</if>
<if test="d2 != null" >
#{d2,jdbcType=INTEGER},
</if>
<if test="t1 != null" >
#{t1,jdbcType=TIMESTAMP},
</if>
<if test="t2 != null" >
#{t2,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchivePrintinfo" >
update archive_printInfo
<set >
<if test="printUserid != null" >
print_userid = #{printUserid,jdbcType=NVARCHAR},
</if>
<if test="printUsername != null" >
print_username = #{printUsername,jdbcType=NVARCHAR},
</if>
<if test="printCreatetime != null" >
print_createtime = #{printCreatetime,jdbcType=TIMESTAMP},
</if>
<if test="archiveDetailId != null" >
archive_detail_id = #{archiveDetailId,jdbcType=NVARCHAR},
</if>
<if test="masterid != null" >
MasterID = #{masterid,jdbcType=NVARCHAR},
</if>
<if test="patientId != null" >
patient_id = #{patientId,jdbcType=NVARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=NVARCHAR},
</if>
<if test="admissId != null" >
admiss_id = #{admissId,jdbcType=NVARCHAR},
</if>
<if test="admissTimes != null" >
admiss_times = #{admissTimes,jdbcType=INTEGER},
</if>
<if test="assortId != null" >
assort_id = #{assortId,jdbcType=NVARCHAR},
</if>
<if test="assortName != null" >
assort_name = #{assortName,jdbcType=NVARCHAR},
</if>
<if test="filetitle != null" >
FileTitle = #{filetitle,jdbcType=NVARCHAR},
</if>
<if test="pagecount != null" >
PageCount = #{pagecount,jdbcType=INTEGER},
</if>
<if test="sys != null" >
sys = #{sys,jdbcType=NVARCHAR},
</if>
<if test="c1 != null" >
C1 = #{c1,jdbcType=NVARCHAR},
</if>
<if test="c2 != null" >
C2 = #{c2,jdbcType=NVARCHAR},
</if>
<if test="d1 != null" >
D1 = #{d1,jdbcType=INTEGER},
</if>
<if test="d2 != null" >
D2 = #{d2,jdbcType=INTEGER},
</if>
<if test="t1 != null" >
T1 = #{t1,jdbcType=TIMESTAMP},
</if>
<if test="t2 != null" >
T2 = #{t2,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchivePrintinfo" >
update archive_printInfo
set print_userid = #{printUserid,jdbcType=NVARCHAR},
print_username = #{printUsername,jdbcType=NVARCHAR},
print_createtime = #{printCreatetime,jdbcType=TIMESTAMP},
archive_detail_id = #{archiveDetailId,jdbcType=NVARCHAR},
MasterID = #{masterid,jdbcType=NVARCHAR},
patient_id = #{patientId,jdbcType=NVARCHAR},
name = #{name,jdbcType=NVARCHAR},
admiss_id = #{admissId,jdbcType=NVARCHAR},
admiss_times = #{admissTimes,jdbcType=INTEGER},
assort_id = #{assortId,jdbcType=NVARCHAR},
assort_name = #{assortName,jdbcType=NVARCHAR},
FileTitle = #{filetitle,jdbcType=NVARCHAR},
PageCount = #{pagecount,jdbcType=INTEGER},
sys = #{sys,jdbcType=NVARCHAR},
C1 = #{c1,jdbcType=NVARCHAR},
C2 = #{c2,jdbcType=NVARCHAR},
D1 = #{d1,jdbcType=INTEGER},
D2 = #{d2,jdbcType=INTEGER},
T1 = #{t1,jdbcType=TIMESTAMP},
T2 = #{t2,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
<!--根据masterId查询分组打印次数-->
<select id="selectPrintCountByMasterId" resultType="ArchivePrintinfo">
select MasterID,COUNT(MasterID) admiss_times from archive_printInfo
<where>
<if test="masterIds != null and masterIds != ''">
MasterID IN (<foreach collection="masterIds.split(',')" item="item" separator=",">#{item}</foreach>)
</if>
</where>
group by MasterID
</select>
</mapper>

@ -169,7 +169,7 @@
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
where 1=1
and patindex('%B%',m.inp_no) = 0
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
<if test="deptAdmissionTo!= null and deptAdmissionTo!= ''">
and (m.dept_admission_to in
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
@ -269,7 +269,7 @@
dept_name,CONVERT(varchar(10),m.discharge_date_time, 120) discharge_date_time,m.ArchiveState,CONVERT(varchar(10),m.admission_date_time, 120) admission_date_time,d.name dept_admission_to
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend,m.isscaned,m.is_scanning,
m.cmt_doctor,m.cmt_nurse,m.doctor_name,m.nurse_name,m.cmt_doctor_date,m.cmt_nurse_date,m.emr_doctor_cmt,m.emr_nure_cmt,m.death_flag,m.bed_number,ISNULL(s.numb, 0) numb
,ISNULL(sDoctor.numb, 0) faultDoctorNum,ISNULL(sNurse.numb, 0) faultNurseNum,ISNULL(printTable.num, 0) printNum,ISNULL(extDoctor.num, 0) doctorNum,ISNULL(extNurse.num, 0) nurseNum
,ISNULL(sDoctor.numb, 0) faultDoctorNum,ISNULL(sNurse.numb, 0) faultNurseNum,ISNULL(extDoctor.num, 0) doctorNum,ISNULL(extNurse.num, 0) nurseNum
from archive_master m
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) d
@ -283,8 +283,6 @@
on m.id=sDoctor.archive_detail_id
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag in ('2','6') GROUP BY archive_detail_id) sNurse
on m.id=sNurse.archive_detail_id
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
LEFT JOIN (select zyh,jzh,COUNT(*) num from archive_other_ext where T1!='1801-02-03 00:00:00.000' group by zyh,jzh) extDoctor
on m.inp_no=extDoctor.zyh
and m.visit_id=extDoctor.jzh
@ -292,7 +290,7 @@
on m.inp_no=extNurse.zyh
and m.visit_id=extNurse.jzh
where 1=1 and ArchiveState in('归档中','提交','主任退回')
and patindex('%B%',m.inp_no) = 0
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
<if test="emrCmit!=null and emrCmit!=''">
<if test="emrCmit==1">
and m.emr_doctor_cmt='提交'
@ -301,8 +299,19 @@
and m.emr_nure_cmt='提交'
</if>
</if>
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
<if test="printNum != null and printNum != ''">
and m.id
<choose>
<when test="printNum == 1">
in
</when>
<otherwise>not in</otherwise>
</choose>
(
<foreach collection="id.split(',')" item="item" separator=",">
#{item}
</foreach>
)
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
@ -416,7 +425,7 @@
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
where 1=1 and ArchiveState in('初审')
and patindex('%B%',m.inp_no) = 0
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
@ -546,7 +555,7 @@
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag is not null GROUP BY archive_detail_id) s
on m.id=s.archive_detail_id
where 1=1
and m.ArchiveState not in('作废','已封存')
and m.ArchiveState not in('作废','已封存') and inp_no not like 'LG%'
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
@ -679,7 +688,7 @@
on m.id=printTable.MasterID
where 1=1
and patindex('%B%',m.inp_no) in (0,1)
and m.ArchiveState not in('作废','已封存')
and m.ArchiveState not in('作废','已封存') and inp_no not like 'LG%'
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
@ -808,7 +817,7 @@
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
where 1=1 and ArchiveState in('提交','主任退回','归档中','复审退回')
and patindex('%B%',m.inp_no) = 0
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
@ -1562,4 +1571,68 @@
</choose>
ORDER BY f.handle_time desc
</select>
<!--留观病历查询-->
<select id="getObservationRecordList" resultType="com.emr.entity.Archive_Master">
SELECT
id,
patient_id,
inp_no,
visit_id,
NAME,
CONVERT ( nvarchar ( 19 ), admission_date_time, 23 ) admission_date_time,
CONVERT ( nvarchar ( 19 ), discharge_date_time, 23 ) discharge_date_time,
ArchiveState,
CASE
WHEN death_flag = '1' THEN
'是' ELSE '否'
END death_flag
FROM
Archive_Master
WHERE
inp_no LIKE 'LG%'
AND ArchiveState != '已归档'
<if test="patientId != null and patientId != ''">
AND patient_id LIKE '%' + #{patientId} + '%'
</if>
<if test="inpNo != null and inpNo != ''">
AND inp_no LIKE '%' + #{inpNo} + '%'
</if>
<if test="visitId != null and visitId != ''">
AND visit_id = #{visitId}
</if>
<if test="name != null and name != ''">
AND name LIKE '%' + #{name} + '%'
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and 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 discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)
</when>
<when test="endDate != null and endDate != ''">
and discharge_date_time &lt;= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and admission_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and admission_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and admission_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="archivestate != null and archivestate != ''">
AND ArchiveState = #{archivestate}
</if>
<if test="deathFlag != null and deathFlag != ''">
AND death_flag = #{deathFlag}
</if>
</select>
</mapper>

@ -2,7 +2,7 @@
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<%--<!-- jquery -->--%>
<script type="text/javascript" src="${path}/static/js/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="${path}/static/css/comm.css"/>
<link rel="stylesheet" href="${path}/static/css/comm.css?time=2021-11-17"/>
<%--<!-- 引入bootstrap样式 -->--%>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bower_components/bootstrap/dist/css/bootstrap.min.css"/>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-table-develop/dist/bootstrap-table.min.css"/>
@ -13,7 +13,7 @@
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-table-develop/src/extensions/page-jump/bootstrap-table-pagejump.css"/>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-select-1.13.0-dev/dist/css/bootstrap-select.min.css">
<link rel="stylesheet" type="text/css" href="${path}/static/css/timeAxis1.css">
<link rel="shortcut icon" href="${path}/static/js/favicon.ico">
<script type="text/javascript" src="${path}/static/js/comm.js"></script>
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js"></script>

@ -17,7 +17,7 @@
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>--%>
<%--<link rel="stylesheet" href="${path}/static/css/comm.css">--%>
<link rel="stylesheet" href="${path}/static/css/comm.css"/>
<link rel="stylesheet" href="${path}/static/css/comm.css?time=2021-11-17"/>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bower_components/bootstrap/dist/css/bootstrap.min.css"/>
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-table/bootstrap-table.js" ></script>
@ -32,7 +32,7 @@
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bower_components/bootstrap-daterangepicker/daterangepicker.css"/>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"/>
<%--<link rel="stylesheet" href="${path}/static/js/toastr.min.css" type="text/css">--%>
<link rel="shortcut icon" href="${path}/static/js/favicon.ico">
<!-- jQuery 3 -->

@ -34,24 +34,6 @@
padding: 5px;
}
.seal-result {
width: 60px;
height: 60px;
transform: rotate(30deg);
border: solid 2px red;
border-radius: 100%;
text-align: center;
color: red;
font-size: 16px;
font-weight: bold;
line-height: 60px;
left: 17.5%;
top: 6%;
position: absolute;
background-color: rgba(255, 255, 255, 0.8);
z-index: 1000;
}
.divCss {
margin-top: 5px;
}
@ -507,10 +489,6 @@
<!--搜索-->
<form style="margin-top:20px;" onkeydown="enter()">
<div class="form-inline">
<%--<div class="form-group divCss8">--%>
<%--<label for="id">病案号:</label>--%>
<%--<input type="text" class="input-sm form-control" id="id" placeholder="请输入病案号">--%>
<%--</div>--%>
<div class="form-group divCss8">
<label for="inpNo">住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
@ -523,21 +501,8 @@
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
</div>
<%--<div class="form-group divCss8">--%>
<%--<label for="name">身份证号:</label>--%>
<%--<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">--%>
<%--</div>--%>
<div class="form-group divCss8" id="deptDiv">
<label>出院科室:</label>
<%--<select class="input-sm form-control" id="deptName">--%>
<%--<option value="">全部</option>--%>
<%--&lt;%&ndash;<option value="在院">在院</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="未归档">未归档</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="归档中">归档中</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="初审">初审</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="已认证">已认证</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="已归档">已归档</option>&ndash;%&gt;--%>
<%--</select>--%>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="deptName"
id="deptName" title="请输入入院科室" data-actions-box="true" data-deselect-all-text="取消全选"
data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">
@ -567,10 +532,6 @@
<option value="归档中">归档中</option>
<option value="提交">提交</option>
<option value="主任退回">主任退回</option>
<%--<option value="初审">初审</option>--%>
<%--<option value="复审退回">复审退回</option>--%>
<%--<option value="已认证">已认证</option>--%>
<%--<option value="已归档">已归档</option>--%>
</select>
</div>
<div class="form-group ">
@ -585,9 +546,16 @@
<label>床号:</label>
<input type="text" class="input-sm form-control" id="bedNumber" placeholder="请输入床号">
</div>
<div class="form-group ">
<label>是否打印:</label>
<select class="input-sm form-control" id="printNum">
<option value="">全部</option>
<option value="1">已打印</option>
<option value="0">未打印</option>
</select>
</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>
</div>
</form>
<!--数据表格-->
@ -613,34 +581,6 @@
</div>
<%--缺陷窗口--%>
<%--<div class="modal fade" id="QXModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content ">
<div class="modal-header2">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">缺陷列表</h4>
</div>
<div class="modal-body" style="height:500px;overflow:auto">
<!--数据表格-->
<table id="tableQX" class="table text-nowrap table-striped" style="table-layout:fixed"></table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">返回</button>
&lt;%&ndash;<button type="button" class="btn btn-primary btn-sm" id="verifyBtn">通过</button>&ndash;%&gt;
</div>
</div>
</div>
</div>--%>
<%--<div id="modal">--%>
<%--<div class="mask"></div>--%>
<%--<!-- 这里开始才是真正的内容 -->--%>
<%--<div class="dialog"></div>--%>
<%--</div>--%>
<!-- 模态框3Modal查看档案 -->
<div class="modal fade" id="selModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
@ -1692,11 +1632,7 @@
$(function () {
// $("#selModal").draggable({
// handle: ".modal-header2" // 只能点击头部拖动
// });
// $("#selModal").css("overflow", "hidden"); // 防止出现滚动条,出现的话,你会把滚动条一起拖着走的
initTableLg();
getFaultType();
var objUrl;
var img_html;
@ -3856,7 +3792,8 @@
deptName: deptName.toString(),
doctorInCharge: doctorInCharge,
emrCmit: $("#emrCmit").val(),
bedNumber: $("#bedNumber").val()
bedNumber: $("#bedNumber").val(),
printNum:$("#printNum").val()
};
return temp;
},
@ -4086,7 +4023,7 @@
},
'click .selInfo': function (e, value, row, index) {
$("#printTableFlag").hide();
if (row.printNum != 0) {
if (row.printNum == '已打印') {
$("#printTableFlag").show();
}
getStaffRemarkFun(row.id, 0);
@ -4264,13 +4201,6 @@
return a;
}
},
{
title: '身份证号',
field: 'idNo',
align: 'center',
valign: 'middle',
visible: false
},
{
title: '出院科室',
field: 'deptName',
@ -4307,28 +4237,6 @@
return a;
}
},
{
title: '完整性',
field: 'lockInfo',
align: 'center',
valign: 'middle',
visible: false
},
// {
// title: '出院日期',
// field: 'dischargeDateTime',
// align: 'center',
// valign: 'middle',
// // formatter: function (value, row, index) {
// // return value
// // }
// },
{
title: '主管医生',
field: 'doctorInCharge',
align: 'left',
visible: false
},
{//医生是否提交、医生、提交日期、护士是否提交、护士、提交日期
title: '归档医生是否提交',
field: 'cmtDoctor',
@ -4553,6 +4461,20 @@
}
return result;
}
},{
title: '是否打印',
field: 'printNum',
align: 'center',
formatter: function (value, row, index) {
var printNum = row.printNum;
var html = '';
if (printNum == '未打印') {
html = '<span style="color:green"><i class="glyphicon glyphicon-ok-circle" aria-hidden="true"></i>'+printNum+'</span>';
} else {
html = '<span style="color:red;"><i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>'+printNum+'</span>';
}
return html;
}
}, {
title: '状态',
field: 'archivestate',
@ -5149,6 +5071,7 @@
// var deptName=""+$("#deptName").val();
var startDateTo = $("#startDateTo").val();
var endDateTo = $("#endDateTo").val();
var printNum = $("#printNum").val();
var url = window.location.href;
var deptName = url.substring(url.lastIndexOf('&') + 1).replace("depts=", "");
@ -5166,7 +5089,7 @@
window.location.href = "${path}/beHosp/exportExcel?inpNo=" + inpNo + "&visitId=" + visitId +
"&name=" + name + "&archivestate=" + archivestate + "&deptName=" + deptName + "&emrCmit=" + emrCmit
+ "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo + "&doctorInCharge=" + doctorInCharge + "&bedNumber=" + bedNumber;
+ "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo + "&doctorInCharge=" + doctorInCharge + "&bedNumber=" + bedNumber + "&printNum=" + printNum;
});

@ -20,6 +20,9 @@
<script type="text/javascript"
src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css">
<script>
var path = "${path}";
</script>
<style>
.modal-header2 {
height: 30px;
@ -424,117 +427,197 @@
<body>
<input type="text" value="" id="collectionID" hidden>
<input type="text" value="" id="pid" hidden>
<input type="text" id="tableId" hidden/>
<input type="text" id="inpatientNo" hidden/>
<div id="mb"></div>
<div style="margin-left:30px;margin-right:10px;height:auto">
<!--搜索-->
<form style="margin-top:20px;" >
<div class="form-inline">
<%--<div class="form-group divCss8" hidden="hidden">--%>
<%--<label for="id">病案号:</label>--%>
<%--<input type="text" class="input-sm form-control" hidden id="id" placeholder="请输入病案号">--%>
<%--</div>--%>
<div class="form-group divCss8">
<label for="inpNo">住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" id="visitId" placeholder="请输入次数">
</div>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
</div>
<%--<div class="form-group divCss8">--%>
<%--<label for="name">身份证号:</label>--%>
<%--<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">--%>
<%--</div>--%>
<div class="form-group divCss8" id="deptDiv" >
<label>出院科室:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="deptName" id="deptName"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" title="请输入科室" data-none-results-text="没找到相应记录{0}">
<option value="">全部</option>
</select>
</div>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">住院</a></li>
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">留观</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="home">
<!--搜索-->
<form style="margin-top:20px;" >
<div class="form-inline">
<%--<div class="form-group divCss8" hidden="hidden">--%>
<%--<label for="id">病案号:</label>--%>
<%--<input type="text" class="input-sm form-control" hidden id="id" placeholder="请输入病案号">--%>
<%--</div>--%>
<div class="form-group divCss8">
<label for="inpNo">住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" id="visitId" placeholder="请输入次数">
</div>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
</div>
<%--<div class="form-group divCss8">--%>
<%--<label for="name">身份证号:</label>--%>
<%--<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">--%>
<%--</div>--%>
<div class="form-group divCss8" id="deptDiv" >
<label>出院科室:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="deptName" id="deptName"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" title="请输入科室" data-none-results-text="没找到相应记录{0}">
<option value="">全部</option>
</select>
</div>
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo"/>
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo"/>
</div>
</div>
<div class="form-group divCss8" style="height: 18px;margin-top: -5px;">
<label>是否扫描:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isScanning" id="isScanning"
title="是否扫描">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss8" >
<label>科室是否提交纸质病历:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isscaned" id="isscaned" title="科室是否提交纸质病历">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss8" style="margin-top: 10px">
<label>是否签收:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isSign" id="isSign" title="是否签收">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<%--<div class="form-group divCss2">--%>
<%--<label for="archivestate">归档状态:</label>--%>
<%--<select class="input-sm form-control" id="archivestate">--%>
<%--<option value="">全部</option>--%>
<%--&lt;%&ndash;<option value="未归档">未归档</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="归档中">归档中</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="初审">初审</option>&ndash;%&gt;--%>
<%--<option value="已认证">已认证</option>--%>
<%--<option value="已归档">已归档</option>--%>
<%--</select>--%>
<%--</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>
<button type="button" class="btn btn-success btn-sm divCss" id="signBtn" style="visibility:hidden">签收</button>
</div>
</div>
<div class="form-group divCss8" style="height: 18px;margin-top: -5px;">
<label>是否扫描:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isScanning" id="isScanning"
title="是否扫描">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss8" >
<label>科室是否提交纸质病历:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isscaned" id="isscaned" title="科室是否提交纸质病历">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss8" style="margin-top: 10px">
<label>是否签收:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isSign" id="isSign" title="是否签收">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</form>
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped"></table>
<div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">
<div class="columns columns-right btn-group pull-right" style="margin-top:0px;">
<div class="btn-group btn-info">
<select id="sel_exportoption" class="form-control">                
<option value="">导出当前页面数据</option>
               
<option value="all">导出全部数据</option>
               
<option value="selected">导出选中数据</option>
</select>
</div>
<button class=" btn btn-success" style="height: 34px" type="button" id="refreshBtn" name="refresh"
aria-label="Refresh"
title="Refresh">
<i class="glyphicon glyphicon-refresh icon-refresh"></i>
</button>
</div>
<%--<div class="form-group divCss2">--%>
<%--<label for="archivestate">归档状态:</label>--%>
<%--<select class="input-sm form-control" id="archivestate">--%>
<%--<option value="">全部</option>--%>
<%--&lt;%&ndash;<option value="未归档">未归档</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="归档中">归档中</option>&ndash;%&gt;--%>
<%--&lt;%&ndash;<option value="初审">初审</option>&ndash;%&gt;--%>
<%--<option value="已认证">已认证</option>--%>
<%--<option value="已归档">已归档</option>--%>
<%--</select>--%>
<%--</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>
<button type="button" class="btn btn-success btn-sm divCss" id="signBtn" style="visibility:hidden">签收</button>
</div>
</div>
</form>
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped"></table>
<div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">
<div class="columns columns-right btn-group pull-right" style="margin-top:0px;">
<div class="btn-group btn-info">
<select id="sel_exportoption" class="form-control">                
<option value="">导出当前页面数据</option>
               
<option value="all">导出全部数据</option>
               
<option value="selected">导出选中数据</option>
</select>
<div class="tab-pane" id="profile">
<!--搜索-->
<form style="margin-top:20px;">
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">患者ID:</label>
<input type="text" class="input-sm form-control" id="patientId1" placeholder="请输入患者ID">
</div>
<div class="form-group divCss8">
<label for="inpNo">留观号:</label>
<input type="text" class="input-sm form-control" id="inpNo1" placeholder="请输入留观号">
</div>
<div class="form-group divCss8">
<label for="visitId">留观次数:</label>
<input type="number" class="input-sm form-control" id="visitId1" placeholder="请输入留观次数" min="0">
</div>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name1" placeholder="请输入姓名">
</div>
<div class="form-group divCss8">
<label>留观开始日期:</label>
<div class="input-daterange input-group" id="datepicker1">
<input type="text" class="input-sm form-control" name="start" id="startDateTo2"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo2"/>
</div>
</div>
<div class="form-group divCss8">
<label>留观结束日期:</label>
<div class="input-daterange input-group" id="datepicker2">
<input type="text" class="input-sm form-control" name="start" id="startDateTo1"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo1"/>
</div>
</div>
<div class="form-group divCss8">
<label for="archivestate">归档状态 :</label>
<select class="input-sm form-control" id="archivestate">
<option value="">全部</option>
<option value="初审">初审</option>
<option value="初审退回">初审退回</option>
</select>
</div>
<div class="form-group divCss">
<label for="deathFlag">是否死亡 :</label>
<select class="input-sm form-control" id="deathFlag">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss"id="searchLgBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelLgBtn">条件导出</button>
</div>
</form>
<!--数据表格-->
<table id="tableLg" class="table text-nowrap table-striped"></table>
<div id="toolbarLg" class="btn-group pull-right toolbarCss">
<div class="columns columns-right btn-group pull-right" style="margin-top:0px;">
<div class="btn-group btn-info">
<select id="sel_exportoptionLg" class="form-control">                
<option value="">导出当前页面数据</option>
               
<option value="all">导出全部数据</option>
               
<option value="selected">导出选中数据</option>
</select>
</div>
<button class=" btn btn-success" style="height: 34px" type="button" id="refreshLgBtn" name="refresh"
aria-label="Refresh"
title="Refresh">
<i class="glyphicon glyphicon-refresh icon-refresh"></i>
</button>
</div>
</div>
<button class=" btn btn-success" style="height: 34px" type="button" id="refreshBtn" name="refresh"
aria-label="Refresh"
title="Refresh">
<i class="glyphicon glyphicon-refresh icon-refresh"></i>
</button>
</div>
</div>
</div>
<%--<div id="modal">--%>
<%--<div class="mask"></div>--%>
<%--<!-- 这里开始才是真正的内容 -->--%>
<%--<div class="dialog"></div>--%>
<%--</div>--%>
<!-- 模态框3Modal查看档案 -->
<div class="modal fade" id="selModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
@ -552,49 +635,73 @@
<form class="form-horizontal" id="form1">
<div class="row">
<div class="row divCss3">病历信息</div>
<div class="row divCss2">
<div class="seal-result" style="display:none;" id="printTableFlag">已打印</div>
<div class="col-sm-5" hidden>
病案号:<label id="idLab" class="labCss"></label><label id="assortId" hidden></label>
</div>
<label id="patientId" hidden></label>
<div class="col-sm-5" hidden>
来源:<label id="idsource" class="labCss"></label><label id="source" hidden></label>
</div>
<div class="col-sm-4">
住院号:<label id="inLab" class="labCss"></label>
</div>
<div class="col-sm-4">
住院次数:<label id="inTimeLab" class="labCss"></label>
<div class="seal-result" style="display:none;" id="printTableFlag">已打印</div>
<label id="assortId" hidden></label>
<label id="source" hidden></label>
<input type="text" id="outDateLab" hidden/>
<label id="patientId" hidden></label>
<label id="idLab" class="labCss" hidden></label>
<div id="tableDiag">
<div class="row divCss2">
<div class="col-sm-4">
住院号:<label id="inLab" class="labCss"></label>
</div>
<div class="col-sm-4">
住院次数:<label id="inTimeLab" class="labCss"></label>
</div>
<div class="col-sm-3">
姓名:<label id="nameLab" class="labCss"></label>
</div>
</div>
<div class="col-sm-3">
姓名:<label id="nameLab" class="labCss"></label>
<div class="row divCss2">
<div class="col-sm-4">
入院科室:<label id="deptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
入院日期:<label id="inDateLab" class="labCss"></label>
</div>
<div class="col-sm-3" id="firstDiv">
初审管理:
<button type="button" class="btn btn-danger btn-sm" id="getFirstBtn">初审查看</button>
</div>
<div class="col-sm-3" id="recallDiv">
缺陷管理:
<button type="button" class="btn btn-danger btn-sm" id="getRecallBtn">缺陷查看</button>
</div>
<div class="col-sm-4"><input type="text" id="outDeptLab" hidden/>
出院科室:<label id="outDeptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
出院日期:<label id="outDeptDateLab" class="labCss"></label>
</div>
<div class="col-sm-3" id="timeLine">
跟踪管理:
<button type="button" class="btn btn-info btn-sm" id="getTimeline">跟踪查看</button>
</div>
</div>
</div>
<div class="row divCss2">
<div class="col-sm-4"><input type="text" id="outDateLab" hidden/>
入院科室:<label id="deptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
入院日期:<label id="inDateLab" class="labCss"></label>
</div>
<div class="col-sm-3" id="firstDiv">
初审管理:
<button type="button" class="btn btn-danger btn-sm" id="getFirstBtn">初审查看</button>
</div>
<div class="col-sm-3" id="recallDiv">
缺陷管理:
<button type="button" class="btn btn-danger btn-sm" id="getRecallBtn">缺陷查看</button>
</div>
<div class="col-sm-4"><input type="text" id="outDeptLab" hidden/>
出院科室:<label id="outDeptToLab" class="labCss"></label>
</div>
<div class="col-sm-4">
出院日期:<label id="outDeptDateLab" class="labCss"></label>
<div id="tableLgDiag">
<div class="row divCss2">
<div class="col-sm-4">
患者ID<label id="patientIdLab" class="labCss"></label>
</div>
<div class="col-sm-4">
留观号:<label id="inLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
留观次数:<label id="inTimeLab1" class="labCss"></label>
</div>
</div>
<div class="col-sm-3" id="timeLine">
跟踪管理:
<button type="button" class="btn btn-info btn-sm" id="getTimeline">跟踪查看</button>
<div class="row divCss2">
<div class="col-sm-4">
姓名:<label id="nameLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
留观开始日期:<label id="deptToLab1" class="labCss"></label>
</div>
<div class="col-sm-4">
留观结束日期:<label id="inDateLab1" class="labCss"></label>
</div>
</div>
</div>
<div class="row divCss4">完整性审核:
@ -2284,11 +2391,16 @@
$.ajax({
url: "${path}/lastVerify/updateStateByArchivId",
type: "POST",
data: {archiveDetailId: archiveDetailId, firstTrial: firstTrial, state: state},
data: {archiveDetailId: archiveDetailId, firstTrial: firstTrial, state: state,content:$("#inpatientNo").val()},
success: function (result) {
$("#verifyModal").modal('hide');
$("#table").bootstrapTable("refresh");
toastr.success("终审操作成功!");
if(result == 1) {
$("#verifyModal").modal('hide');
var tableId = $("#tableId").val();
toastr.success("终审操作成功!");
$("#" + tableId).bootstrapTable("refresh");
}else{
toastr.error("出错了,或住院号为空!");
}
}
});
}
@ -3742,80 +3854,11 @@
}
},
'click .verifyInfo': function (e, value, row, index) {
if (row.id != null && row.id != "") {
$.ajax({
url: "${path}/beHosp/getMaster",
type: "POST",
data: {"id": row.id},
success: function (result) {
if (result != null) {
if (result.id != null) {
if (result.archivestate == '初审') {
// console.log("====审核====");
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#archiveId").val(row.id);
$("#isScaned2").val(row.isscaned);
$("#isSign2").val(row.isSign);
$("#verifyText").val("");
} else {
toastr.warning("病案室已经审核!");
//刷新
$('#table').bootstrapTable('refresh');
}
} else {
toastr.warning("病案号不存在!");
}
} else {
toastr.warning("病案不存在!");
}
}, error: function () {
toastr.error("操作失败!");
}
});
} else {
toastr.warning("病案号不存在!");
}
lashVerifyApprove(row,'table');
},
'click .selInfo': function (e, value, row, index) {
$("#printTableFlag").hide();
//ID供按需采集使用
$("#collectionID").val(row.id);
$("#pid").val(row.patientId);
if(row.printNum!=0){
$("#printTableFlag").show();
}
//实时获取完整性
getWzxFun(row.id);
$('#selModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
if (row.archivestate != '复审退回') {
$("#recallDiv").hide();
} else {
$("#recallDiv").show();
}
if (row.archivestate == '初审') {
$("#firstDiv").show();
} else {
$("#firstDiv").hide();
}
//同步
$("#idLab").html(row.id);
isscanedVal=row.isscaned;
isSignVal=row.isSign;
selIno(row,'table');
$("#nameLab").html(row.name);
// $("#inDateLab").html(row.admissionDateTime.substring(0, 10));
if (row.admissionDateTime != null && row.admissionDateTime != '') {
$("#inDateLab").html(row.admissionDateTime.substring(0, 10));
}
@ -3825,22 +3868,7 @@
$("#outDeptDateLab").html(row.dischargeDateTime);
$("#outHospLab").html(row.dischargeDisposition);
$("#inLab").html(row.inpNo);
$("#patientId").html(row.patientId);
$("#inTimeLab").html(row.visitId);
//$("#wzContent").html(row.lockinfo);
//入/出院年+出院月+住院号+住院次数
var outDate = "";
if (row.dischargeDateTime != null && row.dischargeDateTime != "") {
outDate = row.dischargeDateTime.split("-");
} else if (row.admissionDateTime != null && row.admissionDateTime != "") {
outDate = row.admissionDateTime.split("-");
}
$("#outDateLab").val(outDate[0] + "" + outDate[1] + "" + row.inpNo.trim() + "" + row.visitId + "");
initTree(row.id);
//获取来源下拉框
getSourceFun();
},
'click .getQXDoctorInfo': function (e, value, row, index) {
//查看缺陷列表
@ -3896,7 +3924,6 @@
},
cellStyle: function (value, row, index) {
return {classes: 'success'}
}
}
],
@ -3938,6 +3965,111 @@
}
}
//查看方法的清单显示方法
function showDiag(tableId){
$("#tableDiag").hide();
$("#tableLgDiag").hide();
if('table' == tableId){
$("#tableDiag").show();
}else if('tableLg' == tableId){
$("#tableLgDiag").show();
}
}
//查看方法
function selIno(row,tableId){
showDiag(tableId);
$("#printTableFlag").hide();
//ID供按需采集使用
$("#collectionID").val(row.id);
$("#pid").val(row.patientId);
if(row.printNum == '已打印'){
$("#printTableFlag").show();
}
//实时获取完整性
getWzxFun(row.id);
$('#selModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
if (row.archivestate != '复审退回') {
$("#recallDiv").hide();
} else {
$("#recallDiv").show();
}
if (row.archivestate == '初审') {
$("#firstDiv").show();
} else {
$("#firstDiv").hide();
}
//同步
isscanedVal=row.isscaned;
isSignVal=row.isSign;
$("#patientId").html(row.patientId);
$("#idLab").html(row.id);
//入/出院年+出院月+住院号+住院次数
var outDate = "";
if (row.dischargeDateTime != null && row.dischargeDateTime != "") {
outDate = row.dischargeDateTime.split("-");
} else if (row.admissionDateTime != null && row.admissionDateTime != "") {
outDate = row.admissionDateTime.split("-");
}
$("#outDateLab").val(outDate[0] + "" + outDate[1] + "" + row.inpNo.trim() + "" + row.visitId + "");
initTree(row.id);
//获取来源下拉框
getSourceFun();
}
//审核方法
function lashVerifyApprove(row,tableId){
$("#inpatientNo").val(row.inpNo);
//赋值表id
$("#tableId").val(tableId);
if (row.id != null && row.id != "") {
$.ajax({
url: "${path}/beHosp/getMaster",
type: "POST",
data: {"id": row.id},
success: function (result) {
if (result != null) {
if (result.id != null) {
if (result.archivestate == '初审') {
// console.log("====审核====");
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#archiveId").val(row.id);
$("#isScaned2").val(row.isscaned);
$("#isSign2").val(row.isSign);
$("#verifyText").val("");
} else {
toastr.warning("病案室已经审核!");
//刷新
$('#' + tableId).bootstrapTable('refresh');
}
} else {
toastr.warning("病案号不存在!");
}
} else {
toastr.warning("病案不存在!");
}
}, error: function () {
toastr.error("操作失败!");
}
});
} else {
toastr.warning("病案号不存在!");
}
}
function rowStyle(row, index) {
var style = {};
if (row.followingType != null) {
@ -5179,7 +5311,6 @@
document.getElementById('searchBtn').click();
}
}
</script>
<script src="${path}/static/js/lastVerify/observationRecordList.js"></script>
</html>

@ -224,6 +224,7 @@
<div class="modal-body">
<form>
<div class="form-group ">
<input type="hidden" id="inpatientNo">
<input type="hidden" id="id" name="id" value=""/><label hidden id="danganhao"></label>
<span style="vertical-align:top;">原因:</span><textarea rows="6" style="width:87%;" maxlength="255" id="recallReason2"></textarea>
</div>
@ -594,15 +595,19 @@
if (index != null && index != "" && index.indexOf("recall") != -1) {
if (row.archivestate == "已认证" || row.archivestate == "已归档") {
if(row.state=="已召回"){
htmlVal+= '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\')">召回 </button>' + '<button class="btn btn-danger btn-sm" onclick="logFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.recallReason + '\')">日志</button>';
htmlVal+= '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.inpNo + '\')">召回 </button>' + '<button class="btn btn-danger btn-sm" onclick="logFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.recallReason + '\')">日志</button>';
}else{
htmlVal+= '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\')">召回 </button>';
htmlVal+= '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.inpNo + '\')">召回 </button>';
}
} else {
htmlVal='';
}
}
if (index != null && index != "" && index.indexOf("getline") != -1) {
var inpNo = row.inpNo;
if(inpNo != ''){
inpNo = inpNo.substring(0,2);
}
if (index != null && index != "" && index.indexOf("getline") != -1 && inpNo != 'LG') {
htmlVal+= '<button class="btn btn-success btn-sm" onclick="getTimeLine(\'' + row.archiveDetailId + '\')">跟踪查看 </button>';
}
return htmlVal;
@ -682,13 +687,14 @@
}
function recallFun(id, archiveDetailId){
function recallFun(id, archiveDetailId,inpNo){
$('#exampleModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#recallReason2").val("");
$("#inpatientNo").val(inpNo)
//$("#id").val(id);
$("#danganhao").html(archiveDetailId);
}
@ -758,7 +764,7 @@
$.ajax({
url: "${path}/medicalRecall/updateState",
type: "POST",
data: {"state": "已召回", "archiveDetailId": archiveDetailId, recallReason: recallReason},
data: {"state": "已召回", "archiveDetailId": archiveDetailId, recallReason: recallReason,content:$("#inpatientNo").val()},
success: function (result) {
//刷新
$('#table').bootstrapTable('refresh');

@ -63,7 +63,13 @@
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>emr_medical_record.root</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.WebAppRootListener</listener-class>
</listener>
<!-- springMVC的前端控制器拦截所有的请求 -->
<servlet>
<servlet-name>dispatcherServlet</servlet-name>

@ -149,4 +149,23 @@ body {
.img{
cursor: pointer;
}
/**
*/
.seal-result {
width: 60px;
height: 60px;
transform: rotate(30deg);
border: solid 2px red;
border-radius: 100%;
text-align: center;
color: red;
font-size: 16px;
font-weight: bold;
line-height: 60px;
left: 17.5%;
top: 6%;
position: absolute;
background-color: rgba(255, 255, 255, 0.8);
z-index: 1000;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

@ -0,0 +1,240 @@
$(function(){
initTableLg();
});
//查询
$('#searchLgBtn').click(function () {
if (tipLoad == 0) {
$("#tableLg").bootstrapTable("refreshOptions", {pageNumber: 1});
} else {
toastr.warning("正在查询,请稍等...");
}
});
function initTableLg() {
if(tipLoad == 1){
$("#tableLg").bootstrapTable({ // 对应table标签的id
//method: 'POST',
url: path + "/observationRecord/getObservationRecordList", // 获取表格数据的url
contentType: "application/x-www-form-urlencoded",//一种编码。好像在post请求的时候需要用到。这里用的get请求注释掉这句话也能拿到数据
//dataField: "data",//这是返回的json数组的key.默认是"rows".这里只有前后端约定好就行
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
smartDisplay: false,
pageSize: 2, // 页面数据条数
pageNumber: 1, // 初始化加载第一页,默认第一页
sidePagination: 'server', // 设置为服务器端分页 客户端client
search: false,
showColumns: true,
// sortable: true,
// sortOrder: "asc",
toolbar: '#toolbarLg',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
undefinedText: '---', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
//height: 560, //定义表格的高度。
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 temp = {
limit: limit, //页面大小
offset: offset, //页码
order: params.order, //排位命令descasc
patientId: $("#patientId1").val(),
inpNo: "" + $("#inpNo1").val(),
visitId:""+$("#visitId1").val(),
name:""+$("#name1").val(),
startDateTo:$("#startDateTo2").val(),
endDateTo:$("#endDateTo2").val(),
startDate:$("#startDateTo1").val(),
endDate:$("#endDateTo1").val(),
deathFlag:$("#deathFlag").val(),
archivestate: "" + $("#archivestate").val(),
};
return temp;
},
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [{
title: '全选',
field: 'select', //复选框
checkbox: true,
width: 25,
align: 'center',
valign: 'middle',
},
{
title: '序号',
field: 'id',
align: 'center',
valign: 'middle',
//sortable: true,
visible: false,
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '患者ID',
field: 'patientId',
align: 'center',
valign: 'middle'
},
{
title: '留观号',
field: 'inpNo',
align: 'center',
valign: 'middle'
},
{
title: '留观次数',
field: 'visitId',
align: 'center',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'center',
valign: 'middle'
},
{
title: '留观开始日期',
field: 'admissionDateTime',
align: 'center',
valign: 'middle'
},
{
title: '留观结束日期',
field: 'dischargeDateTime',
align: 'center',
valign: 'middle'
},
{
title: '归档状态',
field: 'archivestate',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
//在院 未归档 归档中 初审 已归档 已认证
//在院 未归档 归档中 初审 已归档 已认证 复审退回
var a = '';
if (value == "初审") {
a = '<span style="color:#8FBC8F"><i class="fa fa-check-circle-o" aria-hidden="true"></i>' + value + '</span>';
} else if (value == "初审退回") {
a = '<span style="color:red"><i class="fa fa-check-circle-o" aria-hidden="true"></i>' + value + '</span>';
}
return a;
}
},
{
title: '是否死亡',
field: 'deathFlag',
align: 'center',
formatter: function (value, row, index) {
var htmlVal="";
if (value == "否") {
htmlVal += '<span style="color:green;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>'+value+'</span>';
} else {
htmlVal += '<span style="color:red;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>'+value+'</span>';
}
return htmlVal;
},
},
{
title: "操作",
align: 'left',
valign: 'middle',
width: 80, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
var html = '';
if (index != null && index != "" && index.indexOf("select") != -1) {
html = '<button type="button" class="btn btn-danger btn-sm selInfo" >查看</button>';
}
if (index != null && index != "" && index.indexOf("last") != -1) {
html += '<button type="button" class="btn btn-sm btn-primary verifyInfo">审核</button>';
}
return html;
},
events: {
'click .verifyInfo': function (e, value, row, index) {
lashVerifyApprove(row,'tableLg');
},
'click .selInfo': function (e, value, row, index) {
selIno(row,'tableLg');
$("#patientIdLab").html(row.patientId);
$("#nameLab1").html(row.name);
$("#deptToLab1").html(row.admissionDateTime);
$("#inDateLab1").html(row.dischargeDateTime);
$("#inLab1").html(row.inpNo);
$("#inTimeLab1").html(row.visitId);
}
},
cellStyle: function (value, row, index) {
return {classes: 'success'}
}
}
],
onLoadSuccess: function (result) { //加载成功时执行
//console.info("加载成功");
tipLoad = 0;
},
onLoadError: function () { //加载失败时执行
//console.info("加载数据失败");
tipLoad = 0;
}
});
}
}
//导出excel功能
$("#excelLgBtn").click(function () {
var patientId = $("#patientId1").val();
var inpNo = "" + $("#inpNo1").val();
var visitId = ""+$("#visitId1").val();
var name = ""+$("#name1").val();
var archivestate = "" + $("#archivestate").val();
var startDateTo = $("#startDateTo2").val();
var endDateTo = $("#endDateTo2").val();
var startDate = $("#startDateTo1").val();
var endDate = $("#endDateTo1").val();
var deathFlag = $("#deathFlag").val();
window.location.href = path + "/observationRecord/exportExcel?patientId=" + patientId + "&inpNo=" + inpNo + "&visitId=" + visitId +
"&name=" + name + "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo + "&startDate=" + startDate + "&endDate=" + endDate + "&archivestate=" + archivestate+ "&deathFlag=" + deathFlag;
});
Loading…
Cancel
Save