医生、护士提交

master
linjj 2 years ago
parent ea10074362
commit 63c8ef0ef7

@ -93,6 +93,20 @@
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.Final</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
@ -104,6 +118,7 @@
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
@ -255,6 +270,36 @@
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.6.0.RELEASE</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.5</version>
</dependency>
</dependencies>
<build>

@ -1,33 +1,27 @@
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.dao.TPrintinfoMapper;
import com.emr.entity.*;
import com.emr.service.Archive_DetailService;
import com.emr.service.Archive_MasterService;
import com.emr.service.PushInfoService;
import com.emr.service.ipml.*;
import com.emr.util.CommonResult;
import com.emr.util.DateUtil;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.*;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.http.HttpEntity;
import org.apache.http.client.ClientProtocolException;
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.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shiro.util.CollectionUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@ -40,11 +34,12 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
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 javax.validation.Valid;
import java.io.IOException;
import java.io.StringReader;
import java.text.SimpleDateFormat;
@ -52,13 +47,13 @@ import java.util.*;
/**
* @author zwh
* */
*/
@Controller
@RequestMapping("font/")
public class FontController {
@Value("${pdfWater}")
private String pdfWater;
// @Value("${RoomDetailsUrl}")
// @Value("${RoomDetailsUrl}")
// private String RoomDetailsUrl;
// @Value("${RoomDetailsUrlName}")
// private String RoomDetailsUrlName;
@ -69,6 +64,8 @@ public class FontController {
@Autowired
private TPrintinfoService printinfoService;
@Autowired
private PushInfoService pushInfoService;
@Autowired
private Archive_DetailService archiveDetailService;
@Autowired
private Archive_MasterService archiveMasterService;
@ -808,262 +805,53 @@ public class FontController {
return map;
}
// /**
// * 调用第三方接口获取唯一标识patientid
// *
// * @return
// * @throws Exception
// */
// @RequestMapping(value = "getRoomDetails")
// @ResponseBody
// public String selRoomDetails(EsbPublicVo esbPublicVo,SecureloginVo secureloginVo, HttpServletRequest request) throws Exception {
// //创建连接工厂
// String patientId1 = esbPublicVo.getPatientId();
// System.out.println("patientId1:::::"+patientId1);
// JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
// //创建客户端 wsUrl为webService接口地址
// Client client = dcf.createClient(RoomDetailsUrl);
// String xmlStr = createXml(patientId1);
// Object[] objects = client.invoke(RoomDetailsUrlName, xmlStr);
// //销毁连接
// client.destroy();
// //接收结果
// String result = objects[0].toString();
// System.out.println("result::::::"+result);
// String patientId=null;
// if (StringUtils.isNotBlank(result)) {
// Map<String, String> map = new HashMap<>();
// map = parseXml2Map(result, map);
// //获取序列号
// patientId = map.get("Body.ResultContent.patientid");
//
// }
// // 获得Http客户端
// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// // 创建Post请求
// HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
// //json格式转换
// JSONObject jsonParam = new JSONObject();
// jsonParam.put("idp","NSDP");
// jsonParam.put("secret", "Secret");
// jsonParam.put("userName","002030");
// jsonParam.put("password", "123456");
// jsonParam.put("scopes", "openid profile cr-api roles");
// jsonParam.put("key", patientId1);
// System.out.println(jsonParam);
// StringEntity entity = new StringEntity(jsonParam.toString(), "UTF-8");
// httpPost.setEntity(entity);
// httpPost.setHeader("Content-Type","application/json");
// // 响应模型
// CloseableHttpResponse response = null;
// HttpEntity responseEntity=null;
// String token="";
// String s ="";
// try {
// // 由客户端执行(发送)Post请求
// response = httpClient.execute(httpPost);
// // 从响应模型中获取响应实体
// responseEntity=response.getEntity();
// System.out.println("响应状态为:" + response.getStatusLine());
// if (responseEntity != null) {
// Map<String,Object> mapType = JSON.parseObject(EntityUtils.toString(responseEntity),Map.class);
// token = mapType.get("token").toString();
// System.out.println("token:::"+token);
// s = StringUtils.substringAfter(token, " ");
// System.out.println("s:::"+s);
// }
// } catch (ClientProtocolException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// try {
// // 释放资源
// if (httpClient != null) {
// httpClient.close();
// }
// if (response != null) {
// response.close();
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// String pdfUrl="http://10.100.12.3:33600/view/subjects/"+patientId+"/records/"+secureloginVo.getVisitId()+"?token="+s+"&token_type=Bearer";
// return pdfUrl;
// }
//
//
// /* *//*
// * <Request>
// <Header>
// <SourceSystem>HIS</SourceSystem>
// <MessageId>D561C89A-6320-4b27-83DE-A6169B1D0761</MessageId>
// <CreateTime>2021-07-18 11:12:41</CreateTime>
// <MethodName>Get360PatientId</MethodName>
// </Header>
// <Body>
// <PatientId>0000623132</PatientId>
// </Body>
//</Request>
// * */
// public static String createXml(String patientId1) {
// String strXML = null;
// try {
//// Document document = DocumentHelper.createDocument();
//// org.dom4j.Element request = document.addElement("Request");
//// org.dom4j.Element header = request.addElement("Header");
//// org.dom4j.Element sourceSystem = header.addElement("SourceSystem");
//// org.dom4j.Element messageId = header.addElement("MessageId");
//// org.dom4j.Element createTime = header.addElement("CreateTime");
//// org.dom4j.Element methodName = header.addElement("MethodName");
//// sourceSystem.setText("record");
//// messageId.setText(UUID.randomUUID().toString().toUpperCase());
//// createTime.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
//// methodName.setText("Get360PatientId");
//// org.dom4j.Element body = request.addElement("Body");
//// Element patientIdEle = body.addElement("PatientId");
//// patientIdEle.setText(patientId);
//// return document.toString();
// Document document = DocumentHelper.createDocument();
// //创建根节点
// Element request = document.addElement("Request");
// //添加子节点
// Element header = request.addElement("Header");
// //给Header标签添加子节点
// Element sourceSystem = header.addElement("SourceSystem");
// Element messageId = header.addElement("MessageId");
// Element createTime = header.addElement("CreateTime");
// Element methodName = header.addElement("MethodName");
// //给Request标签添加子节点
// Element body = request.addElement("Body");
// //给Body标签添加子节点
// Element patientIdEle = body.addElement("PatientId");
// //给xml赋值
// sourceSystem.addText("CaseSys");
// UUID guid = UUID.randomUUID();
// messageId.addText(guid.toString());
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// createTime.addText(df.format(new Date()));
// methodName.addText("Get360PatientId");
// patientIdEle.addText(patientId1);
// strXML = document.asXML();
// System.out.println("strXML:::::" + strXML);
// } catch (Exception e) {
// System.out.println("生成rssNew.xml失败");
// }
// return strXML;
// }
// /**
// * 获取token
// * @return
// * @throws
// */
// @RequestMapping(value="getToken")
// @ResponseBody
// public void selToken(SecureloginVo secureloginVo, HttpServletRequest request){
// System.out.println(secureloginVo.getKey());
// // 获得Http客户端
// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// // 创建Post请求
// HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
// secureloginVo.setIDP("NSDP");
// secureloginVo.setSecret("Secret");
//// Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//// secureloginVo.setUserName(user.getUserName());
// secureloginVo.setUserName("002030");
// secureloginVo.setPassword("123456");
// secureloginVo.setScopes("openid profile cr-api roles");
//
// //json格式转换
// String jsonString = JSON.toJSONString(secureloginVo);
// StringEntity entity = new StringEntity(jsonString, "UTF-8");
// // post请求是将参数放在请求体里面传过去的;这里将entity放入post请求体中
// httpPost.setEntity(entity);
// httpPost.setHeader("Content-Type", "application/json;charset=utf8");
// // 响应模型
// CloseableHttpResponse response = null;
// try {
// // 由客户端执行(发送)Post请求
// response = httpClient.execute(httpPost);
// // 从响应模型中获取响应实体
// HttpEntity responseEntity = response.getEntity();
// System.out.println("responseEntity::::"+responseEntity);
// System.out.println("响应状态为:" + response.getStatusLine());
// if (responseEntity != null) {
// System.out.println("响应内容长度为:" + responseEntity.getContentLength());
// System.out.println("响应内容为:" + EntityUtils.toString(responseEntity));
// }
// } catch (ClientProtocolException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// try {
// // 释放资源
// if (httpClient != null) {
// httpClient.close();
// }
// if (response != null) {
// response.close();
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
//
// /**
// * 获取二维码
// * @return
// * @throws
// */
// @RequestMapping(value="getQRcode")
// @ResponseBody
// public void getQRcode(QRcode qRcode, HttpServletRequest request) {
// // 获得Http客户端
// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// // 创建Post请求
// HttpPost httpPost = new HttpPost("https://zh.fstth.cn");
// qRcode.setType(3);
// qRcode.setProjectUid("cloudkey-fstth");
// qRcode.setApplicationId("fstth-wzh");
// //json格式转换
// String jsonString = JSON.toJSONString(qRcode);
// StringEntity entity = new StringEntity(jsonString, "UTF-8");
// // post请求是将参数放在请求体里面传过去的;这里将entity放入post请求体中
// httpPost.setEntity(entity);
// httpPost.setHeader("Content-Type", "application/json;charset=utf8");
// // 响应模型
// CloseableHttpResponse response = null;
// try {
// // 由客户端执行(发送)Post请求
// response = httpClient.execute(httpPost);
// // 从响应模型中获取响应实体
// HttpEntity responseEntity = response.getEntity();
// System.out.println("responseEntity::::" + responseEntity);
// System.out.println("响应状态为:" + response.getStatusLine());
// if (responseEntity != null) {
// System.out.println("响应内容长度为:" + responseEntity.getContentLength());
// System.out.println("响应内容为:" + EntityUtils.toString(responseEntity));
// }
// } catch (ClientProtocolException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// try {
// // 释放资源
// if (httpClient != null) {
// httpClient.close();
// }
// if (response != null) {
// response.close();
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
/**
* @description: /
* @params:
* @return:
* @author linjj
* @date: 2023/12/7 15:07
*/
@RequestMapping(value = "pushInfo")
@ResponseBody
public Msg pushInfo(@Valid PushInfoVo pushInfoVo) {
if (pushInfoVo == null) {
return Msg.pushFail("参数不得为空");
}
if (StringUtils.isBlank(pushInfoVo.getDataType() + "")) {
return Msg.pushFail("提交类型不得为空");
}
if (StringUtils.isBlank(pushInfoVo.getInpNo())) {
return Msg.pushFail("住院号不得为空");
}
if (StringUtils.isBlank(pushInfoVo.getVisitId())) {
return Msg.pushFail("住院次数不得为空");
}
if (StringUtils.isBlank(pushInfoVo.getSubmitCode())) {
return Msg.pushFail("提交时间不得为空");
}
if (pushInfoService.pushInfo(pushInfoVo)) {
return Msg.fail("成功");
}
return Msg.pushFail("失败");
}
@RequestMapping(value = "getTask")
@ResponseBody
public CommonResult GetTask(String collectid) {
return pushInfoService.GetTask(collectid);
}
@RequestMapping(value = "repairTask")
@ResponseBody
public Msg repairTask(String masterId){
if (StringUtils.isBlank(masterId)){
return Msg.pushFail("masterId不能为空");
}
if (pushInfoService.repairTask(masterId)){
return Msg.fail("成功");
}
return Msg.pushFail("失败");
}
}

@ -118,4 +118,36 @@ public interface Archive_MasterMapper {
List<Archive_Master> selectCommonlyUsedNew(@Param("ids") String ids);
//根据住院号住院次数修改医生提交状态
int updateCmtDoctorByInpNoAndVisitId(@Param("inpNo")String inpNo,
@Param("visitId")String visitId,
@Param("submitTime")String submitTime,
@Param("submitCode")String submitCode);
//根据住院号住院次数修改护士提交状态
int updateCmtNurseByInpNoAndVisitId(@Param("inpNo")String inpNo,
@Param("visitId")String visitId,
@Param("submitTime")String submitTime,
@Param("submitCode")String submitCode);
//查询医生提交护士提交状态
int getSubmitStatic(@Param("inpNo")String inpNo,
@Param("visitId")String visitId);
//修改病历审核状态
int updateArchiveStateByInpNoAndVisitId(@Param("inpNo")String inpNo,
@Param("visitId")String visitId);
//根据住院号跟住院次数查询患者信息
List<Archive_Master> getArchiveMaster(@Param("inpNo")String inpNo,
@Param("visitId")String visitId);
//根据住院号跟住院次数查询患者信息
List<Archive_Master> getArchiveMasterByMasterId(@Param("masterId")String masterId);
//查询医生护士提交采集失败病历
List<Archive_Master> getFailList(@Param("scheduledFlag")String scheduledFlag);
}

@ -0,0 +1,15 @@
package com.emr.dao;
import com.emr.vo.PushInfoVo;
/**
* @InterfaceName PushInfoMapper
* @Description /
* @Author linjj
* @Date 2023/12/11 14:56
* @Version 1.0
*/
public interface PushInfoMapper {
int addPushTracer(PushInfoVo pushInfoVo);
}

@ -5,6 +5,16 @@ import java.math.BigDecimal;
public class Archive_Master {
private String id;
private String sysFlag;
public String getSysFlag() {
return sysFlag;
}
public void setSysFlag(String sysFlag) {
this.sysFlag = sysFlag;
}
private String patientId;
private String deptName1;

@ -12,6 +12,11 @@ import java.util.List;
@Data
public class Archive_Master_Vo extends Archive_Master{
private int cmtDoctor;
private int cmtNurse;
private String cmtDoctorDate;
private String cmtNurseDate;
private String startDateTo;
private String endDateTo;

@ -0,0 +1,66 @@
package com.emr.quartz;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.Archive_Master;
import com.emr.util.RedisMq;
import com.emr.vo.PrintParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
/**
* @ClassName ScheduledJob
* @Description
* @Author linjj
* @Date 2023/12/14 16:48
* @Version 1.0
*/
@Component
public class ScheduledJob {
private String redisKey = "docus:task:topic_collect_%s_queue:%s";
@Autowired(required = false)
private RedisMq redisMq;
@Value("${scheduledFlag}")
private String scheduledFlag;
@Autowired
private Archive_MasterMapper archiveMasterMapper;
/**
* @description:
* @author linjj
* @date: 2023/12/14 16:54
*/
@Scheduled(cron = "0 0 1 * * ?")
public void repairTaskAll() {
//查询采集未完成患者继续采集
List<Archive_Master> failList = archiveMasterMapper.getFailList(scheduledFlag);
for (Archive_Master list:failList){
PrintParam printParam = new PrintParam();
printParam.setMasterId(list.getId());
printParam.setInpNo(list.getInpNo());
printParam.setVisitId(list.getVisitId());
printParam.setDeptName(list.getDeptName());
printParam.setDischargeDateTime(list.getDischargeDateTime());
printParam.setName(list.getName());
GenerateQueue(printParam,1,list.getSysFlag());
}
}
//生成队列消息
private void GenerateQueue(PrintParam data, Integer ispriority, String collectid) {
String key = String.format(redisKey, collectid, ispriority);
redisMq.push(key, JSON.toJSONString(data, SerializerFeature.WriteDateUseDateFormat, SerializerFeature.WriteMapNullValue));
}
}

@ -0,0 +1,23 @@
package com.emr.service;
import com.emr.util.CommonResult;
import com.emr.vo.PushInfoVo;
/**
* @InterfaceName pushInfoService
* @Description /
* @Author linjj
* @Date 2023/12/11 14:51
* @Version 1.0
*/
public interface PushInfoService {
Boolean pushInfo(PushInfoVo pushInfoVo);
CommonResult GetTask(String collectid);
Boolean repairTask(String masterId);
}

@ -0,0 +1,161 @@
package com.emr.service.ipml;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.PushInfoMapper;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.service.PushInfoService;
import com.emr.util.CommonResult;
import com.emr.util.RedisMq;
import com.emr.vo.PrintParam;
import com.emr.vo.PushInfoVo;
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 java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @ClassName pushInfoServiceImpl
* @Description /
* @Author linjj
* @Date 2023/12/11 14:51
* @Version 1.0
*/
@Service
public class PushInfoServiceImpl implements PushInfoService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private PushInfoMapper pushInfoMapper;
private String redisKey = "docus:task:topic_collect_%s_queue:%s";
@Autowired(required = false)
private RedisMq redisMq;
@Value("${doctorFlag}")
private String doctorFlag;
@Value("${nurseFlag}")
private String nurseFlag;
@Value("${collectIdList}")
private String collectIdList;
@Override
public Boolean pushInfo(PushInfoVo pushInfoVo) {
boolean exist = false;
//将采集器标识转为集合
List<String> doctorList = Arrays.asList(doctorFlag.split(","));
List<String> nurseFlagList = Arrays.asList(nurseFlag.split(","));
List<Archive_Master> list = archiveMasterMapper.getArchiveMaster(pushInfoVo.getInpNo(), pushInfoVo.getVisitId());
PrintParam printParam = new PrintParam();
printParam.setMasterId(list.get(0).getId());
printParam.setInpNo(pushInfoVo.getInpNo());
printParam.setVisitId(pushInfoVo.getVisitId());
printParam.setDeptName(list.get(0).getDeptName());
printParam.setDischargeDateTime(list.get(0).getDischargeDateTime());
printParam.setName(list.get(0).getName());
//判断类型为电子病历或护理记录接1.电子病历2.护理记录
if (pushInfoVo.getDataType() == 1) {
int i = archiveMasterMapper.updateCmtDoctorByInpNoAndVisitId(pushInfoVo.getInpNo(), pushInfoVo.getVisitId(), pushInfoVo.getSubmitTime(), pushInfoVo.getSubmitCode());
if (i == 1) {
exist = true;
}
//判断医生护士是否全部提交
submitStatic(pushInfoVo.getInpNo(), pushInfoVo.getVisitId());
//保存记录到提交示踪表
addPushTracer(pushInfoVo);
for (String doctorId : doctorList) {
//存放队列消息
GenerateQueue(printParam, 5, doctorId);
}
}
if (pushInfoVo.getDataType() == 2) {
int i = archiveMasterMapper.updateCmtNurseByInpNoAndVisitId(pushInfoVo.getInpNo(), pushInfoVo.getVisitId(), pushInfoVo.getSubmitTime(), pushInfoVo.getSubmitCode());
if (i == 1) {
exist = true;
}
//判断医生护士是否全部提交
submitStatic(pushInfoVo.getInpNo(), pushInfoVo.getVisitId());
//保存记录到提交示踪表
addPushTracer(pushInfoVo);
for (String nurseId : nurseFlagList) {
//存放队列消息
GenerateQueue(printParam, 5, nurseId);
}
}
return exist;
}
@Override
public CommonResult GetTask(String collectid) {
String message = "";
for (int i = 10; i >= 1; i--) {
String key = String.format(redisKey, collectid, i);
message = redisMq.pop(key);
if (!StringUtils.isEmpty(message) && !message.equals("null")) {
break;
}
}
if (StringUtils.isEmpty(message) || message.equals("null")) {
return CommonResult.failed("暂无队列数据");
} else {
PrintParam data = JSON.parseObject(message, PrintParam.class);
return CommonResult.success(data);
}
}
@Override
public Boolean repairTask(String masterId) {
boolean exist = false;
//补偿所有采集器id集合
List<String> idList = Arrays.asList(collectIdList.split(","));
//获取患者基础信息
List<Archive_Master> list = archiveMasterMapper.getArchiveMasterByMasterId(masterId);
PrintParam printParam = new PrintParam();
printParam.setMasterId(list.get(0).getId());
printParam.setInpNo(list.get(0).getInpNo());
printParam.setVisitId(list.get(0).getVisitId());
printParam.setDeptName(list.get(0).getDeptName());
printParam.setDischargeDateTime(list.get(0).getDischargeDateTime());
printParam.setName(list.get(0).getName());
//存放队列消息
for (String id : idList) {
GenerateQueue(printParam, 10, id);
exist = true;
}
return exist;
}
//生成队列消息
private void GenerateQueue(PrintParam data, Integer ispriority, String collectid) {
String key = String.format(redisKey, collectid, ispriority);
redisMq.push(key, JSON.toJSONString(data, SerializerFeature.WriteDateUseDateFormat, SerializerFeature.WriteMapNullValue));
}
//判断医生护士是否全部提交
void submitStatic(String inpNo, String visitId) {
//判断医生护士是否全部提交
int submitStatic = archiveMasterMapper.getSubmitStatic(inpNo, visitId);
//如果全部提交将改病历修改为病案室终审
if (submitStatic == 1) {
archiveMasterMapper.updateArchiveStateByInpNoAndVisitId(inpNo, visitId);
}
}
void addPushTracer(PushInfoVo pushInfoVo) {
pushInfoMapper.addPushTracer(pushInfoVo);
}
}

@ -0,0 +1,151 @@
package com.emr.util;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author docus
* @date 2020/3/28 16:23
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
private Integer code;
private String msg;
private T data;
public CommonResult(Integer code, String msg) {
this.code = code;
this.msg = msg;
}
/**
*
*
* @param data
* @param <T>
* @return
*/
public static <T> CommonResult<T> success(T data) {
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
}
/**
*
*
* @param data
* @param message
* @param <T>
* @return
*/
public static <T> CommonResult<T> success(T data, String message) {
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data);
}
/**
*
*
* @param errorCode
* @param <T>
* @return
*/
public static <T> CommonResult<T> failed(IErrorCode errorCode) {
return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(), null);
}
/**
*
*
* @param errorCode
* @param message
* @param <T>
* @return
*/
public static <T> CommonResult<T> failed(IErrorCode errorCode, String message) {
return new CommonResult<T>(errorCode.getCode(), message, null);
}
/**
*
*
* @param message
* @param <T>
* @return
*/
public static <T> CommonResult<T> failed(String message) {
return new CommonResult<T>(ResultCode.FAILED.getCode(), message, null);
}
/**
*
*
* @param <T>
* @return
*/
public static <T> CommonResult<T> failed() {
return failed(ResultCode.FAILED);
}
/**
*
*
* @param <T>
* @return
*/
public static <T> CommonResult<T> validateFailed() {
return failed(ResultCode.VALIDATE_FAILED);
}
/**
*
*
* @param message
* @param <T>
* @return
*/
public static <T> CommonResult<T> validateFailed(String message) {
return new CommonResult<T>(ResultCode.VALIDATE_FAILED.getCode(), message, null);
}
/**
*
*
* @param data
* @param <T>
* @return
*/
public static <T> CommonResult<T> unauthorized(T data) {
return new CommonResult<T>(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data);
}
/**
*
*
* @param data
* @param <T>
* @return
*/
public static <T> CommonResult<T> preventreplay(T data) {
return new CommonResult<T>(ResultCode.PREVENT_REPLAY.getCode(), ResultCode.PREVENT_REPLAY.getMessage(), data);
}
/**
*
*
* @param data
* @param <T>
* @return
*/
public static <T> CommonResult<T> forbidden(T data) {
return new CommonResult<T>(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data);
}
}

