1.每个页面查看病历页面展示时间轴
2.病案室退回后医生再提交,将该行字体换颜色展示 3.增加菜单,病案封存,当病历进行病案封存后,这份病历就只能在病案封存这个菜单里查看 4.增加菜单,病案封存日志,记录病案封存后又撤回的信息 5.工号栏显示姓名 6.首次签收与超期页面根据要求修改sql ————2021.02.24 王泽钦master
parent
75fed113ac
commit
0a3f7669c5
@ -0,0 +1,176 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (C), 2015-2019
|
||||||
|
* Author: HJL
|
||||||
|
* Date: 2019/7/19 14:39
|
||||||
|
* Description:病案召回
|
||||||
|
*/
|
||||||
|
package com.emr.controller;
|
||||||
|
|
||||||
|
import com.emr.annotation.OptionalLog;
|
||||||
|
import com.emr.entity.*;
|
||||||
|
import com.emr.service.*;
|
||||||
|
import com.emr.util.ExportExcelUtil;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.session.Session;
|
||||||
|
import org.apache.shiro.subject.Subject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
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.io.UnsupportedEncodingException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@PropertySource(value = "classpath:config/jdbc.properties", encoding = "UTF-8")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/storage")
|
||||||
|
public class storageController {
|
||||||
|
@Autowired
|
||||||
|
private Emr_Fault_DetailService emrFaultDetailService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Emr_DictionaryService emrDictionaryService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Archive_MasterService archiveMasterService;
|
||||||
|
@Autowired
|
||||||
|
private Archive_Master_FollowingService archiveMasterFollowingService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/MedicalRecordStorage")
|
||||||
|
public String faults(Model model) {
|
||||||
|
return "medicalRecordStorageDir/MedicalRecordStorage";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value = "/StorageList")
|
||||||
|
public OffsetLimitPage recallList(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
|
||||||
|
OffsetLimitPage result = emrFaultDetailService.selectStorageByCol(emrFaultVo, offset, limit);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value = "/exportExcel")
|
||||||
|
public void exportExcel(HttpServletResponse response, Emr_Fault_Vo emrFaultVo) throws Exception {
|
||||||
|
String tableThNames = "ID,病历清单id,住院号,住院次数,名字,性别,身份证,入院科室,入院日期,出院科室,出院日期,状态,归档状态";
|
||||||
|
String fieldCns = "id,archiveDetailId,inpNo,visitId,name,sex,idNo,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,state,archivestate";
|
||||||
|
//构造excel的数据
|
||||||
|
List<Emr_Fault_Vo> list = emrFaultDetailService.selectByCol(emrFaultVo);
|
||||||
|
|
||||||
|
Emr_Dictionary dic = new Emr_Dictionary();
|
||||||
|
dic.setEffective(1);
|
||||||
|
dic.setTypecode("dept_code");
|
||||||
|
//科室列表
|
||||||
|
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
//替换科室
|
||||||
|
for (int k = 0; k < dicList.size(); k++) {
|
||||||
|
String deptName = list.get(i).getDeptName();
|
||||||
|
if (deptName.equals(dicList.get(k).getCode())) {
|
||||||
|
//出院科室
|
||||||
|
deptName = deptName.replace(deptName, dicList.get(k).getName());
|
||||||
|
list.get(i).setDeptName(deptName);
|
||||||
|
//入院科室dept_admission_to
|
||||||
|
deptName = list.get(i).getDeptAdmissionTo();
|
||||||
|
deptName = deptName.replace(deptName, dicList.get(k).getName());
|
||||||
|
list.get(i).setDeptAdmissionTo(deptName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//文件名
|
||||||
|
String fileName = "召回信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
|
||||||
|
//ExportExcelUtil
|
||||||
|
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
|
||||||
|
response.setContentType("application/ms-excel;charset=gbk");
|
||||||
|
//导出excel的操作
|
||||||
|
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*病案封存
|
||||||
|
* 将已封存数据转换成未封存
|
||||||
|
* 新增操作时日志记录
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@OptionalLog(methods = "病案封存")
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value = "/updateState")
|
||||||
|
public int updateState(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) throws UnsupportedEncodingException {
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
request.setCharacterEncoding("utf-8");
|
||||||
|
Subject currentUser = SecurityUtils.getSubject();
|
||||||
|
Session session = currentUser.getSession();
|
||||||
|
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
|
||||||
|
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
|
||||||
|
String handleName = user.getUserPosition();//姓名
|
||||||
|
emrFaultDetail.setUpdater(username);
|
||||||
|
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String nowTime = format1.format(new Date());
|
||||||
|
emrFaultDetail.setUpdateTime(nowTime);
|
||||||
|
|
||||||
|
Archive_Master archiveMaster = new Archive_Master();
|
||||||
|
Archive_Master_Following archiveMasterFollowing = new Archive_Master_Following();
|
||||||
|
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
|
||||||
|
archiveMaster.setArchivestate(emrFaultDetail.getArchiveState());
|
||||||
|
archiveMaster.setCmtNurse(1);
|
||||||
|
archiveMaster.setCmtDoctor(1);
|
||||||
|
int bol = archiveMasterService.updateByClo(archiveMaster);
|
||||||
|
if (bol == 1) {
|
||||||
|
if(archiveMaster.getArchivestate().equals("已封存")){
|
||||||
|
archiveMasterFollowing.setMasterId(emrFaultDetail.getArchiveDetailId());
|
||||||
|
archiveMasterFollowing.setFollowingContent("病案封存");
|
||||||
|
archiveMasterFollowing.setFollowingType("11");
|
||||||
|
archiveMasterFollowing.setHandleTime(nowTime);
|
||||||
|
// archiveMasterFollowing.setHandleId();
|
||||||
|
archiveMasterFollowing.setHandleName(handleName);
|
||||||
|
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
|
||||||
|
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
|
||||||
|
}else if (archiveMaster.getArchivestate().equals("已归档")){
|
||||||
|
archiveMasterFollowing.setMasterId(emrFaultDetail.getArchiveDetailId());
|
||||||
|
archiveMasterFollowing.setFollowingContent("病案取消封存");
|
||||||
|
archiveMasterFollowing.setFollowingType("12");
|
||||||
|
archiveMasterFollowing.setHandleTime(nowTime);
|
||||||
|
// archiveMasterFollowing.setHandleId();
|
||||||
|
archiveMasterFollowing.setHandleName(handleName);
|
||||||
|
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
|
||||||
|
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return bol;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 封存日志
|
||||||
|
* */
|
||||||
|
@RequestMapping(value = "/MedicalRecordStorageLog")
|
||||||
|
public String faultsLog(Model model) {
|
||||||
|
return "medicalRecordStorageDir/MedicalRecordStorageLog";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 封存日志
|
||||||
|
* */
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value = "/storageLogList")
|
||||||
|
public OffsetLimitPage storageLogList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
|
||||||
|
OffsetLimitPage result = archiveMasterService.selectByFollowinglog(archiveMasterVo, offset, limit);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.emr.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PowerUserService {
|
||||||
|
|
||||||
|
JSONArray getPowerUserList(String type);
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.emr.service.ipml;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.emr.util.HttpClientUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.emr.service.PowerUserService;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PowerUserServiceImpl implements PowerUserService {
|
||||||
|
|
||||||
|
@Value("${powerGetUserList}")
|
||||||
|
private String powerGetUserList;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getPowerUserList(String type) {
|
||||||
|
JSONObject jsonObject = HttpClientUtils.httpGet(powerGetUserList);
|
||||||
|
JSONArray users = new JSONArray();
|
||||||
|
String code = jsonObject.getString("code");
|
||||||
|
if (code.equals("100")) {
|
||||||
|
JSONObject data = jsonObject.getJSONObject("extend");
|
||||||
|
// return data.toString()
|
||||||
|
JSONArray userList = data.getJSONArray("userList");
|
||||||
|
if (type.equals("1")) {
|
||||||
|
return userList;
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < userList.size(); i++) {
|
||||||
|
JSONObject temp = userList.getJSONObject(i);
|
||||||
|
String roleId = temp.getString("roleId");
|
||||||
|
if (roleId.equals("22") || roleId.equals("20")) {
|
||||||
|
users.add(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue