王新海的版本加借阅工号转姓名

master
zengwh 5 years ago
parent a995e23397
commit 458dfc5839

@ -1,11 +1,20 @@
package com.emr.controller; package com.emr.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.emr.annotation.OptionalLog;
import com.emr.dao.CommomMapper; import com.emr.dao.CommomMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.dao.approve.Emr_Apply_ApproveMapper;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.Power_User; import com.emr.entity.Power_User;
import com.emr.entity.ResultUtil; import com.emr.entity.ResultUtil;
import com.emr.entity.approve.Emr_Apply_Approve;
import com.emr.entity.emrLog.Emr_Log;
import com.emr.service.CommomService; import com.emr.service.CommomService;
import com.emr.service.approve.ApplyApproveService;
import com.emr.service.emrLog.LogService;
import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService; import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService;
import com.emr.util.DateUtils;
import com.emr.util.ExceptionPrintUtil; import com.emr.util.ExceptionPrintUtil;
import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo; import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import com.emr.vo.commomSearch.CommomTree; import com.emr.vo.commomSearch.CommomTree;
@ -16,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -25,6 +35,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.File; import java.io.File;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@Controller @Controller
@ -40,6 +51,14 @@ public class FontShowRecordController {
private PrintOrDownLoadInfoService printOrDownLoadInfoService; private PrintOrDownLoadInfoService printOrDownLoadInfoService;
@Autowired @Autowired
private CommomService commomService; private CommomService commomService;
@Autowired
private LogService logService;
@Autowired
private ApplyApproveService applyApproveService;
@Autowired
private Emr_DictionaryMapper dictionaryMapper;
/** /**
* @MethodName recordList * @MethodName recordList
* @Description: * @Description:
@ -72,7 +91,6 @@ public class FontShowRecordController {
user.setUserId(-999); user.setUserId(-999);
user.setRoleId(-999); user.setRoleId(-999);
Set<String> menu = new TreeSet<>(); Set<String> menu = new TreeSet<>();
//menu.add("/commom/printPdf");
user.setMenus(menu); user.setMenus(menu);
UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456"); UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456");
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
@ -86,6 +104,172 @@ public class FontShowRecordController {
return "font/recordList"; return "font/recordList";
} }
/**
*
* @param inpatientNo
* @param userName
* @param model
* @param request
* @return
*/
@RequestMapping(value = "recordListSouth")
public String showRecordSouth(String inpatientNo, String userName, String deptName, Model model, HttpServletRequest request) {
try{
//根据病案号查看病案是否存在
if(StringUtils.isNotBlank(inpatientNo)){
int commom = commomMapper.isExistInpatientOrAdmissId(inpatientNo, null, null);
if(commom == 0){
model.addAttribute("msg","病案不存在!");
return "font/msg";
}
}else{
model.addAttribute("msg","参数病案号不能为空!");
return "font/msg";
}
//虚假登陆
//验证shiro(有shiro才此操作)
Power_User user = new Power_User();
user.setUserName(userName);
user.setUserId(-999);
user.setRoleId(-999);
Set<String> menu = new TreeSet<>();
//menu.add("/commom/printPdf");
user.setMenus(menu);
UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
request.getSession().setAttribute("CURRENT_USER", user);
request.getSession().setAttribute("userName", userName);
request.getSession().setAttribute("deptName", deptName);
model.addAttribute("inpatientNo",inpatientNo);
Emr_Log emrLog = new Emr_Log();
emrLog.setLogTitle("接口查看");
emrLog.setLogContent("接口查询页面");
logService.insertInterface(emrLog, userName);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return "font/recordListSouth";
}
/**
*
* @param page
* @param limit
* @param inpatientNo
* @param request
* @return
*/
@RequestMapping("getRecordListByInpatientNoSouth")
@ResponseBody
public String getRecordListByInpatientNoSouth(Integer page, Integer limit,String inpatientNo, HttpServletRequest request){
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
try{
List<CommomVo> list = commomMapper.selectCommomByInpatientNo(inpatientNo);
PageInfo pageInfo = new PageInfo<>(list);
return JSON.toJSONString(pageInfo);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
* 访
* @param userName
* @param deptName
* @param request
* @return
*/
@RequestMapping(value = "commomListSouth")
public String commomListSouth(String userName, String deptName, Model model, HttpServletRequest request){
//验证shiro(有shiro才此操作)
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
Power_User user = new Power_User();
user.setUserName(userName);
request.getSession().setAttribute("cuserName", userName);
request.getSession().setAttribute("CURRENT_USER", user);
request.getSession().setAttribute("cdeptName", deptName);
model.addAttribute("cuserName", userName);
return "font/commomListSouth";
}
/**
*
* @param applyApprove
* @param patientIds
* @param request
* @return
* @throws Exception
*/
@RequestMapping("addApplyApprove")
@ResponseBody
@OptionalLog(module = "接口保存",methods = "接口查询页面保存借阅申请")
public ResultUtil addApplyApprove(Emr_Apply_Approve applyApprove, String patientIds,HttpServletRequest request) throws Exception {
boolean flag = FormTokenFlagUtil.isFlag(request);
if (!flag) {
return ResultUtil.error("请不要重复提交!");
}
List<CommomVo> commomtables = commomMapper.selectAllByPatients(patientIds.substring(0, patientIds.length()-1));
if(null != commomtables && !commomtables.isEmpty()) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String userName = (String)request.getSession().getAttribute("cuserName");
applyApprove.setApplyer(userName);
applyApprove.setApplyTime(fmt.format(new Date()));
List<Emr_Apply_Approve> list = new ArrayList<>();
///查询表列数
int colCount = commomMapper.selectColByTableName("emr_apply_approve");
int simpleInsertCount = 2100/colCount;
for (int i = 0; i < commomtables.size(); i++) {
//处理批量添加sql太长问题设定个数为180
if(i > 0 && list.size()%simpleInsertCount == 0){
list.clear();
}
Emr_Apply_Approve applyApproveInsert = new Emr_Apply_Approve();
BeanUtils.copyProperties(applyApprove, applyApproveInsert);
BeanUtils.copyProperties(commomtables.get(i), applyApproveInsert);
if(StringUtils.isNotBlank(commomtables.get(i).getDisDate())){
applyApproveInsert.setDisDate(DateUtils.strToDateLong(commomtables.get(i).getDisDate()));
}
list.add(applyApproveInsert);
if(list.size() == 1 && list.get(0).getId() != null){
applyApproveService.updateEmrApplyApprove(list.get(0));
}else{
//是180的倍数或最后一个
if((list.size()%simpleInsertCount == 0 || i == commomtables.size() - 1)){
applyApproveService.SimpleInsert(list);
}
}
}
sendPowerApproveInterface(applyApprove.getApplyType(), commomtables.size());
return ResultUtil.ok();
}
return ResultUtil.error("请至少选中一个!");
}
//推送给权限系统下发审批人通知
private void sendPowerApproveInterface(String applyType,Integer count) throws Exception{
//查询申请类型
List<Emr_Dictionary> dictionaryList = dictionaryMapper.selectDictionaryByTypeCode("apply_type");
String applyTypeName = "";
if(null != dictionaryList && !dictionaryList.isEmpty()){
for(Emr_Dictionary dictionary : dictionaryList){
if(dictionary.getCode().equals(applyType)){
applyTypeName = dictionary.getName();
break;
}
}
}
//发送通知
applyApproveService.sendNotice(applyTypeName,count);
}
@RequestMapping("getRecordListByInpatientNo") @RequestMapping("getRecordListByInpatientNo")
@ResponseBody @ResponseBody
public String getRecordListByInpatientNo(Integer page, Integer limit,String inpatientNo){ public String getRecordListByInpatientNo(Integer page, Integer limit,String inpatientNo){
@ -137,7 +321,32 @@ public class FontShowRecordController {
} }
/** /**
* *
* @param patientId
* @param model
* @param request
* @return
*/
@RequestMapping("showRecordFontSouth")
public String showRecordFontSouth(String patientId, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId);
try {
List<EmrPrintOrDownLoadInfoVo> printCount = printOrDownLoadInfoService.getPrintCount(patientId);
if (null != printCount && !printCount.isEmpty()) {
model.addAttribute("printCount", 1);
}
String userName = (String)request.getSession().getAttribute("userName");
Emr_Log emrLog = new Emr_Log();
emrLog.setLogTitle("接口查看");
emrLog.setLogContent("接口预览页面");
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return "font/showRecordFontSouth";
}
/**
* pdfiframe * pdfiframe
* @param patientId * @param patientId
* @param model * @param model
@ -148,21 +357,24 @@ public class FontShowRecordController {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
//查询是否有打印权限 //查询是否有打印权限
int printFlag = 0; int printFlag = 0;
/*Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
Set<String> menus = user.getMenus();
for (String menu : menus) {
if (StringUtils.isNotBlank(menu)) {
if ("/commom/printPdf".equals(menu)) {
printFlag = 1;
break;
}
}
}*/
model.addAttribute("printFlag", printFlag); model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag); model.addAttribute("flag", flag);
return "font/showRecordIframeFont"; return "font/showRecordIframeFont";
} }
@RequestMapping("showRecordIframeFontSouth")
public String showRecordIframeFontSouth(String patientId, String flag,Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId);
//查询是否有打印权限
int printFlag = 0;
model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag);
model.addAttribute("userName", (String)request.getSession().getAttribute("userName"));
model.addAttribute("deptName", (String)request.getSession().getAttribute("deptName"));
return "font/showRecordIframeFontSouth";
}
/** /**
* *
* @param patientId * @param patientId
@ -275,4 +487,41 @@ public class FontShowRecordController {
model.addAttribute("httpFilePath",httpFilePath); model.addAttribute("httpFilePath",httpFilePath);
return "font/showPdfFrameFont"; return "font/showPdfFrameFont";
} }
/**
* PDF
* @param patientId
* @param scanPages
* @param sources
* @param flag
* @param model
* @param request
* @return
*/
@RequestMapping(value = "showRecordContentSouthFont")
public String showRecordContentSouthFont(String patientId, String scanPages, String sources, String flag,Model model, HttpServletRequest request){
String pdfTempRoot = "pdfTemp";
//临时保存pdf的文件目录
String fileOutRoot = WATERPICPATH + pdfTempRoot;
//目录不存在则创建
if(!new File(fileOutRoot).isDirectory()){
new File(fileOutRoot).mkdirs();
}
//文件相对路径
String filePath = pdfTempRoot + "\\" + UUID.randomUUID() + ".pdf";
//组织暂存pdf文件路径
String fileOutPath = WATERPICPATH + filePath;
//组织前台访问临时pdf路径
String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath;
String userName = (String)request.getSession().getAttribute("userName");
String deptName = (String)request.getSession().getAttribute("deptName");
try {
commomService.showRecordContentSouthFont(patientId,userName,deptName,scanPages,sources,flag,fileOutPath);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
model.addAttribute("httpFilePath",httpFilePath);
return "font/showPdfFrameFont";
}
} }

@ -6,10 +6,12 @@ import com.emr.dao.*;
import com.emr.dao.approve.Emr_Apply_ApproveMapper; import com.emr.dao.approve.Emr_Apply_ApproveMapper;
import com.emr.dao.tScanAssort.T_Scan_AssortMapper; import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
import com.emr.entity.*; import com.emr.entity.*;
import com.emr.entity.emrLog.Emr_Log;
import com.emr.entity.recordType.Emr_Type; import com.emr.entity.recordType.Emr_Type;
import com.emr.entity.recordType.Emr_Type_Related; import com.emr.entity.recordType.Emr_Type_Related;
import com.emr.service.CommomService; import com.emr.service.CommomService;
import com.emr.service.Zd_AssortServiceImpl; import com.emr.service.Zd_AssortServiceImpl;
import com.emr.service.emrLog.LogService;
import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService; import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService;
import com.emr.service.recordType.EmrTypeRelatedService; import com.emr.service.recordType.EmrTypeRelatedService;
import com.emr.service.recordType.EmrTypeService; import com.emr.service.recordType.EmrTypeService;
@ -73,6 +75,9 @@ public class CommomSearchController {
private Zd_AssortMapper assortMapper; private Zd_AssortMapper assortMapper;
@Autowired @Autowired
private CommomService commomService; private CommomService commomService;
@Autowired
private LogService logService;
//祈福医院 //祈福医院
@RequiresPermissions("/commom/commomListqf") @RequiresPermissions("/commom/commomListqf")
@OptionalLog(module = "查看", methods = "常用查询页面") @OptionalLog(module = "查看", methods = "常用查询页面")
@ -113,6 +118,7 @@ public class CommomSearchController {
/** /**
* id * id
*
* @param patientId * @param patientId
* @return * @return
*/ */
@ -131,6 +137,7 @@ public class CommomSearchController {
/** /**
* *
*
* @return * @return
*/ */
@RequestMapping("getCommonInfo") @RequestMapping("getCommonInfo")
@ -180,7 +187,9 @@ public class CommomSearchController {
} }
} }
/******************************病案预览操作****************************/ /******************************病案预览操作****************************/
/**174 /**
* 174
*
* @MethodName: showRecord174 * @MethodName: showRecord174
* @Description: * @Description:
* @Param String patientId:patientId * @Param String patientId:patientId
@ -215,6 +224,35 @@ public class CommomSearchController {
return "recordManage/commomSearch/showRecord174"; return "recordManage/commomSearch/showRecord174";
} }
@RequestMapping("showRecordSouth")
public String showRecordSouth(String patientId, String userName, String deptName ,Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId);
model.addAttribute("userName", userName);
model.addAttribute("deptName", deptName);
//加载登陆者
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (null != user) {
model.addAttribute("user", user);
model.addAttribute("roleId", user.getRoleId());
}
List<EmrPrintOrDownLoadInfoVo> printCount = null;
try {
printCount = printOrDownLoadInfoService.getPrintCount(patientId);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
if (null != printCount && !printCount.isEmpty()) {
model.addAttribute("printCount", 1);
}
Emr_Log emrLog = new Emr_Log();
emrLog.setLogTitle("接口查看");
emrLog.setLogContent("接口预览页面");
logService.insertInterface(emrLog, userName);
return "recordManage/commomSearch/showRecordSouth";
}
//加载病案信息 //加载病案信息
@RequestMapping("getRecord") @RequestMapping("getRecord")
@ResponseBody @ResponseBody
@ -277,6 +315,7 @@ public class CommomSearchController {
/** /**
* *
* pdfiframe * pdfiframe
*
* @param patientId * @param patientId
* @param model * @param model
* @param request * @param request
@ -304,21 +343,77 @@ public class CommomSearchController {
model.addAttribute("isDownload", isDownload); model.addAttribute("isDownload", isDownload);
//查询是否有打印权限 //查询是否有打印权限
int printFlag = 0; int printFlag = 0;
int moveFlag = 0;
Set<String> menus = user.getMenus(); Set<String> menus = user.getMenus();
for (String menu : menus) { for (String menu : menus) {
if (StringUtils.isNotBlank(menu)) { if (StringUtils.isNotBlank(menu)) {
if ("/commom/printPdf".equals(menu)) { if ("/commom/printPdf".equals(menu)) {
printFlag = 1; printFlag = 1;
break; }
if ("/commom/movePdf".equals(menu)) {
moveFlag = 1;
} }
} }
} }
model.addAttribute("moveFlag", moveFlag);
model.addAttribute("printFlag", printFlag); model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag); model.addAttribute("flag", flag);
return "recordManage/commomSearch/showRecordIframeBlood"; return "recordManage/commomSearch/showRecordIframeBlood";
} }
/** /**
* 访
* @param userName
* @param flag
* @param model
* @param request
* @return
*/
@RequestMapping("showRecordIframeSouth")
public String showRecordIframeSouth(String patientId, String userName, String deptName, String flag, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId);
model.addAttribute("userName", request.getSession().getAttribute("userName"));
model.addAttribute("deptName", request.getSession().getAttribute("deptName"));
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
//打印分类集合
List<Emr_Type> emrTypes = null;
List<Zd_Assort> zdAssorts = null;
int isDownload = 0;
try {
emrTypes = emrTypeService.selectAllByCreater(1, request);
//病案分段集合
zdAssorts = assortService.selectAllByPower(user);
isDownload = apply_approveMapper.selectIsPowerByUser(user.getUserName(), patientId, 3);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
model.addAttribute("emrTypes", emrTypes);
model.addAttribute("zdAssorts", zdAssorts);
model.addAttribute("isDownload", isDownload);
//查询是否有打印权限
int printFlag = 0;
int moveFlag = 0;
Set<String> menus = user.getMenus();
for (String menu : menus) {
if (StringUtils.isNotBlank(menu)) {
if ("/commom/printPdf".equals(menu)) {
printFlag = 1;
}
if ("/commom/movePdf".equals(menu)) {
moveFlag = 1;
}
}
}
model.addAttribute("moveFlag", moveFlag);
model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag);
return "recordManage/commomSearch/showRecordIframeSouth";
}
/**
*
*
* @MethodName: getOtherDiagNameByAdmissTimesAndInpatientNo * @MethodName: getOtherDiagNameByAdmissTimesAndInpatientNo
* @Description: admissTimesinpatientNo * @Description: admissTimesinpatientNo
* @Param Integer admissTimes:,String inpatientNo * @Param Integer admissTimes:,String inpatientNo
@ -367,6 +462,7 @@ public class CommomSearchController {
/** /**
* *
*
* @param patientId * @param patientId
* @param typeId * @param typeId
* @param request * @param request
@ -488,6 +584,7 @@ public class CommomSearchController {
/** /**
* *
*
* @param patientId * @param patientId
* @param rootPaths * @param rootPaths
* @param names * @param names
@ -497,14 +594,35 @@ public class CommomSearchController {
*/ */
@RequestMapping(value = "selectPrintPic", method = RequestMethod.POST) @RequestMapping(value = "selectPrintPic", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public ResultUtil selectPrintPic(String patientId,String rootPaths,String names,String sources,HttpServletRequest request) throws Exception{ public ResultUtil selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception {
//生成加载进度mapKey
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String mapKey = user.getUserName() + "_" + patientId;
List<String> outs = commomService.selectPrintPic(response, patientId, rootPaths, names, sources, mapKey);
return ResultUtil.ok(outs);
}
/**
*
*
* @param patientId
* @param rootPaths
* @param names
* @param sources
* @return
* @throws Exception
*/
@RequestMapping(value = "selectPrintPicTh", method = RequestMethod.POST)
@ResponseBody
public ResultUtil selectPrintPicTh(String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception {
//生成加载进度mapKey //生成加载进度mapKey
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String mapKey = user.getUserName() + "_" + patientId; String mapKey = user.getUserName() + "_" + patientId;
List<String> outs = commomService.selectPrintPic(patientId,rootPaths,names,sources,mapKey); List<String> outs = commomService.selectPrintPicTh(patientId, rootPaths, names, sources, mapKey);
return ResultUtil.ok(outs); return ResultUtil.ok(outs);
} }
@RequestMapping("getPrintPicLoading") @RequestMapping("getPrintPicLoading")
@ResponseBody @ResponseBody
public ResultUtil getPrintPicLoading(String patientId, HttpServletRequest request) throws Exception { public ResultUtil getPrintPicLoading(String patientId, HttpServletRequest request) throws Exception {
@ -516,6 +634,7 @@ public class CommomSearchController {
/** /**
* pdf * pdf
*
* @param patientId * @param patientId
* @param scanPages * @param scanPages
* @param sources * @param sources
@ -533,7 +652,31 @@ public class CommomSearchController {
} }
} }
/** /**
* 访
* @param patientId
* @param userName
* @param scanPages
* @param sources
* @param flag
* @param response
*/
@RequestMapping(value = "showRecordContentSouth")
@ResponseBody
public void showRecordContentSouth(String patientId, String userName, String deptName, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) {
try {
userName = (String)request.getSession().getAttribute("userName");
deptName = (String)request.getSession().getAttribute("deptName");
commomService.showRecordContentSouth(patientId, userName, deptName, scanPages, sources, flag, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
/**
*
*
* @MethodName: updateScanAssortByBlood * @MethodName: updateScanAssortByBlood
* @Description: * @Description:
* @Param String patientId,String assortIds:,newAssortIdid * @Param String patientId,String assortIds:,newAssortIdid
@ -688,6 +831,7 @@ public class CommomSearchController {
} }
return treeList; return treeList;
} }
/** /**
* @MethodName: getDeledPicRecordTree * @MethodName: getDeledPicRecordTree
* @Description: * @Description:
@ -712,6 +856,7 @@ public class CommomSearchController {
/**************************病案维护开始*****************************/ /**************************病案维护开始*****************************/
/** /**
* *
*
* @param commomVo * @param commomVo
* @return * @return
* @throws Exception * @throws Exception
@ -778,7 +923,9 @@ public class CommomSearchController {
} }
} }
/**getOperateCodeContents /**
* getOperateCodeContents
*
* @MethodName: * @MethodName:
* @Description: * @Description:
* @Param * @Param

@ -11,6 +11,7 @@ import com.emr.entity.Power_User;
import com.emr.entity.ResultUtil; import com.emr.entity.ResultUtil;
import com.emr.entity.approve.Emr_Apply_Approve; import com.emr.entity.approve.Emr_Apply_Approve;
import com.emr.entity.emrReasonAnnoModel.Emr_Reason_Anno_Model; import com.emr.entity.emrReasonAnnoModel.Emr_Reason_Anno_Model;
import com.emr.service.CommomService;
import com.emr.service.ImportExcel.ImportExcelEntity; import com.emr.service.ImportExcel.ImportExcelEntity;
import com.emr.service.ImportExcel.ImportExcelUtil; import com.emr.service.ImportExcel.ImportExcelUtil;
import com.emr.service.approve.ApplyApproveService; import com.emr.service.approve.ApplyApproveService;
@ -19,11 +20,13 @@ import com.emr.util.ConvertToSelectJson;
import com.emr.util.DateUtils; import com.emr.util.DateUtils;
import com.emr.util.ExceptionPrintUtil; import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil; import com.emr.util.ExportExcelUtil;
import com.emr.vo.User;
import com.emr.vo.commomSearch.CommomVo; import com.emr.vo.commomSearch.CommomVo;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -74,6 +77,8 @@ public class ApproveController {
private Emr_Apply_ApproveMapper applyApproveMapper; private Emr_Apply_ApproveMapper applyApproveMapper;
@Value("${POWER_URLHEAD}") @Value("${POWER_URLHEAD}")
private String POWER_URLHEAD; private String POWER_URLHEAD;
@Autowired
private CommomService commomService;
/** /**
* @MethodName: approveListByAppleStatus * @MethodName: approveListByAppleStatus
* @Description: * @Description:
@ -448,6 +453,18 @@ public class ApproveController {
obj.setAddOper(addOper); obj.setAddOper(addOper);
obj.setUpdateOper(updateOper); obj.setUpdateOper(updateOper);
obj.setDeleteOper(deleteOper); obj.setDeleteOper(deleteOper);
//转换用户名
List<User> userList = commomService.getUserList(user.getUserName(), request);
//获取申请者工号
String applyer = obj.getApplyer();
if(!CollectionUtils.isEmpty(userList)){
for(User user1 : userList){
String name = user1.getName();
if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){
obj.setApplyer(name);
}
}
}
} }
} }
} }
@ -643,6 +660,23 @@ public class ApproveController {
} }
for (Emr_Apply_Approve obj : approves){ for (Emr_Apply_Approve obj : approves){
obj.setUpdateOper(updateOper); obj.setUpdateOper(updateOper);
//转换用户名
List<User> userList = commomService.getUserList(user.getUserName(), request);
//获取申请者工号
String applyer = obj.getApplyer();
//获取审批者工号
String approver = obj.getApprover();
if(!CollectionUtils.isEmpty(userList)){
for(User user1 : userList){
String name = user1.getName();
if(StringUtils.isNotBlank(applyer) && user1.getUserName().equals(applyer)){
obj.setApplyer(name);
}
if(StringUtils.isNotBlank(approver) && user1.getUserName().equals(approver)){
obj.setApprover(name);
}
}
}
} }
} }
} }

@ -64,6 +64,17 @@ public class BackDatabaseController {
return "otherManage/backupDatabase"; return "otherManage/backupDatabase";
} }
/**
*
* @return
*/
@RequiresPermissions("/otherManage/interfaceDatabase")
@RequestMapping("interfaceDatabase")
public String interfaceDatabase(){
return "otherManage/interfaceDatabase";
}
/** /**
* @MethodName getLogList * @MethodName getLogList
* @Description: * @Description:
@ -111,6 +122,51 @@ public class BackDatabaseController {
} }
} }
/**
*
* @param page
* @param limit
* @param log
* @param startTime
* @param endTime
* @param request
* @return
*/
@RequestMapping("getLogListIf")
@ResponseBody
public String getLogListIf(Integer page, Integer limit, Emr_Log log, String startTime, String endTime, HttpServletRequest request){
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
try{
List<Emr_Log> logs = logMapper.selectAllByFont(log, startTime, endTime);
//匹配权限
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
Set<String> menus = user.getMenus();
if(null != logs && !logs.isEmpty()){
if(null != menus && !menus.isEmpty()){
int deleteOper = 0;
for(String menu : menus){
if(StringUtils.isNotBlank(menu)){
if("/otherManage/deleteLogById".equals(menu)){
deleteOper = 1;
}
}
}
for (Emr_Log obj : logs){
obj.setDeleteOper(deleteOper);
}
}
}
PageInfo pageInfo = new PageInfo<>(logs);
return JSON.toJSONString(pageInfo);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/** /**
* @MethodName deleteLogById * @MethodName deleteLogById
* @Description: id * @Description: id

@ -3,6 +3,7 @@ package com.emr.controller.otherManage;
import com.emr.annotation.OptionalLog; import com.emr.annotation.OptionalLog;
import com.emr.dao.CommomMapper; import com.emr.dao.CommomMapper;
import com.emr.dao.approve.Emr_Apply_ApproveMapper; import com.emr.dao.approve.Emr_Apply_ApproveMapper;
import com.emr.dao.commomSearch.ScanPathMapper;
import com.emr.dao.emrPrintAndDownLoad.EmrPrintDownloadInfoMapper; import com.emr.dao.emrPrintAndDownLoad.EmrPrintDownloadInfoMapper;
import com.emr.dao.recordLock.Emr_LockMapper; import com.emr.dao.recordLock.Emr_LockMapper;
import com.emr.entity.approve.Emr_Apply_Approve; import com.emr.entity.approve.Emr_Apply_Approve;
@ -36,6 +37,8 @@ public class monitoringCenterController {
private CommomMapper commomMapper; private CommomMapper commomMapper;
@Autowired @Autowired
private Emr_LockMapper emrLockMapper; private Emr_LockMapper emrLockMapper;
@Autowired
private ScanPathMapper scanPathMapper;
/** /**
* *
* @return * @return
@ -44,14 +47,23 @@ public class monitoringCenterController {
@RequiresPermissions("/monitoringCenter/select") @RequiresPermissions("/monitoringCenter/select")
@RequestMapping("monitoringCenterList") @RequestMapping("monitoringCenterList")
public String monitoringCenter(Model model){ public String monitoringCenter(Model model){
//正在调阅的数量
int applyApproveNum = 0; int applyApproveNum = 0;
//待批病案数
int applyApproveNullNum = 0; int applyApproveNullNum = 0;
EmrPrintOrDownLoadInfoVo vo = new EmrPrintOrDownLoadInfoVo(); EmrPrintOrDownLoadInfoVo vo = new EmrPrintOrDownLoadInfoVo();
vo.setOperType(Short.valueOf("2")); vo.setOperType(Short.valueOf("2"));
List<EmrPrintOrDownLoadInfoVo> emrPrintOrDownLoadInfoVos = null; List<EmrPrintOrDownLoadInfoVo> emrPrintOrDownLoadInfoVos = null;
//数字病案库存数量
int commomNum = 0; int commomNum = 0;
//病案锁定数
int lockNum = 0; int lockNum = 0;
//病案总盘数
int phCount = 0;
//病案图像总数
int pdfCount = 0;
try { try {
//下载量
emrPrintOrDownLoadInfoVos = emrPrintDownloadInfoMapper.selectAll(vo); emrPrintOrDownLoadInfoVos = emrPrintDownloadInfoMapper.selectAll(vo);
commomNum = commomMapper.selectCommomCount(); commomNum = commomMapper.selectCommomCount();
lockNum = emrLockMapper.selectCountLocking(); lockNum = emrLockMapper.selectCountLocking();
@ -72,6 +84,15 @@ public class monitoringCenterController {
applyApproveNullNum += 1; applyApproveNullNum += 1;
} }
} }
//查询总盘数
List<Integer> phNums = scanPathMapper.selectCountPh();
for (Integer phNum : phNums) {
if (0 != phNum) {
phCount += 1;
}
}
//查询图像总数
pdfCount = scanPathMapper.selectCountPdf();
} catch (ParseException e) { } catch (ParseException e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
@ -81,6 +102,8 @@ public class monitoringCenterController {
model.addAttribute("emrDownloadInfoNum", emrPrintOrDownLoadInfoVos.size()); model.addAttribute("emrDownloadInfoNum", emrPrintOrDownLoadInfoVos.size());
model.addAttribute("commomNum", commomNum); model.addAttribute("commomNum", commomNum);
model.addAttribute("lockNum", lockNum); model.addAttribute("lockNum", lockNum);
model.addAttribute("phCount", phCount);
model.addAttribute("pdfCount", pdfCount);
return "otherManage/monitoringCenter"; return "otherManage/monitoringCenter";
} }
} }

@ -23,6 +23,7 @@ import com.emr.entity.templateSearch.Emr_Customize;
import com.emr.entity.templateSearch.Emr_Modle; import com.emr.entity.templateSearch.Emr_Modle;
import com.emr.entity.templateSearch.Emr_Modle_Check; import com.emr.entity.templateSearch.Emr_Modle_Check;
import com.emr.service.CommomService; import com.emr.service.CommomService;
import com.emr.service.approve.ApplyApproveService;
import com.emr.service.emrFunGroupDistribution.FunGroupDistributionService; import com.emr.service.emrFunGroupDistribution.FunGroupDistributionService;
import com.emr.service.emrLock.EmrLockServiceImpl; import com.emr.service.emrLock.EmrLockServiceImpl;
import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService; import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService;
@ -30,6 +31,7 @@ import com.emr.service.templateSearch.TemplateSearchService;
import com.emr.util.*; import com.emr.util.*;
import com.emr.vo.Msg; import com.emr.vo.Msg;
import com.emr.vo.commomSearch.CommomVo; import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.commomSearch.ScanAssortVo;
import com.emr.vo.commomSearch.ScanPathForPatientListVo; import com.emr.vo.commomSearch.ScanPathForPatientListVo;
import com.emr.vo.commomSearch.ScanPathVo; import com.emr.vo.commomSearch.ScanPathVo;
import com.emr.vo.templateSearch.Emr_Modle_RelatedVo; import com.emr.vo.templateSearch.Emr_Modle_RelatedVo;
@ -96,6 +98,7 @@ public class TemplateSearchController {
private PrintOrDownLoadInfoService printOrDownLoadInfoService; private PrintOrDownLoadInfoService printOrDownLoadInfoService;
@Autowired @Autowired
private EmrPdfWaterSetMapper pdfWaterSetMapper; private EmrPdfWaterSetMapper pdfWaterSetMapper;
/** /**
* @MethodName templateList * @MethodName templateList
* @Description: * @Description:
@ -710,6 +713,7 @@ public class TemplateSearchController {
return ResultUtil.error("modleId不能为空"); return ResultUtil.error("modleId不能为空");
} }
} }
/***************************************自定义查询********************************************/ /***************************************自定义查询********************************************/
//祈福医院 //祈福医院
@RequiresPermissions("/template/customSearchListqf") @RequiresPermissions("/template/customSearchListqf")
@ -919,6 +923,60 @@ public class TemplateSearchController {
} }
} }
/**
*
* @param sql
* @param page
* @param limit
* @param request
* @return
*/
@RequestMapping(value = "cutomSearchTableSouth", produces = {"text/json;charset=UTF-8"}, method = RequestMethod.POST)
@ResponseBody
public String cutomSearchTableSouth(String sql, Integer page, Integer limit, HttpServletRequest request) {
if (StringUtils.isNoneBlank(sql)) {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
try {
List<CommomVo> commomVos = commomMapper.selectAll(sql);
//匹配权限
String userName = (String) request.getSession().getAttribute("cuserName");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (null != commomVos && !commomVos.isEmpty()) {
for (CommomVo vo:commomVos) {
Emr_Apply_Approve approve = applyApproveMapper.selectByApplyerAndPatientId(userName, vo.getPatientId());
if (null != approve) {
Date date = sdf.parse(approve.getEffeTime());
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
calendar.add(calendar.DATE, 1);
date = calendar.getTime();
if ("1".equals(approve.getApproveState()) && new Date().compareTo(date) < 0){
vo.setBorrowingOper(1);
} else if (approve.getApprover() == null && approve.getApproveState() == null) {
vo.setBorrowingOper(2);
} else {
vo.setBorrowingOper(0);
}
} else {
vo.setBorrowingOper(0);
}
}
}
assert commomVos != null;
PageInfo pageInfo = new PageInfo<>(commomVos);
return JSON.toJSONString(pageInfo);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
} else {
return null;
}
}
/** /**
* @MethodName: exportExcel * @MethodName: exportExcel
* @Description: excel * @Description: excel
@ -956,6 +1014,7 @@ public class TemplateSearchController {
} }
//脐血库、祈福 //脐血库、祈福
/** /**
* @MethodName: downloadBloodZip * @MethodName: downloadBloodZip
* @Description: patientId * @Description: patientId
@ -1148,6 +1207,7 @@ public class TemplateSearchController {
} }
} }
} }
//脐血库、祈福 //脐血库、祈福
@RequestMapping(value = "getScanCountByPatientId") @RequestMapping(value = "getScanCountByPatientId")
@ResponseBody @ResponseBody
@ -1167,6 +1227,7 @@ public class TemplateSearchController {
} }
return "0"; return "0";
} }
//脐血库、祈福 //脐血库、祈福
@RequiresPermissions(value = {"/commom/downloadPdf"}) @RequiresPermissions(value = {"/commom/downloadPdf"})
@RequestMapping(value = "downloadPdfBlood", produces = {"text/json;charset=UTF-8"}) @RequestMapping(value = "downloadPdfBlood", produces = {"text/json;charset=UTF-8"})
@ -1219,6 +1280,59 @@ public class TemplateSearchController {
} }
} }
/**
*
*
* @param response
* @param oldPatientId
* @param newPatientId
* @param assortIds
* @param newAssortId
* @param flag
* @return
*/
@RequiresPermissions(value = {"/commom/movePdf"})
@RequestMapping(value = "movePdfBlood", method = RequestMethod.POST)
@ResponseBody
public ResultUtil movePdfBlood(HttpServletResponse response, String oldPatientId, String newPatientId, String assortIds, String newAssortId, String flag) {
if (StringUtils.isNoneBlank(oldPatientId) && StringUtils.isNoneBlank(newPatientId)) {
if (StringUtils.isNotBlank(assortIds)) {
String[] assortIdStr = assortIds.split(",");
StringBuilder assortIdsBuilder = new StringBuilder();
for (int i = 0; i < assortIdStr.length; i++) {
if (i != assortIdStr.length - 1) {
assortIdsBuilder.append("'").append(assortIdStr[i]).append("',");
} else {
assortIdsBuilder.append("'").append(assortIdStr[i]).append("'");
}
}
assortIds = assortIdsBuilder.toString();
}
oldPatientId = "'" + oldPatientId + "'";
List<ScanPathVo> oldScanPathVos = scanPathMapper.selectScanFileByBloodPatientIds(oldPatientId, assortIds, flag);
CommomVo commomVo = commomMapper.selectByPrimaryKey(newPatientId);
if (null == commomVo) {
return ResultUtil.error("目标病案不存在!");
}
if (null != oldScanPathVos && !oldScanPathVos.isEmpty()) {
for (ScanPathVo scanPathVo : oldScanPathVos) {
String newFile = commomVo.getFilePath() + "\\" + scanPathVo.getScanPage();
String oldFile = scanPathVo.getFileRealPath();
try {
templateSearchService.movePdf(oldFile, newFile);
} catch (IOException e) {
e.printStackTrace();
}
String sql = "UPDATE dbo.t_scan_assort SET patient_id = '"+ newPatientId +"', assort_id = '" + newAssortId +
"' WHERE patient_id = " + oldPatientId + " AND scan_page = '" + scanPathVo.getScanPage() + "'";
scanPathMapper.updateScanFileByPatientIdAndScanPage(sql);
}
}
return ResultUtil.ok();
}
return ResultUtil.error("程序出现错误,请联系管理员进行处理!");
}
/** /**
* @MethodName: printInfoBlood * @MethodName: printInfoBlood
* @Description: patientId * @Description: patientId

@ -72,4 +72,12 @@ public interface Emr_Apply_ApproveMapper {
* @return * @return
*/ */
List<Emr_Apply_Approve> selectCountByApproveStateIsNull(); List<Emr_Apply_Approve> selectCountByApproveStateIsNull();
/**
*
* @param userName
* @param patientId
* @return
*/
Emr_Apply_Approve selectByApplyerAndPatientId(@Param("userName")String userName,@Param("patientId")String patientId);
} }

@ -8,9 +8,27 @@ import java.util.List;
public interface ScanPathMapper { public interface ScanPathMapper {
/** /**
* patientIdid * patientIdid
* */ */
List<ScanPathVo> selectScanFileByPatientIds(@Param("patientIds") String patientIds, @Param("assortIds") String assortIds); List<ScanPathVo> selectScanFileByPatientIds(@Param("patientIds") String patientIds, @Param("assortIds") String assortIds);
List<ScanPathVo> selectScanFileByBloodPatientIds(@Param("patientIds") String patientIds, List<ScanPathVo> selectScanFileByBloodPatientIds(@Param("patientIds") String patientIds,
@Param("assortIds") String assortIds, @Param("flag") String flag); @Param("assortIds") String assortIds, @Param("flag") String flag);
/**
*
* @param sql
*/
void updateScanFileByPatientIdAndScanPage(@Param("sql") String sql);
/**
*
* @return
*/
List<Integer> selectCountPh();
/**
*
* @return
*/
Integer selectCountPdf();
} }

@ -29,4 +29,6 @@ public interface Emr_LogMapper {
List<Emr_Log> selectAllByIds(@Param("checks")String checks); List<Emr_Log> selectAllByIds(@Param("checks")String checks);
void deleteLogByIds(@Param("str")String str); void deleteLogByIds(@Param("str")String str);
List<Emr_Log> selectAllByFont(@Param("record")Emr_Log record,@Param("startTime") String startTime,@Param("endTime") String endTime);
} }

@ -24,11 +24,14 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.*;
import java.net.InetAddress;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.List;
/** /**
* @ProjectName: * @ProjectName:
@ -52,6 +55,8 @@ public class CommomService {
private String WATERPICPATH; private String WATERPICPATH;
@Value("${EMR_RECORD_JSP}") @Value("${EMR_RECORD_JSP}")
private String EMRRECORDJSP; private String EMRRECORDJSP;
@Value("${waterTifToJpgPath}")
private String WATERTIFTOJPGPATH;
@Autowired @Autowired
private CommomMapper commomMapper; private CommomMapper commomMapper;
@Autowired @Autowired
@ -60,6 +65,7 @@ public class CommomService {
private T_Scan_AssortService scanAssortService; private T_Scan_AssortService scanAssortService;
@Autowired @Autowired
private EmrPdfWaterSetMapper pdfWaterSetMapper; private EmrPdfWaterSetMapper pdfWaterSetMapper;
//获取所属医院用户名集合 //获取所属医院用户名集合
public static StringBuilder creaters(HttpServletRequest request) { public static StringBuilder creaters(HttpServletRequest request) {
List<User> userList = (List<User>) request.getSession().getAttribute("USER_LIST"); List<User> userList = (List<User>) request.getSession().getAttribute("USER_LIST");
@ -92,6 +98,7 @@ public class CommomService {
/** /**
* admin * admin
*
* @param userName * @param userName
* @param request * @param request
* @return * @return
@ -123,6 +130,7 @@ public class CommomService {
/** /**
* *
*
* @param files * @param files
* @param patientId * @param patientId
* @param assortId * @param assortId
@ -135,7 +143,7 @@ public class CommomService {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId); CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
ResultUtil resultUtil = selectRootPath(patientId, commomVo.getInpatientNo()); ResultUtil resultUtil = selectRootPath(patientId, commomVo.getInpatientNo());
if (resultUtil.getCode().equals(0)) { if (resultUtil.getCode().equals(0)) {
String path = resultUtil.getMsg(); String path = resultUtil.getMsg().replaceAll(" ", "");
//保存至commomtable表 //保存至commomtable表
commomVo.setNewPath(path); commomVo.setNewPath(path);
commomMapper.updateByPrimaryKeySelective(commomVo); commomMapper.updateByPrimaryKeySelective(commomVo);
@ -200,6 +208,59 @@ public class CommomService {
} }
} }
//南方医院显示图像
public void showRecordContentSouth(String patientId, String userName, String deptName, String scanPages, String sources, String flag, HttpServletResponse response) throws Exception {
String pdfName = "档案管理PDF";
if (StringUtils.isNotBlank(patientId)) {
patientId = patientId.replace("\'", "");
//查询
if (StringUtils.isNotBlank(flag)) {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
//flag = home_addr取home_addr字段path_file取home_addr字段
String root1 = "";
if ("home_addr".equals(flag)) {
root1 = commomVo.getHomeAddr();
} else if ("file_path".equals(flag)) {
root1 = commomVo.getFilePath();
}
String root2 = commomVo.getNewPath();
//组织src
List<String> src = new LinkedList<>();
String[] scanPageArr = scanPages.split(",");
String[] sourceArr = sources.split(",");
for (int i = 0; i < scanPageArr.length; i++) {
String srcStr = "";
if (StringUtils.isNotBlank(scanPageArr[i])) {
if ("1".equals(sourceArr[i])) {
srcStr = root1 + "\\" + scanPageArr[i];
} else {
srcStr = root2 + "\\" + scanPageArr[i];
}
}
src.add(srcStr);
}
List<String> filePaths = new LinkedList<>();
for (String srcs : src) {
File file = new File(srcs);
if (file.isFile()) {
filePaths.add(srcs);
}
}
if (!filePaths.isEmpty()) {
//根据图片路径转换pdf
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
InetAddress netAddress = InetAddress.getLocalHost();
String ip = null;
if (null != netAddress) {
ip = netAddress.getHostAddress();
}
emrPdfWaterSet.setText(userName + " " + ip);
img2PdfUtil.imageToPdf(response, filePaths, pdfName, emrPdfWaterSet);
}
}
}
}
//接口显示pdf //接口显示pdf
public void showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, String fileOutPath) throws Exception { public void showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, String fileOutPath) throws Exception {
if (StringUtils.isNotBlank(patientId)) { if (StringUtils.isNotBlank(patientId)) {
@ -246,6 +307,58 @@ public class CommomService {
} }
} }
//接口显示pdf
public void showRecordContentSouthFont(String patientId, String userName, String deptName, String scanPages, String sources, String flag, String fileOutPath) throws Exception {
if (StringUtils.isNotBlank(patientId)) {
patientId = patientId.replace("\'", "");
//查询
if (StringUtils.isNotBlank(flag)) {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
//flag = home_addr取home_addr字段path_file取home_addr字段
String root1 = "";
if ("home_addr".equals(flag)) {
root1 = commomVo.getHomeAddr();
} else if ("file_path".equals(flag)) {
root1 = commomVo.getFilePath();
}
String root2 = commomVo.getNewPath();
//组织src
List<String> src = new LinkedList<>();
String[] scanPageArr = scanPages.split(",");
String[] sourceArr = sources.split(",");
for (int i = 0; i < scanPageArr.length; i++) {
String srcStr = "";
if (StringUtils.isNotBlank(scanPageArr[i])) {
if ("1".equals(sourceArr[i])) {
srcStr = root1 + "\\" + scanPageArr[i];
} else {
srcStr = root2 + "\\" + scanPageArr[i];
}
}
src.add(srcStr);
}
List<String> filePaths = new LinkedList<>();
for (String srcs : src) {
File file = new File(srcs);
if (file.isFile()) {
filePaths.add(srcs);
}
}
if (!CollectionUtils.isEmpty(filePaths)) {
//根据图片路径转换pdf
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
InetAddress netAddress = InetAddress.getLocalHost();
String ip = null;
if (null != netAddress) {
ip = netAddress.getHostAddress();
}
emrPdfWaterSet.setText(userName + " " + ip);
img2PdfUtil.imageToPdfFont(filePaths, emrPdfWaterSet, fileOutPath);
}
}
}
}
//封装批量上传图片,返回上传图片记录 //封装批量上传图片,返回上传图片记录
private List<T_Scan_Assort> getScanAssortListByUpdatePic(List<MultipartFile> multipartFiles, String patientId, String assortId, String root) throws Exception { private List<T_Scan_Assort> getScanAssortListByUpdatePic(List<MultipartFile> multipartFiles, String patientId, String assortId, String root) throws Exception {
List<T_Scan_Assort> scanAssorts = new ArrayList<>(); List<T_Scan_Assort> scanAssorts = new ArrayList<>();
@ -284,6 +397,7 @@ public class CommomService {
//格式化年月 //格式化年月
SimpleDateFormat fmt1 = new SimpleDateFormat("yyyyMM"); SimpleDateFormat fmt1 = new SimpleDateFormat("yyyyMM");
String path = newPicRoot + "\\" + fmt1.format(new Date()) + "\\" + inpatientId + "-" + patientId; String path = newPicRoot + "\\" + fmt1.format(new Date()) + "\\" + inpatientId + "-" + patientId;
path = path.replaceAll(" ", "");
//该目录不存在,创建目录 //该目录不存在,创建目录
if (!new File(path).isDirectory()) { if (!new File(path).isDirectory()) {
new File(path).mkdirs(); new File(path).mkdirs();
@ -309,13 +423,14 @@ public class CommomService {
/** /**
* *
*
* @param patientId * @param patientId
* @param rootPaths * @param rootPaths
* @param names * @param names
* @param sources * @param sources
* @return * @return
*/ */
public List<String> selectPrintPic(String patientId, String rootPaths, String names, String sources,String mapKey) { public List<String> selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, String mapKey) {
List<String> outs = new LinkedList<>(); List<String> outs = new LinkedList<>();
if (StringUtils.isNotBlank(names)) { if (StringUtils.isNotBlank(names)) {
String[] rootPathList = rootPaths.split(","); String[] rootPathList = rootPaths.split(",");
@ -345,6 +460,145 @@ public class CommomService {
if ((printEffective != null && printEffective == 1) || if ((printEffective != null && printEffective == 1) ||
(printIsImg != null && printIsImg == 1)) { (printIsImg != null && printIsImg == 1)) {
//需要水印 //需要水印
//组织加水印后图片存放目录
String waterPicRoot = WATERPICPATH + patientId + "\\" + sourceList[i] + "\\";
//目录不存在则创建
if (!new File(waterPicRoot).isDirectory()) {
new File(waterPicRoot).mkdirs();
}
if (srcPath.substring(srcPath.length() - 3).equals("tif")) {
//需要水印
//组织加水印后图片存放目录
String waterJpgRoot = WATERTIFTOJPGPATH + patientId + "\\" + sourceList[i] + "\\";
//目录不存在则创建
if (!new File(waterJpgRoot).isDirectory()) {
new File(waterJpgRoot).mkdirs();
}
//获取到转换后jpg图像存放的位置
String filePathPrefix = waterJpgRoot + nameList[i];
String tifToJpgRoot = filePathPrefix.substring(0, filePathPrefix.lastIndexOf("."))+ ".jpg" ;
if (!new File(tifToJpgRoot).exists()) {
//tifToJpg(srcPath, tifToJpgRoot);
//加水印存放的地址
String waterPicPath = waterPicRoot + nameList[i].substring(0, nameList[i].lastIndexOf("."))+ ".jpg";
img2PdfUtil.addWatermarkPic1(new File(tifToJpgRoot), emrPdfWaterSet, waterPicPath);
}
outSrc = EMRRECORDJSP + "\\reload\\" + patientId + "\\" + sourceList[i] + "\\" + nameList[i].substring(0, nameList[i].lastIndexOf("."))+ ".jpg";
} else {
//组织加水印后图片存放地址
String waterPicPath = waterPicRoot + nameList[i];
if (!new File(waterPicPath).exists()) {
img2PdfUtil.addWatermarkPic1(new File(srcPath), emrPdfWaterSet, waterPicPath);
//组织输出地址
}
outSrc = EMRRECORDJSP + "\\reload\\" + patientId + "\\" + sourceList[i] + "\\" + nameList[i];
}
} else {
//不需要水印
//将原图片地址转换成映射地址
//获取盘符并转换映射地址的头部地址
String root = selectRootByNotWater(srcPath);
//获取盘符后面的地址
String str1 = srcPath.substring(0, srcPath.indexOf("\\"));
String picPath = srcPath.substring(str1.length() + 1, srcPath.length());
outSrc = EMRRECORDJSP + "\\" + root + picPath;
}
outs.add(outSrc);
Integer value = Math.round((i + 1) * 100 / nameList.length);
printLoadingMap.put(mapKey, value);
}
}
return outs;
}
/*private static String tifToJpg(String tifUrl, String tifToJpgRoot) {
File fileTiff = new File(tifToJpgRoot);
if (fileTiff.exists()) {
return tifToJpgRoot;
}
RenderedOp rd = JAI.create("fileload", tifUrl);//读取iff文件
OutputStream ops = null;
try {
ops = new FileOutputStream(tifToJpgRoot);
//文件存储输出流
JPEGEncodeParam param = new JPEGEncodeParam();
ImageEncoder image = ImageCodec.createImageEncoder("JPEG", ops, param); //指定输出格式
image.encode(rd );
//解析输出流进行输出
ops.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return tifToJpgRoot;
}*/
/**
*
*
* @param patientId
* @param rootPaths
* @param names
* @param sources
* @return
*/
public List<String> selectPrintPicTh(String patientId, String rootPaths, String names, String sources, String mapKey) {
List<String> outs = new LinkedList<>();
if (StringUtils.isNotBlank(names)) {
String[] rootPathList = rootPaths.split(",");
String[] nameList = names.split(",");
String[] sourceList = sources.split(",");
//获取水印设置
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
//获取是否打印文本水印
Short printEffective = emrPdfWaterSet.getPrintEffective();
//获取是否打印图片水印
Short printIsImg = emrPdfWaterSet.getPrintIsImg();
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
//判断是否有两套图像
int num = 0;
if (null != commomVo.getFilePath2() && !"".equals(commomVo.getFilePath2())) {
num = 1;
}
for (int i = 0; i < nameList.length; i++) {
//定义图片根目录地址
String rootPath = "";
//组织原图片地址
if (num == 1) {
rootPath = commomVo.getFilePath2();
} else {
if ("1".equals(sourceList[i])) {
//扫描图片地址位于rootPathList第一个
rootPath = rootPathList[0];
} else {
rootPath = rootPathList[1];
}
}
//原图片地址
String srcPath = rootPath + "\\" + nameList[i];
//定义输出地址
String outSrc = "";
//获取项目上下文地址
if ((printEffective != null && printEffective == 1) ||
(printIsImg != null && printIsImg == 1)) {
if (num == 1) {
//第二套打印图像输出
//组织加水印后图片存放目录
String waterPicRoot = WATERPICPATH + patientId + "\\" + 3 + "\\";
//目录不存在则创建
if (!new File(waterPicRoot).isDirectory()) {
new File(waterPicRoot).mkdirs();
}
//组织加水印后图片存放地址
String waterPicPath = waterPicRoot + nameList[i];
if (!new File(waterPicPath).exists()) {
img2PdfUtil.addWatermarkPic1(new File(srcPath), emrPdfWaterSet, waterPicPath);
}
//组织输出地址
outSrc = EMRRECORDJSP + "\\reload\\" + patientId + "\\" + 3 + "\\" + nameList[i];
} else {
//组织加水印后图片存放目录 //组织加水印后图片存放目录
String waterPicRoot = WATERPICPATH + patientId + "\\" + sourceList[i] + "\\"; String waterPicRoot = WATERPICPATH + patientId + "\\" + sourceList[i] + "\\";
//目录不存在则创建 //目录不存在则创建
@ -358,6 +612,7 @@ public class CommomService {
} }
//组织输出地址 //组织输出地址
outSrc = EMRRECORDJSP + "\\reload\\" + patientId + "\\" + sourceList[i] + "\\" + nameList[i]; outSrc = EMRRECORDJSP + "\\reload\\" + patientId + "\\" + sourceList[i] + "\\" + nameList[i];
}
} else { } else {
//不需要水印 //不需要水印
//将原图片地址转换成映射地址 //将原图片地址转换成映射地址
@ -378,6 +633,7 @@ public class CommomService {
/** /**
* *
*
* @param srcPath * @param srcPath
* @return * @return
*/ */
@ -403,7 +659,8 @@ public class CommomService {
return "reloadJ\\"; return "reloadJ\\";
case "K": case "K":
return "reloadK\\"; return "reloadK\\";
default:; default:
;
} }
return null; return null;
} }

@ -8,6 +8,8 @@ import java.util.Map;
public interface LogService { public interface LogService {
void insert(Emr_Log log); void insert(Emr_Log log);
void insertInterface(Emr_Log log, String userName);
void autoInsert(Emr_Log log); void autoInsert(Emr_Log log);
void deleteLogById(Integer logId); void deleteLogById(Integer logId);

@ -84,6 +84,54 @@ public class LogServiceImpl implements LogService {
logMapper.insert(log); logMapper.insert(log);
} }
@Override
public void insertInterface(Emr_Log log, String userName) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// 从session获取用户名
log.setCreater(userName);
// 获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm");
log.setCreateDate(fmt.format(new Date()));
// 获取访问真实IP
String ipAddress = request.getHeader("x-forwarded-for");
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("WL-Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getRemoteAddr();
if("127.0.0.1".equals(ipAddress) || "0:0:0:0:0:0:0:1".equals(ipAddress)){
//根据网卡取本机配置的IP
InetAddress inet=null;
try {
inet = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
assert inet != null;
ipAddress= inet.getHostAddress();
}
}
//对于通过多个代理的情况第一个IP为客户端真实IP,多个IP按照','分割
if(ipAddress!=null && ipAddress.length()>15){ //"***.***.***.***".length() = 15
if(ipAddress.indexOf(",")>0){
ipAddress = ipAddress.substring(0,ipAddress.indexOf(","));
}
}
log.setSysFlag("emr_record");
//字符串太长,截取
String remark = log.getRemark();
if(StringUtils.isNoneBlank(remark) && remark.length() > 100){
remark = remark.substring(0,100);
log.setRemark(remark);
}
log.setIp(ipAddress);
logMapper.insert(log);
}
@Override @Override
public void autoInsert(Emr_Log log) { public void autoInsert(Emr_Log log) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm");

@ -5,6 +5,7 @@ import com.emr.entity.templateSearch.Emr_Modle;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/** /**
* @ProjectName: * @ProjectName:
@ -36,4 +37,6 @@ public interface TemplateSearchService {
* *
* */ * */
void addModleRelated(Integer modleId,String checks,HttpServletRequest request); void addModleRelated(Integer modleId,String checks,HttpServletRequest request);
void movePdf(String oldFile, String newFile) throws IOException;
} }

@ -21,6 +21,10 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
@ -164,4 +168,26 @@ public class TemplateSearchServiceImpl implements TemplateSearchService {
} }
} }
} }
@Override
public void movePdf(String oldFile, String newFile) throws IOException {
//一遍读取一遍写入。
//无论你是是使用的输出流还是输入流,操作的一定是文件。
//1.读取数据 //输入字节流
//1.找到需要复制的图片
File file = new File(oldFile); // NotFoundException
FileInputStream inputStream = new FileInputStream(file);
File file1 = new File(newFile);
FileOutputStream outputStream = new FileOutputStream(file1);
byte[] b = new byte[1024];
//int count = 0;
while (inputStream.read(b) != -1) {
//2.写入数据 //输出字节流
outputStream.write(b);
}
//关闭流 关闭流的原则: 先开后关 后开的先关。
outputStream.close();
inputStream.close();
}
} }

@ -0,0 +1,84 @@
package com.emr.util;
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
/**
* @program: emr_record
* @description
* @author: wangsiyi
* @create: 2020-11-21 14:05
**/
public class Img2BinaryUtil {
final private static float A4_weight = 595; //标准A4的宽
final private static float A4_height = 842; //标准A4的高
public static void Img2Binary(File srcImgFile, String binaryPicPath){
if(!new File(binaryPicPath).exists()){
String src = null;
BufferedImage bi = null;
try {
bi = ImageIO.read(srcImgFile);
// 获取当前图片的高,宽,ARGB
int h = bi.getHeight();
int w = bi.getWidth();
int rgb = bi.getRGB(0, 0);
int arr[][] = new int[w][h];
// 获取图片每一像素点的灰度值
for (int i = 0; i < w; i++) {
for (int j = 0; j < h; j++) {
// getRGB()返回默认的RGB颜色模型(十进制)
arr[i][j] = getImageRgb(bi.getRGB(i, j));//该点的灰度值
}
}
BufferedImage bufferedImage = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_BINARY);// 构造一个类型为预定义图像类型之一的 BufferedImageTYPE_BYTE_BINARY表示一个不透明的以字节打包的 1、2 或 4 位图像。)
int FZ = 130;
for (int i = 0; i < w; i++) {
for (int j = 0; j < h; j++) {
if (getGray(arr, i, j, w, h) > FZ) {
int black = new Color(255, 255, 255).getRGB();
bufferedImage.setRGB(i, j, black);
} else {
int white = new Color(0, 0, 0).getRGB();
bufferedImage.setRGB(i, j, white);
}
}
}
ImageIO.write(bufferedImage, "jpg", new File(binaryPicPath));
} catch (IOException e) {
e.printStackTrace();
}
}
}
private static int getImageRgb(int i) {
String argb = Integer.toHexString(i);// 将十进制的颜色值转为十六进制
// argb分别代表透明,红,绿,蓝 分别占16进制2位
int r = Integer.parseInt(argb.substring(2, 4), 16);//后面参数为使用进制
int g = Integer.parseInt(argb.substring(4, 6), 16);
int b = Integer.parseInt(argb.substring(6, 8), 16);
int result = (int) ((r + g + b) / 3);
return result;
}
//自己加周围8个灰度值再除以9算出其相对灰度值
public static int getGray(int gray[][], int x, int y, int w, int h) {
int rs = gray[x][y]
+ (x == 0 ? 255 : gray[x - 1][y])
+ (x == 0 || y == 0 ? 255 : gray[x - 1][y - 1])
+ (x == 0 || y == h - 1 ? 255 : gray[x - 1][y + 1])
+ (y == 0 ? 255 : gray[x][y - 1])
+ (y == h - 1 ? 255 : gray[x][y + 1])
+ (x == w - 1 ? 255 : gray[x + 1][y])
+ (x == w - 1 || y == 0 ? 255 : gray[x + 1][y - 1])
+ (x == w - 1 || y == h - 1 ? 255 : gray[x + 1][y + 1]);
return rs / 9;
}
}

@ -11,14 +11,11 @@ import com.lowagie.text.pdf.*;
import com.sun.media.jai.codec.ImageCodec; import com.sun.media.jai.codec.ImageCodec;
import com.sun.media.jai.codec.ImageEncoder; import com.sun.media.jai.codec.ImageEncoder;
import com.sun.media.jai.codec.JPEGEncodeParam; import com.sun.media.jai.codec.JPEGEncodeParam;
import com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReaderSpi;
import com.twelvemonkeys.imageio.plugins.tiff.TIFFImageWriterSpi;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.imageio.spi.IIORegistry;
import javax.media.jai.JAI; import javax.media.jai.JAI;
import javax.media.jai.RenderedOp; import javax.media.jai.RenderedOp;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -26,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.*; import java.io.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -43,6 +41,7 @@ import java.util.List;
public class img2PdfUtil { public class img2PdfUtil {
final private static float A4_weight = 595; //标准A4的宽 final private static float A4_weight = 595; //标准A4的宽
final private static float A4_height = 842; //标准A4的高 final private static float A4_height = 842; //标准A4的高
public static void imageToPdf(HttpServletResponse response, List<String> filePaths, String pdfName, EmrPdfWaterSet pdfWaterSet) { public static void imageToPdf(HttpServletResponse response, List<String> filePaths, String pdfName, EmrPdfWaterSet pdfWaterSet) {
Document document = new Document(PageSize.A4, 0, 0, 0, 0); //创建文档容器 Document document = new Document(PageSize.A4, 0, 0, 0, 0); //创建文档容器
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
@ -83,6 +82,45 @@ public class img2PdfUtil {
} }
} }
public static void imageToPdf2(HttpServletResponse response, String filePath, String targetPath, EmrPdfWaterSet pdfWaterSet) {
Document document = new Document(PageSize.A4, 30, 30, 30, 30); //创建文档容器
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStream out = null;
//是否启用水印
Short effective = pdfWaterSet.getEffective();
Short isImg = pdfWaterSet.getIsImg();
try {
if (effective == 1 || isImg == 1) {
PdfWriter.getInstance(document, bos); //创建编写器PDF类型
} else {
out = new FileOutputStream(filePath);
PdfWriter.getInstance(document, out); //创建编写器PDF类型
}
//图片合成pdf
List<String> files = new ArrayList<>();
files.add(filePath);
imgToPdf(document, files);
if (effective == 1 || isImg == 1) {
addWaterMarkFont(bos, pdfWaterSet.getUpOrUnder(), pdfWaterSet.getTransparent(),
pdfWaterSet.getText(), pdfWaterSet.getTextX(), pdfWaterSet.getTextY(),
pdfWaterSet.getTextColor(), pdfWaterSet.getTextSize(), pdfWaterSet.getTextRotation(),
pdfWaterSet.getEffective(), pdfWaterSet.getIsImg(), pdfWaterSet.getImgFile(), pdfWaterSet.getImgWidth(),
pdfWaterSet.getImgHeight(), pdfWaterSet.getImgX(), pdfWaterSet.getImgY(), targetPath);
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
} finally {
try {
bos.flush();
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
document.close();
}
}
public static void imageToPdfFont(List<String> filePaths, EmrPdfWaterSet pdfWaterSet, String fileOutPath) { public static void imageToPdfFont(List<String> filePaths, EmrPdfWaterSet pdfWaterSet, String fileOutPath) {
Document document = new Document(PageSize.A4, 30, 30, 30, 30); //创建文档容器 Document document = new Document(PageSize.A4, 30, 30, 30, 30); //创建文档容器
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
@ -150,18 +188,13 @@ public class img2PdfUtil {
document.close(); document.close();
} }
} }
public static String addWatermarkPic1(File srcImgFile, EmrPdfWaterSet pdfWaterSet, String outPath) { public static String addWatermarkPic1(File srcImgFile, EmrPdfWaterSet pdfWaterSet, String outPath) {
java.awt.Image srcImg = null; java.awt.Image srcImg = null;
BufferedImage bufImg = null; BufferedImage bufImg = null;
Graphics2D g = null; Graphics2D g = null;
try { try {
srcImg = ImageIO.read(new FileInputStream(srcImgFile)); srcImg = ImageIO.read(srcImgFile);//文件转化为图片
if(null == srcImg){
IIORegistry registry = IIORegistry.getDefaultInstance();
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.tiff.TIFFImageWriterSpi());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReaderSpi());
srcImg = ImageIO.read(new FileInputStream(srcImgFile));
}
//System.out.println("读取图片"+(end-start)/1000.0+"s"); //System.out.println("读取图片"+(end-start)/1000.0+"s");
int srcImgWidth = srcImg.getWidth(null);//获取图片的宽 int srcImgWidth = srcImg.getWidth(null);//获取图片的宽
int srcImgHeight = srcImg.getHeight(null);//获取图片的高 int srcImgHeight = srcImg.getHeight(null);//获取图片的高
@ -202,7 +235,7 @@ public class img2PdfUtil {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
e.getMessage(); e.getMessage();
return outPath; return null;
} finally { } finally {
if (null != g) { if (null != g) {
g.dispose();// 释放资源*/ g.dispose();// 释放资源*/
@ -215,6 +248,7 @@ public class img2PdfUtil {
} }
} }
} }
//图片合成pdf //图片合成pdf
private static void imgToPdf(Document document, List<String> filePaths) throws Exception { private static void imgToPdf(Document document, List<String> filePaths) throws Exception {
document.open(); //打开容器 document.open(); //打开容器
@ -232,6 +266,7 @@ public class img2PdfUtil {
} else if ((w < A4_weight) && (h > A4_height)) { } else if ((w < A4_weight) && (h > A4_height)) {
percent = (A4_height * 100) / h; percent = (A4_height * 100) / h;
} else if ((w > A4_weight) && (h > A4_height)) { } else if ((w > A4_weight) && (h > A4_height)) {
percent = (A4_weight * 100) / w; percent = (A4_weight * 100) / w;
h = (h * percent) / 100; h = (h * percent) / 100;
if (h > A4_height) { if (h > A4_height) {
@ -249,6 +284,7 @@ public class img2PdfUtil {
} }
document.close(); //关闭容器 document.close(); //关闭容器
} }
/** /**
* *
* *
@ -372,7 +408,9 @@ public class img2PdfUtil {
// 加完水印的文件 // 加完水印的文件
stamper = new PdfStamper(reader, out); stamper = new PdfStamper(reader, out);
//设置不允许打印 //设置不允许打印
/*
stamper.setEncryption(null, null, ~(PdfWriter.ALLOW_COPY | PdfWriter.ALLOW_PRINTING ), PdfWriter.STANDARD_ENCRYPTION_128); stamper.setEncryption(null, null, ~(PdfWriter.ALLOW_COPY | PdfWriter.ALLOW_PRINTING ), PdfWriter.STANDARD_ENCRYPTION_128);
*/
// 设置字体 // 设置字体
BaseFont font = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED); BaseFont font = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
// PDF总页数 // PDF总页数
@ -449,9 +487,10 @@ public class img2PdfUtil {
/** /**
* Color * Color
*
* @param colorStr 16 * @param colorStr 16
* @return Color * @return Color
* */ */
private static Color toColorFromString(String colorStr) { private static Color toColorFromString(String colorStr) {
int r = Integer.valueOf(colorStr.substring(1, 3), 16); int r = Integer.valueOf(colorStr.substring(1, 3), 16);
int g = Integer.valueOf(colorStr.substring(3, 5), 16); int g = Integer.valueOf(colorStr.substring(3, 5), 16);
@ -494,4 +533,3 @@ public class img2PdfUtil {
return turnJpgFile; return turnJpgFile;
} }
} }

@ -385,6 +385,16 @@ public class CommomVo {
private Integer delCount;//病案图片已删除的个数 private Integer delCount;//病案图片已删除的个数
private String filePath2;//第二套图像存放地址
public String getFilePath2() {
return filePath2;
}
public void setFilePath2(String filePath2) {
this.filePath2 = filePath2;
}
public Integer getDelCount() { public Integer getDelCount() {
return delCount; return delCount;
} }

@ -0,0 +1,50 @@
package com.emr.vo.commomSearch;
/**
* @program: emr_record
* @description
* @author: wangsiyi
* @create: 2020-10-23 10:44
**/
public class ScanAssortVo {
private String oldPatientId;
private String newPatientId;
private String newAssortId;
private String scanPage;
public String getOldPatientId() {
return oldPatientId;
}
public void setOldPatientId(String oldPatientId) {
this.oldPatientId = oldPatientId;
}
public String getNewPatientId() {
return newPatientId;
}
public void setNewPatientId(String newPatientId) {
this.newPatientId = newPatientId;
}
public String getNewAssortId() {
return newAssortId;
}
public void setNewAssortId(String newAssortId) {
this.newAssortId = newAssortId;
}
public String getScanPage() {
return scanPage;
}
public void setScanPage(String scanPage) {
this.scanPage = scanPage;
}
}

@ -1,12 +1,12 @@
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 #power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
POWER_IP = 192.168.1.3 POWER_IP = localhost
POWER_URLHEAD = http://192.168.1.3:8080/power POWER_URLHEAD = http://localhost:8081/power
POWER_JSPHEAD = 192.168.1.3 POWER_JSPHEAD = localhost
POWER_JSP = http://192.168.1.3:8080/power POWER_JSP = http://localhost:8081/power
#\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 #\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
EMR_RECORD_JSP = http://192.168.1.3:8080/emr_record EMR_RECORD_JSP = http://localhost:8083/emr_record
#webSocket\u670D\u52A1\u5668\u5730\u5740 #webSocket\u670D\u52A1\u5668\u5730\u5740
@ -29,3 +29,5 @@ picPath = static/pdfWaterSet/upload/
#1\u751F\u6210\u52A0\u4E0A\u6C34\u5370\u540E\u7684\u56FE\u7247\u7684\u66F4\u76EE\u5F55 #1\u751F\u6210\u52A0\u4E0A\u6C34\u5370\u540E\u7684\u56FE\u7247\u7684\u66F4\u76EE\u5F55
#2\u9884\u89C8\u75C5\u6848\u63A5\u53E3pdf\u4E34\u65F6\u751F\u6210\u76EE\u5F55 #2\u9884\u89C8\u75C5\u6848\u63A5\u53E3pdf\u4E34\u65F6\u751F\u6210\u76EE\u5F55
waterPicPath = D:/jiashi/reload/ waterPicPath = D:/jiashi/reload/
waterTifToJpgPath = D:/jiashi/tifToJpgLoad/

@ -1262,12 +1262,8 @@
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept
from commomtable from commomtable
where inpatient_no like '%${inpatientNo}%' where inpatient_no like '%${inpatientNo}%'
order by admiss_times desc
</select> </select>
<!--<select id="selectCommomCount" parameterType="java.lang.Integer">
select
COUNT(*)
FROM dbo.commomtable
</select>-->
<select id="selectCommomCount" resultType="java.lang.Integer"> <select id="selectCommomCount" resultType="java.lang.Integer">
SELECT SELECT
COUNT(1) COUNT(1)

@ -315,10 +315,12 @@
a.dis_date, a.dis_date,
a.approve_notes, a.approve_notes,
a.patient_id, a.patient_id,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交' END apply_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交'
END apply_state,
a.approver, a.approver,
a.approve_time, a.approve_time,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' END approve_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN
'审核不通过' WHEN approve_state is null THEN '待审批' END approve_state,
c.name, c.name,
CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus
FROM FROM
@ -371,10 +373,13 @@
AND a.apply_type = ${record.applyType} AND a.apply_type = ${record.applyType}
</if> </if>
<if test="record.applyState != '' and record.applyState != null"> <if test="record.applyState != '' and record.applyState != null">
AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交' END) = #{record.applyState} AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2'
THEN '已提交' END) = #{record.applyState}
</if> </if>
<if test="record.approveState != '' and record.approveState != null"> <if test="record.approveState != '' and record.approveState != null">
AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END) = #{record.approveState} AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN
approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批'
END) = #{record.approveState}
</if> </if>
</where> </where>
ORDER BY a.apply_time DESC ORDER BY a.apply_time DESC
@ -395,10 +400,12 @@
a.dis_date, a.dis_date,
a.approve_notes, a.approve_notes,
a.patient_id, a.patient_id,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交' END apply_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交'
END apply_state,
a.approver, a.approver,
a.approve_time, a.approve_time,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN
'审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state,
c.name, c.name,
CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus
FROM FROM
@ -451,15 +458,17 @@
AND a.apply_type = ${record.applyType} AND a.apply_type = ${record.applyType}
</if> </if>
<if test="record.applyState != '' and record.applyState != null"> <if test="record.applyState != '' and record.applyState != null">
AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2' THEN '已提交' END) = #{record.applyState} AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state='1' THEN '未提交' WHEN apply_state='2'
THEN '已提交' END) = #{record.applyState}
</if> </if>
<if test="record.approveState != '' and record.approveState != null"> <if test="record.approveState != '' and record.approveState != null">
AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END) = #{record.approveState} AND (CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = '1' THEN '审核通过' WHEN
approve_state='2' THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批'
END) = #{record.approveState}
</if> </if>
</where> </where>
ORDER BY a.apply_time DESC ORDER BY a.apply_time DESC
</select> </select>
<!--根据id查询包括患者姓名的申请对象--> <!--根据id查询包括患者姓名的申请对象-->
<select id="selectApproveById" resultMap="BaseResultMap"> <select id="selectApproveById" resultMap="BaseResultMap">
SELECT SELECT
@ -532,10 +541,12 @@
a.inpatient_no, a.inpatient_no,
a.admiss_times, a.admiss_times,
a.approve_notes, a.approve_notes,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state=1 THEN '未提交' WHEN apply_state=2 THEN '已提交' END apply_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN apply_state=1 THEN '未提交' WHEN apply_state=2 THEN '已提交' END
apply_state,
a.approver, a.approver,
a.approve_time, a.approve_time,
CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = 1 THEN '审核通过' WHEN approve_state=2 THEN '审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state, CASE WHEN effe_time &lt;= GETDATE() THEN '已过期' WHEN approve_state = 1 THEN '审核通过' WHEN approve_state=2 THEN
'审核不通过' WHEN approve_state is null THEN '待审批' WHEN approve_state = '' THEN '待审批' END approve_state,
c.name, c.name,
CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus
FROM FROM
@ -557,8 +568,6 @@
AND a.id IN (${checks}) AND a.id IN (${checks})
</where> </where>
</select> </select>
<!--批量插入--> <!--批量插入-->
<insert id="SimpleInsert" parameterType="java.util.List"> <insert id="SimpleInsert" parameterType="java.util.List">
INSERT INTO INSERT INTO
@ -570,8 +579,10 @@
<foreach collection="list" item="item" separator="union"> <foreach collection="list" item="item" separator="union">
select #{item.applyer,jdbcType=NVARCHAR}, #{item.applyTime,jdbcType=NCHAR}, select #{item.applyer,jdbcType=NVARCHAR}, #{item.applyTime,jdbcType=NCHAR},
#{item.effeTime,jdbcType=NCHAR}, #{item.effeDays,jdbcType=INTEGER}, #{item.applyType,jdbcType=NVARCHAR}, #{item.effeTime,jdbcType=NCHAR}, #{item.effeDays,jdbcType=INTEGER}, #{item.applyType,jdbcType=NVARCHAR},
#{item.applyReason,jdbcType=NVARCHAR}, #{item.applyState,jdbcType=NVARCHAR}, #{item.approver,jdbcType=NVARCHAR}, #{item.applyReason,jdbcType=NVARCHAR}, #{item.applyState,jdbcType=NVARCHAR},
#{item.approveTime,jdbcType=NCHAR}, #{item.approveState,jdbcType=NVARCHAR}, #{item.approveNotes,jdbcType=NVARCHAR}, #{item.approver,jdbcType=NVARCHAR},
#{item.approveTime,jdbcType=NCHAR}, #{item.approveState,jdbcType=NVARCHAR},
#{item.approveNotes,jdbcType=NVARCHAR},
#{item.patientId,jdbcType=VARCHAR}, #{item.admissId,jdbcType=CHAR}, #{item.inpatientNo,jdbcType=CHAR}, #{item.patientId,jdbcType=VARCHAR}, #{item.admissId,jdbcType=CHAR}, #{item.inpatientNo,jdbcType=CHAR},
#{item.admissTimes,jdbcType=SMALLINT}, #{item.disDate,jdbcType=TIMESTAMP} #{item.admissTimes,jdbcType=SMALLINT}, #{item.disDate,jdbcType=TIMESTAMP}
</foreach> </foreach>
@ -667,4 +678,12 @@
AND ( approve_state IS NULL OR approve_state = '' ) AND ( approve_state IS NULL OR approve_state = '' )
AND ( emr_lock.lock_state = 0 OR emr_lock.lock_state IS NULL ) AND ( emr_lock.lock_state = 0 OR emr_lock.lock_state IS NULL )
</select> </select>
<select id="selectByApplyerAndPatientId" resultMap="BaseResultMap" parameterType="java.lang.String">
select top 1 *
from emr_apply_approve
where applyer = #{userName}
and patient_id = #{patientId}
and apply_type = 4
order by id desc
</select>
</mapper> </mapper>

@ -67,4 +67,16 @@
ORDER BY ORDER BY
dbo.zd_assort.assort_sort dbo.zd_assort.assort_sort
</select> </select>
<update id="updateScanFileByPatientIdAndScanPage" parameterType="java.lang.String">
${sql}
</update>
<select id="selectCountPh" resultType="java.lang.Integer">
SELECT COUNT(*) FROM dbo.t_gdh_index GROUP BY ph
</select>
<select id="selectCountPdf" resultType="java.lang.Integer">
SELECT COUNT(*) FROM dbo.t_scan_assort
</select>
</mapper> </mapper>

@ -162,6 +162,28 @@
</where> </where>
ORDER BY create_date DESC,log_id DESC ORDER BY create_date DESC,log_id DESC
</select> </select>
<select id="selectAllByFont" resultMap="BaseResultMap">
SELECT
*
FROM
emr_log
WHERE
log_title Like '%接口%'
<if test="record.logContent != '' and record.logContent != null">
AND log_content LIKE '%${record.logContent}%'
</if>
<if test="record.creater != '' and record.creater != null">
AND creater LIKE '%${record.creater}%'
</if>
<if test="startTime != '' and startTime != null">
AND create_date >= #{startTime}
</if>
<if test="endTime != '' and endTime != null">
AND create_date &lt;= #{endTime}
</if>
AND sys_flag = 'emr_record'
ORDER BY create_date DESC,log_id DESC
</select>
<select id="selectObjectByKey" resultType="java.util.Map"> <select id="selectObjectByKey" resultType="java.util.Map">
select * from ${tableName} where ${whereSql} select * from ${tableName} where ${whereSql}
</select> </select>

@ -526,13 +526,11 @@
</div> </div>
</div> </div>
<script> <script>
/*$(function () {
$(".modal-dialog").draggable();//为模态对话框添加拖拽
})*/
var time = new Date().getTime(); var time = new Date().getTime();
document.write('<script src="${path}/static/js/approveManage/approveList/approveList174.js?t=' + time + '"><\/script>') document.write('<script src="${path}/static/js/approveManage/approveList/approveList174.js?t=' + time + '"><\/script>')
document.write('<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js?t=' + time + '"><\/script>') document.write('<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js?t=' + time + '"><\/script>')
document.write('<script src="${path}/static/js/approveManage/approveList/approveSaveCommomMethod.js?t=' + time + '"><\/script>') document.write('<script src="${path}/static/js/approveManage/approveList/approveSaveCommomMethod.js?t=' + time + '"><\/script>')
document.write('<script src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js?t=' + time + '"><\/script>')
document.write('<script src="${path}/static/js/dateUtil.js?t=' + time + '"><\/script>') document.write('<script src="${path}/static/js/dateUtil.js?t=' + time + '"><\/script>')
document.write('<script src="${path}/static/js/commom.js?t=' + time + '"><\/script>') document.write('<script src="${path}/static/js/commom.js?t=' + time + '"><\/script>')
</script> </script>
@ -543,3 +541,4 @@
<script src="${path}/static/js/dateUtil.js"></script>--%> <script src="${path}/static/js/dateUtil.js"></script>--%>
</body> </body>
</html> </html>

@ -521,7 +521,7 @@
</script> </script>
<script src="${path}/static/js/approveManage/collection/collectManage174.js?t=2019-11-20"></script> <script src="${path}/static/js/approveManage/collection/collectManage174.js?t=2019-11-20"></script>
<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script> <script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script src="${path}/static/js/approveManage/approveList/approveSaveCommomMethod.js"></script> <script src="${path}/static/js/approveManage/approveList/approveSaveCommomMethodBlood.js"></script>
<script src="${path}/static/js/dateUtil.js"></script> <script src="${path}/static/js/dateUtil.js"></script>
</body> </body>
</html> </html>