@ -0,0 +1,12 @@
package com.emr.util;
/**
* @Description API
* @Author JacksonTu
* @Date 2020/3/28 16:26
*/
public interface IErrorCode {
Integer getCode();
String getMessage();
}

@ -42,6 +42,23 @@ public class Msg {
return result;
}
public static Msg pushFail(String msg){
Msg result=new Msg();
result.setCode(100);
result.setMsg(msg);
return result;
}
public static Msg pushSuccess(String msg){
Msg result=new Msg();
result.setCode(200);
result.setMsg(msg);
return result;
}
public Msg add(String key,Object value){
this.getExtend().put(key, value);
return this;

@ -0,0 +1,89 @@
package com.emr.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class RedisMq {
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private RedisTemplate redisTemplate;
/**
*
*
* @param message
*/
public void push(String messageKey, String message) {
String Key = messageKey;
stringRedisTemplate.opsForList().leftPush(Key, message);
}
public void deleteKey(String Key)
{
try {
redisTemplate.delete(Key);
} catch (Exception e) {
return;
}
}
public void deleteAllKey(List<String> ids)
{
try {
redisTemplate.delete(ids);
} catch (Exception e) {
return;
}
}
public void pushAll(String messageKey, List<String> messages) {
String Key = messageKey;
stringRedisTemplate.opsForList().leftPushAll(Key, messages);
}
/**
*
* @return
*/
public long size(String messageKey) {
String Key = messageKey;
try {
return stringRedisTemplate.opsForList().size(messageKey);
} catch (Exception e) {
return 0;
}
}
/**
* ,null
* rightPop1.key,2.3.
*
* @return
*/
public String pop(String messageKey) {
String Key = messageKey;
try {
return String.valueOf(stringRedisTemplate.opsForList().rightPop(Key));
} catch (Exception e) {
return null;
}
}
/**
* key
* @param messageKey
* @return
*/
public boolean IsExist(String messageKey){
return stringRedisTemplate.hasKey(messageKey);
}
}

@ -0,0 +1,40 @@
package com.emr.util;
/**
* @Description API
* @Author JacksonTu
* @Date 2020/3/28 16:26
*/
public enum ResultCode implements IErrorCode {
SUCCESS(0, "操作成功"),
FAILED(500, "操作失败"),
VALIDATE_FAILED(404, "参数检验失败"),
UNAUTHORIZED(401, "暂未登录或token已经过期"),
FORBIDDEN(403, "没有相关权限"),
PREVENT_REPLAY(405,"重复请求"),
NOT_EXIST(601,"数据不存在"),
NOT_ENABLE(600,"数据未启用");
private Integer code;
private String message;
private ResultCode(Integer code, String message) {
this.code = code;
this.message = message;
}
public Integer getCode() {
return code;
}
public String getMessage() {
return message;
}
}

@ -0,0 +1,22 @@
package com.emr.vo;
import lombok.Data;
/**
* @ClassName PrintParam
* @Author linjj
* @Date 2023/12/13 9:05
* @Version 1.0
*/
@Data
public class PrintParam {
private String masterId;
private String inpNo;
private String visitId;
private String name;
private String deptName;
private String dischargeDateTime;
}

@ -0,0 +1,45 @@
package com.emr.vo;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @ClassName pushInfoVo
* @Description /
* @Author linjj
* @Date 2023/12/7 15:07
* @Version 1.0
*/
@Data
public class PushInfoVo {
//住院流水号
@NotBlank(message = "住院流水号不能为空")
private String inhospNo;
//住院号
@NotBlank(message = "住院号不能为空")
private String inpNo;
//住院次数
@NotBlank(message = "住住院次数不能为空")
private String visitId;
//患者姓名
@NotBlank(message = "患者姓名不能为空")
private String name;
//提交时间
@NotBlank(message = "提交时间不能为空")
private String submitTime;
//提交类型1.电子病历2.护理记录
@NotNull(message = "提交类型不能为空")
private int dataType;
//提交用户工号
@NotBlank(message = "提交用户工号不能为空")
private String submitCode;
//提交用户姓名
@NotBlank(message = "提交用户姓名不能为空")
private String submitNameString;
}

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<description>Redis configuration</description>
<!-- 载入redis配置参数 -->
<context:property-placeholder location="classpath:config/redis.properties" ignore-unresolvable="true" />
<!-- redis config start -->
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxIdle" value="${redis.pool.maxIdle}"></property>
<property name="maxTotal" value="${redis.pool.maxActive}" />
<property name="maxWaitMillis" value="${redis.pool.maxWaitMillis}" />
<property name="testOnBorrow" value="${redis.pool.testOnBorrow}" />
<!--
<property name="minEvictableIdleTimeMillis" value="${redis.minEvictableIdleTimeMillis}"></property>
<property name="numTestsPerEvictionRun" value="${redis.numTestsPerEvictionRun}"></property>
<property name="timeBetweenEvictionRunsMillis" value="${redis.timeBetweenEvictionRunsMillis}"></property>
-->
</bean>
<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">
<property name="poolConfig" ref="jedisPoolConfig"></property>
<property name="hostName" value="${redis.host}"></property>
<property name="port" value="${redis.port}"></property>
<!-- 通过密码连接服务器(保证安全) -->
<!-- <property name="password" value="${redis.password}"></property>-->
<property name="timeout" value="${redis.timeout}"></property>
<!--是否使用連接池 <property name="usePool" value="${redis.usePool}"></property> -->
</bean>
<!-- redis操作模板面向对象的模板 -->
<bean id="stringRedisSerializer" class="org.springframework.data.redis.serializer.StringRedisSerializer" />
<bean id="jdkSerializationRedisSerializer" class="org.springframework.data.redis.serializer.JdkSerializationRedisSerializer" />
<bean id="stringRedisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate">
<property name="connectionFactory" ref="jedisConnectionFactory" />
<!-- 如果不配置Serializer那么存储的时候只能使用String如果用对象类型存储那么会提示错误 -->
<!-- 注意原来valueSerializer配置为jdkSerializationRedisSerializer 实际测试取值时会出现类似内容: \xac\xed\x00\x05t\x00\tb 需要改成stringRedisSerializer -->
<property name="keySerializer" ref="stringRedisSerializer" />
<property name="valueSerializer" ref="stringRedisSerializer" />
</bean>
<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="jedisConnectionFactory" />
<property name="keySerializer">
<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
</property>
<property name="valueSerializer">
<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
</property>
</bean>
<!-- redis config end -->
<!-- Redis 发布订阅监配置 -->
<!-- 1、配置监听类 -->
<!-- 2、配置监听容器 -->
<bean id="topicContainer" class="org.springframework.data.redis.listener.RedisMessageListenerContainer" destroy-method="destroy">
<!-- redis连接工厂 -->
<property name="connectionFactory" ref="jedisConnectionFactory"></property>
<!-- 连接池,这里要线程池生存,才能继续监听 -->
<property name="taskExecutor">
<bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler">
<property name="poolSize" value="3"></property>
</bean>
</property>
</bean>
</beans>

@ -12,6 +12,7 @@
<property name="filterChainDefinitions">
<value>
/toLogin=anon <!--表示都可以访问-->
/font/**=anon <!--表示都可以访问-->
/static/**=anon <!--表示都可以访问-->
/error=authc
/test=anon

@ -21,7 +21,6 @@
http://www.springframework.org/schema/task/spring-task.xsd">
<!-- 开启注解扫描 -->
<mvc:annotation-driven/>
<!-- 注解扫面包路径 -->
<context:component-scan base-package="com.emr">
<!-- 制定扫包规则 ,不扫描@Controller注解的JAVA类 -->
@ -30,7 +29,7 @@
<!--启动任务定时器-->
<task:annotation-driven/>
<context:property-placeholder location="classpath:config/*.properties" />
<context:property-placeholder location="classpath:config/*.properties"/>
<!--配置数据源-->
@ -39,34 +38,33 @@
<property name="url" value="${jdbc.url}"/> <!--数据库地址-->
<property name="username" value="${jdbc.username}"/> <!--用户名-->
<property name="password" value="${jdbc.password}"/> <!--密码-->
<property name = "filters" value = "${filters}" />
<property name="filters" value="${filters}"/>
<!-- 最大并发连接数 -->
<property name = "maxActive" value = "${maxActive}" />
<property name="maxActive" value="${maxActive}"/>
<!-- 初始化连接数量 -->
<property name = "initialSize" value = "${initialSize}" />
<property name="initialSize" value="${initialSize}"/>
<!-- 配置获取连接等待超时的时间 -->
<property name = "maxWait" value = "${maxWait}" />
<property name="maxWait" value="${maxWait}"/>
<!-- 最小空闲连接数 -->
<property name = "minIdle" value = "${minIdle}" />
<property name="minIdle" value="${minIdle}"/>
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name = "timeBetweenEvictionRunsMillis" value ="${timeBetweenEvictionRunsMillis}" />
<property name="timeBetweenEvictionRunsMillis" value="${timeBetweenEvictionRunsMillis}"/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name = "minEvictableIdleTimeMillis" value ="${minEvictableIdleTimeMillis}" />
<property name = "validationQuery" value = "${validationQuery}" />
<property name = "testWhileIdle" value = "${testWhileIdle}" />
<property name = "testOnBorrow" value = "${testOnBorrow}" />
<property name = "testOnReturn" value = "${testOnReturn}" />
<property name = "maxOpenPreparedStatements" value ="${maxOpenPreparedStatements}" />
<property name="minEvictableIdleTimeMillis" value="${minEvictableIdleTimeMillis}"/>
<property name="validationQuery" value="${validationQuery}"/>
<property name="testWhileIdle" value="${testWhileIdle}"/>
<property name="testOnBorrow" value="${testOnBorrow}"/>
<property name="testOnReturn" value="${testOnReturn}"/>
<property name="maxOpenPreparedStatements" value="${maxOpenPreparedStatements}"/>
<!-- 打开 removeAbandoned 功能 -->
<property name = "removeAbandoned" value = "${removeAbandoned}" />
<property name="removeAbandoned" value="${removeAbandoned}"/>
<!-- 1800 秒,也就是 30 分钟 -->
<property name = "removeAbandonedTimeout" value ="${removeAbandonedTimeout}" />
<property name="removeAbandonedTimeout" value="${removeAbandonedTimeout}"/>
<!-- 关闭 abanded 连接时输出错误日志 -->
<property name = "logAbandoned" value = "${logAbandoned}" />
<property name="logAbandoned" value="${logAbandoned}"/>
</bean>
<!-- ====================== 配置和MyBatis的整合 ======================== -->
<!--配置session工厂MyBatis的整合-->
@ -142,7 +140,6 @@
<!--<aop:aspectj-autoproxy proxy-target-class="true"/>-->
<!-- 配置启用Shiro的注解功能 -->
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor">
@ -169,12 +166,22 @@
<property name="maxUploadSize" value="-1"/>
</bean>
<import resource="applicationContext-redis.xml"/>
<!-- 自定义拦截器 -->
<!--<bean id="login" class="com.common.shiro.filter.LoginFilter"/>-->
<!-- Shiro生命周期处理器-->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
<!--定时任务-->
<!-- <task:scheduled-tasks>-->
<!-- <task:scheduled ref="quartzTestBean" method="quartzJobTestMethod" cron="*/5 * * * * ?"/>-->
<!-- </task:scheduled-tasks>-->
<!-- <bean id="quartzTestBean" class="com.emr.service.ipml.PushInfoServiceImpl"/>-->
<context:component-scan base-package="com.emr.quartz" />
</beans>

@ -54,4 +54,11 @@ allAddortIds = 00000000
overDateSet = 2021-05-01
#\u5404\u5BA1\u6838\u89D2\u8272\u7528\u6237id 1\uFF1A\u533B\u751F\uFF1B2\uFF1A\u62A4\u58EB\uFF1B3\uFF1A\u75C5\u6848\u5BA4\u4EBA\u5458\uFF1B5\uFF1A\u533B\u751F\u8D28\u63A7\u5458\uFF1B6\uFF1A\u79D1\u4E3B\u4EFB\uFF1B7\uFF1A\u62A4\u58EB\u957F\uFF1B8\uFF1A\u62A4\u58EB\u8D28\u63A7\u5458
#电子病历采集器标识
doctorFlag= 2,15,8
#护理记录采集器标识
nurseFlag= 1
#补偿采集器标识
collectIdList= 1,2,15,8
#定时需要补偿的采集器id
scheduledFlag=1,2,15,8

@ -0,0 +1,34 @@
#redis pool config
redis.pool.maxActive=1000
redis.pool.maxIdle=100
redis.pool.maxWaitMillis=10000
redis.pool.testOnBorrow=true
#redis config
redis.host=127.0.0.1
redis.port=6379
redis.timeout=6000
#redis.password=123456
redis.dbindex=8
redis.usePool=1
redis.default.expire=1800000
#redis pool config
#redis.pool.maxActive=1000
#redis.pool.maxIdle=100
#redis.pool.maxWaitMillis=10000
#redis.pool.testOnBorrow=true
#
##redis config
#redis.host=127.0.0.1
#redis.port=16379
#redis.timeout=6000
#redis.password=docus@702
#redis.dbindex=8
#redis.usePool=1
#redis.default.expire=1800000

@ -49,6 +49,10 @@
<result column="dept_code_lend" jdbcType="NVARCHAR" property="deptCodeLend"/>
<result column="days" jdbcType="NVARCHAR" property="days"/>
<result column="paper_static" property="paperStatic"/>
<result column="cmt_doctor" property="cmtDoctor"/>
<result column="cmt_nurse" property="cmtNurse"/>
<result column="cmt_doctor_date" property="cmtDoctorDate"/>
<result column="cmt_nurse_date" property="cmtNurseDate"/>
</resultMap>
<resultMap id="BaseResultMap3" type="com.emr.vo.DoctorStatistics">
@ -58,30 +62,7 @@
<result column="overDays" jdbcType="INTEGER" property="overDays"/>
</resultMap>
<!--<resultMap id="BaseResultMap2" type="com.emr.entity.Archive_MasterVo">-->
<!--<id column="id" jdbcType="NVARCHAR" property="id"/>-->
<!--<result column="patient_id" jdbcType="NVARCHAR" property="patientId"/>-->
<!--<result column="inp_no" jdbcType="NVARCHAR" property="inpNo"/>-->
<!--<result column="visit_id" jdbcType="NVARCHAR" property="visitId"/>-->
<!--<result column="name" jdbcType="NVARCHAR" property="name"/>-->
<!--<result column="sex" jdbcType="NVARCHAR" property="sex"/>-->
<!--<result column="dept_name" jdbcType="NVARCHAR" property="deptName"/>-->
<!--<result column="discharge_date_time" jdbcType="NVARCHAR" property="dischargeDateTime"/>-->
<!--<result column="ArchiveState" jdbcType="NVARCHAR" property="archivestate"/>-->
<!--<result column="admission_date_time" jdbcType="NVARCHAR" property="admissionDateTime"/>-->
<!--<result column="dept_admission_to" jdbcType="NVARCHAR" property="deptAdmissionTo"/>-->
<!--<result column="check_doctor" jdbcType="NVARCHAR" property="checkDoctor"/>-->
<!--<result column="check_datetime" jdbcType="NVARCHAR" property="checkDatetime"/>-->
<!--<result column="checked_doctor" jdbcType="NVARCHAR" property="checkedDoctor"/>-->
<!--<result column="checked_datetime" jdbcType="NVARCHAR" property="checkedDatetime"/>-->
<!--<result column="LockInfo" jdbcType="NVARCHAR" property="lockinfo"/>-->
<!--<result column="DOCTOR_IN_CHARGE" jdbcType="NVARCHAR" property="doctorInCharge"/>-->
<!--<result column="ID_NO" jdbcType="NVARCHAR" property="idNo"/>-->
<!--<result column="DISCHARGE_DISPOSITION" jdbcType="NVARCHAR" property="dischargeDisposition"/>-->
<!--<result column="dept_code_lend" jdbcType="NVARCHAR" property="deptCodeLend"/>-->
<!--<result column="startDateTo" jdbcType="NVARCHAR" property="startDateTo"/>-->
<!--<result column="endDateTo" jdbcType="NVARCHAR" property="endDateTo"/>-->
<!--</resultMap>-->
<sql id="Base_Column_List">
id, patient_id, inp_no, visit_id, name, sex, dept_name, discharge_date_time, ArchiveState,
admission_date_time, dept_admission_to, check_doctor, check_datetime, checked_doctor,
@ -462,7 +443,11 @@
archive_master.dept_admission_to,
archive_master.LockInfo,
archive_master.DOCTOR_IN_CHARGE,
archive_master.D1
archive_master.D1,
archive_master.cmt_doctor,
archive_master.cmt_nurse,
archive_master.cmt_doctor_date,
archive_master.cmt_nurse_date
</sql>
<!--查询存在麻醉记录且不完整的MasterId集合-->
@ -701,7 +686,7 @@
<include refid="leaveHospitalCommomSearch"></include>
</if>
) archive_master
ORDER BY archive_master.dept_name,archive_master.discharge_date_time desc
ORDER BY archive_master.discharge_date_time desc
</select>
<!---出院-->
@ -1582,6 +1567,18 @@
</set>
where id = #{id,jdbcType=NVARCHAR}
</update>
<update id="updateCmtDoctorByInpNoAndVisitId">
update archive_master set cmt_doctor=1,cmt_doctor_date=#{submitTime},cmt_doctor_name=#{submitCode}
where inp_no=#{inpNo} and visit_id=#{visitId}
</update>
<update id="updateCmtNurseByInpNoAndVisitId">
update archive_master set cmt_nurse=1,cmt_nurse_date=#{submitTime},cmt_nurse_name=#{submitCode}
where inp_no=#{inpNo} and visit_id=#{visitId}
</update>
<update id="updateArchiveStateByInpNoAndVisitId">
update archive_master set ArchiveState='64'
where inp_no=#{inpNo} and visit_id=#{visitId}
</update>
<!---查询出院工作日-->
<select id="selectDaysByMasterIds" resultMap="BaseResultMap2">
SELECT
@ -1831,5 +1828,39 @@
#{item}
</foreach>
</select>
<select id="getSubmitStatic" resultType="java.lang.Integer">
select count(*)
from archive_master
where inp_no = #{inpNo}
and visit_id = #{visitId}
and cmt_doctor_date !=''
and cmt_nurse_date !=''
</select>
<select id="getArchiveMaster" resultType="com.emr.entity.Archive_Master">
select *
from archive_master
where inp_no = #{inpNo}
and visit_id = #{visitId}
</select>
<select id="getArchiveMasterByMasterId" resultType="com.emr.entity.Archive_Master">
select *
from archive_master
where id = #{masterId}
</select>
<select id="getFailList" resultType="com.emr.entity.Archive_Master">
SELECT
distinct a.* ,b.sysFlag
FROM
archive_master a
LEFT JOIN archive_other_ext b ON a.id=b.MID
WHERE
a.cmt_doctor = 1
AND a.cmt_nurse =1
AND b.statusFlag !=3
and sysFlag in
<foreach item="item" collection="scheduledFlag.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>

