2020-12-23备份

master
zengwh 5 years ago
parent 949d7c9307
commit c6090903cb

Binary file not shown.

@ -30,6 +30,12 @@ public class LoginController {
@Value("${powerUrl}")
private String powerUrl;
@Value("${medicalRecordsRoomDeptId}")
private String medicalRecordsRoomDeptId;
@Value("${medicalepartmentDeptId}")
private String medicalepartmentDeptId;
@RequestMapping(value = "/toLogin")
public String toLogin(Model model) {
// 从session获取用户名
@ -74,14 +80,14 @@ public class LoginController {
}catch (Exception e){
e.printStackTrace();
}
model.addAttribute("isAllDeptIds",medicalRecordsRoomDeptId + "," + medicalepartmentDeptId);
return "index";
}
@RequestMapping(value = "/index")
public String Login(HttpServletRequest request, Model model) {
public String Login() {
return "index";
}
}

@ -55,7 +55,7 @@ public class MedicalRecallController {
@ResponseBody
@RequestMapping(value = "/recallList")
public OffsetLimitPage recallList(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
public OffsetLimitPage recallList(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
OffsetLimitPage result = emrFaultDetailService.selectByCol(emrFaultVo, offset, limit);
return result;
}
@ -98,7 +98,6 @@ public class MedicalRecallController {
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@OptionalLog(methods = "病案召回")
@ResponseBody
@RequestMapping(value = "/updateState")
public int updateState(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {

@ -0,0 +1,21 @@
package com.emr.controller;
import com.emr.service.ipml.EmrPaperPositionInfoServer;
import com.emr.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("paperPosition")
public class PaperPositionController {
@Autowired
private EmrPaperPositionInfoServer paperPositionInfoServer;
@RequestMapping("savePaperPosition")
@ResponseBody
public Msg savePaperPosition(String masterId,String paperPosition) throws Exception{
paperPositionInfoServer.savePaperPositionInfo(masterId,paperPosition);
return Msg.success();
}
}

@ -0,0 +1,32 @@
package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.PatientListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("patientList")
public class PatientListController {
@Autowired
private PatientListService patientListService;
@RequestMapping("select")
public String select(){
return "statistics/patientList";
}
@ResponseBody
@RequestMapping(value = "getPatientList")
public OffsetLimitPage getPatientList( Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
OffsetLimitPage result = patientListService.getPatientList(archiveMasterVo, offset, limit);
return result;
}
}

@ -63,12 +63,12 @@ public class beHospitaledController {
@Autowired
private Archive_DetailMapper detailMapper;
@RequestMapping(value = "/beHosps")
public String inHospitals(Model model){
public String inHospitals(){
return "beHospitaledDir/beHospList";
}
@ResponseBody
@RequestMapping(value = "/beHospList")
public OffsetLimitPage beHospList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
public OffsetLimitPage beHospList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);
@ -102,16 +102,16 @@ public class beHospitaledController {
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")
public String updateStateByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
public String updateStateByArchivId(Emr_Fault_Detail emrFaultDetail) {
String result = "";
result = checkSuccessMethod(emrFaultDetail.getArchiveDetailId());
//result = checkSuccessMethod(emrFaultDetail.getArchiveDetailId());
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
if(result.equals("完整")) {
//修改病案归档状态
Archive_Master archiveMaster = new Archive_Master();
@ -123,11 +123,8 @@ public class beHospitaledController {
archiveMaster.setCheckDoctor(username);
archiveMaster.setLockinfo(result);
int bol = archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if (bol == 1) {
String nowTime = format1.format(new Date());
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
@ -139,7 +136,7 @@ public class beHospitaledController {
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
//设置审核时间
archiveMaster.setCheckDatetime(format1.format(new Date()));
archiveMaster.setCheckDatetime(nowTime);
//设置审核人
archiveMaster.setCheckDoctor(username);
archiveMaster.setLockinfo(result);

@ -10,6 +10,7 @@ import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.service.ipml.EmrPaperPositionInfoServer;
import com.emr.util.ExportExcelUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
@ -57,6 +58,8 @@ public class lastVerifyController {
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
@Autowired
private EmrPaperPositionInfoServer paperPositionInfoServer;
@RequestMapping(value = "/lastVerifys")
public String faults(Model model) {
return "lastVerifyDir/lastVerifyList";
@ -64,7 +67,7 @@ public class lastVerifyController {
@ResponseBody
@RequestMapping(value = "/lastVerifyList")
public OffsetLimitPage lastVerifyList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
public OffsetLimitPage lastVerifyList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);
@ -114,7 +117,7 @@ public class lastVerifyController {
@ResponseBody
@RequestMapping(value = "/updateDetailByArchivId")
public int updateDetailByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail_Vo emrFaultDetail) {
public int updateDetailByArchivId(Emr_Fault_Detail_Vo emrFaultDetail) {
//修改病案归档状态:复审退回
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
@ -228,23 +231,23 @@ public class lastVerifyController {
//终审
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")
public int updateStateByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail_Vo emrFaultDetail) {
public int updateStateByArchivId(Emr_Fault_Detail_Vo emrFaultDetail,String paperPosition) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//修改病案归档状态
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate("已归档");
//设置审核时间
if(StringUtils.isBlank(emrFaultDetail.getCheckedDateTime())){
archiveMaster.setCheckedDatetime(format1.format(new Date()));
}else{
archiveMaster.setCheckedDatetime(emrFaultDetail.getCheckedDateTime());
if(StringUtils.isNotBlank(emrFaultDetail.getCheckedDateTime())){
nowTime = emrFaultDetail.getCheckedDateTime();
}
archiveMaster.setCheckedDatetime(nowTime);
//设置修改原因
archiveMaster.setChangeReason(emrFaultDetail.getChangeReason());
//设置审核人
@ -252,14 +255,16 @@ public class lastVerifyController {
int bol = archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if (bol == 1) {
String nowTime = format1.format(new Date());
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
emrFaultDetail.setState("未召回");
emrFaultDetailService.insertSel(emrFaultDetail);
}
//设置物理位置信息
if(StringUtils.isNotBlank(paperPosition)){
paperPositionInfoServer.savePaperPositionInfo(emrFaultDetail.getArchiveDetailId(),paperPosition);
}
return 1;
}

@ -31,4 +31,5 @@ public interface Archive_MasterMapper {
List<DoctorStatistics> getDoctorFileInfo(@Param("deptCode")String deptCode,@Param("doctor")String doctor,@Param("startTime")String startTime,@Param("endTime")String endTime);
List<Archive_Master_Vo> selectAllPatient(Archive_Master_Vo archiveMasterVo);
}

@ -0,0 +1,20 @@
package com.emr.dao;
import com.emr.entity.EmrPaperPositionInfo;
import org.apache.ibatis.annotations.Param;
public interface EmrPaperPositionInfoMapper {
int deleteByPrimaryKey(Integer id);
int insert(EmrPaperPositionInfo record);
int insertSelective(EmrPaperPositionInfo record);
EmrPaperPositionInfo selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(EmrPaperPositionInfo record);
int updateByPrimaryKey(EmrPaperPositionInfo record);
EmrPaperPositionInfo selectByMasterId(@Param("masterId")String masterId);
}

@ -71,6 +71,56 @@ public class Archive_Master_Vo {
private String checkedName;
private String paperStatus;//纸质签收状态
private String callBackStatus;//his召回状态
private String updateStatus;//修改状态
private String lockStatus;//封存状态
private String finalApproveContent;//终审内容
public String getFinalApproveContent() {
return finalApproveContent;
}
public void setFinalApproveContent(String finalApproveContent) {
this.finalApproveContent = finalApproveContent;
}
public String getLockStatus() {
return lockStatus;
}
public void setLockStatus(String lockStatus) {
this.lockStatus = lockStatus;
}
public String getUpdateStatus() {
return updateStatus;
}
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
}
public String getPaperStatus() {
return paperStatus;
}
public void setPaperStatus(String paperStatus) {
this.paperStatus = paperStatus;
}
public String getCallBackStatus() {
return callBackStatus;
}
public void setCallBackStatus(String callBackStatus) {
this.callBackStatus = callBackStatus;
}
public String getCheckName() {
return checkName;
}

@ -0,0 +1,161 @@
package com.emr.entity;
import java.io.Serializable;
import java.util.Date;
public class EmrPaperPositionInfo implements Serializable {
private Integer id;
private String masterId;
private String paperPosition;
private String createTime;
private String createUserName;
private String updateTime;
private String updateUserName;
private String str1;
private Integer int1;
private String str2;
private Integer int2;
private Date time1;
private Date time2;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getMasterId() {
return masterId;
}
public void setMasterId(String masterId) {
this.masterId = masterId == null ? null : masterId.trim();
}
public String getPaperPosition() {
return paperPosition;
}
public void setPaperPosition(String paperPosition) {
this.paperPosition = paperPosition == null ? null : paperPosition.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName == null ? null : createUserName.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName == null ? null : updateUserName.trim();
}
public String getStr1() {
return str1;
}
public void setStr1(String str1) {
this.str1 = str1 == null ? null : str1.trim();
}
public Integer getInt1() {
return int1;
}
public void setInt1(Integer int1) {
this.int1 = int1;
}
public String getStr2() {
return str2;
}
public void setStr2(String str2) {
this.str2 = str2 == null ? null : str2.trim();
}
public Integer getInt2() {
return int2;
}
public void setInt2(Integer int2) {
this.int2 = int2;
}
public Date getTime1() {
return time1;
}
public void setTime1(Date time1) {
this.time1 = time1;
}
public Date getTime2() {
return time2;
}
public void setTime2(Date time2) {
this.time2 = time2;
}
@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(", masterId=").append(masterId);
sb.append(", paperPosition=").append(paperPosition);
sb.append(", createTime=").append(createTime);
sb.append(", createUserName=").append(createUserName);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateUserName=").append(updateUserName);
sb.append(", str1=").append(str1);
sb.append(", int1=").append(int1);
sb.append(", str2=").append(str2);
sb.append(", int2=").append(int2);
sb.append(", time1=").append(time1);
sb.append(", time2=").append(time2);
sb.append("]");
return sb.toString();
}
}

@ -70,6 +70,16 @@ public class Emr_Fault_Vo {
private String patientId;
private String paperPosition;
public String getPaperPosition() {
return paperPosition;
}
public void setPaperPosition(String paperPosition) {
this.paperPosition = paperPosition;
}
public String getPatientId() {
return patientId;
}

@ -97,6 +97,6 @@ public interface Archive_MasterService {
* @return
*/
Archive_Master selectByPrimaryKey(String id);
}
void setPaperStatusAndCallbackStatus(List<Archive_Master_Vo> list);
}

@ -6,7 +6,6 @@
*/
package com.emr.service.ipml;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
@ -14,12 +13,15 @@ import com.emr.entity.Emr_Dictionary;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_DictionaryService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.OracleConnect;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
@Service
@ -63,15 +65,40 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public OffsetLimitPage selectByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByColumn(archiveMasterVo);
//设置科室
setDeptNameForList(list);
return new OffsetLimitPage((Page) list);
}
//设置科室
private void setDeptNameForList(List<Archive_Master_Vo> list) {
if(!CollectionUtils.isEmpty(list)) {
//查询科室集合
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> deptList = emrDictionaryService.dicByTypeCode(dictionary);
for (Archive_Master_Vo master : list) {
//设置科室
if (!CollectionUtils.isEmpty(deptList)) {
for (Emr_Dictionary dictionary1 : deptList) {
//出院科室
if (master.getDeptName().equals(dictionary1.getCode())) {
master.setDeptName(dictionary1.getName());
}
//入院科室
if (master.getDeptAdmissionTo().equals(dictionary1.getCode())) {
master.setDeptAdmissionTo(dictionary1.getName());
}
}
}
}
}
}
@Override
public OffsetLimitPage selectByUnfile(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectByUnfile(archiveMasterVo);
return new OffsetLimitPage((Page) list);
}
@ -79,10 +106,89 @@ 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);
//设置科室设置纸质签收状态和his召回状态
setPaperStatusAndCallbackStatus(list);
return new OffsetLimitPage((Page) list);
}
/**
* his
* @param list
*/
@Override
public void setPaperStatusAndCallbackStatus(List<Archive_Master_Vo> list) {
if(!CollectionUtils.isEmpty(list)){
StringBuilder patientIdsBuilder = new StringBuilder();
for(Archive_Master_Vo master : list){
if(StringUtils.isNotBlank(patientIdsBuilder)){
patientIdsBuilder.append(",");
}
patientIdsBuilder.append("'").append(master.getPatientId()).append("'");
}
//查询纸质签收状态
String paperStatusSql = "select fpatno from pacs.v_emrconfirm where fcomf_dt is not null and fpatno in ("+patientIdsBuilder.toString()+")";
//查询his召回状态
String callBackStatusSql = "select fpatno from pacs.v_emrreturn_apply where fpatno in ("+patientIdsBuilder.toString()+")";
List<String> paperPatiendIds = null;
List<String> callBackPatiendIds = null;
/*try {
//查询纸质签收状态
paperPatiendIds = OracleConnect.select2(paperStatusSql);
//查询his召回状态
callBackPatiendIds = OracleConnect.select2(callBackStatusSql);
}catch (Exception e){
e.printStackTrace();
ExceptionPrintUtil.printException(e);
}*/
//查询科室集合
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> deptList = emrDictionaryService.dicByTypeCode(dictionary);
for(Archive_Master_Vo master : list){
//设置科室
if(!CollectionUtils.isEmpty(deptList)){
for(Emr_Dictionary dictionary1 : deptList){
//出院科室
if(master.getDeptName().equals(dictionary1.getCode())){
master.setDeptName(dictionary1.getName());
}
//入院科室
if(master.getDeptAdmissionTo().equals(dictionary1.getCode())){
master.setDeptAdmissionTo(dictionary1.getName());
}
}
}
String patientId = master.getPatientId();
master.setPaperStatus("未签收");
master.setCallBackStatus("未召回");
//设置纸质签收状态
if(!CollectionUtils.isEmpty(paperPatiendIds)){
for(String paperPatientId : paperPatiendIds){
if(paperPatientId.equals(patientId)){
master.setPaperStatus("已签收");
break;
}
}
}
//设置召回状态
if(!CollectionUtils.isEmpty(callBackPatiendIds)){
for(String callBackPatientId : callBackPatiendIds){
if(callBackPatientId.equals(patientId)){
master.setPaperStatus("已召回");
break;
}
}
}
//设置修改状态
if(StringUtils.isNotBlank(master.getUpdateStatus())){
master.setUpdateStatus("已修改");
}else{
master.setUpdateStatus("未修改");
}
}
}
}
@Override
public int updateByClo(Archive_Master record) {
return archiveMasterMapper.updateByClo(record);

@ -0,0 +1,43 @@
package com.emr.service.ipml;
import com.emr.dao.EmrPaperPositionInfoMapper;
import com.emr.entity.EmrPaperPositionInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.Date;
@Service
@Transactional
public class EmrPaperPositionInfoServer {
@Autowired
private EmrPaperPositionInfoMapper paperPositionInfoMapper;
@Autowired
private StatisticsService statisticsService;
public void savePaperPositionInfo(String masterId,String paperPosition){
//查询masterId在该表中是否存在
EmrPaperPositionInfo emrPaperPositionInfo = paperPositionInfoMapper.selectByMasterId(masterId);
if(null == emrPaperPositionInfo){
emrPaperPositionInfo = new EmrPaperPositionInfo();
}
String currentUserName = statisticsService.getCurrentUserName();
emrPaperPositionInfo.setUpdateUserName(currentUserName);
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = fmt.format(new Date());
emrPaperPositionInfo.setUpdateTime(nowTime);
if(emrPaperPositionInfo.getId() == null){
//不存在新建
emrPaperPositionInfo.setCreateUserName(currentUserName);
emrPaperPositionInfo.setCreateTime(nowTime);
emrPaperPositionInfo.setPaperPosition(paperPosition);
emrPaperPositionInfo.setMasterId(masterId);
paperPositionInfoMapper.insertSelective(emrPaperPositionInfo);
}else{
//存在则修改
emrPaperPositionInfo.setPaperPosition(paperPosition);
paperPositionInfoMapper.updateByPrimaryKey(emrPaperPositionInfo);
}
}
}

@ -37,7 +37,6 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
*/
@Override
public OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
//return emrFaultDetailMapper.selectByCol(emrFaultDetail);
PageHelper.offsetPage(offset, limit);
List<Emr_Fault_Vo> list = emrFaultDetailMapper.selectByCol(emrFaultVo);
Emr_Dictionary dic = new Emr_Dictionary();

@ -0,0 +1,28 @@
package com.emr.service.ipml;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class PatientListService {
@Autowired
private Archive_MasterMapper archiveMasterMapper;
@Autowired
private Archive_MasterService archiveMasterService;
public OffsetLimitPage getPatientList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Archive_Master_Vo> list = archiveMasterMapper.selectAllPatient(archiveMasterVo);
archiveMasterService.setPaperStatusAndCallbackStatus(list);
return new OffsetLimitPage((Page) list);
}
}

@ -4,9 +4,8 @@ import com.alibaba.fastjson.JSON;
import com.emr.dao.StatisticsMapper;
import com.emr.dao.TUuInfoMapper;
import com.emr.dao.TUuPrintMapper;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.entity.TUuPrint;
import com.emr.entity.*;
import com.emr.service.Emr_DictionaryService;
import com.emr.vo.*;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@ -20,6 +19,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
@ -50,6 +52,8 @@ public class StatisticsService {
private TUuPrintMapper uuPrintMapper;
@Autowired
private TUuInfoMapper uuInfoMapper;
@Autowired
private Emr_DictionaryService emrDictionaryService;
//终审按天统计
public List<FinalAndFirstStatistics> getFinalStatistics(HttpServletRequest request,Integer offset, Integer limit, String startDate, String endDate,String sql) {
if(null != offset && null != limit){
@ -115,7 +119,24 @@ public class StatisticsService {
archiveMasterVo.setCheckDoctor(checkNames.toString());
}
List<Archive_Master_Vo> list = statisticsMapper.statistics(disStartDate,disEndDate,archiveMasterVo,flag,sql);
//查询科室集合
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> deptList = emrDictionaryService.dicByTypeCode(dictionary);
for(Archive_Master_Vo statistics:list) {
//设置科室
if(!CollectionUtils.isEmpty(deptList)){
for(Emr_Dictionary dictionary1 : deptList){
//出院科室
if(statistics.getDeptName().equals(dictionary1.getCode())){
statistics.setDeptName(dictionary1.getName());
}
//入院科室
if(statistics.getDeptAdmissionTo().equals(dictionary1.getCode())){
statistics.setDeptAdmissionTo(dictionary1.getName());
}
}
}
for (User user : userList) {
if(StringUtils.isNotBlank(statistics.getCheckDoctor()) && statistics.getCheckDoctor().equals(user.getUserName())){
statistics.setCheckName(user.getName());
@ -189,5 +210,19 @@ public class StatisticsService {
}
return userList;
}
public HttpServletRequest getRequest(){
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
//获取当前用户
public Power_User getCurrentUser(){
return (Power_User)getRequest().getSession().getAttribute("CURRENT_USER");
}
//获取当前用户名
public String getCurrentUserName(){
return getCurrentUser().getUserName();
}
}

@ -122,6 +122,19 @@ public class OracleConnect {
OracleConnect.CloseConn(rs, pst, conn);
return list;
}
public static List<String> select2(String arg0) throws Exception {
Connection conn = new OracleConnect().getConnect();
pst = conn.prepareStatement(arg0);
rs = pst.executeQuery();
List<String> list = new ArrayList<>();
if(rs.next()) {
while (rs.next()) {
list.add(rs.getString(1));
}
}
OracleConnect.CloseConn(rs, pst, conn);
return list;
}
public static int insert(String sql) throws Exception {
Connection conn = new OracleConnect().getConnect();

@ -1,9 +1,15 @@
##退回病案给金蝶公司的webService接口地址
##\u9000\u56DE\u75C5\u6848\u7ED9\u91D1\u8776\u516C\u53F8\u7684webService\u63A5\u53E3\u5730\u5740
RETURNWEBSERVICE = http://192.168.10.39:8001/KingdeeEmrArchiveReturn.asmx?wsdl
##webService qName参数1
##webService qName\u53C2\u65701
RETURNPARM1 = http://tempuri.org/
##webService qName参数2
##webService qName\u53C2\u65702
RETURNPARM2 = SetArchieveReturn
#pdf水印
pdfWater = 广东省英德市人民医院
#pdf\u6C34\u5370
pdfWater = \u5E7F\u4E1C\u7701\u82F1\u5FB7\u5E02\u4EBA\u6C11\u533B\u9662
#\u75C5\u6848\u5BA4\u79D1\u5BA4\u7F16\u53F7
medicalRecordsRoomDeptId = 1315
#\u533B\u52A1\u79D1\u79D1\u5BA4\u7F16\u53F7
medicalepartmentDeptId = 1145

@ -1,14 +1,14 @@
#数据库IP
#\u6570\u636E\u5E93IP
dataBaseIp=localhost
#数据库名称
#dataBaseName=yd_record
##数据库密码
#dataBasePassword=docus702
#\u6570\u636E\u5E93\u540D\u79F0
dataBaseName=yd_record
#\u6570\u636E\u5E93\u5BC6\u7801
dataBasePassword=docus702
##数据库名称
dataBaseName=emr_record
#数据库密码
dataBasePassword=xjgs+docus911
##\u6570\u636E\u5E93\u540D\u79F0
#dataBaseName=emr_record
##\u6570\u636E\u5E93\u5BC6\u7801
#dataBasePassword=xjgs+docus911
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://${dataBaseIp}:1433;databaseName=${dataBaseName}
@ -31,13 +31,13 @@ removeAbandoned: true
removeAbandonedTimeout: 1800
logAbandoned: true
#图片地址
#\u56FE\u7247\u5730\u5740
pictureUrl=src\\main\\webapp
powerUrl=http://10.36.116.108:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://10.36.116.108:8080/power
POWER_JSP=http://10.36.116.108:8080/power
recallReason=医院需要这份文档
powerUrl=http://localhost:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://localhost:8080/power
POWER_JSP=http://localhost:8080/power
recallReason=\u533B\u9662\u9700\u8981\u8FD9\u4EFD\u6587\u6863
HomepageDictionary=http://10.36.116.108:8080/filing/services/HomepageDictionary?wsdl
HomepageMethod=CheckData

@ -187,8 +187,8 @@
<!--select-->
<!--<include refid="Base_Column_List"/>-->
<!--from archive_master-->
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,
m.dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,m.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,
datediff(day,m.discharge_date_time,getdate()) -
(select COUNT(1) from emr_holiday_set where date between convert(varchar(10),m.discharge_date_time,120)
@ -199,12 +199,6 @@
days
END from emr_overtime_set where id = 1) days
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
on m.dept_admission_to=d.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) f
on m.dept_name=f.code
where 1=1 and ArchiveState in('归档中','复审退回','初审')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
@ -280,8 +274,8 @@
<!--终审-->
<select id="selectByLast" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,
m.dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,m.dept_admission_to
,m.check_doctor,m.check_datetime,m.checked_doctor,m.checked_datetime,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend,
datediff(day,m.discharge_date_time,getdate()) -
(select COUNT(1) from emr_holiday_set where date between convert(varchar(10),m.discharge_date_time,120)
@ -290,14 +284,11 @@
dead_days
ELSE
days
END from emr_overtime_set where id = 1) days
END from emr_overtime_set where id = 1) days,
emrreturn_apply.fpatno updateStatus
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
on m.dept_admission_to=d.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) f
on m.dept_name=f.code
left join emrreturn_apply
on m.patient_id = emrreturn_apply.fpatno
where 1=1 and ArchiveState in('初审')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
@ -771,4 +762,117 @@
</if>
order by t.code,DOCTOR_IN_CHARGE
</select>
<!--查询全部-->
<select id="selectAllPatient" resultMap="BaseResultMap2">
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,
m.dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,m.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,
datediff(day,m.discharge_date_time,getdate()) -
(select COUNT(1) from emr_holiday_set where date between convert(varchar(10),m.discharge_date_time,120)
and getdate() and flag = 2)-(select CASE
WHEN m.DISCHARGE_DISPOSITION = 5 THEN
dead_days
ELSE
days
END from emr_overtime_set where id = 1) days,
emrreturn_apply.fpatno updateStatus,
case when emr_lock.id is not null then '已封存' else '未封存' end lockStatus
from archive_master m
left join emrreturn_apply
on m.patient_id = emrreturn_apply.fpatno
left join emr_lock on m.id = emr_lock.patient_id and emr_lock.lock_state = 1
where 1=1
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate != null and archivestate != ''">
and m.ArchiveState=#{archivestate,jdbcType=NVARCHAR}
</if>
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="sex != null">
and m.sex = #{sex,jdbcType=NVARCHAR}
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and m.discharge_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 m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and m.discharge_date_time &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to = #{deptAdmissionTo,jdbcType=NVARCHAR}
</if>
<if test="checkDoctor != null">
and m.check_doctor = #{checkDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkedDoctor != null">
and checked_doctor = #{checkedDoctor,jdbcType=NVARCHAR}
</if>
<if test="checkDatetime != null">
and m.check_datetime = #{checkDatetime,jdbcType=NVARCHAR}
</if>
<if test="checkedDatetime != null">
and m.checked_datetime = #{checkedDatetime,jdbcType=NVARCHAR}
</if>
<if test="lockinfo != null">
and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR}
</if>
<if test="doctorInCharge != null">
and m.DOCTOR_IN_CHARGE LIKE '%'+#{doctorInCharge,jdbcType=NVARCHAR}+'%'
</if>
<if test="dischargeDisposition != null">
and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR}
</if>
<if test="deptCodeLend != null">
and m.dept_code_lend = #{deptCodeLend,jdbcType=NVARCHAR}
</if>
<if test="updateStatus != null and updateStatus != ''">
and
<choose>
<when test="updateStatus == 1">
emrreturn_apply.fpatno is not null
</when>
<otherwise>
emrreturn_apply.fpatno is null
</otherwise>
</choose>
</if>
<if test="lockStatus != null and lockStatus != ''">
and
<choose>
<when test="lockStatus == 1">
emr_lock.id is not null
</when>
<otherwise>
emr_lock.id is null
</otherwise>
</choose>
</if>
ORDER BY m.discharge_date_time desc
</select>
</mapper>

@ -0,0 +1,192 @@
<?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.EmrPaperPositionInfoMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.EmrPaperPositionInfo" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="master_id" property="masterId" jdbcType="NVARCHAR" />
<result column="paper_position" property="paperPosition" jdbcType="NVARCHAR" />
<result column="create_time" property="createTime" jdbcType="VARCHAR" />
<result column="create_user_name" property="createUserName" jdbcType="NVARCHAR" />
<result column="update_time" property="updateTime" jdbcType="VARCHAR" />
<result column="update_user_name" property="updateUserName" jdbcType="NVARCHAR" />
<result column="str1" property="str1" jdbcType="NVARCHAR" />
<result column="int1" property="int1" jdbcType="INTEGER" />
<result column="str2" property="str2" jdbcType="NVARCHAR" />
<result column="int2" property="int2" jdbcType="INTEGER" />
<result column="time1" property="time1" jdbcType="TIMESTAMP" />
<result column="time2" property="time2" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, master_id, paper_position, create_time, create_user_name, update_time, update_user_name,
str1, int1, str2, int2, time1, time2
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from emr_paper_position_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from emr_paper_position_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.emr.entity.EmrPaperPositionInfo" >
insert into emr_paper_position_info (id, master_id, paper_position,
create_time, create_user_name, update_time,
update_user_name, str1, int1,
str2, int2, time1,
time2)
values (#{id,jdbcType=INTEGER}, #{masterId,jdbcType=NVARCHAR}, #{paperPosition,jdbcType=NVARCHAR},
#{createTime,jdbcType=VARCHAR}, #{createUserName,jdbcType=NVARCHAR}, #{updateTime,jdbcType=VARCHAR},
#{updateUserName,jdbcType=NVARCHAR}, #{str1,jdbcType=NVARCHAR}, #{int1,jdbcType=INTEGER},
#{str2,jdbcType=NVARCHAR}, #{int2,jdbcType=INTEGER}, #{time1,jdbcType=TIMESTAMP},
#{time2,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.EmrPaperPositionInfo" >
insert into emr_paper_position_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="masterId != null" >
master_id,
</if>
<if test="paperPosition != null" >
paper_position,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createUserName != null" >
create_user_name,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="updateUserName != null" >
update_user_name,
</if>
<if test="str1 != null" >
str1,
</if>
<if test="int1 != null" >
int1,
</if>
<if test="str2 != null" >
str2,
</if>
<if test="int2 != null" >
int2,
</if>
<if test="time1 != null" >
time1,
</if>
<if test="time2 != null" >
time2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="masterId != null" >
#{masterId,jdbcType=NVARCHAR},
</if>
<if test="paperPosition != null" >
#{paperPosition,jdbcType=NVARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=VARCHAR},
</if>
<if test="createUserName != null" >
#{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=VARCHAR},
</if>
<if test="updateUserName != null" >
#{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="str1 != null" >
#{str1,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
#{int1,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
#{str2,jdbcType=NVARCHAR},
</if>
<if test="int2 != null" >
#{int2,jdbcType=INTEGER},
</if>
<if test="time1 != null" >
#{time1,jdbcType=TIMESTAMP},
</if>
<if test="time2 != null" >
#{time2,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrPaperPositionInfo" >
update emr_paper_position_info
<set >
<if test="masterId != null" >
master_id = #{masterId,jdbcType=NVARCHAR},
</if>
<if test="paperPosition != null" >
paper_position = #{paperPosition,jdbcType=NVARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=VARCHAR},
</if>
<if test="createUserName != null" >
create_user_name = #{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=VARCHAR},
</if>
<if test="updateUserName != null" >
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="str1 != null" >
str1 = #{str1,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
int1 = #{int1,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
str2 = #{str2,jdbcType=NVARCHAR},
</if>
<if test="int2 != null" >
int2 = #{int2,jdbcType=INTEGER},
</if>
<if test="time1 != null" >
time1 = #{time1,jdbcType=TIMESTAMP},
</if>
<if test="time2 != null" >
time2 = #{time2,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrPaperPositionInfo" >
update emr_paper_position_info
set master_id = #{masterId,jdbcType=NVARCHAR},
paper_position = #{paperPosition,jdbcType=NVARCHAR},
create_time = #{createTime,jdbcType=VARCHAR},
create_user_name = #{createUserName,jdbcType=NVARCHAR},
update_time = #{updateTime,jdbcType=VARCHAR},
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
str1 = #{str1,jdbcType=NVARCHAR},
int1 = #{int1,jdbcType=INTEGER},
str2 = #{str2,jdbcType=NVARCHAR},
int2 = #{int2,jdbcType=INTEGER},
time1 = #{time1,jdbcType=TIMESTAMP},
time2 = #{time2,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<!--按masterId查询记录-->
<select id="selectByMasterId" resultType="com.emr.entity.EmrPaperPositionInfo">
select * from emr_paper_position_info where master_id = #{masterId}
</select>
</mapper>

@ -102,7 +102,8 @@
t.ID_NO,
t.dept_admission_to,
t.admission_date_time,
t.DISCHARGE_DISPOSITION
t.DISCHARGE_DISPOSITION,
t.paper_position paperPosition
FROM
(
SELECT
@ -142,11 +143,13 @@
m.ID_NO,
m.dept_admission_to,
m.admission_date_time,
m.DISCHARGE_DISPOSITION
m.DISCHARGE_DISPOSITION,
emr_paper_position_info.paper_position
FROM
emr_fault_detail f
RIGHT JOIN archive_master m ON f.archive_detail_id = m.id
LEFT JOIN emr_lock ON emr_lock.patient_id = m.id
LEFT JOIN emr_paper_position_info ON emr_paper_position_info.master_id = m.id
) t
) AS t
WHERE

@ -58,16 +58,18 @@
checked_datetime,
archive_master.name,
inp_no,
t_dictionary.Name dept_name,
archive_master.dept_name,
discharge_date_time,
t_dictionary1.Name dept_admission_to,
archive_master.dept_admission_to,
admission_date_time,
DATEDIFF(day,admission_date_time,discharge_date_time) days
DATEDIFF(day,admission_date_time,discharge_date_time) days,
emr_fault_detail.first_trial finalApproveContent
FROM archive_master
LEFT JOIN
t_dictionary on archive_master.dept_name = t_dictionary.code and t_dictionary.typeCode='dept_code'
LEFT JOIN
t_dictionary t_dictionary1 on archive_master.dept_name = t_dictionary1.code and t_dictionary1.typeCode='dept_code'
emr_fault_detail
ON
CONVERT(varchar(19),archive_master.checked_datetime) = emr_fault_detail.create_time
AND archive_master.id = emr_fault_detail.archive_detail_id
WHERE checked_datetime is not null
<choose>
<when test="sql != null and sql != ''">

@ -32,6 +32,9 @@
select * from t_PrintInfo where patient_id = #{patientId}
</select>
<select id="selectLockByPatienId" resultType="com.emr.entity.TPrintinfo">
select count(1) isprint from emr_lock where patient_id = #{patientId} and lock_state = 1
select count(1) isprint from emr_lock
inner join archive_master
on emr_lock.patient_id = archive_master.id
where archive_master.patient_id = #{patientId} and lock_state = 1
</select>
</mapper>

@ -54,7 +54,7 @@
* 判断出院日期是否是1801-02-03
* */
function operDisDate(value){
if(value != ''){
if(value != '' && value != null){
value = value.substring(0, 10);
if(value == '1801-02-03'){
return '';
@ -66,7 +66,7 @@
* 判断出院时间是否是1801-02-03
* */
function operDisTime(value){
if(value != '' && '1801-02-03' == value.substring(0, 10)){
if(value != '' && value != null && '1801-02-03' == value.substring(0, 10)){
value = '';
}
return value;

@ -338,7 +338,7 @@
<div class="col-sm-4">
完整性审核:
<a id="showDefectTable" style="cursor: pointer">
<span id="wzContent">测试完整性</span>
<span id="wzContent"></span>
</a>
</div>
</div>
@ -1707,7 +1707,8 @@
events: {
'click .verifyInfo': function (e, value, row, index) {
//查询his判断医生护士是否全部提交
var result = selectHis(row);
var result = 1;
//var result = selectHis(row);
if (result == 1) {
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。

@ -77,7 +77,12 @@
deptList = uniq(deptArr);
}
var depts = '';
if(deptList != ''){
//判断是否包含免科室
var isAllDept = false;
if(list[0].deptId != null){
isAllDept = judgeIsAllDept(list[0].deptId);
}
if(deptList != '' && !isAllDept){
for (var i = 0; i < deptList.length; i++) {
if(i != deptList.length-1){
depts += deptList[i] + ",";
@ -134,9 +139,35 @@
$("#stateBtn").click(function () {
$('#exampleModal').modal('hide'); //手动关闭
});
//判断是否免科室
function judgeIsAllDept(deptIdTemp){
//获取免科室的科室集合
var isAllDeptIds = $("#isAllDeptIds").val();
if(isAllDeptIds != ''){
var isAllDeptIdArr = isAllDeptIds.split(",");
var deptIdTempArr = deptIdTemp.split(",");
//判断该登陆者所属科室是否包含在免科室内
for(var i = 0;i<isAllDeptIdArr.length;i++){
var deptId = isAllDeptIdArr[i];
if(deptId != ''){
for(var j = 0;j<deptIdTempArr.length;j++){
var deptIdTempTemp = deptIdTempArr[j];
if(deptId == deptIdTempTemp){
return true;
}
}
}
}
return false;
}else{
return false;
}
}
});
</script>
<body class="skin-blue" data-spy="scroll" data-target="#scrollspy">
<!--不受科室限制的科室id-->
<input type="hidden" id="isAllDeptIds" value="${isAllDeptIds}">
<div class="wrapper">
<header class="main-header">

@ -655,12 +655,16 @@
<div class="modal-body">
<form>
<input type="hidden" id="checkDatetime">
<div class="form-group ">
<div class="form-group">
<input id="archiveId" hidden/>
<span style="vertical-align:top;">内容:</span><textarea rows="6" cols="70"
id="verifyText"></textarea>
<span style="vertical-align:top;">&emsp;&emsp;&emsp;&emsp;内容:</span>
<textarea rows="6" cols="56" id="verifyText" maxlength="122"></textarea>
</div>
<div class="form-group ">
<div class="form-group">
<span style="vertical-align:top;">纸质存放位置:</span>
<textarea id="paperPosition" rows="2" cols="56" maxlength="100"></textarea>
</div>
<div class="form-group">
<span style="vertical-align:top;">是否修改终审时间:</span>
<input type="checkbox" id="isChange" onclick="changeBox()">
</div>
@ -1337,7 +1341,9 @@
$.ajax({
url: "${path}/lastVerify/updateStateByArchivId",
type: "POST",
data: {archiveDetailId: archiveDetailId, firstTrial: firstTrial, state: state,changeReason:$("#changeReason").val(),checkedDateTime:$("#checkedDateTime").val()},
data: {archiveDetailId: archiveDetailId, firstTrial: firstTrial,
state: state,changeReason:$("#changeReason").val(),
checkedDateTime:$("#checkedDateTime").val(),paperPosition:$("#paperPosition").val()},
success: function (result) {
if (result == 1) {
$("#verifyModal").modal('hide');
@ -1593,7 +1599,7 @@
checkbox: true,
width: 25,
align: 'center',
valign: 'middle',
valign: 'middle'
}, {
title: '病案清单id',
@ -1606,25 +1612,25 @@
title: '住院号',
field: 'inpNo',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '住院次数',
field: 'visitId',
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '性别',
field: 'sex',
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '身份证号',
@ -1637,7 +1643,7 @@
title: '出院科室',
field: 'deptName',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '出院日期',
@ -1650,7 +1656,7 @@
{
title: '主管医生',
field: 'doctorInCharge',
align: 'left',
align: 'left'
},
// {
// title: '出院科室',
@ -1702,6 +1708,42 @@
return a;
}
},
{
title: '纸质状态',
field: 'paperStatus',
align: 'center',
formatter: function (value, row, index) {
var color = 'red';
if(value=='已签收'){
color = 'green';
}
return '<span style="color:'+color+'">'+value+'</span>';
}
},
{
title: 'his召回状态',
field: 'callBackStatus',
align: 'center',
formatter: function (value, row, index) {
var color = 'red';
if(value=='未召回'){
color = 'green';
}
return '<span style="color:'+color+'">'+value+'</span>';
}
},
{
title: '修改状态',
field: 'updateStatus',
align: 'center',
formatter: function (value, row, index) {
var color = 'red';
if(value=='未修改'){
color = 'green';
}
return '<span style="color:'+color+'">'+value+'</span>';
}
},
{
title: "操作",
align: 'left',
@ -1761,6 +1803,7 @@
});
$("#archiveId").val(row.id);
$("#verifyText").val("");
$("#paperPosition").val("");
},
'click .selInfo': function (e, value, row, index) {
//查询是否医生或护士是否提交
@ -2226,10 +2269,10 @@
var time = getFormatDate();
if(flag){
//获取医生初审时间
var html = '<div class="form-group"><span style="vertical-align:top;">审核时间:</span>'
var html = '<div class="form-group"><span style="vertical-align:top;">&emsp;&emsp;审核时间:</span>'
+'<input type="text" class="input-sm" value="'+time+'" id="checkedDateTime" name="checkedDateTime" maxlength="30"></div>'
+'<div class="form-group ">'
+'<span style="vertical-align:top;">修改原因:</span><textarea rows="6" cols="66" id="changeReason" name="changeReason" maxlength="500"></textarea></div>';
+'<span style="vertical-align:top;">&emsp;&emsp;修改原因:</span><textarea rows="6" cols="56" id="changeReason" name="changeReason" maxlength="500"></textarea></div>';
$("#block").append(html);
}else{
$("#block").empty();

@ -3,7 +3,7 @@
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<html>
<head>
<title>召回日志列表</title>
<title>病案终审退回日志</title>
<meta charset="utf-8">
<!-- 解决部分兼容性问题如果安装了GCF则使用GCF来渲染页面如果未安装GCF则使用最高版本的IE内核进行渲染。 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

@ -5,7 +5,7 @@
<%--<%@ include file="/WEB-INF/jspf/common.jspf" %>--%>
<html>
<head>
<title>召回列表</title>
<title>病案终审退回</title>
<meta charset="utf-8">
<!-- 解决部分兼容性问题如果安装了GCF则使用GCF来渲染页面如果未安装GCF则使用最高版本的IE内核进行渲染。 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ -43,6 +43,12 @@
height: 160px;
width: 500px;
}
.hidden-xs{
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<body>
<div style="margin-left:30px;margin-right:10px;height:auto">
@ -224,6 +230,32 @@
</div>
</div>
</div>
<%--编辑纸质存放位置弹窗--%>
<div class="modal fade" id="paperPostionModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content ">
<div class="modal-header">
<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">
<form>
<div class="form-group ">
<input id="masterId" hidden/>
<span style="vertical-align:top;">纸质存放位置:</span><textarea rows="2" cols="60"
id="paperPosition"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">返回</button>
<button type="button" class="btn btn-primary btn-sm" id="savePaperPosition">确定</button>
</div>
</div>
</div>
</div>
</body>
<script>
var tipLoad = 1;
@ -321,8 +353,6 @@
sidePagination: 'server', // 设置为服务器端分页 客户端client
search: false,
showColumns: true,
// sortable: true,
// sortOrder: "asc",
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
undefinedText: '---', //当数据为 undefined 时显示的字符
@ -343,15 +373,11 @@
exportOptions: {
fileName: document.title
},
// showToggle: false, //是否显示详细视图和列表视图的切换按钮
// cardView: false, //是否显示详细视图
// detailView: false, //是否显示父子表
queryParams: function (params) {
var currPageSize = this.pageSize;
if (currPageSize == 2) {
currPageSize = 10;
}
var limit= null;
var offset= params.offset;
//判断是否导出全部all
@ -363,11 +389,7 @@
limit = currPageSize;
this.pageSize = currPageSize;
}
//var url = window.location.href;
//var deptName = url.substring(url.lastIndexOf('&') + 1).replace("depts=", "");
var deptName = "";
var len = ($("#deptName").val()).length;
if (len > 0) {
var deptNameT = $("#deptName").val();
@ -398,7 +420,7 @@
checkbox: true,
width: 25,
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
@ -423,37 +445,37 @@
title: '住院号',
field: 'inpNo',
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '住院次数',
field: 'visitId',
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '性别',
field: 'sex',
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '身份证号',
field: 'idNo',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '入院科室',
field: 'deptAdmissionTo',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '入院日期',
@ -467,7 +489,7 @@
title: '出院科室',
field: 'deptName',
align: 'left',
valign: 'middle',
valign: 'middle'
},
{
title: '出院日期',
@ -494,6 +516,12 @@
return a;
}
},
{
title: '纸质位置',
field: 'paperPosition',
align: 'left',
formatter:paramsMatter
},
{
title: '归档状态',
field: 'archivestate',
@ -529,20 +557,36 @@
formatter: function (value, row, index) {
var url = window.location.href;
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
//console.log(index);
var btns = '';
if (index != null && index != "" && index.indexOf("recall") != -1) {
if (row.archivestate == "已认证" || row.archivestate == "已归档") {
if(row.state=="已召回"){
return '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\','+row.patientId+')">召回 </button>' + '<button class="btn btn-danger btn-sm" onclick="logFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.recallReason + '\')">日志</button>';
btns = '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\','+row.patientId+')">召回 </button>' + '<button class="btn btn-danger btn-sm" onclick="logFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',\'' + row.recallReason + '\')">日志</button>';
}else{
if(row.updater != '1') {
return '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',' + row.patientId + ')">召回 </button>';
btns = '<button class="btn btn-warning btn-sm" onclick="recallFun(\'' + row.id + '\',\'' + row.archiveDetailId + '\',' + row.patientId + ')">召回 </button>';
}
}
}
return '';
}
if (index != null && index != "" && index.indexOf("update") != -1) {
//拼接纸质位置按钮
btns += '<button class="btn btn-primary btn-sm toUpdatePaperPosition">纸质位置</button>';
}
return btns;
},
events: {
'click .toUpdatePaperPosition': function (e, value, row, index) {
//编辑纸质位置
var masterId = row.archiveDetailId;
$("#paperPostion").val("");
$("#masterId").val(masterId);
$('#paperPostionModal').modal({
show: true//弹出对话框
});
var paperPosition = row.paperPosition;
$("#paperPosition").val(paperPosition);
}
},
cellStyle: function (value, row, index) {
return {classes: 'success'}
@ -558,11 +602,24 @@
//console.info("加载数据失败");
tipLoad = 0;
}
});
}
}
/**
* 格式化纸质存放位置
* @param value
* @param row
* @param index
* @returns {*}
*/
function paramsMatter(value, row, index) {
if(value == null){
return '';
}
value = '<p class="hidden-xs" title="'+value+'">'+value+'</p>'
return value;
}
function logFun(id, archiveDetailId, recallReason) {
$('#logModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
@ -585,9 +642,37 @@
toastr.error("召回失败!")
}
});
}
/**
* 保存纸质存放位置
*/
$("#savePaperPosition").click(function(){
var masterId = $("#masterId").val();
$.ajax({
type:'post',
url:'${path}/paperPosition/savePaperPosition',
data:{masterId:masterId,paperPosition:$("#paperPosition").val()},
dataType:'json',
success:function(data){
if(data.code == 100){
toastr.success("修改成功");
$('#paperPostionModal').modal('hide');
//修改当前
$("#table").bootstrapTable('updateByUniqueId',{
archiveDetailId:masterId,
row: {
paperPosition: paperPosition //这些字段值请根据您自己的需求去修改
}
});
$("#table").bootstrapTable('refresh');
}else{
toastr.error(data.msg);
}
}
})
});
function recallFun(id, archiveDetailId,patientId){
$.ajax({
type:'get',
@ -687,9 +772,7 @@
toastr.error("召回失败!")
}
});
});
</script>
</html>

File diff suppressed because it is too large Load Diff

@ -76,7 +76,7 @@ function initTable() {
field: 'select', //复选框
checkbox: true,
align: 'center',
valign: 'middle',
valign: 'middle'
},
{
title: '序号',
@ -103,12 +103,12 @@ function initTable() {
{
title: '终审工号',
field: 'checkedDoctor',
align: 'center',
align: 'center'
},
{
title: '终审姓名',
field: 'checkedName',
align: 'center',
align: 'center'
},
{
title: '终审日期',
@ -118,20 +118,25 @@ function initTable() {
return operDisTime(value);
}
},
{
title: '终审内容',
field: 'finalApproveContent',
align: 'center'
},
{
title: '患者姓名',
field: 'name',
align: 'center',
align: 'center'
},
{
title: '住院号',
field: 'inpNo',
align: 'center',
align: 'center'
},
{
title: '出院科室',
field: 'deptName',
align: 'center',
align: 'center'
},
{
title: '出院日期',
@ -144,7 +149,7 @@ function initTable() {
{
title: '入院科室',
field: 'deptAdmissionTo',
align: 'center',
align: 'center'
},
{
title: '入院日期',
@ -157,7 +162,7 @@ function initTable() {
{
title: '住院天数',
field: 'days',
align: 'center',
align: 'center'
},
],

Loading…
Cancel
Save