@ -0,0 +1,720 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>常用查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css">
<link href="${path}/static/bootstrap-3.3.7/bower_components/select2/dist/css/select2.min.css" rel="stylesheet"/>
<script type="text/javascript"
src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script>
<script type="text/javascript" src="${path}/static/js/pinying.js"></script>
<script src="${path}/static/bootstrap-3.3.7/bower_components/select2/dist/js/select2.min.js"></script>
<script>
var path = "${path}";\
console.log(path);
</script>
<style type="text/css">
.labelDiv {
padding-top: 2%;
padding-right: 0;
text-align: right;
}
.radioDiv {
padding-top: 2%;
}
.btns {
background-color: #fff;
text-align: right;
margin-top: -15px;
margin-bottom: 5px;
}
.btn {
margin-left: -1%;
}
/*tableDiv*/
.tableDiv {
/*margin-top: 1%;*/
width: 100%;
background-color: #fff;
}
/*多选下拉框*/
.dropdown-menu {
position: absolute;
top: 103%;
left: 0;
z-index: 1000;
display: none;
float: left;
list-style: none;
text-shadow: none;
max-height: 400px;
/*设置最大高度为400 overflow: scroll;*/
/* 设置可滚动 padding: 5 px;*/
margin: 0px;
-webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 8px rgba(120, 234, 61, 0.55);
font-size: 12px;
font-family: "Segoe UI", Helvetica, Arial, sans-serif;
border: 1px solid #ddd;
}
.TableView {
margin-left: 2%;
}
.form-group {
width: 110%;
}
/**级联病案号内容*/
.mouseOver {
background-color: #708090;
color: #FFFAFA;
}
.mouseOut {
background-color: #FFFAFA;
color: #000000;
}
/*模态框头*/
.modal-header {
background-color: #199ED8;
text-align: center;
}
/*搜索按钮div*/
.searchDiv {
margin-left: 33px;
}
/*清空按钮div*/
.clearDiv {
margin-left: 16px;
}
.col-sm-1, .col-sm-4 {
padding-left: 0 !important;
}
label {
font-weight: normal !important;
}
/**表格鼠标悬停样式*/
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
cursor: pointer;
}
.fht-cell {
width: 85px !important;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
cursor: pointer;
}
.checkBoxClass {
cursor: pointer;
}
.row {
width: 100%;
}
.bootstrap-select {
margin-left: 3px !important;
height: 30px !important;
line-height: 30px !important;
}
form {
margin-bottom: 0 !important;
}
</style>
</head>
<body>
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
常用查询
</span>
</div>
</div>
<!--搜索区-->
<div class="panel-group" id="accordion">
<div class="panel">
<div class="panel-heading" style="padding:0px 14px!important;">
<h5>
<a data-toggle="collapse" href="#b">
可收缩
</a>
</h5>
</div>
<div id="b" class="panel-collapse collapse in">
<div class="panel-body">
<form>
<!--查询的sql-->
<input type="hidden" id="sql">
<!--查询的菜单权限-->
<input type="hidden" id="powerMenu">
<!--登录者Id-->
<input type="hidden" id="userId" value="${CURRENT_USER.userId}">
<input type="hidden" id="roleId" value="${CURRENT_USER.roleId}">
<input type="hidden" id="userName" value="${CURRENT_USER.userName}">
<input type="hidden" id="powerMenus" value="${power_menus}">
<input type="hidden" id="showRecord" value="${CURRENT_USER.userTel}">
<input type="hidden" id="downloadRecord" value="${CURRENT_USER.userEmail}">
<input type="hidden" id="showPrint" value="${CURRENT_USER.userAge}">
<input type="hidden" id="flag" value="file_path">
<input type="hidden" id="cuserName" value="${cuserName}">
<!--查询的sql ORDER BY 语句-->
<input type="hidden" id="orderBys" value=" order by commomtable.name">
<!--该用户借阅申请的审批过了且未过期的病案不可重复申请可查看的病案主键patientId-->
<input type="hidden" id="approves">
<!--该用户下载申请的审批过了且未过期的病案不可重复申请可查看的病案主键patientId-->
<input type="hidden" id="loads">
<!--被锁的病案-->
<input type="hidden" id="locks">
<!--按条件搜索的patientIds-->
<input type="hidden" id="patientIds">
<!--类似自定义查询的搜索条件-->
<div id="block">
<div id="inputDiv">
<input type="hidden">
</div>
</div>
<!--表格头-->
<input type="hidden" id="tableThNames"
value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术">
<!--查询字段-->
<input type="hidden" id="englishFields"
value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper">
<!--数据字段-->
<input type="hidden" id="fields"
value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper">
<!--显示字段-->
<input type="hidden" id="fieldCns">
<!--查询总行数-->
<input type="hidden" id="rows">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">姓名:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="name"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">年龄:</label>
</div>
<div style="float:left;width:20%;margin-left:4%">
<input type="number" class="form-control input-sm inputValue" id="age1" min="0"
oninput="if(value.length>9)value=value.slice(0,9)">
</div>
<div style="float:left;width:3%;margin-left:2%">-</div>
<div style="float:left;width:20%">
<input type="number" class="form-control input-sm inputValue" id="age2" min="0"
oninput="if(value.length>9)value=value.slice(0,9)">
</div>
<div style="float:left;width:20%;margin-left:2%">
<select class="form-control input-sm" id="ageType">
<option value="1">岁</option>
<option value="2">月</option>
<option value="3">日</option>
</select>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-2 labelDiv">
<label class="control-label">性别:</label>
</div>
<div class="col-sm-3 radioDiv">
<input type="radio" id="all" name="sex" checked value="" class="sexInput"><label
for="all" class="checkBoxClass">全部</label>
</div>
<div id="sex"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">病案号:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
onkeyup="getInpatientNoContents('inpatient_no')"
onfocus="getInpatientNoContents('inpatient_no')"
onblur="clearContent('inpatient_no')">
<div id="inpatient_noDiv" style="position: absolute;z-index: 2000">
<table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="inpatient_noContent"></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">ID号</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="admiss_id"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">出院科室:</label>
</div>
<div class="col-sm-9 inputDiv">
<select class="selectpicker form-control input-sm inputValue" multiple
id="dis_dept" style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">主诊转归:</label>
</div>
<div class="col-sm-8 inputDiv">
<select class="form-control input-sm inputValue" id="dis_thing">
</select>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">入院日期:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime1"
style="margin-left: 15px" autocomplete="off">
</div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="endTime1"
autocomplete="off">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">出院日期:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime2"
style="margin-left: 15px" autocomplete="off">
</div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="endTime2"
autocomplete="off">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">主诊ICD码</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_code" onkeyup="getDiagCodeContents('diag_code')"
onfocus="getDiagCodeContents('diag_code')"
onblur="clearContent('diag_code')" maxlength="16">
<div id="diag_codeDiv" style="position: absolute;z-index: 2000">
<table id="diag_codeContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="diag_codeContent"></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">主诊名称:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="diag_name" onkeyup="getDiagNameContents('diag_name')"
onfocus="getDiagNameContents('diag_name')"
onblur="clearContent('diag_name')" maxlength="16">
<div id="diag_nameDiv" style="position: absolute;z-index: 2000">
<table id="diag_nameContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="diag_nameContent"></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">主诊编码范围:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="diag_code1"
style="margin-left: 15px">
</div>
<div class="col-sm-1" style="padding-top:2%;">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="diag_code2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">手术编码:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_code" onkeyup="getOperateCodeContents('operate_code')"
onfocus="getOperateCodeContents('operate_code')"
onblur="clearContent('operate_code')" maxlength="16">
<div id="operate_codeDiv" style="position: absolute;z-index: 2000">
<table id="operate_codeContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="operate_codeContent"></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">手术名称:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_name" onkeyup="getOperateNameContents('operate_name')"
onfocus="getOperateNameContents('operate_name')"
onblur="clearContent('operate_name')" maxlength="16">
<div id="operate_nameDiv" style="position: absolute;z-index: 2000">
<table id="operate_nameContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="operate_nameContent"></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">手术编码范围:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="operate_code1"
style="margin-left: 15px">
</div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="operate_code2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">其他诊断:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm otherTable diagTable inputValue"
id="other_diag_name" maxlength="100">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">病理诊断:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="pathology_name" maxlength="100">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">其他诊断码范围:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue"
id="other_diag_name1" style="margin-left: 15px">
</div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue"
id="other_diag_name2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">全部诊断:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="all_diag_name" maxlength="100">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">损伤中毒:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="poisoning_name" maxlength="100">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">主治医生:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="attending" maxlength="6">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">科主任:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="dept_director" maxlength="6">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">主任(副主任)</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="director" maxlength="6">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">住院医师:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="admiss_doctor" maxlength="100">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv"></div>
<div class="col-sm-8 inputDiv">
<input type="checkbox" id="isOper"
class="otherTable operTable isOperInput"><label for="isOper"
class="checkBoxClass">限手术</label>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="btns">
<div class="btn">
<button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button>
</div>
<div class="btn">
<button type="button" class="btn btn-sm btn-default" onclick="clearForm()">&nbsp;&nbsp;清&nbsp;&nbsp;空&nbsp;&nbsp;</button>
</div>
<div class="btn" id="borrowingsBox">
<button type="button" class="btn btn-sm btn-primary" id="borrowings" onclick="borrowings()">批量借阅申请
</button>
</div>
<div class="btn">
<button type="button" class="btn btn-sm btn-default" data-toggle="modal" data-target="#myModal2" onclick="clearForm()">申请信息查询</button>
</div>
</div>
<!--数据表格-->
<div id="tableDiv" class="table-responsive tableDiv table-hover" style="overflow:scroll;">
<table id="mytab" class="table text-nowrap table-bordered" data-toggle="table" data-height="200">
</table>
</div>
<!-- 模态框1Modal借阅申请 -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
申请信息
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<!--隐藏申请过的集合input Id-->
<input type="hidden" name="formToken" id="formToken" value="${formToken}">
<input type="hidden" id="checks">
<input type="hidden" id="typeId">
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">有效时间:</label>
<div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="effeTime" name="effeTime"
maxlength="10" autocomplete="off">
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请类型:</label>
<div class="col-sm-7">
<input class="form-control input-sm input" name="applyType"
id="applyType" value="接口借阅申请" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请理由:</label>
<div class="col-sm-7">
<textarea class="form-control input-sm input" id="applyReason" name="applyReason"
maxlength="250"></textarea>
</div>
<div class="col-sm-1"></div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-sm btn-primary" onclick="addApprove()">
确认提交
</button>
</div>
</div>
</div>
</div>
<!-- 模态框2Modal申请查询 -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font size="30">&times;</font></button>
<h4 class="modal-title" style="font-weight: bold">申请信息</h4>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/font/commomListSouth.js"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
<script type="text/javascript" src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>
</body>
</html>

@ -47,6 +47,7 @@
</head> </head>
<body> <body>
<input type="hidden" id="inpatientNo" value="${inpatientNo}"> <input type="hidden" id="inpatientNo" value="${inpatientNo}">
<input type="hidden" id="userName" value="${userName}">
<div class="main"> <div class="main">
<div class="headDiv"> <div class="headDiv">
<div class="headSpanDiv"> <div class="headSpanDiv">

@ -0,0 +1,139 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>预览列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script src="${path}/static/js/html5shiv.js"></script>
<script src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<script>
var path = "${path}";
</script>
<style type="text/css">
body {
margin-right: -15px;
margin-bottom: -15px;
}
.mainDiv{
background-color: #fff;
height:100%;
}
.tableDiv{
width: 100%;
height: 90%;
background-color: #fff;
margin-left: 1%;
padding-top:5px;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
cursor: pointer;
}
</style>
</head>
<body>
<input type="hidden" id="inpatientNo" value="${inpatientNo}">
<input type="hidden" id="userName" value="${userName}">
<input type="hidden" id="deptName" value="${deptName}">
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
预览列表
</span>
</div>
</div>
<div class="mainDiv">
<!--数据表格-->
<div id="tableDiv" class="tableDiv table-responsive table-hover">
<table id="mytab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
</div>
<!-- 模态框1Modal借阅申请 -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
申请信息
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<input type="hidden" name="formToken" id="formToken" value="${formToken}">
<input type="hidden" id="check">
<input type="hidden" id="approveId">
<!--隐藏申请过的集合input Id-->
<input type="hidden" id="typeId">
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">有效时间:</label>
<div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="effeTime" name="effeTime"
maxlength="10" autocomplete="off">
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请类型:</label>
<div class="col-sm-7">
<input class="form-control input-sm input" name="applyType"
id="applyType" value="接口借阅申请" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请理由:</label>
<div class="col-sm-7">
<textarea class="form-control input-sm input" id="applyReason" name="applyReason"
maxlength="250"></textarea>
</div>
<div class="col-sm-1"></div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-sm btn-primary" onclick="addApprove()">
确认提交
</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/font/recordListSouth.js"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js"></script>
<script type="text/javascript" src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
</body>
</html>

@ -22,7 +22,7 @@
onselect=document.selection.empty()> onselect=document.selection.empty()>
<div> <div>
<p style="margin-top:-50px;margin-bottom:0px;" media="print" class="noprint"> <p style="margin-top:-50px;margin-bottom:0px;" media="print" class="noprint">
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" id="Pdf1" width="100%" height="120%" media="print" <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" id="Pdf1" width="100%" height="800px;" media="print"
oncontextmenu="return false" oncontextmenu="return false"
ondragstart="return false" ondragstart="return false"
onselectstart="return false" onselectstart="return false"

@ -0,0 +1,184 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>预览PDF</title>
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<!--[if lt IE 9]>
<script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script src="${path}/static/js/html5shiv.js"></script>
<script src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<link rel="shortcut icon" href="${path}/static/js/favicon.ico">
<link rel="stylesheet" href="${path}/static/css/comm.css"/>
<script src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script>
var path = "${path}";
</script>
<style type="text/css">
html,body{
width:100%;
height:100%;
margin:0;
padding:0;
background-color: #F2F2F2;
}
.searchDiv{
width:100%;
height:87px;
background-color: #FFF;
}
.contentDiv{
width:100%;
height:calc(100% - 135px);
margin-top:5px;
background-color: #FFF;
}
.labelDiv{
width:41.66%;
text-align: right;
float: left;
margin-top: 5px;
}
.textInputDiv{
width:58.33%;
float: left;
}
.rowDiv{
padding-top:10px;
width:100%;
height:30px;
}
.inputDiv{
width:24%;
float: left;
}
h4{
color: #fff;
font-size: 1.0em;
font-weight: bold;
}
hr{
margin:0!important;
}
.seal-result{
width: 60px;
height: 60px;
transform: rotate(30deg);
border: solid 2px red;
border-radius: 100%;
text-align: center;
color: red;
font-size: 16px;
font-weight: bold;
line-height: 60px;
left: 20%;
top: 6%;
position: absolute;
background-color: rgba(255,255,255,0.8);
z-index: 1000;
}
.main{
width: 100%;
height:100%;
background-color: #c1d7e3;
}
</style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<input hidden type="hidden" id="patientId" value="${patientId}">
<input type="hidden" id="userName" value="${userName}">
<input type="hidden" id="deptName" value="${deptName}">
<!--174、祈福医院扫描图片存放根目录的字段-->
<input hidden type="hidden" id="flag" value="file_path">
<!--存放扫描图片和新上传图片根目录的集合-->
<input hidden type="hidden" id="rootPaths">
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
病案浏览
</span>
</div>
</div>
<!--病案详情-->
<div class="searchDiv">
<input type="hidden" id="admissId" value="${commom.admissId}">
<div class="rowDiv">
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">病案号:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input input-sm inpatientNo" id="inpatientNo" onmouseover="this.title=this.value">
</div>
</div>
</div>
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">姓名:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input-sm input" id="name">
</div>
</div>
</div>
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">住院次数:</label>
<div class="textInputDiv">
<select class="form-control input input-sm admissTimes" id="admissTimes" disabled></select>
</div>
<div type="hidden" id="admissTimesValue"></div>
</div>
</div>
<c:if test="${printCount == '1'}">
<div class="seal-result">已打印</div>
</c:if>
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">出院日期:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input-sm input" id="disDate">
</div>
</div>
</div>
</div>
<div class="rowDiv" style="padding-top:20px;">
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">出院科室:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input-sm input" id="disDeptName">
</div>
</div>
</div>
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">主要诊断:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input-sm input" id="diagName">
</div>
</div>
</div>
<div class="inputDiv">
<div class="form-group">
<label class="control-label labelDiv">其他诊断:</label>
<div class="textInputDiv">
<input type="text" readonly class="form-control input-sm input otherDiagName" id="otherDiagName">
</div>
</div>
</div>
</div>
</div>
<div class="contentDiv">
<iframe width="100%" height="100%" src="" id="iframe" frameborder="0" scrolling="no"></iframe>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/font/showRecordFontSouth.js"></script>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script>
</body>
</html>

@ -52,7 +52,7 @@
} }
.loading { .loading {
width: 160px; width: 160px;
height: 56px; height:100%;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;

@ -0,0 +1,115 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>预览pdfIframe页面</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<%--<%@ include file="/WEB-INF/jspf/common.jspf" %>--%>
<link rel="stylesheet" href="${path}/static/css/comm.css"/>
<link rel="stylesheet" href="${path}/static/js/font/style.min.css" />
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script src="${path}/static/js/font/jstree.min.js"></script>
<script>
var path = "${path}";
</script>
<style type="text/css">
html,body{
width:100%;
height:100%;
margin:0;
padding:0;
background-color: #F2F2F2;
}
.content-left{
height:100%;
width:23%;
float:left;
background-color: #FFFFFF;
overflow-y: auto;
}
.content-right{
height:100%;
width:76%;
float:right;
padding-left:5px;
background-color: #FFFFFF;
}
.btnDiv{
text-align: right;
}
.btn{
background-color: #1D9ED7;
}
.loading {
width: 160px;
height: 56px;
position: absolute;
top: 50%;
left: 50%;
line-height: 56px;
color: #fff;
padding-left: 60px;
font-size: 15px;
background: #000;
opacity: 0.7;
z-index: 9999;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
}
</style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<div id="myModal" class="modal fade" data-keyboard="false"
data-backdrop="static" data-role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div id="loading1" class="loading">加载中。。。</div>
</div>
<input hidden type="hidden" id="patientId" value="${patientId}">
<input type="hidden" id="userName" value="${userName}">
<input type="hidden" id="deptName" value="${deptName}">
<!--初始化及树复选框勾选的文件名称集合-->
<input hidden type="hidden" id="assortIds">
<!--初始化及树复选框勾选的文件来源集合-->
<input hidden type="hidden" id="sources">
<!--树节点点击选中的文件名称-->
<input hidden type="hidden" id="assortIdByClick">
<!--树节点点击选中的文件来源-->
<input hidden type="hidden" id="sourceByClick">
<input hidden type="hidden" id="flag" value="${flag}">
<!--是否有打印权限-->
<input hidden type="hidden" id="print" value="${printFlag}">
<!--文件路径-->
<input hidden type="hidden" id="filePath">
<!--定义iframe1加载完成标识-->
<input hidden type="hidden" id="iframeLoad">
<!--定义打印预览的图片加载完成标识-->
<input hidden type="hidden" id="printPicLoaded">
<!--定义打印预览的图片加载进度-->
<input type="hidden" id="loading">
<div class="content-left">
<div class="form-group">
<div class="btnDiv">
<button type="button" class="btn" onclick="onloadPdf()">加载PDF</button>
</div>
<div id="data" class="demo"></div>
</div>
</div>
<div class="content-right">
<iframe width="100%" height="100%" src="" id="iframe1" frameborder="0" onkeydown="disabledPrint()"></iframe>
</div>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeSouthFont.js"></script>
<script type="text/javascript" src="${path}/static/js/font/showRecordIframeBloodCommom.js"></script>
</body>
</html>

@ -0,0 +1,163 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>其他管理</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
.mainDiv {
background-color: #fff;
}
/**搜索区*/
.searchDiv {
padding-top: 10px;
width: 100%;
height: 30px;
}
.dateSearchDiv {
width: 29%;
}
.dateSearchInput {
width: 30%;
margin-left: 5px;
}
.dateLabelDiv {
width: 30%;
text-align: right;
}
.searchInput {
width: 21%;
margin-left: 5px;
text-align: right;
}
.searchElement {
width: 40%;
}
.searchInputElement {
width: 60%;
}
.labelDiv {
padding-top: 4%;
margin-left: 2%;
}
/**查询按钮组*/
.btnsDiv {
margin-top: 15px;
height: 35px;
text-align: right;
margin-right: 25px;
}
.btns {
margin-left: 2%;
}
/**表格div*/
.tableDiv {
margin-left: 1%;
margin-top: -15px;
}
</style>
</head>
<body>
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
接口日志管理
</span>
</div>
</div>
<div class="mainDiv">
<div class="searchDiv">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">日志主题:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="logTitle">
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">日志内容:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="logContent">
</div>
</div>
<div class="searchInput left">
<div class="searchElement left">
<label class="labelDiv">操作人:</label>
</div>
<div class="searchInputElement left">
<input type="text" class="form-control input-sm" id="creater">
</div>
</div>
<div class="dateSearchDiv left">
<div class="dateLabelDiv left">
<label class="labelDiv">操作时间:</label>
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="startTime1" placeholder="开始时间"
autocomplete="off">
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="endTime1" placeholder="结束时间"
autocomplete="off">
</div>
</div>
<div class="left">
<button type="button" class="btn btn-sm btn-primary" onclick="refreshTable()">查询</button>
</div>
</div>
<div class="btnsDiv">
<shiro:hasPermission name="/otherManage/exportExcel">
<button type="button" class="btn btn-sm btn-primary btns" onclick="exportExcel()"><i
class="fa fa-reply"></i>导出
</button>
</shiro:hasPermission>
<shiro:hasPermission name="/otherManage/deleteLogByIds">
<button type="button" class="btn btn-sm btn-danger btns" onclick="deleteLogByIds()">批量删除</button>
</shiro:hasPermission>
</div>
<!--数据表格-->
<div id="tableDiv" class="tableDiv">
<input type="hidden" id="checks">
<table id="mytab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
<%-- <div class="tab-pane fade" id="tab3">
<p>通知管理</p>
</div>
</div>--%>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/otherManage/interfaceDatabase.js"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
</body>
</html>

@ -27,39 +27,48 @@
margin-right: -15px; margin-right: -15px;
margin-bottom: -15px; margin-bottom: -15px;
} }
.mainDiv { .mainDiv {
background-color: #fff; background-color: #fff;
} }
.timeShow { .timeShow {
height: 50px; height: 50px;
} }
.colorBack1 { .colorBack1 {
width: 29%; width: 29%;
height: 13%; height: 13%;
float: left; float: left;
border-radius: 60px; border-radius: 60px;
} }
.colorBack2 { .colorBack2 {
width: 30%; width: 30%;
height: 12%; height: 12%;
float: left; float: left;
border-radius: 60px; border-radius: 60px;
} }
.textBack1 { .textBack1 {
margin-top: 17%; margin-top: 17%;
} }
.textBack2 { .textBack2 {
margin-top: 15%; margin-top: 15%;
} }
.textNum { .textNum {
font-size: 18px; font-size: 18px;
} }
.welcomeInfo { .welcomeInfo {
float: left; float: left;
margin-right: 5%; margin-right: 5%;
color: #2aabd2; color: #2aabd2;
font-size: 22px; font-size: 22px;
} }
.companyInfo { .companyInfo {
margin-top: 8px; margin-top: 8px;
color: #2aabd2; color: #2aabd2;
@ -120,6 +129,7 @@
<div class="row" style="margin-top: 40px;"> <div class="row" style="margin-top: 40px;">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 col-md-offset-2">
<div class="col-md-4"> <div class="col-md-4">
<a onclick="pdfDownloadClick()" style="cursor: pointer">
<div class="colorBack2" style="background: #00a65a;"></div> <div class="colorBack2" style="background: #00a65a;"></div>
<div class="textBack2"> <div class="textBack2">
<div class="textNum" style="color: #00a65a"> <div class="textNum" style="color: #00a65a">
@ -129,6 +139,7 @@
下载量 下载量
</div> </div>
</div> </div>
</a>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="colorBack2" style="background: #027dc1;"></div> <div class="colorBack2" style="background: #027dc1;"></div>
@ -154,6 +165,32 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 25px;">
<div class="col-md-6 col-md-offset-3">
<div class="col-md-6">
<div class="colorBack1" style="background: #F1D031;"></div>
<div class="textBack1">
<div class="textNum" style="color: #F1D031">
<strong>${phCount}</strong>
</div>
<div class="text">
病案总盘数
</div>
</div>
</div>
<div class="col-md-6">
<div class="colorBack1" style="background: #ff5500;"></div>
<div class="textBack1">
<div class="textNum" style="color: #ff5500">
${pdfCount}
</div>
<div>
病案图像总数
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<script type="text/javascript" src="${path}/static/js/otherManage/monitoringCenter.js"></script> <script type="text/javascript" src="${path}/static/js/otherManage/monitoringCenter.js"></script>

@ -80,9 +80,11 @@
font-family: "Segoe UI", Helvetica, Arial, sans-serif; font-family: "Segoe UI", Helvetica, Arial, sans-serif;
border: 1px solid #ddd; border: 1px solid #ddd;
} }
.TableView { .TableView {
margin-left: 2%; margin-left: 2%;
} }
.form-group { .form-group {
width: 110%; width: 110%;
} }
@ -330,13 +332,17 @@
<label class="control-label">入院日期:</label> <label class="control-label">入院日期:</label>
</div> </div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime1" style="margin-left: 15px" autocomplete="off"> <input type="text" class="form-control input-sm inputValue" id="startTime1"
style="margin-left: 15px" autocomplete="off">
</div> </div>
<div class="col-sm-1" style="padding-top:2%"> <div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div> </div>
</div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="endTime1" autocomplete="off"> <input type="text" class="form-control input-sm inputValue" id="endTime1"
autocomplete="off">
</div> </div>
</div> </div>
</div> </div>
@ -346,13 +352,17 @@
<label class="control-label">出院日期:</label> <label class="control-label">出院日期:</label>
</div> </div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="startTime2" style="margin-left: 15px" autocomplete="off"> <input type="text" class="form-control input-sm inputValue" id="startTime2"
style="margin-left: 15px" autocomplete="off">
</div> </div>
<div class="col-sm-1" style="padding-top:2%"> <div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div> </div>
</div>
<div class="col-sm-4 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="endTime2" autocomplete="off"> <input type="text" class="form-control input-sm inputValue" id="endTime2"
autocomplete="off">
</div> </div>
</div> </div>
</div> </div>
@ -399,9 +409,30 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 labelDiv"> <div class="col-sm-3 labelDiv">
<label class="control-label">主诊编码范围:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="diag_code1"
style="margin-left: 15px">
</div>
<div class="col-sm-1" style="padding-top:2%;">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="diag_code2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">手术编码:</label> <label class="control-label">手术编码:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm otherTable operTable inputValue" <input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_code" onkeyup="getOperateCodeContents('operate_code')" id="operate_code" onkeyup="getOperateCodeContents('operate_code')"
onfocus="getOperateCodeContents('operate_code')" onfocus="getOperateCodeContents('operate_code')"
@ -415,14 +446,12 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-4 labelDiv"> <div class="col-sm-3 labelDiv">
<label class="control-label">手术名称:</label> <label class="control-label">手术名称:</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm otherTable operTable inputValue" <input type="text" class="form-control input-sm otherTable operTable inputValue"
id="operate_name" onkeyup="getOperateNameContents('operate_name')" id="operate_name" onkeyup="getOperateNameContents('operate_name')"
onfocus="getOperateNameContents('operate_name')" onfocus="getOperateNameContents('operate_name')"
@ -439,22 +468,19 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 labelDiv"> <div class="col-sm-3 labelDiv">
<label class="control-label">主治医生:</label> <label class="control-label">手术编码范围:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="attending" maxlength="6">
</div> </div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="operate_code1"
style="margin-left: 15px">
</div> </div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div> </div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">全部诊断:</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue" <input type="text" class="form-control input-sm inputValue" id="operate_code2">
id="all_diag_name" maxlength="100">
</div> </div>
</div> </div>
</div> </div>
@ -482,6 +508,39 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">其他诊断码范围:</label>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue"
id="other_diag_name1" style="margin-left: 15px">
</div>
<div class="col-sm-1" style="padding-top:2%">
<div style="margin-left: 50%">
</div>
</div>
<div class="col-sm-4 inputDiv">
<input type="text" class="form-control input-sm inputValue"
id="other_diag_name2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">全部诊断:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="all_diag_name" maxlength="100">
</div>
</div>
</div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 labelDiv"> <div class="col-sm-3 labelDiv">
@ -493,17 +552,52 @@
</div> </div>
</div> </div>
</div> </div>
<%-- <div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="col-sm-3 labelDiv"> <div class="col-sm-3 labelDiv">
<label class="control-label">院内感染</label> <label class="control-label">主治医生</label>
</div> </div>
<div class="col-sm-9 inputDiv"> <div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="taint_name" <input type="text" class="form-control input-sm diagTable inputValue"
maxlength="16"> id="attending" maxlength="6">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">科主任:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="dept_director" maxlength="6">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">主任(副主任)</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="director" maxlength="6">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-3 labelDiv">
<label class="control-label">住院医师:</label>
</div>
<div class="col-sm-9 inputDiv">
<input type="text" class="form-control input-sm diagTable inputValue"
id="admiss_doctor" maxlength="100">
</div>
</div> </div>
</div> </div>
</div>--%>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
@ -593,7 +687,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">有效时间:</label> <label class="col-sm-4 control-label">有效时间:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="effeTime" name="effeTime" maxlength="10" autocomplete="off"> <input type="text" class="form-control input-sm input" id="effeTime" name="effeTime"
maxlength="10" autocomplete="off">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -603,7 +698,7 @@
<label class="col-sm-4 control-label">申请天数:</label> <label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays" <input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)"> name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)" readonly>
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -631,7 +726,8 @@
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">关闭 <button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button> </button>
<button type="button" class="btn btn-sm btn-primary" onclick="save()"> <button type="button" class="btn btn-sm btn-primary" onclick="save()">
暂时保存 暂时保存
@ -662,7 +758,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">病案号:</label> <label class="col-sm-4 control-label">病案号:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="inpatientNo" readonly name="inpatientNo"> <input type="text" class="form-control input-sm input" id="inpatientNo"
name="inpatientNo">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -690,7 +787,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">出院时间:</label> <label class="col-sm-4 control-label">出院时间:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" class="form-control input-sm input" name="disDate" id="disDate" maxlength="10" autocomplete="off"> <input type="text" class="form-control input-sm input" name="disDate" id="disDate"
maxlength="10" autocomplete="off">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>