@ -0,0 +1,60 @@
<?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.PushInfoMapper">
<insert id="addPushTracer">
insert into push_tracer
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="inhospNo != null" >
inhospNo,
</if>
<if test="inpNo != null" >
inpNo,
</if>
<if test="visitId != null" >
visitId,
</if>
<if test="name != null" >
name,
</if>
<if test="submitTime != null" >
submitTime,
</if>
<if test="dataType != null" >
dataType,
</if>
<if test="submitCode != null" >
submitCode,
</if>
<if test="submitNameString != null" >
submitNameString,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="inhospNo != null" >
#{inhospNo},
</if>
<if test="inpNo != null" >
#{inpNo},
</if>
<if test="visitId != null" >
#{visitId},
</if>
<if test="name != null" >
#{name},
</if>
<if test="submitTime != null" >
#{submitTime},
</if>
<if test="dataType != null" >
#{dataType},
</if>
<if test="submitCode != null" >
#{submitCode},
</if>
<if test="submitNameString != null" >
#{submitNameString},
</if>
</trim>
</insert>
</mapper>

@ -130,13 +130,6 @@ function initTable() {
field: 'doctorInCharge',
align: 'left'
},
// {
// title: '状态',
// field: 'status',
// align: 'center',
// valign: 'middle',
// formatter:paramsMatter
// },
{
title: '是否完整',
field: 'lockinfo',
@ -150,6 +143,44 @@ function initTable() {
}
}
},
{
title: '医生提交状态',
field: 'cmtDoctor',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '1'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: '医生提交时间',
field: 'cmtDoctorDate',
align: 'center',
valign: 'middle',
},
{
title: '护士提交状态',
field: 'cmtNurse',
align: 'center',
valign: 'middle',
formatter:function(value, row){
if(value == '1'){
return '<span style="color:green">是</span>';
}else{
return '<span style="color:red">否</span>';
}
}
},
{
title: '护士提交时间',
field: 'cmtnurseDate',
align: 'center',
valign: 'middle',
},
// {
// title: 'HIS召回状态',
// field: 'callBackStatus',

Loading…
Cancel
Save