@ -11,7 +11,8 @@
<title>预览PDF</title> <title>预览PDF</title>
<meta http-equiv=X-UA-Compatible IE=EmulateIE7> <meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="${path}/static/css/updatePic/common.css" type="text/css" rel="stylesheet"> <link href="${path}/static/css/updatePic/common.css" type="text/css" rel="stylesheet">
<link href="${path}/static/css/updatePic/index.css" type="text/css" rel="stylesheet"> <link href="${path}/static/css/updatePic/index.css" type="text/css" rel="stylesheet">
<link href="${path}/static/js/recordManage/templateSearch/jquery.qtip.min.css" type="text/css" rel="stylesheet"> <link href="${path}/static/js/recordManage/templateSearch/jquery.qtip.min.css" type="text/css" rel="stylesheet">
@ -33,110 +34,137 @@
padding: 0; padding: 0;
background-color: #F2F2F2; background-color: #F2F2F2;
} }
.searchDiv { .searchDiv {
width: 100%; width: 100%;
height: 13%; height: 13%;
background-color: #FFF; background-color: #FFF;
} }
.contentDiv { .contentDiv {
width: 100%; width: 100%;
height: 86%; height: 86%;
margin-top: 1%; margin-top: 1%;
background-color: #FFF; background-color: #FFF;
} }
.labelDiv { .labelDiv {
padding-top: 2%; padding-top: 2%;
padding-right: 0; padding-right: 0;
text-align: right; text-align: right;
} }
.rowDiv { .rowDiv {
padding-top: 0.5%; padding-top: 0.5%;
} }
.inputDiv { .inputDiv {
padding: 0 !important; padding: 0 !important;
} }
.modal-header { .modal-header {
height: 6%; height: 6%;
background-color: #1D9ED7; background-color: #1D9ED7;
} }
h4 { h4 {
color: #fff; color: #fff;
font-size: 1.0em; font-size: 1.0em;
font-weight: bold; font-weight: bold;
} }
.left { .left {
float: left; float: left;
width: 30%; width: 30%;
height: 100%; height: 100%;
} }
.line1 { .line1 {
float: left; float: left;
width: 1px; width: 1px;
height: 100%; height: 100%;
background: darkgray; background: darkgray;
} }
.right { .right {
float: left; float: left;
width: 69%; width: 69%;
height: 100%; height: 100%;
} }
.treeSearch { .treeSearch {
width: 80%; width: 80%;
margin: 4px auto; margin: 4px auto;
} }
.addCode { .addCode {
margin: 6px 27px; margin: 6px 27px;
} }
.form { .form {
float: left; float: left;
width: 100%; width: 100%;
padding-top: 1%; padding-top: 1%;
} }
.flagDiv { .flagDiv {
width: 80%; width: 80%;
float: left; float: left;
padding-top: 3%; padding-top: 3%;
} }
.codeBtn { .codeBtn {
float: right; float: right;
width: 20%; width: 20%;
} }
.formInput { .formInput {
width: 100%; width: 100%;
} }
.input-group { .input-group {
width: 80%; width: 80%;
padding-left: 9%; padding-left: 9%;
margin-top: -2%; margin-top: -2%;
} }
.typeBtn { .typeBtn {
width: 80%; width: 80%;
padding-left: 34%; padding-left: 34%;
} }
.formDiv { .formDiv {
display: none; display: none;
} }
.formHead { .formHead {
font-color: blue; font-color: blue;
padding-left: 18%; padding-left: 18%;
font-size: 1.5em; font-size: 1.5em;
margin-bottom: 2%; margin-bottom: 2%;
} }
hr { hr {
margin: 0 !important; margin: 0 !important;
} }
.collectLabel { .collectLabel {
margin-top: 1%; margin-top: 1%;
text-align: right; text-align: right;
} }
.collectDiv { .collectDiv {
margin-top: 2%; margin-top: 2%;
} }
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) { .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 295px;} width: 295px;
}
.modal-title { .modal-title {
margin-top: -6px; margin-top: -6px;
} }
.seal-result { .seal-result {
width: 60px; width: 60px;
height: 60px; height: 60px;
@ -178,7 +206,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-5 control-label labelDiv">病案号:</label> <label class="col-sm-5 control-label labelDiv">病案号:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" readonly class="form-control input input-sm inpatientNo" id="inpatientNo" onmouseover="this.title=this.value"> <input type="text" readonly class="form-control input input-sm inpatientNo" id="inpatientNo"
onmouseover="this.title=this.value">
</div> </div>
</div> </div>
</div> </div>
@ -199,7 +228,8 @@
<select class="form-control input input-sm admissTimes" id="admissTimes"></select> <select class="form-control input input-sm admissTimes" id="admissTimes"></select>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<select class="form-control input input-sm admissTimes" id="admissTimes" disabled></select> <select class="form-control input input-sm admissTimes" id="admissTimes"
disabled></select>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
@ -240,7 +270,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-5 control-label labelDiv">其他诊断:</label> <label class="col-sm-5 control-label labelDiv">其他诊断:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input otherDiagName" id="otherDiagName"> <input type="text" readonly class="form-control input-sm input otherDiagName"
id="otherDiagName">
</div> </div>
</div> </div>
</div> </div>
@ -253,17 +284,23 @@
</shiro:hasPermission>--%> </shiro:hasPermission>--%>
<shiro:hasPermission name="/commom/updatePic"> <shiro:hasPermission name="/commom/updatePic">
<div class="col-sm-4"> <div class="col-sm-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal3" onclick="addPic()">新增扫描图片</button> <button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
data-target="#myModal3" onclick="addPic()">新增扫描图片
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="/commom/recoverPic"> <shiro:hasPermission name="/commom/recoverPic">
<div class="btn" id="recoverPic" style="display: none"> <div class="btn" id="recoverPic" style="display: none">
<button type="button" class="btn btn-sm btn-warning" data-toggle="modal" data-target="#myModal5" onclick="recoverPic()">恢复扫描图片</button> <button type="button" class="btn btn-sm btn-warning" data-toggle="modal"
data-target="#myModal5" onclick="recoverPic()">恢复扫描图片
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<shiro:hasPermission name="/collect/addCollect"> <shiro:hasPermission name="/collect/addCollect">
<div class="col-sm-4"> <div class="col-sm-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal2" onclick="collect()">&nbsp;&nbsp;&nbsp;&nbsp;收藏&nbsp;&nbsp;&nbsp;&nbsp;</button> <button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
data-target="#myModal2" onclick="collect()">&nbsp;&nbsp;&nbsp;&nbsp;收藏&nbsp;&nbsp;&nbsp;&nbsp;
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
</div> </div>
@ -275,7 +312,8 @@
</div> </div>
</div> </div>
<!-- 模态框1Modal编码信息 --> <!-- 模态框1Modal编码信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade bs-example-modal-lg" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<input type="hidden" id="roleId" value="${user.roleId}"> <input type="hidden" id="roleId" value="${user.roleId}">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content modal1Content"> <div class="modal-content modal1Content">
@ -288,7 +326,10 @@
</h4> </h4>
</div> </div>
<div class="modal-body code-body"> <div class="modal-body code-body">
<a target="_blank"><iframe class="row-fluid" style="width:100%;height: 100%" src="" id="iFrame1" name="iFrame1" scrolling="yes" frameborder="0"></iframe></a> <a target="_blank">
<iframe class="row-fluid" style="width:100%;height: 100%" src="" id="iFrame1" name="iFrame1"
scrolling="yes" frameborder="0"></iframe>
</a>
<%-- <!--左边树--> <%-- <!--左边树-->
<div class="left"> <div class="left">
<div class="treeSearch"> <div class="treeSearch">
@ -813,7 +854,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label collectLabel">住院次数:</label> <label class="col-sm-4 control-label collectLabel">住院次数:</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="text" class="form-control input-sm input admissTimes" readonly id="admissTimes1"> <input type="text" class="form-control input-sm input admissTimes" readonly
id="admissTimes1">
</div> </div>
<div class="col-sm-1"></div> <div class="col-sm-1"></div>
</div> </div>
@ -823,7 +865,8 @@
</div> </div>
</div> </div>
<!-- 模态框3Modal添加资料 --> <!-- 模态框3Modal添加资料 -->
<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabe3" aria-hidden="true"自定义查询> <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabe3" aria-hidden="true"
自定义查询>
<div class="modal-dialog" style="width:90%;height:90%"> <div class="modal-dialog" style="width:90%;height:90%">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -876,7 +919,8 @@
</section>--> </section>-->
<section class="z_file fl"> <section class="z_file fl">
<img src="${path}/static/img/a11.png" class="add-img"> <img src="${path}/static/img/a11.png" class="add-img">
<input type="file" name="file" id="file" class="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple /> <input type="file" name="file" id="file" class="file" value=""
accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
</section> </section>
</div> </div>
</section> </section>
@ -884,7 +928,8 @@
<aside class="mask works-mask"> <aside class="mask works-mask">
<div class="mask-content"> <div class="mask-content">
<p class="del-p ">您确定要删除这张图片吗?</p> <p class="del-p ">您确定要删除这张图片吗?</p>
<p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p> <p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span>
</p>
</div> </div>
</aside> </aside>
</form> </form>
@ -893,7 +938,8 @@
</div> </div>
</div> </div>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/showRecord174.js?t=2019-12-20"></script> <script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/showRecord174.js?t=2019-12-20"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script> <script type="text/javascript"
src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script> <script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
</body> </body>
</html> </html>

@ -28,12 +28,14 @@
padding: 0; padding: 0;
background-color: #F2F2F2; background-color: #F2F2F2;
} }
.content-left { .content-left {
height: 100%; height: 100%;
width: 23%; width: 23%;
float: left; float: left;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.content-right { .content-right {
height: 100%; height: 100%;
width: 76%; width: 76%;
@ -44,6 +46,11 @@
</style> </style>
</head> </head>
<body style="scroll:auto" onkeydown="disabledPrint()"> <body style="scroll:auto" onkeydown="disabledPrint()">
<div id="myModal" class="modal fade" data-keyboard="false"
data-backdrop="static" data-role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div id="loading1" class="loading">加载中。。。</div>
</div>
<input type="hidden" id="patientId" value="${patientId}"> <input type="hidden" id="patientId" value="${patientId}">
<!--初始化及树复选框勾选的文件名称集合--> <!--初始化及树复选框勾选的文件名称集合-->
<input type="hidden" id="assortIds"> <input type="hidden" id="assortIds">
@ -64,8 +71,9 @@
<input type="hidden" id="printPicLoaded"> <input type="hidden" id="printPicLoaded">
<!--定义打印预览的图片加载进度--> <!--定义打印预览的图片加载进度-->
<input type="hidden" id="loading"> <input type="hidden" id="loading">
<div class="content-left"> <div class="content-left">
<div class="form-group"> <div class="form-group" style="margin-top: 2%">
<div class="col-sm-5" style="padding-right: 0"> <div class="col-sm-5" style="padding-right: 0">
<c:if test="${fn:length(emrTypes) != 0}"> <c:if test="${fn:length(emrTypes) != 0}">
<select class="form-control input input-sm" id="typeId"> <select class="form-control input input-sm" id="typeId">
@ -75,14 +83,20 @@
</select> </select>
</c:if> </c:if>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" onclick="onloadPdfMethod()">加载PDF</button> <button type="button" class="btn btn-sm btn-primary" onclick="onloadPdfMethod()">加载PDF</button>
</div> </div>
<c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}"> <c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}">
<div class="col-sm-3"> <div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" onclick="onloadJpgForPdf()">下载PDF</button> <button type="button" class="btn btn-sm btn-primary" onclick="onloadJpgForPdf()">下载PDF</button>
</div> </div>
</c:if> </c:if>
<c:if test="${moveFlag == '1'}">
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal1">移动PDF
</button>
</div>
</c:if>
<div class="zTreeDemo"> <div class="zTreeDemo">
<ul id="ztree" class="ztree"></ul> <ul id="ztree" class="ztree"></ul>
</div> </div>
@ -101,12 +115,149 @@
<option value="${assort.assortId}">${assort.assortName}</option> <option value="${assort.assortId}">${assort.assortName}</option>
</c:forEach> </c:forEach>
</select> </select>
<button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">确定</button> <button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">
确定
</button>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<iframe width="100%" height="100%" src="" id="iframe1" frameborder="0" scrolling="yes"></iframe> <iframe width="100%" height="100%" src="" id="iframe1" name="iframe1" frameborder="0" scrolling="yes"></iframe>
</div>
<!-- 模态框1Modal移动PDFtable信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:1600px">
<div class="modal-content modal1Content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
移动PDF
</h4>
</div>
<div class="modal-body code-body">
<div class="row">
<div></div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">病案号:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatientNo"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">住院次数:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="admissTimes"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">姓名:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="name"
maxlength="16">
</div>
</div>
</div>
</div>
<div class="btns">
<div class="btn" style="margin-left: 90%; margin-top: 1%">
<button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button>
</div>
</div>
<!--数据表格-->
<div id="tableDiv" class="table-responsive tableDiv table-hover" style="overflow:scroll;">
<table id="mytab" class="table text-nowrap table-bordered" data-toggle="table" data-height="200">
</table>
</div>
</div>
</div>
</div>
</div>
<!-- 模态框1Moda2移动PDF分段信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:400px">
<div class="modal-content modal1Content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
选择分段
</h4>
</div>
<div class="modal-body code-body">
<input type="hidden" id="patientIdInfo">
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">病案号:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="inpatientNoInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">住院次数:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="admissTimesInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">姓名:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="nameInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">重新归页:</label>
<div class="col-sm-7">
<select class="form-control" style="float:left;width:100%;" id="moveAssortId">
<option value="">选择重新归页</option>
<c:forEach items="${zdAssorts}" var="assort">
<option value="${assort.assortId}">${assort.assortName}</option>
</c:forEach>
</select>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" onclick="movePdf()">
提交
</button>
</div>
</div>
</div>
</div>
</div> </div>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/showRecordIframeBlood.js"></script> <script type="text/javascript"
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script> src="${path}/static/js/recordManage/commomSearch/showRecordIframeBlood.js"></script>
<script type="text/javascript"
src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>
</body> </body>
</html> </html>

@ -0,0 +1,265 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>预览pdfIframe页面</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #F2F2F2;
}
.content-left {
height: 100%;
width: 23%;
float: left;
background-color: #FFFFFF;
}
.content-right {
height: 100%;
width: 76%;
float: right;
padding-left: 1%;
background-color: #FFFFFF;
}
</style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<div id="myModal" class="modal fade" data-keyboard="false"
data-backdrop="static" data-role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div id="loading1" class="loading">加载中。。。</div>
</div>
<input type="hidden" id="patientId" value="${patientId}">
<input type="hidden" id="userName" value="${userName}">
<input type="hidden" id="deptName" value="${deptName}">
<!--初始化及树复选框勾选的文件名称集合-->
<input type="hidden" id="assortIds">
<!--初始化及树复选框勾选的文件来源集合-->
<input type="hidden" id="sources">
<!--树节点点击选中的文件名称-->
<input type="hidden" id="assortIdByClick">
<!--树节点点击选中的文件来源-->
<input type="hidden" id="sourceByClick">
<input type="hidden" id="flag" value="${flag}">
<!--是否有打印权限-->
<input type="hidden" id="print" value="${printFlag}">
<!--文件路径-->
<input type="hidden" id="filePath">
<!--定义iframe1加载完成标识-->
<input type="hidden" id="iframeLoad">
<!--定义打印预览的图片加载完成标识-->
<input type="hidden" id="printPicLoaded">
<!--定义打印预览的图片加载进度-->
<input type="hidden" id="loading">
<div class="content-left">
<div class="form-group" style="margin-top: 2%">
<div class="col-sm-5" style="padding-right: 0">
<c:if test="${fn:length(emrTypes) != 0}">
<select class="form-control input input-sm" id="typeId">
<c:forEach items="${emrTypes}" var="type">
<option value="${type.id}">${type.typeName}</option>
</c:forEach>
</select>
</c:if>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" onclick="onloadPdfMethod()">加载PDF</button>
</div>
<c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}">
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" onclick="onloadJpgForPdf()">下载PDF</button>
</div>
</c:if>
<c:if test="${moveFlag == '1'}">
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal1">移动PDF
</button>
</div>
</c:if>
<div class="zTreeDemo">
<ul id="ztree" class="ztree"></ul>
</div>
</div>
</div>
<div class="content-right">
<shiro:hasPermission name="/commom/delScanAssort">
<button type="button" class="btn btn-sm btn-danger" style="float:left;" onclick="delPic()">删除</button>
</shiro:hasPermission>
<shiro:hasPermission name="/commom/updateScanAssort">
<div class="form-group" style="margin-left: 6%">
<label class="control-label" style="float:left;margin-top:1%;">重新归页:</label>
<select class="form-control" style="float:left;width:30%;" id="newAssortId">
<option value="">选择重新归页</option>
<c:forEach items="${zdAssorts}" var="assort">
<option value="${assort.assortId}">${assort.assortName}</option>
</c:forEach>
</select>
<button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">
确定
</button>
</div>
</shiro:hasPermission>
<iframe width="100%" height="100%" src="" id="iframe1" name="iframe1" frameborder="0" scrolling="yes"></iframe>
</div>
<!-- 模态框1Modal移动PDFtable信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:1600px">
<div class="modal-content modal1Content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
移动PDF
</h4>
</div>
<div class="modal-body code-body">
<div class="row">
<div></div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">病案号:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatientNo"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">住院次数:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="admissTimes"
maxlength="16">
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">姓名:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="name"
maxlength="16">
</div>
</div>
</div>
</div>
<div class="btns">
<div class="btn" style="margin-left: 90%; margin-top: 1%">
<button type="button" class="btn btn-sm btn-primary" onclick="search()">开始搜索</button>
</div>
</div>
<!--数据表格-->
<div id="tableDiv" class="table-responsive tableDiv table-hover" style="overflow:scroll;">
<table id="mytab" class="table text-nowrap table-bordered" data-toggle="table" data-height="200">
</table>
</div>
</div>
</div>
</div>
</div>
<!-- 模态框1Moda2移动PDF分段信息 -->
<div class="modal fade bs-example-modal-lg" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" style="width:400px">
<div class="modal-content modal1Content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
选择分段
</h4>
</div>
<div class="modal-body code-body">
<input type="hidden" id="patientIdInfo">
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">病案号:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="inpatientNoInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">住院次数:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="admissTimesInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">姓名:</label>
<div class="col-sm-7">
<input type="text" class="form-control input" id="nameInfo" maxlength="16" readonly>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row" style="margin-top: 2%">
<div class="form-group">
<label class="col-sm-4 control-label">重新归页:</label>
<div class="col-sm-7">
<select class="form-control" style="float:left;width:100%;" id="moveAssortId">
<option value="">选择重新归页</option>
<c:forEach items="${zdAssorts}" var="assort">
<option value="${assort.assortId}">${assort.assortName}</option>
</c:forEach>
</select>
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" onclick="movePdf()">
提交
</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"
src="${path}/static/js/recordManage/commomSearch/showRecordIframeSouth.js"></script>
<script type="text/javascript"
src="${path}/static/js/recordManage/commomSearch/showRecordIframeBloodCommom.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>
</body>
</html>

@ -250,13 +250,13 @@
</section> </section>
</div> </div>
<!-- 底部版权--> <!-- 底部版权-->
<footer class="main-footer"> <%--<footer class="main-footer">
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
<b>Version</b> 20200211 <b>Version</b> 20200211
</div> </div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights <strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved. reserved.
</footer> </footer>--%>
</div> </div>
<script type="text/javascript" src="${path}/static/js/menu.js?time=2019-12-15"></script> <script type="text/javascript" src="${path}/static/js/menu.js?time=2019-12-15"></script>
<%@ include file="/WEB-INF/jspf/webSocket.jspf" %> <%@ include file="/WEB-INF/jspf/webSocket.jspf" %>

@ -27,7 +27,9 @@ $("#parentId").change(function(){
}) })
} }
}) })
//加载数据表格 /**
* 加载数据表格
*/
$('#mytab').bootstrapTable({ $('#mytab').bootstrapTable({
height:5000, height:5000,
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
@ -153,7 +155,7 @@ $('#mytab').bootstrapTable({
if(row.approveState != '已过期'){ if(row.approveState != '已过期'){
//非已提交,提供申请,编辑,删除 //非已提交,提供申请,编辑,删除
if(addOper == 1){ if(addOper == 1){
editanddrop += '<button type="button" onclick="updateThenAdd('+row.id+')" class="btn btn-sm btn-primary">提交申请</button>'; editanddrop += '<button type="button" onclick="updateThenAdd('+row.id+')" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal3">提交申请</button>';
} }
} }
if(updateOper == 1){ if(updateOper == 1){
@ -232,13 +234,17 @@ $('#mytab').bootstrapTable({
$("#checks").val(""); $("#checks").val("");
} }
}) })
function crtTimeFtt(val) { function crtTimeFtt(val) {
if (val != null) { if (val != null) {
var date = new Date(val); var date = new Date(val);
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
} }
} }
//查询按钮
/**
* 查询按钮
*/
function refreshTable(){ function refreshTable(){
$("#checks").val(""); $("#checks").val("");
$('#mytab').bootstrapTable('refresh',{ $('#mytab').bootstrapTable('refresh',{
@ -246,7 +252,9 @@ function refreshTable(){
}) })
} }
//批量添加按钮 /**
* 批量添加按钮
*/
function addApproves(){ function addApproves(){
pickTime("effeTime5", null); pickTime("effeTime5", null);
form5.reset(); form5.reset();
@ -254,7 +262,9 @@ function addApproves(){
loadSelect(path+ '/approve/loadReasonModle','parentId5',''); loadSelect(path+ '/approve/loadReasonModle','parentId5','');
} }
//添加按钮 /**
* 添加按钮
*/
function addApprove(){ function addApprove(){
pickTime("effeTime", null); pickTime("effeTime", null);
setFormToken(); setFormToken();
@ -266,7 +276,11 @@ function addApprove(){
//加载申请原因模板 //加载申请原因模板
loadSelect(path+ '/approve/loadReasonModle','parentId',''); loadSelect(path+ '/approve/loadReasonModle','parentId','');
} }
//批量申请保存
/**
* 批量申请保存
* @returns {boolean}
*/
function addSimple(){ function addSimple(){
if($("#effeTime5").val() != ''){ if($("#effeTime5").val() != ''){
if($("#applyType5").val() != '') { if($("#applyType5").val() != '') {
@ -333,7 +347,11 @@ function addSimple(){
$("#effeTime5").focus(); $("#effeTime5").focus();
} }
} }
//编辑
/**
* 编辑
* @param id
*/
function updateApprove(id){ function updateApprove(id){
pickTime("effeTime", null); pickTime("effeTime", null);
//加载申请原因模板 //加载申请原因模板
@ -368,13 +386,21 @@ function updateApprove(id){
} }
}) })
} }
//病案預覽
//查看详情 /**
* 病案預覽
* 查看详情
* @param patientId
*/
function showDetail(patientId){ function showDetail(patientId){
//隐藏模板选项 //隐藏模板选项
window.location.href=path+"/commom/showRecord174?patientId="+patientId; window.location.href=path+"/commom/showRecord174?patientId="+patientId;
} }
//显示申请信息详情
/**
* 显示申请信息详情
* @param id
*/
function showApprove(id){ function showApprove(id){
loadSelect(path+ '/approve/loadType',null,'applyType1'); loadSelect(path+ '/approve/loadType',null,'applyType1');
//加载申请原因模板 //加载申请原因模板
@ -400,7 +426,11 @@ function showApprove(id){
} }
}) })
} }
//提交申请按钮功能
/**
* 提交申请按钮功能
* @param id
*/
function updateThenAdd(id){ function updateThenAdd(id){
updateApprove(id); updateApprove(id);
setTimeout(function(){ setTimeout(function(){
@ -408,7 +438,11 @@ function updateThenAdd(id){
},1000) },1000)
$('#mytab').bootstrapTable('selectPage', pageNumber); $('#mytab').bootstrapTable('selectPage', pageNumber);
} }
//删除
/**
* 删除
* @param id
*/
function deleteApprove(id){ function deleteApprove(id){
Common.confirm({ Common.confirm({
title: "提示", title: "提示",
@ -433,7 +467,10 @@ function deleteApprove(id){
} }
}) })
} }
//导出excel功能
/**
* 导出excel功能
*/
function exportExcel(){ function exportExcel(){
var checks = $("#checks").val(); var checks = $("#checks").val();
if(checks != '') { if(checks != '') {

@ -324,7 +324,6 @@ function add(flag){
//封装提交审批方法 //封装提交审批方法
function saveMethod(flag){ function saveMethod(flag){
debugger
if(flag == 'n'){ if(flag == 'n'){
$("#effeTime").val(applyDate); $("#effeTime").val(applyDate);
$("#effeDays").val(applyDay); $("#effeDays").val(applyDay);

@ -98,9 +98,11 @@ function pickTime(info, showDate){
} }
//转换日期 //转换日期
function covertDate(value){ function covertDate(value){
if (value != undefined){
if(value != '' && value.length >= 10){ if(value != '' && value.length >= 10){
value = value.substring(0,10); value = value.substring(0,10);
} }
}
return value; return value;
} }

@ -0,0 +1,939 @@
$(function () {
//百叶窗风格
$('.collapse').collapse({
toggle: false
})
//加载表格
freshTableSouth();
//加载时间控件1
initDateInput(1);
//加载时间控件2
initDateInput(2);
//加载性别
loadSex();
//加载科室
loadDept();
//加载转归情况
loadDiagStatus();
//权限控制按钮
permissionControlButton();
});
//加载性别
function loadSex() {
$.ajax({
type: 'get',
url: path + '/commom/getSex',
dataType: 'json',
success: function (data) {
if (null != data) {
$("#sex").empty();
var html = '';
for (var i = 0; i < data.length; i++) {
if (i > 1) {
html += '<div class="col-sm-3 radioDiv">'
+ '<input type="radio" id="' + data[i].name + '" name="sex" value="' + data[i].name + '" class="sexInput"><label class="checkBoxClass" for="' + data[i].name + '">' + data[i].name + '</label></div>';
} else {
html += '<div class="col-sm-2 radioDiv">'
+ '<input type="radio" id="' + data[i].name + '" name="sex" value="' + data[i].name + '" class="sexInput"><label class="checkBoxClass" for="' + data[i].name + '">' + data[i].name + '</label></div>';
}
}
$("#sex").append(html);
}
}
})
}
//加载科室
function loadDept() {
$.ajax({
type: 'get',
url: path + '/commom/getDept',
dataType: 'json',
success: function (data) {
if (null != data) {
$("#dis_dept").empty();
var html = '<option value=""></option>';
for (var i = 0; i < data.length; i++) {
if (data[i].name != '') {
var name = data[i].name;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '">' + name + '</option>';
}
}
$("#dis_dept").append(html);
$("#dis_dept").selectpicker('refresh');
}
}
})
}
//加载科室
function loadDeptDefault(defaultDeptName){
$.ajax({
type:'get',
url:path+'/commom/getDept',
dataType:'json',
success:function (data) {
if(null != data){
$("#disDept").empty();
var html = '<option value="">请选择</option>';
for (var i = 0; i < data.length; i++) {
if (data[i].name != '' && data[i].name == defaultDeptName) {
var name = data[i].name;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '" selected>' + name + '</option>';
} else {
var name = data[i].name;
var py = makePy(name);
var pingyin = ConvertPinyin(name);
html += '<option data-tokens="' + name + '|' + py[0] + '|' + pingyin + '" value="' + name + '">' + name + '</option>';
}
}
$("#disDept").append(html);
$("#disDept").selectpicker('refresh');
}
}
})
}
//加载转归情况
function loadDiagStatus() {
$.ajax({
type: 'get',
url: path + '/commom/getDiagStatus',
dataType: 'json',
success: function (data) {
if (null != data) {
$("#dis_thing").empty();
var html = '<option value="">全部</option>';
for (var i = 0; i < data.length; i++) {
if (data[i].code != '0') {
html += '<option value="' + data[i].name + '">' + data[i].name + '</option>';
}
}
$("#dis_thing").append(html);
}
}
})
}
//动态控制限手术的值
$("#isOper").change(function () {
var checked = $(this).is(':checked');
if (checked) {
$(this).val(1)
} else {
$(this).val("");
}
})
//时间格式属性名集合
var commomtable = 'commomtable';
var commomtable1 = 'commomtable1';
//拼接sql
function getSql() {
var inputValue = getInputValue();
if (inputValue != '') {
//select语句字符串
var selectNames = 'select ' + commomtable + '.patient_id,CASE WHEN emr_apply_approve.id is null THEN 0 ELSE 1 END isShowDetail,CASE WHEN emr_apply_approve1.id IS NULL THEN 0 ELSE 1 END isDownload,CASE WHEN emr_lock.id is null THEN 0 ELSE 1 END lockStatus,';
selectNames += $("#englishFields").val();
//from语句字符串
var fromTableNames = ' from ';
//where语句字符串
var whereNames = ' where ';
//判断是否多表
var tables = false;
$('.otherTable').each(function () {
if ($(this).val() != '') {
tables = true;
return false;
}
})
//单表
fromTableNames += commomtable;
//拼接where语句
var name = '';
//姓名
var searchName = $("#name").val();
if (searchName != '') {
name = 'name';
//去除前后空格
searchName = searchName.replace(/(^\s*)|(\s*$)/g, "");
var pinyin = /^[a-zA-Z]+$/;
//1.逗号隔开
if (searchName.indexOf(",") != -1 || searchName.indexOf("") != -1) {
if (searchName.indexOf(",") != -1) {
searchName = searchName.split(",");
} else if (searchName.indexOf("") != -1) {
searchName = searchName.split("");
}
for (var i = 0; i < searchName.length; i++) {
if (searchName[i] != '') {
//拼接前括号
if (i == 0) {
whereNames += "(";
}
if (i != searchName.length - 1) {
if (searchName[i].indexOf("*") != -1) {
//2.带*号
searchName = searchName.replace(/\*/g, "_");
whereNames += commomtable + "." + name + " LIKE '" + searchName[i] + "' OR ";
} else if (pinyin.test(searchName[i])) {
//3.拼音缩写
whereNames += commomtable + ".name_cym LIKE '%" + searchName[i] + "%' OR ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + searchName[i] + "%' OR ";
}
} else {
if (searchName[i].indexOf("*") != -1) {
//2.带*号
searchName = searchName.replace(/\*/g, "_");
whereNames += commomtable + "." + name + " LIKE '" + searchName[i] + "')";
} else if (pinyin.test(searchName[i])) {
//3.拼音缩写
whereNames += commomtable + ".name_cym LIKE '%" + searchName[i] + "%')";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + searchName[i] + "%')";
}
}
}
}
whereNames += " AND ";
} else if (searchName.indexOf("*") != -1) {
//2.带*号
searchName = searchName.replace(/\*/g, "_");
whereNames += commomtable + "." + name + " LIKE '" + searchName + "' AND ";
} else if (pinyin.test(searchName)) {
//3.拼音缩写
whereNames += commomtable + ".name_cym LIKE '%" + searchName + "%' AND ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
}
//年龄
if ($("#age1").val() != '' && $("#age2").val() != '') {
var ageType = $("#ageType").val();
if (ageType == '1') {
name = 'age';
if ($("#age1").val() < $("#age2").val()) {
whereNames += "(" + commomtable + "." + name + " BETWEEN " + $("#age1").val() + " AND " + ($("#age2").val() - 1) + " or (" + commomtable + "." + name + "=" + $("#age2").val() + " and " + commomtable + ".age_month=0 and " + commomtable + ".age_day=0)) AND ";
} else if ($("#age2").val() < $("#age1").val()) {
whereNames += "(" + commomtable + "." + name + " BETWEEN " + $("#age2").val() + " AND " + ($("#age1").val() - 1) + " or (" + commomtable + "." + name + "=" + $("#age1").val() + " and " + commomtable + ".age_month=0 and " + commomtable + ".age_day=0)) AND ";
}
} else if (ageType == '2') {
//周
name = 'age_month';
if ($("#age1").val() < $("#age2").val()) {
whereNames += "(" + 'age = 0 AND ' + commomtable + "." + name + " BETWEEN " + $("#age1").val() + " AND " + ($("#age2").val() - 1) + " OR (" + commomtable + ".age = 0 AND " + commomtable + ".age_month = " + $("#age2").val() + " AND " + commomtable + ".age_day = 0)) AND ";
} else if ($("#age2").val() < $("#age1").val()) {
whereNames += "(" + 'age = 0 AND ' + commomtable + "." + name + " BETWEEN " + $("#age2").val() + " AND " + ($("#age1").val() - 1) + " OR (" + commomtable + ".age = 0 AND " + commomtable + ".age_month = " + $("#age1").val() + " AND " + commomtable + ".age_day = 0)) AND ";
}
} else if (ageType == '3') {
//天
name = 'age_day';
if ($("#age1").val() < $("#age2").val()) {
whereNames += commomtable + "." + name + " BETWEEN " + $("#age1").val() + " AND " + $("#age2").val() + " AND ";
} else if ($("#age2").val() < $("#age1").val()) {
whereNames += commomtable + "." + name + " BETWEEN " + $("#age2").val() + " AND " + $("#age1").val() + " AND ";
}
whereNames += 'age = 0 AND age_month = 0 AND ';
}
}
//性别
var sex = $("input[name='sex']:checked").val();
if (sex != '') {
name = 'sex';
whereNames += commomtable + "." + name + " = '" + sex + "' AND ";
}
//病案号
var inpatientNo = $("#inpatient_no").val();
if (inpatientNo != '') {
name = 'inpatient_no';
inpatientNo = inpatientNo.replace(/(^\s*)|(\s*$)/g, "");
//1.逗号隔开
if (inpatientNo.indexOf(",") != -1 || inpatientNo.indexOf("") != -1) {
if (inpatientNo.indexOf(",") != -1) {
inpatientNo = inpatientNo.split(",");
} else if (inpatientNo.indexOf("") != -1) {
inpatientNo = inpatientNo.split("");
}
for (var i = 0; i < inpatientNo.length; i++) {
if (inpatientNo[i] != '') {
inpatientNo[i] = inpatientNo[i].replace(/(^\s*)|(\s*$)/g, "");
//拼接前括号
if (i == 0) {
whereNames += "(";
}
if (i != inpatientNo.length - 1) {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%' OR ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%')";
}
}
}
whereNames += " AND ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
}
//ID号
if ($("#admiss_id").val() != '') {
name = 'admiss_id';
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
//出院科室
var disDept = $("#dis_dept").val();
if (disDept != '' && disDept != null && disDept != 'null') {
var disDepts = "";
for (var i = 0; i < disDept.length; i++) {
if (disDept[i] != '') {
disDepts += "'" + disDept[i] + "',";
}
}
disDepts = disDepts.substring(0, disDepts.length - 1);
name = 'dis_dept';
whereNames += commomtable + "." + name + " IN (" + disDepts + ") AND ";
}
//病状转归
if ($("#dis_thing").val() != '') {
name = 'main_dis_thing';
whereNames += commomtable + "." + name + " = '" + $("#dis_thing").val() + "' AND ";
}
//入院日期
if ($("#startTime1").val() != '' && $("#endTime1").val() != '') {
name = 'admiss_date';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime1").val() + " 00:00:00' AND '" + $("#endTime1").val() + " 23:59:59' AND ";
}
//出院日期
if ($("#startTime2").val() != '' && $("#endTime2").val() != '') {
name = 'dis_date';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime2").val() + " 00:00:00' AND '" + $("#endTime2").val() + " 23:59:59' AND ";
}
debugger
//诊断名称
if ($("#diag_name").val() != '') {
name = 'main_diag_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#diag_name").val() + "%' AND ";
}
//诊断表
//诊断码
if ($("#diag_code").val() != '') {
name = 'main_diag_code';
whereNames += commomtable + "." + name + " LIKE '%" + $("#diag_code").val() + "%' AND ";
}
//全部诊断
if($("#all_diag_name").val() != ''){
name = 'diag_name';
whereNames += "t_diag."+name+" LIKE '%"+$("#all_diag_name").val()+"%' AND ";
}
//其他诊断
if($("#other_diag_name").val() != ''){
name = 'other_diag_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#other_diag_name").val() + "%' AND ";
}
//病理诊断
if($("#pathology_name").val() != ''){
name = 'pathology_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#pathology_name").val() + "%' AND ";
}
//损伤中毒
if($("#poisoning_name").val() != ''){
name = 'poisoning_name';
whereNames += commomtable + "." + name + " LIKE '%" + $("#poisoning_name").val() + "%' AND ";
}
//手术表
//手术编号
if ($("#operate_code").val() != '') {
name = 'operate_code';
whereNames += "t_operate." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
//手术名称
if ($("#operate_name").val() != '') {
name = 'operate_name';
whereNames += "t_operate." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
//主诊编码范围
if ($("#diag_code1").val() != '' && $("#diag_code2").val() != '') {
name = 'main_diag_code';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#diag_cod下·下·e1").val() + "' AND '" + $("#diag_code2").val() + "' AND ";
}
//手术编码范围
if ($("#operate_code1").val() != '' && $("#operate_code2").val() != '') {
name = 'operate_code';
whereNames += "t_operate." + name + " BETWEEN '" + $("#operate_code1").val() + "' AND '" + $("#operate_code2").val() + "' AND ";
}
//其他诊断编码范围
if ($("#other_diag_name1").val() != '' && $("#other_diag_name2").val() != '') {
name = 'other_diag_name';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#other_diag_name1").val() + "' AND '" + $("#other_diag_name2").val() + "' AND ";
}
//科主任
if ($("#dept_director").val() != '') {
name = 'dept_director';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#dept_director").val() + "%' AND ";
}
//主任(副主任)
if ($("#director").val() != '') {
name = 'director';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#director").val() + "%' AND ";
}
//住院医师
if ($("#admiss_doctor").val() != '') {
name = 'admiss_doctor';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#admiss_doctor").val() + "%' AND ";
}
var userName = "'" + $("#userName").val() + "'";
fromTableNames += ' left join emr_apply_approve on ' + commomtable + '.patient_id = emr_apply_approve.patient_id \n' +
'and emr_apply_approve.approve_state = 1 and emr_apply_approve.effe_time > GETDATE()-1 and emr_apply_approve.applyer = ' + userName + ' and emr_apply_approve.apply_type != 3 ' +
' left join emr_apply_approve emr_apply_approve1 on ' + commomtable + '.patient_id = emr_apply_approve1.patient_id \n' +
'and emr_apply_approve1.approve_state = 1 and emr_apply_approve1.effe_time > GETDATE()-1 and emr_apply_approve1.applyer = ' + userName + ' and emr_apply_approve1.apply_type = 3' +
' left join emr_lock on ' + commomtable + '.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1';
//拼接诊断表
//全部诊断
if($("#all_diag_name").val() != ''){
fromTableNames += ' left join t_diag on '+commomtable+'.patient_id=t_diag.patient_id';
}
if ($("#admiss_doctor").val() != '' || $("#director").val() != '' || $("#dept_director").val() != '') {
fromTableNames += ' left join ' + commomtable1 + ' on ' + commomtable1 + '.patient_id = ' + commomtable + '.patient_id';
}
//拼接手术表
var operFlag = false;
$(".operTable").each(function () {
if ($(this).val() != '' && $(this).val() != 'on') {
operFlag = true;
return false;
}
})
if (operFlag || $("#operate_code1").val() != '' || $("#operate_code2").val() != '') {
otherTable = 't_operate';
fromTableNames += ' left join ' + otherTable + ' on ' + commomtable + '.patient_id = ' + otherTable + '.patient_id';
}
//拼接主治医生
if ($("#attending").val() != '') {
name = 'attending';
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
//限手术
var isOper = $("#isOper").val();
if (isOper != '' && isOper == 1) {
name = 'is_oper';
whereNames += commomtable + "." + name + " = '1' AND ";
}
if (whereNames != ' where ') {
whereNames = whereNames.substring(0, whereNames.length - 4);
var orderBys = " ORDER BY " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
var sql = selectNames + fromTableNames + whereNames;
$("#sql").val(sql);
$("#orderBys").val(orderBys);
}
if (whereNames == ' where ') {
var orderBys = " ORDER BY " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
var sql = selectNames + fromTableNames;
$("#sql").val(sql);
$("#orderBys").val(orderBys);
}
console.log(sql);
} else {
$("#sql").val("");
}
}
function freshTableSouth(){
var powerMenus = $("#powerMenus").val();
var powerMenus = $("#powerMenus").val().substring(1,$("#powerMenus").val().length-1);
var powerMenusArr = powerMenus.split(", ");
for (var i = 0; i < powerMenusArr.length; i++){
var strs = powerMenusArr[i];
if (strs == '/commom/updateCommomInfo') {
$("#powerMenu").val("true");
}
}
var str = $("#powerMenu").val();
$("#mytab").bootstrapTable('destroy');
$("#checks").val('');
var columns = [];
columns.push({
title:'全选',
field:'select',
checkbox:true,
width:25,
valign:'middle',
},
{
title:'ID',
field:'patientId',
visible:false
})
var tableThNames = $("#tableThNames").val();
if(tableThNames != ''){
var fieldCns = '';
var fields = $("#fields").val().split(",");
tableThNames = tableThNames.split(",");
for(var i = 0;i<tableThNames.length;i++){
if(tableThNames[i] != ''){
var map = {};
if(fields[i] != ''){
map['title'] = tableThNames[i];
//重新组织选项
//转换RH
if(fields[i] == 'RH'){
map['field'] = 'rh';
fields[i] = 'rh';
}else{
map['field'] = fields[i];
}
fieldCns += fields[i] + ",";
}
if(dateFields.indexOf(fields[i]) != -1){
map['formatter'] = function (value, row, index) {return formatTime(value,'yyyy-MM-dd')};
}
columns.push(map);
}
}
$("#fieldCns").val(fieldCns);
}
var map1 = {};
map1['title'] = '权限';
map1['field'] = 'Button';
map1['align'] = 'center';
map1['formatter'] = 'AddFunctionAltyFont';
columns.push(map1)
var sql = $("#sql").val();
if(sql == ''){
sql = initSql;
}
var orderBys = $("#orderBys").val();
sql += orderBys;
//console.log(sql)
var flag = $("#showPrint").val();
//固定列标识
var mixFlag = false;
if(flag == 1){
flag = true;
}else{
flag = false;
mixFlag = true;
}
//生成用户数据
$('#mytab').bootstrapTable({
method: 'post',
contentType:'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText : '上一页',
paginationNextText : '下一页',
paginationFirstText: '<',
paginationLastText: '>',
detailView: flag,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(*
pageList: [5,10,20,50,100,500,1000],//可供选择的每页的行数(*
height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
buttonsAlign: "left",//按钮对齐方式
columns:columns,
fixedColumns: mixFlag,//固定列
fixedNumber:5,//固定前七列
locale:'zh-CN',//中文支持,
url:path+'/template/cutomSearchTableSouth',//排序方式
queryParams: function (params) {
return{
sql:sql,
limit : params.limit, // 每页显示数量
offset : params.offset, // SQL语句起始索引
page : (params.offset / params.limit) + 1 //当前页码
}
},
responseHandler:function(res){
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total:res.total,rows:res.list});
return nres[0];
},
onLoadSuccess:function(res){
$(".clearfix").height(0);
$(".page-list").show();
$(".fixed-table-body").css("overflow","auto");
//赋值总数
$("#rows").val(res.total);
//全选
$('.fixed-table-container').on('click','input[name="btSelectAll"]',function(){
if($(this).is(':checked')){
$('input[name="btSelectItem"]').prop('checked',true);
}else{
$('input[name="btSelectItem"]').prop('checked',false);
}
})
//逐个选择
$('.fixed-table-container').on('click','input[name="btSelectItem"]',function(){
var inputs = $(this).parents('.fixed-table-body-columns').find('input[name="btSelectItem"]')
var num = 0;
inputs.each(function(){
if($(this).is(':checked')){
num++;
}
});
if(num==inputs.length){
$('input[name="btSelectAll"]').prop('checked',true);
}else{
$('input[name="btSelectAll"]').prop('checked',false);
}
var index = $(this).parents('tr').index();
$('#Table1').find('input[name="btSelectItem"]').eq(index).click();
});
},
//监听分页点击事件
onPageChange: function(num, type) {
pageNumber = num;
},
//选中单个复选框
onCheck:function(row){
var checks = $("#checks").val();
$("#checks").val( checks +="'"+row.patientId + "',");
},
//取消单个复选框
onUncheck:function(row){
var checks = $("#checks").val();
checks = checks.replace("'"+row.patientId + "',","");
$("#checks").val(checks);
},
//全选
onCheckAll:function(rows){
$("#checks").val("");
var checks = '';
for(var i=0;i<rows.length;i++)
{
checks += "'"+rows[i].patientId + "',"
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
$("#checks").val("");
},
//双击事件
onDblClickRow: function (row) {
//是否可查看
var borrowingOper = row.borrowingOper;
if (null != borrowingOper && borrowingOper == 1) {
window.open(returnShowDetailUrl(row.patientId));
}else {
toastr.warning("不可查看,必须申请通过!")
}
},
})
}
//定义查看详情的请求地址url
function returnShowDetailUrl(patientId) {
return path + '/font/showRecordFontSouth?patientId=' + patientId;
}
/**
* 单个借阅申请
* @param patientId
*/
function borrowingFont(patientId){
pickTime("effeTime", null);
$("#typeId").val('approves');
$("#checks").val("'"+patientId+"',");
$("#approveId").val("");
setFormToken();
}
/**
* 借阅申请列表提交
*/
function addApprove() {
if($("#effeTime").val() != ''){
var patientIds = $("#checks").val();
if(patientIds != '' && patientIds != undefined) {
var id = $("#approveId").val();
var effeTime = $("#effeTime").val();
var effeDays = $("#effeDays").val();
var applyType = 4;
var applyState = 2;
var applyReason = $("#applyReason").val();
$.ajax({
type:'post',
url:path+'/font/addApplyApprove',
data:{id:id,applyState:applyState,effeTime:effeTime,effeDays:effeDays,applyType:applyType,applyReason:applyReason,patientIds:patientIds,formToken:$("#formToken").val()},
dataType:'json',
success:function(data){
if(data!=null && data.code == 0){
toastr.success("申请成功,目前审核中,请耐心等待!");
$('#myModal1').modal('hide');
reLoadFontTable();
}else{
toastr.error(data.msg);
}
}
})
}
} else {
toastr.warning("有效时间不能为空!");
$("#effeTime").focus();
}
}
/**
* 列表行操作按钮
* @param value
* @param row
* @param index
* @returns {string}
* @constructor
*/
function AddFunctionAltyFont(value, row, index) {
var borrowingOper = row.borrowingOper;
var str = '';
if (borrowingOper == 1) {
str = '<a type="button" href="' + path + '/font/showRecordFontSouth?patientId=' + row.patientId + '" class="btn btn-danger TableView btn-sm" target="_blank">查看详情</a>';
}
if (borrowingOper == 2) {
str = '<p style="color:grey">正在等待审批</p>';
}
if (borrowingOper == 0) {
var patientId = "'" + row.patientId + "'";
str = '<button type="button" class="btn btn-primary TableView btn-sm" onclick="borrowingFont('+patientId+')" data-toggle="modal" data-target="#myModal1">借阅申请</button>';
}
return str;
}
/**
* 刷新表格
*/
function reLoadFontTable(){
$("#mytab").bootstrapTable('refresh',path+'/template/cutomSearchTableSouth');
$('#mytab').bootstrapTable('selectPage', pageNumber);
$("#checks").val("");
}
//搜索功能
function search() {
var startTime1 = $("#startTime1").val();
var endTime1 = $("#endTime1").val();
var startTime2 = $("#startTime2").val();
var endTime2 = $("#endTime2").val();
var age1 = $("#age1").val();
var age2 = $("#age2").val();
var diag_code1 = $("#diag_code1").val();
var diag_code2 = $("#diag_code2").val();
var operate_code1 = $("#operate_code1").val();
var operate_code2 = $("#operate_code2").val();
var other_diag_name1 = $("#other_diag_name1").val();
var other_diag_name2 = $("#other_diag_name2").val();
if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) {
toastr.warning("请输入完整年龄段!");
return false;
}
if ((startTime1 != '' && endTime1 == '') || (startTime1 == '' && endTime1 != '')) {
toastr.warning("请输入完整的入院日期时间段!");
return false;
}
if ((startTime2 != '' && endTime2 == '') || (startTime2 == '' && endTime2 != '')) {
toastr.warning("请输入完整的出院日期时间段!");
return false;
}
if ((diag_code1 != '' && diag_code2 == '') || (diag_code1 == '' && diag_code2 != '')) {
toastr.warning("请输入完整的主诊编码范围!");
return false;
}
if ((operate_code1 != '' && operate_code2 == '') || (operate_code1 == '' && operate_code2 != '')) {
toastr.warning("请输入完整的手术编码范围!");
return false;
}
if ((other_diag_name1 != '' && other_diag_name2 == '') || (other_diag_name1 == '' && other_diag_name2 != '')) {
toastr.warning("请输入完整的其他诊断编码范围!");
return false;
}
getSql();
freshTableSouth();
}
/*****************************************输入框边输入内容边搜索功能方法*************************************************/
//级联病案号且长度超过4个字节才查询
function getInpatientNoContents(id) {
var keyword = document.getElementById(id).value;
if (keyword.length > 4) {
var ajax = new XMLHttpRequest();
var url = path + "/approve/getInpatientNosByName?inpatientNo=" + keyword;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//级联诊断码
function getDiagCodeContents(id) {
var keyword = document.getElementById(id).value;
if (keyword.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getDiagCodeContents?code=" + keyword;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//级联诊断名称
function getDiagNameContents(id) {
var code = "";
var name = document.getElementById(id).value;
if (name.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getDiagCodeContents?code=" + code + "&name=" + name;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
return;
}
clearContent('main_diag_name')
}
//级联手术编码
function getOperateCodeContents(id) {
var keyword = document.getElementById(id).value;
if (keyword.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getOperateCodeContents?code=" + keyword;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//级联手术名称
function getOperateNameContents(id) {
var name = document.getElementById(id).value;
var code = "";
if (name.length > 2) {
var ajax = new XMLHttpRequest();
var url = path + "/commom/getOperateCodeContents?code=" + code + "&name=" + name;
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
var result = ajax.responseText;
insertContent(result, id);
}
}
}
} else {
clearContent(id);
return;
}
}
//添加内容tr td
function insertContent(content, id) {
clearContent(id);
setLocation(id);
var json = JSON.parse(content);
for (key in json) {
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
var td4 = document.createElement("td");
tr.setAttribute("bgcolor", "#FFFAFA");
tr.setAttribute("border", "0");
if (id == 'main_diag_name'){
td1.innerHTML = json[key];
tr.appendChild(td1);
} else {
if (id == 'inpatient_no' || id == 'diag_code' || id == 'operate_code') {
td2.innerHTML = key;
} else {
td2.innerHTML = json[key];
td4.innerHTML = key;
}
tr.appendChild(td2);
tr.appendChild(td4);
}
document.getElementById(id + "Content").appendChild(tr);
tr.onmouseover = function () {
this.className = 'mouseOver';
document.getElementById(id).value = $(this).children("td").eq(0).html();
};
tr.onmouseout = function () {
this.className = 'mouseOut';
};
tr.onclick = function () {
clearContent(id);
}
}
}
//清楚内容方法
function clearContent(id) {
var popNode = document.getElementById(id + "Div");
popNode.style.border = "none";
var contentNode = document.getElementById(id + "Content");
var len = contentNode.childNodes.length;
for (var i = len - 1; i >= 0; i--) {
contentNode.removeChild(contentNode.childNodes[i]);
}
}
//设置样式
function setLocation(id) {
var inputNode = document.getElementById(id);
var width = inputNode.offsetWidth;
var left = inputNode["offsetLeft"];
var top = inputNode.offsetHeight + inputNode["offsetTop"];
var popNode = document.getElementById(id + "Div");
popNode.style.border = "gray 0.5px solid";
popNode.style.width = width + "px";
popNode.style.top = top + "px";
popNode.style.left = left + "px";
document.getElementById(id + "Content_table").style.width = width + "px";
}

@ -0,0 +1,165 @@
//加载数据表格
$('#mytab').bootstrapTable({
height: 7000,
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
pageList: [10, 15, 20, 30, 50],//可供选择的每页的行数(*
height: 320, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns: [
{
title: '全选',
field: 'select',
checkbox: true,
width: 25,
align: 'center',
valign: 'middle'
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize = $('#mytab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber = $('#mytab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title: '病案号',
field: 'inpatientNo',
},
{
title: '姓名',
field: 'name',
},
{
title: '住院次数',
field: 'admissTimes',
},
{
title: '出院日期',
field: 'disDate',
formatter: function (value) {
if (value != '' && value.length == 21) {
return value.substring(0, value.length - 2);
}
}
},
{
title: '出院科室',
field: 'disDept',
},
{
title: '扫描状态',
formatter: function () {
return '已扫描'
}
},
{
title: '操作',
formatter: function (value, row) {
return '<a type="button" href="' + path + '/font/showRecordFontSouth?patientId=' + row.patientId + '" class="btn btn-danger TableView btn-sm" target="_blank">查看详情</a>';
}
}
],
locale: 'zh-CN',//中文支持,
url: path + '/font/getRecordListByInpatientNoSouth',//排序方式
queryParams: function (params) {
return {
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1, //当前页码,
inpatientNo: $("#inpatientNo").val(),
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function () {
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
},
//双击事件
onDblClickRow: function (row) {
var isShowDetail = row.isShowDetail;
if (isShowDetail == 2) {
window.open(returnShowDetailUrl(row.patientId));
}
},
})
/**
* 单个申请借阅
* @param patientId
*/
function borrowingFont(patientId){
pickTime("effeTime", null);
$("#typeId").val('approves');
$("#check").val("'"+patientId+"'");
$("#approveId").val("");
setFormToken();
}
function addApprove() {
if($("#effeTime").val() != ''){
var patientIds = $("#check").val();
if(patientIds != '' && patientIds != undefined) {
var id = $("#approveId").val();
var effeTime = $("#effeTime").val();
var effeDays = $("#effeDays").val();
var applyType = 4;
var applyState = 2;
var applyReason = $("#applyReason").val();
$.ajax({
type:'post',
url:path+'/font/addApplyApprove',
data:{id:id,applyState:applyState,effeTime:effeTime,effeDays:effeDays,applyType:applyType,applyReason:applyReason,patientIds:patientIds,formToken:$("#formToken").val()},
dataType:'json',
success:function(data){
if(data!=null && data.code == 0){
toastr.success("申请成功,目前审核中,请耐心等待!");
$('#myModal1').modal('hide');
reLoadFontTable();
}else{
toastr.error(data.msg);
}
}
})
}
} else {
toastr.warning("有效时间不能为空!");
$("#effeTime").focus();
}
}
function reLoadFontTable(){
$("#mytab").bootstrapTable('refresh',path+'/font/getRecordListByInpatientNoSouth');
$('#mytab').bootstrapTable('selectPage', pageNumber);
$("#check").val("");
}
//定义查看详情的请求地址url
function returnShowDetailUrl(patientId) {
return path + '/font/showRecordFontSouth?patientId=' + patientId;
}
//病案預覽
//查看详情
function showDetail(patientId) {
//隐藏模板选项
window.location.href = returnShowDetailUrl(patientId);
}

@ -7,11 +7,6 @@ var isIE = function(ver) {
//初始化函数 //初始化函数
$(function(){ $(function(){
$('.contentDiv').css('height', '100%').css('height', '-=140px'); $('.contentDiv').css('height', '100%').css('height', '-=140px');
//加载iframe
//谷歌
//$("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val());
//ie8加载iframe
//$("#iframe").prop("src",path+"/font/showRecordIframeBloodFont?patientId="+$("#patientId").val()+"&flag=file_path");
var ie = isIE(8); var ie = isIE(8);
if(ie) { if(ie) {
//ie8加载iframe //ie8加载iframe
@ -91,29 +86,3 @@ function loadAdmissTimes(){
} }
}) })
} }
/*//住院次数变更事件
$("#admissTimes").change(function () {
var val = $(this).val();
$(".admissTimes").val(val);
var inpatientNo = $("#inpatientNo").val();
var name = $("#name").val();
//变更基本信息,出院时间,出院科室,主要诊断,其他诊断
$.ajax({
type:'post',
url:path+"/commom/getOtherDiagNameByAdmissTimesAndInpatientNo",
data:{name:$("#name").val(),admissTimes:val,inpatientNo:$("#inpatientNo").val(),startTime2:$("#disDate").val()},
dataType:'json',
success:function(d){
if(d != null){
$("#patientId").val(d.patientId);
$("#iframe").prop("src",path+"/commom/showRecordIframe?patientId="+d.patientId);
$("#disDate").val(d.disDate);
$("#disDeptName").val(d.disDept);
$("#diagName").val(d.mainDiagName);
$("#otherDiagName").val(d.otherDiagName);
//重新加载其他诊断名称鼠标滑过显示全部文本
loadQtip('.otherDiagName');
}
}
})
})*/

@ -0,0 +1,91 @@
//判断是否是ie8
var isIE = function(ver) {
var b = document.createElement('b')
b.innerHTML = '<!--[if IE ' + ver + ']><i></i><![endif]-->'
return b.getElementsByTagName('i').length === 1
}
//初始化函数
$(function(){
$('.contentDiv').css('height', '100%').css('height', '-=140px');
var ie = isIE(8);
debugger
if(ie) {
//ie8加载iframe
console.log("ssd");
$("#iframe").prop("src",path+"/font/showRecordIframeFontSouth?patientId="+$("#patientId").val()+"&flag=file_path");
}else{
//谷歌
$("#iframe").prop("src",path+"/commom/showRecordIframeSouth?patientId="+$("#patientId").val()+"&flag=file_path"+"&rootPaths="+$("#rootPaths").val());
}
//加载其他诊断名称鼠标滑过显示全部文本
//loadQtip('.otherDiagName');
//加载病案信息
loadRecord();
//加载住院次数
loadAdmissTimes();
})
//加载病案信息
function loadRecord(){
$.ajax({
type:'get',
url:path+'/commom/getRecord',
data:{patientId:$("#patientId").val(),flag:$("#flag").val()},
async:false,
dataType:'json',
success:function (data) {
if(null != data && data != ''){
$("#inpatientNo").val(data.inpatientNo);
$("#name").val(data.name);
$("#admissTimes1").val(data.admissTimes);
$("#inpatientNo1").val(data.inpatientNo);
$("#name1").val(data.name);
$("#admissTimesValue").val(data.admissTimes);
$("#disDate").val(data.disDate);
$("#disDeptName").val(data.disDept);
$("#diagName").val(data.mainDiagName);
$("#otherDiagName").val(data.otherDiagName);
//判断哪家医院赋值扫描图片和新上传图片的根目录集合
var flag = $("#flag").val();
var rootPaths = "";
if(flag != '' && flag == 'home_addr'){
//脐血库
rootPaths = data.homeAddr + ",";
}else if(flag != '' && flag == 'file_path'){
//祈福医院
rootPaths = data.filePath + ",";
}
//拼接新上传图片根目录
if(data.newFile != null && data.newFile != ''){
rootPaths += data.newFile;
}
$("#rootPaths").val(rootPaths);
}
}
})
}
//加载住院次数
function loadAdmissTimes(){
$.ajax({
type:'get',
url:path+'/commom/getAdmissTimes',
data:{name:$("#name").val(),inpatientNo:$("#inpatientNo").val()},
dataType:'json',
success:function (data) {
if(null != data && data != ''){
$("#admissTimes").empty();
var html = '';
for (var i = 0; i < data.length; i++) {
if($("#admissTimesValue").val() == (data[i].admissTimes)){
html += '<option value="'+data[i].admissTimes+'" selected>'+data[i].admissTimesName+'</option>';
}else{
html += '<option value="'+data[i].admissTimes+'">'+data[i].admissTimesName+'</option>';
}
}
$("#admissTimes").append(html);
}
}
})
}

@ -32,6 +32,7 @@ var tree = $('#data').data('jstree', false).empty().jstree({
var assortList = data[0].children; var assortList = data[0].children;
var assortIds = ''; var assortIds = '';
var sources = ''; var sources = '';
var scanPages = '';
if(assortList != '') { if(assortList != '') {
for (var i = 0; i < assortList.length; i++) { for (var i = 0; i < assortList.length; i++) {
var picList = assortList[i].children; var picList = assortList[i].children;
@ -149,12 +150,13 @@ tree.on('uncheck_node.jstree', function(node, data, event) {
selectAssortIds(); selectAssortIds();
}); });
//加载pdf按钮功能 //加载pdf按钮功能
function onloadPdf(){ function onloadPdf(scanPages){
$("#loading1").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%"); $("#loading1").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%");
var patientId = $("#patientId").val(); var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val(); var assortIds = $("#assortIds").val();
var sources = $("#sources").val(); var sources = $("#sources").val();
var flag = $("#flag").val(); var flag = $("#flag").val();
var rootPaths = parent.$("#rootPaths").val();
var url = path+"/font/showRecordContentBloodFont?flag="+flag+"&patientId="+patientId+"&scanPages="+assortIds+"&sources="+sources; var url = path+"/font/showRecordContentBloodFont?flag="+flag+"&patientId="+patientId+"&scanPages="+assortIds+"&sources="+sources;
$("#iframe1").prop("src",url); $("#iframe1").prop("src",url);
} }
@ -170,3 +172,4 @@ function printInfoBlood(){
var flag = $("#flag").val(); var flag = $("#flag").val();
post(path+'/template/printInfoBlood',{"patientIds":patientId,"assortIds":assortIds,"typeId":typeId,"flag":flag}); post(path+'/template/printInfoBlood',{"patientIds":patientId,"assortIds":assortIds,"typeId":typeId,"flag":flag});
} }

@ -0,0 +1,159 @@
//下载adobe地址
//http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/chs/AdbeRdr930_zh_CN.exe
window.onload = function () {
var checkAdobeReader = Check_AdobeReader();
if(checkAdobeReader != 'Acrobat Version: 6.0'){
alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!");
location = path + "/static/js/font/AdbeRdr60_chs_full.exe";
}
}
var tree = $('#data').data('jstree', false).empty().jstree({
'core': {
"data" : function (obj, callback){
$.ajax({
type : "post",
url : path+'/font/getFontBloodRecordTree?patientId='+$("#patientId").val(),
dataType : "json",
success : function(data) {
var assortList = data[0].children;
var assortIds = '';
var sources = '';
if(assortList != '') {
for (var i = 0; i < assortList.length; i++) {
var picList = assortList[i].children;
for (var j = 0; j < picList.length; j++) {
assortIds += picList[j].newName + ",";
sources += picList[j].source + ",";
}
}
if(assortIds != ''){
assortIds = assortIds.substring(0,assortIds.length-1);
}
if(sources != ''){
sources = sources.substring(0,sources.length-1);
}
$("#assortIds").val(assortIds);
$("#sources").val(sources);
onloadPdf();
}else{
$("#jstree").html("暂无数据!");
}
if(data){
callback.call(this, data);
}
}
});
},
"check_callback": true
},
plugins: ["checkbox"],
"checkbox": {
"keep_selected_style": false,//是否默认选中
"three_state": true,//父子级别级联选择
"tie_selection": false
},
});
function Check_AdobeReader() {
var displayString;
var acrobat = new Object();
acrobat.installed = false;
acrobat.version = "0.0";
if (navigator.plugins && navigator.plugins.length) {
for (x = 0; x < navigator.plugins.length; x++) {
if (navigator.plugins[x].description.indexOf("Adobe Acrobat") != -1) {
acrobat.version = parseFloat(navigator.plugins[x].description.split("Version ")[1]);
if (acrobat.version.toString().length == 1) acrobat.version += ".0";
acrobat.installed = true;
displayString = "Acrobat Version: " + acrobat.version;
break;
} else if (navigator.plugins[x].description.indexOf("Adobe PDF Plug-In") != -1) {
acrobat.installed = true;
acrobat.version = "8+";
displayString = "Acrobat Version 8 or Above";
}
}
} else if (window.ActiveXObject) {
for (x = 2; x < 10; x++) {
try {
oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');");
if (oAcro) {
acrobat.installed = true;
acrobat.version = x + ".0";
displayString = "Acrobat Version: " + acrobat.version;
}
}
catch (e) { }
}
try {
oAcro4 = new ActiveXObject("PDF.PdfCtrl.1");
if (oAcro4) {
acrobat.installed = true;
acrobat.version = '4.0';
displayString = 'Acrobat Version: ' + acrobat.version;
}
}
catch (e) { }
try {
oAcro7 = new ActiveXObject('AcroPDF.PDF.1');
if (oAcro7) {
acrobat.installed = true;
acrobat.version = '7.0';
displayString = 'Acrobat Version: ' + acrobat.version;
}
}
catch (e) { }
}
return displayString;
}
//checkBox选中、取消选中逻辑
function selectAssortIds(){
var instance = $('#data').jstree(true);//获取jstree对象
var nodes = instance.get_checked(true);
var assortIds = '';
var sources = '';
for(var i = 0;i < nodes.length;i++){
if(nodes[i].children == ''){
assortIds += nodes[i].original.newName + ",";
sources += nodes[i].original.source + ",";
}
}
if(assortIds != ''){
assortIds = assortIds.substring(0,assortIds.length - 1);
}
if(sources != ''){
sources = sources.substring(0,sources.length - 1);
}
$("#assortIds").val(assortIds);
$("#sources").val(sources);
}
//checkbox 选中事件
$('#data').on("check_node.jstree", function (node, data, event) {
selectAssortIds();
});
tree.on('uncheck_node.jstree', function(node, data, event) {
selectAssortIds();
});
//加载pdf按钮功能
function onloadPdf(){
$("#loading1").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%");
var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val();
var sources = $("#sources").val();
var flag = $("#flag").val();
var url = path+"/font/showRecordContentSouthFont?flag="+flag+"&patientId="+patientId+"&scanPages="+assortIds+"&sources="+sources;
$("#iframe1").prop("src",url);
}
//记录打印记录
function printInfoBlood(){
var patientId = "'"+$("#patientId").val()+"'";
var assortIds = $("#assortIds").val();
var typeId = $("#typeId").val();
if(typeId == undefined){
typeId = '';
}
var flag = $("#flag").val();
post(path+'/template/printInfoBlood',{"patientIds":patientId,"assortIds":assortIds,"typeId":typeId,"flag":flag});
}

@ -203,7 +203,6 @@ function deleteById(id){
url: path + '/funGroupDistribution/deleteById/' + id, url: path + '/funGroupDistribution/deleteById/' + id,
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
debugger
if (data.code == 100) { if (data.code == 100) {
toastr.success("删除成功!"); toastr.success("删除成功!");
refreshTable(); refreshTable();

@ -0,0 +1,213 @@
var pageNumber;
$('#mytab').bootstrapTable({
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText : '上一页',
paginationNextText : '下一页',
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*
height: $(window).height()-109, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns:[
{
title:'全选',
field:'select',
checkbox:true,
width:25,
align:'center',
valign:'middle'
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize=$('#mytab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber=$('#mytab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title:'访问用户',
field:'creater',
},
{
title:'日志主题',
field:'logTitle',
},
{
title:'日志内容',
field:'logContent',
},
{
title:'备注',
field:'remark',
},
{
title:'操作时间',
field:'createDate',
},
{
title:'ip地址',
field:'ip',
},
{
title:'操作',
field:'id',
formatter: function(value,row,index){
var deleteOper = row.deleteOper;
if(deleteOper == 1){
var editanddrop = '<button type="button" onclick="deleteLogById('+row.logId+')" class="btn btn-sm btn-danger">删除</button>';
return editanddrop;
}
}
}
],
locale:'zh-CN',//中文支持,
url:path+'/otherManage/getLogListIf',//排序方式
queryParams: function (params) {
return{
limit : params.limit, // 每页显示数量
offset : params.offset, // SQL语句起始索引
page : (params.offset / params.limit) + 1, //当前页码,
startTime:$("#startTime1").val(),
endTime:$("#endTime1").val(),
creater:$("#creater").val(),
logTitle:$("#logTitle").val(),
logContent:$("#logContent").val()
}
},
//选中单个复选框
onCheck:function(row){
var checks = $("#checks").val();
$("#checks").val(checks+=row.logId + ",");
},
//取消单个复选框
onUncheck:function(row){
var checks = $("#checks").val();
checks = checks.replace(row.logId + ",");
$("#checks").val(checks);
},
//全选
onCheckAll:function(rows){
$("#checks").val("");
var checks = '';
for(var i=0;i<rows.length;i++)
{
checks += rows[i].logId + ","
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
$("#checks").val("");
},
responseHandler:function(res){
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total:res.total,rows:res.list});
return nres[0];
},
onLoadSuccess:function(){
$(".page-list").show();
$(".fixed-table-body").css("overflow","auto");
},
//监听分页点击事件
onPageChange: function(num, type) {
pageNumber = num;
}
})
//查询按钮
function refreshTable(){
$("#checks").val("");
$('#mytab').bootstrapTable('refresh',{
url : path+'/otherManage/getLogListIf'
})
$('#mytab').bootstrapTable('selectPage', pageNumber);
}
//删除
function deleteLogById(logId){
Common.confirm({
title: "提示",
message: '确定删除这条数据吗?',
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/otherManage/deleteLogById/' + logId,
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("删除成功!");
refreshTable();
} else {
toastr.warning(data.msg);
}
}
})
}
}
})
}
//批量删除
function deleteLogByIds(){
var ids = $("#checks").val();
if(ids != ''){
var idStr = ids.split(",");
Common.confirm({
title: "提示",
message: '确定删除选中的'+ (idStr.length-1)+ '条数据吗?',
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/otherManage/deleteLogByIds/' + ids,
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("删除成功!");
$("#checks").val("");
refreshTable();
} else {
toastr.warning(data.msg);
}
}
})
}
}
})
}else{
toastr.warning("请至少选中一个!");
}
}
//导出excel功能
function exportExcel(){
var checks = $("#checks").val();
if(checks != '') {
checks = checks.substring(0, checks.length - 1);
var url = path+"/otherManage/exportExcel?startTime="+$("#startTime1").val()+"&endTime="+$("#endTime1").val()+"&creater="+$("#creater").val()+"&logTitle=接口查看&logContent="+$("#logContent").val()
+"&checks="+checks;
window.location.href = url;
}else{
Common.confirm({
title: "提示",
message: "没有选中,您确定要按搜索栏条件导出?",
operate: function (reselt) {
if (reselt) {
var url = path+"/otherManage/exportExcel?startTime="+$("#startTime1").val()+"&endTime="+$("#endTime1").val()+"&creater="+$("#creater").val()+"&logTitle=接口查看&logContent="+$("#logContent").val();
window.open(url);
}
}
})
}
}
$(function () {
initDateInput(1);
})

@ -2,6 +2,9 @@ $(function () {
getTime(); getTime();
}); });
/**
* 获取当前年月日
*/
function getTime() { function getTime() {
var date = new Date(); var date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
@ -11,7 +14,16 @@ function getTime() {
$("#timeShow").html(time); $("#timeShow").html(time);
} }
//待审批图片点击事件 /**
* 待审批图片点击事件
*/
function notApproveClick(){ function notApproveClick(){
location.href = path + '/approve/approveManageList174'; location.href = path + '/approve/approveManageList174';
} }
/**
* 下载数量点击事件
*/
function pdfDownloadClick() {
location.href = path + '/downloadInfoList/pageUI174';
}

@ -243,6 +243,7 @@ $("#isOper").change(function () {
//时间格式属性名集合 //时间格式属性名集合
var commomtable = 'commomtable'; var commomtable = 'commomtable';
var commomtable1 = 'commomtable1';
//拼接sql //拼接sql
function getSql() { function getSql() {
@ -423,6 +424,7 @@ function getSql() {
name = 'dis_date'; name = 'dis_date';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime2").val() + " 00:00:00' AND '" + $("#endTime2").val() + " 23:59:59' AND "; whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime2").val() + " 00:00:00' AND '" + $("#endTime2").val() + " 23:59:59' AND ";
} }
debugger
//诊断名称 //诊断名称
if ($("#diag_name").val() != '') { if ($("#diag_name").val() != '') {
name = 'main_diag_name'; name = 'main_diag_name';
@ -465,7 +467,37 @@ function getSql() {
name = 'operate_name'; name = 'operate_name';
whereNames += "t_operate." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; whereNames += "t_operate." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
} }
var userName = "'" + $("#userId").val() + "'"; //主诊编码范围
if ($("#diag_code1").val() != '' && $("#diag_code2").val() != '') {
name = 'main_diag_code';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#diag_cod下·下·e1").val() + "' AND '" + $("#diag_code2").val() + "' AND ";
}
//手术编码范围
if ($("#operate_code1").val() != '' && $("#operate_code2").val() != '') {
name = 'operate_code';
whereNames += "t_operate." + name + " BETWEEN '" + $("#operate_code1").val() + "' AND '" + $("#operate_code2").val() + "' AND ";
}
//其他诊断编码范围
if ($("#other_diag_name1").val() != '' && $("#other_diag_name2").val() != '') {
name = 'other_diag_name';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#other_diag_name1").val() + "' AND '" + $("#other_diag_name2").val() + "' AND ";
}
//科主任
if ($("#dept_director").val() != '') {
name = 'dept_director';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#dept_director").val() + "%' AND ";
}
//主任(副主任)
if ($("#director").val() != '') {
name = 'director';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#director").val() + "%' AND ";
}
//住院医师
if ($("#admiss_doctor").val() != '') {
name = 'admiss_doctor';
whereNames += commomtable1 + "." + name + " LIKE '%" + $("#admiss_doctor").val() + "%' AND ";
}
var userName = "'" + $("#userName").val() + "'";
fromTableNames += ' left join emr_apply_approve on ' + commomtable + '.patient_id = emr_apply_approve.patient_id \n' + fromTableNames += ' left join emr_apply_approve on ' + commomtable + '.patient_id = emr_apply_approve.patient_id \n' +
'and emr_apply_approve.approve_state = 1 and emr_apply_approve.effe_time > GETDATE()-1 and emr_apply_approve.applyer = ' + userName + ' and emr_apply_approve.apply_type != 3 ' + 'and emr_apply_approve.approve_state = 1 and emr_apply_approve.effe_time > GETDATE()-1 and emr_apply_approve.applyer = ' + userName + ' and emr_apply_approve.apply_type != 3 ' +
' left join emr_apply_approve emr_apply_approve1 on ' + commomtable + '.patient_id = emr_apply_approve1.patient_id \n' + ' left join emr_apply_approve emr_apply_approve1 on ' + commomtable + '.patient_id = emr_apply_approve1.patient_id \n' +
@ -476,6 +508,9 @@ function getSql() {
if($("#all_diag_name").val() != ''){ if($("#all_diag_name").val() != ''){
fromTableNames += ' left join t_diag on '+commomtable+'.patient_id=t_diag.patient_id'; fromTableNames += ' left join t_diag on '+commomtable+'.patient_id=t_diag.patient_id';
} }
if ($("#admiss_doctor").val() != '' || $("#director").val() != '' || $("#dept_director").val() != '') {
fromTableNames += ' left join ' + commomtable1 + ' on ' + commomtable1 + '.patient_id = ' + commomtable + '.patient_id';
}
//拼接手术表 //拼接手术表
var operFlag = false; var operFlag = false;
$(".operTable").each(function () { $(".operTable").each(function () {
@ -484,7 +519,7 @@ function getSql() {
return false; return false;
} }
}) })
if (operFlag) { if (operFlag || $("#operate_code1").val() != '' || $("#operate_code2").val() != '') {
otherTable = 't_operate'; otherTable = 't_operate';
fromTableNames += ' left join ' + otherTable + ' on ' + commomtable + '.patient_id = ' + otherTable + '.patient_id'; fromTableNames += ' left join ' + otherTable + ' on ' + commomtable + '.patient_id = ' + otherTable + '.patient_id';
} }
@ -497,16 +532,8 @@ function getSql() {
var isOper = $("#isOper").val(); var isOper = $("#isOper").val();
if (isOper != '' && isOper == 1) { if (isOper != '' && isOper == 1) {
name = 'is_oper'; name = 'is_oper';
whereNames += commomtable + "." + name + " = '' AND "; whereNames += commomtable + "." + name + " = '1' AND ";
} }
//拼接院内感染表
/*var taint_name = $("#taint_name").val();
if(taint_name != ''){
otherTable = 't_taint';
fromTableNames += ' left join '+otherTable+' on '+commomtable+'.patient_id='+otherTable+'.patient_id';
name = 'taint_name';
whereNames += otherTable+".taint_type='1' AND "+otherTable+"."+name+" LIKE '%"+$("#"+name).val()+"%' AND ";
}*/
if (whereNames != ' where ') { if (whereNames != ' where ') {
whereNames = whereNames.substring(0, whereNames.length - 4); whereNames = whereNames.substring(0, whereNames.length - 4);
var orderBys = " ORDER BY " + commomtable + ".inpatient_no," + commomtable + ".admiss_times"; var orderBys = " ORDER BY " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
@ -514,7 +541,13 @@ function getSql() {
$("#sql").val(sql); $("#sql").val(sql);
$("#orderBys").val(orderBys); $("#orderBys").val(orderBys);
} }
//console.log(sql); if (whereNames == ' where ') {
var orderBys = " ORDER BY " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
var sql = selectNames + fromTableNames;
$("#sql").val(sql);
$("#orderBys").val(orderBys);
}
console.log(sql);
} else { } else {
$("#sql").val(""); $("#sql").val("");
} }
@ -528,6 +561,12 @@ function search() {
var endTime2 = $("#endTime2").val(); var endTime2 = $("#endTime2").val();
var age1 = $("#age1").val(); var age1 = $("#age1").val();
var age2 = $("#age2").val(); var age2 = $("#age2").val();
var diag_code1 = $("#diag_code1").val();
var diag_code2 = $("#diag_code2").val();
var operate_code1 = $("#operate_code1").val();
var operate_code2 = $("#operate_code2").val();
var other_diag_name1 = $("#other_diag_name1").val();
var other_diag_name2 = $("#other_diag_name2").val();
if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) { if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) {
toastr.warning("请输入完整年龄段!"); toastr.warning("请输入完整年龄段!");
return false; return false;
@ -540,6 +579,18 @@ function search() {
toastr.warning("请输入完整的出院日期时间段!"); toastr.warning("请输入完整的出院日期时间段!");
return false; return false;
} }
if ((diag_code1 != '' && diag_code2 == '') || (diag_code1 == '' && diag_code2 != '')) {
toastr.warning("请输入完整的主诊编码范围!");
return false;
}
if ((operate_code1 != '' && operate_code2 == '') || (operate_code1 == '' && operate_code2 != '')) {
toastr.warning("请输入完整的手术编码范围!");
return false;
}
if ((other_diag_name1 != '' && other_diag_name2 == '') || (other_diag_name1 == '' && other_diag_name2 != '')) {
toastr.warning("请输入完整的其他诊断编码范围!");
return false;
}
getSql(); getSql();
freshTable(); freshTable();
} }
@ -550,15 +601,12 @@ function showDetail(patientId) {
//window.location.href=path+"/commom/showRecord?patientId="+patientId; //window.location.href=path+"/commom/showRecord?patientId="+patientId;
} }
//导出excel功能 //导出excel功能
function exportExcel() { function exportExcel() {
getChecked(); getChecked();
//var isInputValue = getInputValue();
var checks = $("#checks").val(); var checks = $("#checks").val();
/*if(isInputValue == '' && checks == ''){
toastr.warning("请至少选择一个!")
}else{
*/
if ($("#rows").val() > 5000 && checks == '') { if ($("#rows").val() > 5000 && checks == '') {
toastr.warning("数据量大,暂提供5000条以内数据导出!"); toastr.warning("数据量大,暂提供5000条以内数据导出!");
} else { } else {

@ -43,10 +43,8 @@ function loadRecord(){
$("#name1").val(data.name); $("#name1").val(data.name);
$("#admissTimesValue").val(data.admissTimes); $("#admissTimesValue").val(data.admissTimes);
var disDate = data.disDate; var disDate = data.disDate;
if(disDate != null && disDate != ''){
disDate = covertDate(disDate); disDate = covertDate(disDate);
$("#disDate").val(disDate); $("#disDate").val(disDate);
}
$("#disDeptName").val(data.disDept); $("#disDeptName").val(data.disDept);
$("#diagName").val(data.mainDiagName); $("#diagName").val(data.mainDiagName);
var delCount = data.delCount; var delCount = data.delCount;
@ -65,8 +63,8 @@ function loadRecord(){
rootPaths = data.filePath + ","; rootPaths = data.filePath + ",";
} }
//拼接新上传图片根目录 //拼接新上传图片根目录
if(data.newFile != null && data.newFile != ''){ if(data.newPath != null && data.newPath != ''){
rootPaths += data.newFile; rootPaths += data.newPath;
} }
$("#rootPaths").val(rootPaths); $("#rootPaths").val(rootPaths);
$("#otherDiagName").val(data.otherDiagName); $("#otherDiagName").val(data.otherDiagName);
@ -299,6 +297,7 @@ function save(){
var assortId = $("#assortId").val(); var assortId = $("#assortId").val();
if(assortId != ''){ if(assortId != ''){
if(file1.length > 0){ if(file1.length > 0){
debugger
for (var i = 0; i < file1.length; i++) { for (var i = 0; i < file1.length; i++) {
formData.append('files', file1[i]); formData.append('files', file1[i]);
} }
@ -316,6 +315,7 @@ function save(){
success : function(data){ success : function(data){
if(data.code == 0){ if(data.code == 0){
toastr.success("上传成功"); toastr.success("上传成功");
$('#myModal3').modal('hide');
}else{ }else{
toastr.error(data.msg); toastr.error(data.msg);
} }

@ -20,7 +20,8 @@ var menu = {
}, },
callback: { //回调函数 callback: { //回调函数
onCheck: onCheck, onCheck: onCheck,
onClick:onClick} onClick: onClick
}
}, },
loadMenuTree: function () { loadMenuTree: function () {
$.ajax({ $.ajax({
@ -115,6 +116,7 @@ function onloadPdfMethod(){
$("#sourceByClick").val(""); $("#sourceByClick").val("");
onloadPdf(scanPages, sources); onloadPdf(scanPages, sources);
} }
//加载pdf按钮功能 //加载pdf按钮功能
function onloadPdf(scanPages, sources) { function onloadPdf(scanPages, sources) {
$("#iframeLoad").val(""); $("#iframeLoad").val("");
@ -131,7 +133,9 @@ function onloadPdf(scanPages,sources){
selectPrintPic(patientId, rootPaths, scanPages, sources); selectPrintPic(patientId, rootPaths, scanPages, sources);
} }
} }
var iframe = document.getElementById("iframe1"); var iframe = document.getElementById("iframe1");
/** /**
* 加载打印预览所需图片 * 加载打印预览所需图片
*/ */
@ -192,6 +196,7 @@ function selectPrintPic(patientId,rootPaths,scanPages,sources){
}) })
}, 100); }, 100);
} }
if (iframe.attachEvent) { if (iframe.attachEvent) {
iframe.attachEvent("onreadystatechange", function () { iframe.attachEvent("onreadystatechange", function () {
//此事件在内容没有被载入时候也会被触发,所以我们要判断状态 //此事件在内容没有被载入时候也会被触发,所以我们要判断状态
@ -210,6 +215,7 @@ if(iframe.attachEvent){
this.removeEventListener("load", arguments.call, false); this.removeEventListener("load", arguments.call, false);
}, false); }, false);
} }
//下载pdf按钮功能 //下载pdf按钮功能
function onloadJpgForPdf() { function onloadJpgForPdf() {
var typeId = $("#typeId").val(); var typeId = $("#typeId").val();
@ -234,6 +240,7 @@ function onloadJpgForPdf(){
} }
}) })
} }
//重新归页确定按钮功能 //重新归页确定按钮功能
function sure() { function sure() {
Common.confirm({ Common.confirm({
@ -250,7 +257,12 @@ function sure(){
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: path + '/commom/updateScanAssortByBlood', url: path + '/commom/updateScanAssortByBlood',
data: {patientId: patientId, name:parent.$("#name").val(),assortIds: assortIds,newAssortId: newAssortId}, data: {
patientId: patientId,
name: parent.$("#name").val(),
assortIds: assortIds,
newAssortId: newAssortId
},
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
if (data.code == 0) { if (data.code == 0) {
@ -270,6 +282,7 @@ function sure(){
} }
}) })
} }
//删除图片 //删除图片
function delPic() { function delPic() {
Common.confirm({ Common.confirm({
@ -329,3 +342,184 @@ function printInfoBlood(){
} }
}) })
} }
/**
* 病案查询
*/
function search() {
var inpatientNo = $("#inpatientNo").val();
var admissTimes = $("#admissTimes").val();
var name = $("#name").val();
if (inpatientNo == "" && admissTimes == "" && name == "") {
toastr.warning("请输入搜索信息在进行查询");
} else {
var sql = "select patient_id,inpatient_no,name,admiss_times,admiss_date,dis_date,dis_dept from commomtable where 1 = 1";
if (null != inpatientNo && "" != inpatientNo) {
sql += " and inpatient_no like '%" + inpatientNo + "%'";
}
if (null != admissTimes && "" != admissTimes) {
sql += " and admiss_times like '%" + admissTimes + "%'";
}
if (null != name && "" != name) {4
sql += " and name like '%" + name + "%'";
}
$("#mytab").bootstrapTable('destroy');
//生成用户数据
$('#mytab').bootstrapTable({
method: 'post',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
paginationFirstText: '<',
paginationLastText: '>',
detailView: flag,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(*
pageList: [5, 10, 20, 50, 100],//可供选择的每页的行数(*
height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
buttonsAlign: "left",//按钮对齐方式
columns: [
{
title: '病案号',
field: 'inpatientNo',
},
{
title: '姓名',
field: 'name',
},
{
title: '住院次数',
field: 'admissTimes',
},
{
title: '入院日期',
field: 'admissDate',
},
{
title: '出院时间',
field: 'disDate',
},
{
title: '出院科室',
field: 'disDept',
},
{
title: '操作',
formatter: function (value, row, index) {
var patientId = row.patientId;
var inpatientNo = row.inpatientNo.replace(/\s+/g, "");
var name = row.name;
var admissTimes = row.admissTimes;
var info = "'" + patientId+ "," + inpatientNo + "," + name + "," + admissTimes + "'";
var editanddrop = '<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal2" onclick="showInfo(' + info + ')">选择分段</button>';
return editanddrop;
}
}
],
locale: 'zh-CN',//中文支持,
url: path + '/template/cutomSearchTable',//排序方式
queryParams: function (params) {
return {
sql: sql,
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1 //当前页码
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function (res) {
$(".clearfix").height(0);
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
//赋值总数
$("#rows").val(res.total);
//全选
$('.fixed-table-container').on('click', 'input[name="btSelectAll"]', function () {
if ($(this).is(':checked')) {
$('input[name="btSelectItem"]').prop('checked', true);
} else {
$('input[name="btSelectItem"]').prop('checked', false);
}
})
//逐个选择
$('.fixed-table-container').on('click', 'input[name="btSelectItem"]', function () {
var inputs = $(this).parents('.fixed-table-body-columns').find('input[name="btSelectItem"]')
var num = 0;
inputs.each(function () {
if ($(this).is(':checked')) {
num++;
}
});
if (num == inputs.length) {
$('input[name="btSelectAll"]').prop('checked', true);
} else {
$('input[name="btSelectAll"]').prop('checked', false);
}
var index = $(this).parents('tr').index();
$('#Table1').find('input[name="btSelectItem"]').eq(index).click();
});
}
})
}
}
/**
* 显示需要移动的病案信息
* @param patientId
*/
function showInfo(info) {
var infoList = info.split(",");
$("#patientIdInfo").val(infoList[0]);
$("#inpatientNoInfo").val(infoList[1]);
$("#nameInfo").val(infoList[2]);
$("#admissTimesInfo").val(infoList[3]);
}
/**
* 修改PDF存放地址
*/
function movePdf() {
//需要移动PDF的病案id
var oldPatientId = $("#patientId").val();
//目标病案id
var newPatientId = $("#patientIdInfo").val();
//选中图片名称
var assortIds = $("#assortIds").val();
//选中分段
var newAssortId = $("#moveAssortId").val();
if (oldPatientId == '' || newPatientId == '' || assortIds == '' || newAssortId == '') {
toastr.warning("程序出现错误,请联系管理员!");
} else {
$.ajax({
type: 'post',
url: path + '/template/movePdfBlood',
data: {
oldPatientId: oldPatientId,
newPatientId: newPatientId,
assortIds: assortIds,
newAssortId: newAssortId,
flag: parent.$("#flag").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
window.location.reload();
toastr.success("转移成功!");
}
}
})
}
}

@ -0,0 +1,525 @@
//树操作
var menu = {
setting: {
view: {
fontCss: {"font-family": "微软雅黑", "color": "blue"}
},
data: {
key: {
name: "newName"
},
simpleData: {
chkStyle: "checkbox",
enable: true,
idKey: "id",
pIdKey: "parentId",
},
},
check: {
enable: true
},
callback: { //回调函数
onCheck: onCheck,
onClick: onClick
}
},
loadMenuTree: function () {
$.ajax({
type: "post",
url: path + "/commom/getBloodRecordTree",
data: {patientId: $("#patientId").val(), typeId: $("#typeId").val()},
dataType: "json",
success: function (data) {
$("#assortIds").val("");
if (data != null) {
//图片相对路径集合
var scanPages = '';
//图片来源集合
var sources = '';
for (var i = 0; i < data.length; i++) {
if (data[i].parentId != null && data[i].parentId != 1 && data[i].checked == 'true') {
scanPages += data[i].assortName + ",";
sources += data[i].source + ",";
}
}
//去掉后面逗号
if (scanPages != '') {
scanPages = scanPages.substring(0, scanPages.length - 1);
$("#assortIds").val(scanPages);
sources = sources.substring(0, sources.length - 1);
$("#sources").val(sources);
}
$.fn.zTree.init($("#ztree"), menu.setting, data);
zTree = $.fn.zTree.getZTreeObj("ztree");
var nodes = zTree.getNodes();
for (var i = 0; i < nodes.length; i++) { //设置节点展开
zTree.expandNode(nodes[i], true, false, true);
}
//加载pdf
onloadPdf(scanPages, sources);
}
}
})
}
};
//加载树
$().ready(function (data) {
menu.loadMenuTree();
});
//树选中事件
function onCheck(e, treeId, treeNode) {
var treeObj = $.fn.zTree.getZTreeObj("ztree");
nodes = treeObj.getCheckedNodes(true);
var assortIds = '';
var sources = '';
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 2) {
if (i != (nodes.length - 1)) {
assortIds += nodes[i].assortName + ",";
sources += +nodes[i].source + ",";
} else {
assortIds += nodes[i].assortName + "";
sources += nodes[i].source;
}
}
}
$("#assortIds").val(assortIds);
$("#sources").val(sources);
};
//树点击事件
function onClick(e, treeId, treeNode) {
var treeLevel = treeNode.level;
//选中图片节点时
if (treeLevel == 2) {
//图片集合
var scanPages = treeNode.assortName;
//来源集合
var sources = treeNode.source;
$("#assortIdByClick").val(scanPages);
$("#sourceByClick").val(sources);
onloadPdf(scanPages, sources);
}
};
//打印分类变更事件
$("#typeId").change(function () {
menu.loadMenuTree();
})
//树复选框选中后加载pdf按钮
function onloadPdfMethod() {
var scanPages = $("#assortIds").val();
//来源集合
var sources = $("#sources").val();
$("#assortIdByClick").val("");
$("#sourceByClick").val("");
onloadPdf(scanPages, sources);
}
//加载pdf按钮功能
function onloadPdf(scanPages, sources) {
$("#iframeLoad").val("");
$("#printPicLoaded").val("");
var patientId = $("#patientId").val();
//根目录字段识别名称
var flag = parent.$("#flag").val();
var str = path + "/commom/showRecordContentSouth?patientId=" + patientId + "&scanPages=" + scanPages + "&sources=" + sources + "&flag=" + flag;
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer1.html?file=" + encodeURIComponent(str));
var rootPaths = parent.$("#rootPaths").val();
//加载的图片
var print = $("#print").val();
if (scanPages != '' && print == 1) {
selectPrintPic(patientId, rootPaths, scanPages, sources);
}
}
var iframe = document.getElementById("iframe1");
/**
* 加载打印预览所需图片
*/
//定义打印预览加载图片进度
function selectPrintPic(patientId, rootPaths, scanPages, sources) {
$.ajax({
type: 'post',
url: path + "/commom/selectPrintPic",
data: {
patientId: patientId,
rootPaths: rootPaths,
names: scanPages,
sources: sources
},
datType: 'json',
success: function (data) {
if (data.code == 0) {
var resultList = data.data;
if (null != resultList) {
var img = '';
for (var i = 0; i < resultList.length; i++) {
img += "<img src='" + resultList[i] + "' width='850' height='1190'>";
}
var interval = setInterval(function () {
if ($("#iframeLoad").val() == 1) {
iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
$("#printPicLoaded").val(1);
iframe.contentDocument.getElementById("printLoading").style.display = 'none';
iframe.contentDocument.getElementById("print").style.display = 'block';
clearInterval(interval);
}
}, 200);
}
} else {
toastr.error(data.msg);
}
}
})
//查询进度定时器
var interval1 = setInterval(function () {
$.ajax({
type: 'get',
url: path + "/commom/getPrintPicLoading",
data: {patientId: $("#patientId").val()},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
var value = data.data;
$("#loading").val(value + "%");
if (value == 100) {
//杀死进度定时器
clearInterval(interval1);
}
} else {
toastr.error(data.msg);
}
}
})
}, 100);
}
if (iframe.attachEvent) {
iframe.attachEvent("onreadystatechange", function () {
//此事件在内容没有被载入时候也会被触发,所以我们要判断状态
//有时候会比较怪异 readyState状态会跳过 complete 所以我们loaded状态也要判断
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
//代码能执行到这里说明已经载入成功完毕了
//要清除掉事件
iframe.detachEvent("onreadystatechange", arguments.callee);
//这里是回调函数
}
});
} else {
iframe.addEventListener("load", function () {
$("#iframeLoad").val(1);
//代码能执行到这里说明已经载入成功完毕了
this.removeEventListener("load", arguments.call, false);
}, false);
}
//下载pdf按钮功能
function onloadJpgForPdf() {
var typeId = $("#typeId").val();
if (typeId == undefined) {
typeId = '';
}
Common.confirm({
title: "提示",
message: "确认将左侧树选中的图片下载pdf?",
operate: function (reselt) {
if (reselt) {
var patientId = "'" + $("#patientId").val() + "'";
var assortIds = $("#assortIds").val();
var flag = parent.$("#flag").val();
post(path + '/template/downloadPdfBlood', {
"patientIds": patientId,
"assortIds": assortIds,
"typeId": typeId,
"flag": flag
});
}
}
})
}
//重新归页确定按钮功能
function sure() {
Common.confirm({
title: "提示",
message: "确认将左侧树选中的图片是否重新归页?",
operate: function (reselt) {
if (reselt) {
//pdf页数
var newAssortId = $("#newAssortId").val();
if (newAssortId != '') {
var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val();
if (assortIds != '') {
$.ajax({
type: 'post',
url: path + '/commom/updateScanAssortByBlood',
data: {
patientId: patientId,
name: parent.$("#name").val(),
assortIds: assortIds,
newAssortId: newAssortId
},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("重新归页成功!");
}
//重新加载
menu.loadMenuTree();
}
})
} else {
toastr.warning("左侧树至少选中一张图片!")
}
} else {
toastr.warning("要重新分页,需选中其中下拉框其中一项!")
}
}
}
})
}
//删除图片
function delPic() {
Common.confirm({
title: "提示",
message: "确认将左侧树选中的图片删除?",
operate: function (reselt) {
if (reselt) {
var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val();
if (assortIds != '') {
$.ajax({
type: 'post',
url: path + '/commom/delScanAssortByBlood',
data: {patientId: patientId, name: parent.$("#name").val(), assortIds: assortIds},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("删除成功!");
}
//重新加载
menu.loadMenuTree();
}
})
}
}
}
})
}
//记录打印记录
function printInfoBlood() {
var patientId = "'" + $("#patientId").val() + "'";
var typeId = $("#typeId").val();
if (typeId == undefined) {
typeId = '';
}
var assortIds = '';
//判断树点击选中赋值的框是否有值有则属于取点击选中的值否则去加载pdf的值
var assortIdByClick = $("#assortIdByClick").val();
if (assortIdByClick != '') {
assortIds = $("#assortIdByClick").val();
} else {
assortIds = $("#assortIds").val();
}
var flag = $("#flag").val();
$.ajax({
type: 'post',
url: path + '/template/printInfoBlood',
data: {"patientIds": patientId, "assortIds": assortIds, "typeId": typeId, "flag": flag},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("打印成功")
} else {
toastr.success(data.msg)
}
}
})
}
/**
* 病案查询
*/
function search() {
var inpatientNo = $("#inpatientNo").val();
var admissTimes = $("#admissTimes").val();
var name = $("#name").val();
if (inpatientNo == "" && admissTimes == "" && name == "") {
toastr.warning("请输入搜索信息在进行查询");
} else {
var sql = "select patient_id,inpatient_no,name,admiss_times,admiss_date,dis_date,dis_dept from commomtable where 1 = 1";
if (null != inpatientNo && "" != inpatientNo) {
sql += " and inpatient_no like '%" + inpatientNo + "%'";
}
if (null != admissTimes && "" != admissTimes) {
sql += " and admiss_times like '%" + admissTimes + "%'";
}
if (null != name && "" != name) {
4
sql += " and name like '%" + name + "%'";
}
$("#mytab").bootstrapTable('destroy');
//生成用户数据
$('#mytab').bootstrapTable({
method: 'post',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
paginationFirstText: '<',
paginationLastText: '>',
detailView: flag,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(*
pageList: [5, 10, 20, 50, 100],//可供选择的每页的行数(*
height: 400,//高度调整 //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
buttonsAlign: "left",//按钮对齐方式
columns: [
{
title: '病案号',
field: 'inpatientNo',
},
{
title: '姓名',
field: 'name',
},
{
title: '住院次数',
field: 'admissTimes',
},
{
title: '入院日期',
field: 'admissDate',
},
{
title: '出院时间',
field: 'disDate',
},
{
title: '出院科室',
field: 'disDept',
},
{
title: '操作',
formatter: function (value, row, index) {
var patientId = row.patientId;
var inpatientNo = row.inpatientNo.replace(/\s+/g, "");
var name = row.name;
var admissTimes = row.admissTimes;
var info = "'" + patientId + "," + inpatientNo + "," + name + "," + admissTimes + "'";
var editanddrop = '<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal2" onclick="showInfo(' + info + ')">选择分段</button>';
return editanddrop;
}
}
],
locale: 'zh-CN',//中文支持,
url: path + '/template/cutomSearchTable',//排序方式
queryParams: function (params) {
return {
sql: sql,
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1 //当前页码
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function (res) {
$(".clearfix").height(0);
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
//赋值总数
$("#rows").val(res.total);
//全选
$('.fixed-table-container').on('click', 'input[name="btSelectAll"]', function () {
if ($(this).is(':checked')) {
$('input[name="btSelectItem"]').prop('checked', true);
} else {
$('input[name="btSelectItem"]').prop('checked', false);
}
})
//逐个选择
$('.fixed-table-container').on('click', 'input[name="btSelectItem"]', function () {
var inputs = $(this).parents('.fixed-table-body-columns').find('input[name="btSelectItem"]')
var num = 0;
inputs.each(function () {
if ($(this).is(':checked')) {
num++;
}
});
if (num == inputs.length) {
$('input[name="btSelectAll"]').prop('checked', true);
} else {
$('input[name="btSelectAll"]').prop('checked', false);
}
var index = $(this).parents('tr').index();
$('#Table1').find('input[name="btSelectItem"]').eq(index).click();
});
}
})
}
}
/**
* 显示需要移动的病案信息
* @param patientId
*/
function showInfo(info) {
var infoList = info.split(",");
$("#patientIdInfo").val(infoList[0]);
$("#inpatientNoInfo").val(infoList[1]);
$("#nameInfo").val(infoList[2]);
$("#admissTimesInfo").val(infoList[3]);
}
/**
* 修改PDF存放地址
*/
function movePdf() {
//需要移动PDF的病案id
var oldPatientId = $("#patientId").val();
//目标病案id
var newPatientId = $("#patientIdInfo").val();
//选中图片名称
var assortIds = $("#assortIds").val();
//选中分段
var newAssortId = $("#moveAssortId").val();
if (oldPatientId == '' || newPatientId == '' || assortIds == '' || newAssortId == '') {
toastr.warning("程序出现错误,请联系管理员!");
} else {
$.ajax({
type: 'post',
url: path + '/template/movePdfBlood',
data: {
oldPatientId: oldPatientId,
newPatientId: newPatientId,
assortIds: assortIds,
newAssortId: newAssortId,
flag: parent.$("#flag").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
window.location.reload();
toastr.success("转移成功!");
}
}
})
}
}

@ -92,11 +92,11 @@ function getSql() {
val = 't_dictionary_4.NAME AS anaesthesia_type'; val = 't_dictionary_4.NAME AS anaesthesia_type';
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_4 ON t_operate.anaesthesia_type = t_dictionary_4.CODE AND t_dictionary_4.parent_id = 'anaesthesia'"; dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_4 ON t_operate.anaesthesia_type = t_dictionary_4.CODE AND t_dictionary_4.parent_id = 'anaesthesia'";
} }
if (val == 't_operate.ChosSurg') { /*if (val == 't_operate.ChosSurg') {
//是否择期手术 //是否择期手术
val = 't_dictionary_5.NAME AS chossurg'; val = 't_dictionary_5.NAME AS chossurg';
dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_5 ON t_operate.ChosSurg = t_dictionary_5.CODE AND t_dictionary_5.parent_id = 'whether'"; dictionaryConvertStr += " LEFT JOIN dbo.emr_dictionary AS t_dictionary_5 ON t_operate.ChosSurg = t_dictionary_5.CODE AND t_dictionary_5.parent_id = 'whether'";
} }*/
if (val == 't_baby.babySex') { if (val == 't_baby.babySex') {
//婴儿性别 //婴儿性别
val = 't_dictionary_6.NAME AS babySex'; val = 't_dictionary_6.NAME AS babySex';
@ -267,9 +267,9 @@ function getSql() {
if (fields[i] == 'RH') { if (fields[i] == 'RH') {
fields[i] = 'rh'; fields[i] = 'rh';
} }
if (fields[i] == 'ChosSurg') { /*if (fields[i] == 'ChosSurg') {
fields[i] = 'chossurg'; fields[i] = 'chossurg';
} }*/
fieldCns += fields[i] + ","; fieldCns += fields[i] + ",";
} }
} }
@ -424,7 +424,7 @@ $('.check').on('click', function () {
success:function(data){ success:function(data){
if(data!= null){ if(data!= null){
for (var i = 0;i < data.length;i++){ for (var i = 0;i < data.length;i++){
if(column == 'babySex' || column == 'childbirth_mothed' || column == 'diag_type' || column == 'breathing' || column == 'dis_thing' || column == 'ChosSurg' || column == 'operate_class' || column == 'anaesthesia_type'){ if(column == 'babySex' || column == 'childbirth_mothed' || column == 'diag_type' || column == 'breathing' || column == 'dis_thing' || column == 'operate_class' || column == 'anaesthesia_type'){
selectOptions += '<option value='+data[i].code+'>'+data[i].name+'</option>'; selectOptions += '<option value='+data[i].code+'>'+data[i].name+'</option>';
}else{ }else{
selectOptions += '<option value='+data[i].name+'>'+data[i].name+'</option>'; selectOptions += '<option value='+data[i].name+'>'+data[i].name+'</option>';

@ -73,7 +73,7 @@ $(document).keydown(function (event) {
}); });
function freshTable(){ function freshTable(){
var powerMenus = $("#powerMenus").val(); var powerMenus = $("#powerMenus").val();
var powerMenus = powerMenus.substring(1,powerMenus.length-1); var powerMenus = $("#powerMenus").val().substring(1,$("#powerMenus").val().length-1);
var powerMenusArr = powerMenus.split(", "); var powerMenusArr = powerMenus.split(", ");
for (var i = 0; i < powerMenusArr.length; i++){ for (var i = 0; i < powerMenusArr.length; i++){
var strs = powerMenusArr[i]; var strs = powerMenusArr[i];
@ -112,10 +112,10 @@ function freshTable(){
if(fields[i] == 'RH'){ if(fields[i] == 'RH'){
map['field'] = 'rh'; map['field'] = 'rh';
fields[i] = 'rh'; fields[i] = 'rh';
}if(fields[i] == 'ChosSurg'){ }/*if(fields[i] == 'ChosSurg'){
map['field'] = 'chossurg'; map['field'] = 'chossurg';
fields[i] = 'chossurg'; fields[i] = 'chossurg';
}else{ }*/else{
map['field'] = fields[i]; map['field'] = fields[i];
} }
fieldCns += fields[i] + ","; fieldCns += fields[i] + ",";
@ -302,7 +302,12 @@ function btn(){
var url = path + "/printInfoList/pageUI174"; var url = path + "/printInfoList/pageUI174";
window.location.href = url; window.location.href = url;
} }
//判断是否有使用固定列获取选中多行数据
/**
* 判断是否有使用固定列获取选中多行数据
* @param tableId
* @returns {*}
*/
function getSelectedRow_st(tableId) { function getSelectedRow_st(tableId) {
//解決固定列导致选择复选框选不中的问题 //解決固定列导致选择复选框选不中的问题
//首先判断表格是否为固定列表格使用bootstrapTable('getOptions')获取表格的所有配置项fixedColumns字段判断是否为固定列 //首先判断表格是否为固定列表格使用bootstrapTable('getOptions')获取表格的所有配置项fixedColumns字段判断是否为固定列
@ -320,7 +325,10 @@ function getSelectedRow_st(tableId) {
return $("#"+tableId).bootstrapTable('getSelections'); return $("#"+tableId).bootstrapTable('getSelections');
} }
} }
//获取选中行
/**
* 获取选中行
*/
function getChecked(){ function getChecked(){
var idlist = getSelectedRow_st("mytab"); var idlist = getSelectedRow_st("mytab");
if(idlist.length > 0){ if(idlist.length > 0){
@ -341,7 +349,14 @@ function reLoadTable(){
$("#check").val(""); $("#check").val("");
} }
//列表行‘操作’按钮 /**
* 列表行操作按钮
* @param value
* @param row
* @param index
* @returns {string}
* @constructor
*/
function AddFunctionAlty(value, row, index) { function AddFunctionAlty(value, row, index) {
var patientId = "'" + row.patientId + "'"; var patientId = "'" + row.patientId + "'";
var updatePower = $("#powerMenu").val(); var updatePower = $("#powerMenu").val();
@ -383,10 +398,7 @@ function AddFunctionAlty(value, row, index) {
return str; return str;
} }
/*//查看详情
function showDetail(patientId){
window.location.href=path+"/commom/showRecord?patientId="+patientId;
}*/
/***********************************************按钮功能*****************************************************************/ /***********************************************按钮功能*****************************************************************/
//清空功能 //清空功能
function clearForm(){ function clearForm(){
@ -441,7 +453,10 @@ function updateCommomInfo() {
}) })
} }
//批量下载功能 /**
* 批量下载功能
* @param typeId
*/
function downloadZip(typeId){ function downloadZip(typeId){
var patientIds = ""; var patientIds = "";
getChecked(); getChecked();
@ -503,7 +518,10 @@ function downloadZip(typeId){
} }
} }
//下载pdf功能 /**
* 下载pdf功能
* @param patientId
*/
function downloadPdf(patientId){ function downloadPdf(patientId){
patientId = "'"+patientId+"'"; patientId = "'"+patientId+"'";
//查询是否有图片 //查询是否有图片
@ -521,65 +539,8 @@ function downloadPdf(patientId){
} }
}) })
} }
//批量下载功能
/*function downloadZip(typeId){
var patientIds = "";
getChecked();
var checks = $("#checks").val();
if(checks != ''){
patientIds = powerPotient(checks, true,typeId);
if(patientIds != ''){
patientIds = patientIds.substring(0,patientIds.length-1);
post(path+'/template/downloadZip',{"patientIds":patientIds});
}else{
toastr.warning("必须申请通过!")
}
}else{
var sql = $("#sql").val();
if(sql != '') {
var rows = $("#rows").val();
if(rows != '' && rows <= 1000){
Common.confirm({
title: "提示",
message: "没有选中,您确定要按搜索栏条件下载?",
operate: function (reselt) {
if (reselt) {
getSql();
var sql = $("#sql").val();
if (sql != '') {
$.ajax({
type: 'post',
url: path + '/template/getPatientIdsBySql',
data: {sql: sql},
dataType: 'json',
success: function (data) {
if (data != null) {
patientIds = powerPotient(data, true,typeId);
if (patientIds != '') {
patientIds = patientIds.substring(0, patientIds.length - 1);
post(path+'/template/downloadZip',{"patientIds":patientIds});
}else {
toastr.warning("必须申请通过!")
}
} else {
toastr.warning("没有可下载的内容!")
}
}
})
}
} else {
toastr.warning("没有可下载的内容!")
}
}
})
}else{
toastr.warning("为了用户体验限制批量操作不超过1000条数据!");
}
}else{
toastr.warning("搜索条件不可为空!");
}
}
}*/
function post(url, params) { function post(url, params) {
// 创建form元素 // 创建form元素
var temp_form = document.createElement("form"); var temp_form = document.createElement("form");
@ -600,7 +561,10 @@ function post(url, params) {
temp_form .submit(); temp_form .submit();
} }
//定义空的inputValue方法 /**
* 定义空的inputValue方法
* @returns {boolean}
*/
function getInputValue(){ function getInputValue(){
//判断是否有搜索条件 //判断是否有搜索条件
//所有input //所有input
@ -630,7 +594,10 @@ function getInputValue(){
return isInputValue; return isInputValue;
} }
//加载申请借阅类型 /**
* 加载申请借阅类型
* @param type
*/
function loadApplyType(type){ function loadApplyType(type){
$.ajax({ $.ajax({
type:'get', type:'get',
@ -648,6 +615,9 @@ function loadApplyType(type){
if(type == 2 && data[i].code == 3){ if(type == 2 && data[i].code == 3){
html += '<option value="'+data[i].code+'">'+data[i].name+'</option>'; html += '<option value="'+data[i].code+'">'+data[i].name+'</option>';
} }
if(type == 4 && data[i].code == 4){
html += '<option value="'+data[i].code+'">'+data[i].name+'</option>';
}
} }
} }
$("#applyType").append(html); $("#applyType").append(html);
@ -656,7 +626,10 @@ function loadApplyType(type){
}) })
} }
//单个申请借阅 /**
* 单个申请借阅
* @param patientId
*/
function borrowing(patientId){ function borrowing(patientId){
pickTime("effeTime", null); pickTime("effeTime", null);
$("#typeId").val('approves'); $("#typeId").val('approves');
@ -683,7 +656,9 @@ function borrowing(patientId){
}) })
} }
//批量申请借阅 /**
* 批量申请借阅
*/
function borrowings(){ function borrowings(){
pickTime("effeTime", null); pickTime("effeTime", null);
$("#typeId").val('approves'); $("#typeId").val('approves');
@ -745,8 +720,12 @@ function borrowings(){
} }
} }
//单个下载申请 /**
* 单个下载申请
* @param patientId
*/
function downBorrowing(patientId){ function downBorrowing(patientId){
pickTime("effeTime", null);
$("#typeId").val('loads'); $("#typeId").val('loads');
//加载申请借阅类型 //加载申请借阅类型
loadApplyType(2); loadApplyType(2);
@ -771,8 +750,11 @@ function downBorrowing(patientId){
}) })
} }
//批量下载借阅 /**
* 批量下载借阅
*/
function downBorrowings(){ function downBorrowings(){
pickTime("effeTime", null);
$("#typeId").val('loads'); $("#typeId").val('loads');
//加载申请借阅类型 //加载申请借阅类型
loadApplyType(2); loadApplyType(2);
@ -832,13 +814,17 @@ function downBorrowings(){
} }
} }
//模态框保存操作 /**
* 模态框保存操作
*/
function save(){ function save(){
var typeId = $("#typeId").val(); var typeId = $("#typeId").val();
saveMethod(1,"保存",typeId); saveMethod(1,"保存",typeId);
} }
//模态框提交操作 /**
* 模态框提交操作
*/
function add(){ function add(){
var typeId = $("#typeId").val(); var typeId = $("#typeId").val();
saveMethod(2,"提交",typeId); saveMethod(2,"提交",typeId);
@ -848,13 +834,13 @@ function add(){
function saveMethod(applyState,msg,typeId){ function saveMethod(applyState,msg,typeId){
if($("#effeTime").val() != ''){ if($("#effeTime").val() != ''){
var patientIds = $("#check").val(); var patientIds = $("#check").val();
if(patientIds == '') { if(patientIds == '' || patientIds == undefined) {
patientIds = $("#checks").val(); patientIds = $("#checks").val();
} }
if(patientIds == ''){ if(patientIds == '' || patientIds == undefined){
patientIds = $("#patientIds").val(); patientIds = $("#patientIds").val();
} }
if (patientIds != '') { if (patientIds != '' || patientIds == undefined) {
//过滤已可查阅的patientId集合; //过滤已可查阅的patientId集合;
patientIds = powerPotient(patientIds,false,typeId); patientIds = powerPotient(patientIds,false,typeId);
if(patientIds != ''){ if(patientIds != ''){

@ -7,12 +7,13 @@ $(function(){
}; };
/*点击图片的文本框*/ /*点击图片的文本框*/
$(".file").change(function(){ $(".file").change(function(){
debugger
var idFile = $(this).attr("id"); var idFile = $(this).attr("id");
var file = document.getElementById(idFile); var file = document.getElementById(idFile);
var imgContainer = $(this).parents(".z_photo"); //存放图片的父亲元素 var imgContainer = $(this).parents(".z_photo"); //存放图片的父亲元素
var fileList = file.files; //获取的图片文件 var fileList = file.files; //获取的图片文件
var imgArr = []; var imgArr = [];
//遍历得到的图片文件 //遍历得到的图片文件q
fileList = validateUp(fileList); fileList = validateUp(fileList);
for(var i = 0;i<fileList.length;i++){ for(var i = 0;i<fileList.length;i++){
var imgUrl = window.URL.createObjectURL(fileList[i]); var imgUrl = window.URL.createObjectURL(fileList[i]);

@ -533,6 +533,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/
$(function () { $(function () {
//获取父页面打印权限显示打印按钮 //获取父页面打印权限显示打印按钮
var print = parent.$("#print").val(); var print = parent.$("#print").val();
$("#printLoading").show();
if (print == 1) { if (print == 1) {
$("#printLoading").show(); $("#printLoading").show();
} }

Loading…
Cancel
Save