广总血液净化需求完成一版

master
jian.wang 2 years ago
parent 6074be2a12
commit b77870f391

@ -11,6 +11,7 @@ import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper;
import com.emr.dao.recordLock.Emr_LockMapper;
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
import com.emr.entity.Power_User;
import com.emr.entity.ResultUtil;
import com.emr.entity.Zd_Assort;
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
import com.emr.entity.recordType.Emr_Type;
@ -644,50 +645,82 @@ public class FontController {
*/
@RequestMapping(value = "commomListqf", method = RequestMethod.GET)
public String commomListqf(Model model, HttpServletRequest request,
@RequestParam("dataSource") String dataSource,
@RequestParam(value="hemodialysisId",required = false) String hemodialysisId,
@RequestParam(value="admissId",required = false) String admissId,
@RequestParam(value="outpatientNo",required = false) String outpatientNo) {
String userName = ObjectUtils.isEmpty(request.getParameter("userName")) ? "admin" : request.getParameter("userName");
Map<String,String> params = new HashMap<>();
params.put("userName", userName);
params.put("userPwd", "123456");
String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params);
JSONObject jsonObject = JSONObject.parseObject(result);
String token = jsonObject.getString("token");
if(!ObjectUtils.isEmpty(token)){
this.getUserInfo(request, token, userName);
//查询表格配置表的数据,根据配置动态显示表格字段
Map<String,Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
if(!ObjectUtils.isEmpty(tableConfigMap)){
//血透ID 广总血透接口的参数
model.addAttribute("hemodialysisId",hemodialysisId);
//住院号
model.addAttribute("admissId",admissId);
//门诊号
model.addAttribute("outpatientNo",outpatientNo);
//获取数据来源
model.addAttribute("dataSource",dataSource);
//获取需要查询字段
model.addAttribute("tableQueryField",tableConfigMap.get("tableField"));
//显示查询字段,并转为驼峰格式
model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString()));
//获取查询字段中文名称
model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName"));
//获取排序字段,可点击表头列实现排序
model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString()));
//获取默认排序字段
request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField"));
//获取默认排序字段方式
request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType"));
try {
String userName = request.getParameter("userName");
String dataSource = request.getParameter("dataSource");
if(ObjectUtils.isEmpty(userName)){
model.addAttribute("msg", "用户账号不能为空");
return "font/msg";
}
if(ObjectUtils.isEmpty(dataSource)){
model.addAttribute("msg", "数据源dataSource不能为空");
return "font/msg";
}
Map<String,String> params = new HashMap<>();
Map<String,String> userParams = new HashMap<>();
/**
* userName
*/
userParams.put("userName", userName);
String userResult = HttpClientUtils.doPost(POWER_URLHEAD + "/queryUserByUserNameAndPassword", userParams);
JSONObject userResultJson = JSONObject.parseObject(userResult);
if(ObjectUtils.isEmpty(userResultJson)){
model.addAttribute("msg", "用户账号不存在");
return "font/msg";
}
if(!"1".equals(userResultJson.getString("effective"))){
model.addAttribute("msg", "用户账号已设置为无效");
return "font/msg";
}
params.put("userName", userResultJson.getString("userName"));
params.put("userPwd", userResultJson.getString("userPwd"));
params.put("remark", "GZINTERFACE");
String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params);
JSONObject jsonObject = JSONObject.parseObject(result);
String token = jsonObject.getString("token");
if(!ObjectUtils.isEmpty(token)){
this.getUserInfo(request, token, userName);
//查询表格配置表的数据,根据配置动态显示表格字段
Map<String,Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
if(!ObjectUtils.isEmpty(tableConfigMap)){
//血透ID 广总血透接口的参数
model.addAttribute("hemodialysisId",hemodialysisId);
//住院号
model.addAttribute("admissId",admissId);
//门诊号
model.addAttribute("outpatientNo",outpatientNo);
//获取数据来源
model.addAttribute("dataSource",dataSource);
//获取需要查询字段
model.addAttribute("tableQueryField",tableConfigMap.get("tableField"));
//显示查询字段,并转为驼峰格式
model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString()));
//获取查询字段中文名称
model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName"));
//获取排序字段,可点击表头列实现排序
model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString()));
//获取默认排序字段
request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField"));
//获取默认排序字段方式
request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType"));
}
return "recordManage/commomSearch/commomListqf";
}else{
model.addAttribute("msg", "模拟登录失败");
return "font/msg";
return "recordManage/commomSearch/commomListqf";
}else{
model.addAttribute("msg", "token获取失败");
return "font/msg";
}
}catch (Exception e) {
e.printStackTrace();
}
return null;
}
public void getUserInfo(HttpServletRequest request, String token, String userName){

@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.Set;
/**
* @author HJL
@ -37,6 +38,9 @@ public class LoginController {
private String WEBSOCKET_URLHEAD;
@Value("${TOKEN_EXPIRE_TIME}")
private long TOKEN_EXPIRE_TIME;
@Value("${export_pdf_hospital_info}")
private String hospitalName;
@Autowired
private CommomService commomService;
@ -66,6 +70,9 @@ public class LoginController {
}
Power_User powerUser = JSON.parseObject(objects[0].toString(), Power_User.class);
if (powerUser.getMenus().contains("/pdfWaterSet/hospitalName")) {
model.addAttribute("hospitalName", hospitalName);
}
//返回用户为空跳转到登录权限系统界面
if (null == powerUser) {
return "redirect:" + POWER_URLHEAD + "/login";

@ -4,14 +4,21 @@ import com.alibaba.fastjson.JSON;
import com.emr.annotation.OptionalLog;
import com.emr.dao.CommomMapper;
import com.emr.dao.bloodPurification.BloodPurificationMapper;
import com.emr.dao.emrLog.Emr_LogMapper;
import com.emr.entity.EmrBloodApplyInfo;
import com.emr.entity.EmrBloodDialysisDoc;
import com.emr.entity.Power_User;
import com.emr.entity.ResultUtil;
import com.emr.entity.emrLog.Emr_Log;
import com.emr.service.ImportExcel.ImportExcelEntity;
import com.emr.service.ImportExcel.ImportExcelUtil;
import com.emr.service.bloodPurification.BloodPurificationService;
import com.emr.util.DateUtils;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
@ -19,6 +26,8 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.ui.Model;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
@ -29,13 +38,15 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.nio.charset.Charset;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.*;
/**
* 广
@ -48,8 +59,15 @@ public class bloodPurificationController {
@Autowired
private BloodPurificationMapper bloodPurificationMapper;
@Autowired
private BloodPurificationService bloodPurificationService;
@Autowired
private Emr_LogMapper logMapper;
/**
*
*
* @param model
* @param request
* @return
@ -83,6 +101,7 @@ public class bloodPurificationController {
/**
*
*
* @param model
* @param request
* @return
@ -95,8 +114,42 @@ public class bloodPurificationController {
return "recordManage/bloodPurification/documentList";
}
/**
*
*
* @param model
* @param request
* @return
*/
@RequiresPermissions("/bloodPurification/approveList")
@OptionalLog(module = "查看", methods = "血透检查记录审批")
@RequestMapping("bloodApproveList")
public String bloodApproveList(Model model, HttpServletRequest request) {
//获取当前的HttpSession对象如果不存在则会创建一个新的会话
HttpSession session = request.getSession();
//向HttpSession中放入数据
session.setAttribute("status", request.getParameter("status"));
return "recordManage/bloodPurification/bloodApproveList";
}
/**
*
*
* @param model
* @param request
* @return
*/
@RequiresPermissions("/bloodPurification/flowLogList")
@OptionalLog(module = "查看", methods = "血透检查记录流程记录")
@RequestMapping("flowLogList")
public String flowLogList(Model model, HttpServletRequest request) {
return "recordManage/bloodPurification/flowLogList";
}
/**
*
*
* @param model
* @param request
* @return
@ -109,8 +162,19 @@ public class bloodPurificationController {
return "recordManage/bloodPurification/inspectionRecordsSum";
}
/**
*
* @return
*/
@RequiresPermissions("/bloodPurification/recordLogList")
@RequestMapping("recordLogList")
public String recordLogList(){
return "recordManage/bloodPurification/recordLogList";
}
/**
*
*
* @param model
* @param request
* @return
@ -124,10 +188,6 @@ public class bloodPurificationController {
HttpSession session = request.getSession();
//向HttpSession中放入数据
String inspectionDate = request.getParameter("inspectionDate");
String name = request.getParameter("name");
String dialysisDate = request.getParameter("dialysisDate");
session.setAttribute("inspectionDate", request.getParameter("inspectionDate"));
session.setAttribute("name", request.getParameter("name"));
session.setAttribute("dialysisDate", request.getParameter("dialysisDate"));
@ -138,6 +198,7 @@ public class bloodPurificationController {
/**
*
*
* @param page
* @param limit
* @param emrBloodDialysisDoc
@ -145,16 +206,16 @@ public class bloodPurificationController {
*/
@RequestMapping("queryInspectionRecordsSum")
@ResponseBody
public String queryInspectionRecordsSum(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc){
if(null != page && null != limit){
public String queryInspectionRecordsSum(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc) {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
try{
List<Map<String,Object>> dataMap = bloodPurificationMapper.queryInspectionRecordsSum(emrBloodDialysisDoc);
try {
List<Map<String, Object>> dataMap = bloodPurificationMapper.queryInspectionRecordsSum(emrBloodDialysisDoc);
//保留两位有效数字
DecimalFormat df = new DecimalFormat("0.00");
//遍历 获取有问题数量和总数
if(!CollectionUtils.isEmpty(dataMap)){
if (!CollectionUtils.isEmpty(dataMap)) {
dataMap.forEach(e -> {
//总数
double totalNum = ObjectUtils.isEmpty(e.get("total_num")) ? 0 : Double.parseDouble(e.get("total_num").toString());
@ -199,13 +260,358 @@ public class bloodPurificationController {
}
PageInfo pageInfo = new PageInfo<>(dataMap);
return JSON.toJSONString(pageInfo);
}catch (Exception e){
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@RequestMapping("queryDocumentSum")
@ResponseBody
public ResultUtil queryDocumentSum(String date) {
try {
Map<String, Object> params = new HashMap<>();//参数集合
Map<String, Object> resultMap = new HashMap<>();//返回数据集合
if (StringUtils.isEmpty(date)){
date = DateUtils.getDate(DateUtils.getStringDate(new Date(),"yyyy-MM"));
}
/**
* date
*/
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
// 解析年份和月份
YearMonth inputDate = YearMonth.parse(date, formatter);
// 计算同比日期(去年同月)
YearMonth sameMonthLastYear = inputDate.minusYears(1);
// 计算环比日期(上个月)
YearMonth lastMonth = inputDate.minusMonths(1);
// 将YearMonth对象转换成字符串
String sameMonthLastYearStr = sameMonthLastYear.format(formatter);
String lastMonthStr = lastMonth.format(formatter);
params.put("date", date);//当月
params.put("lastMonth", lastMonthStr);//环比(上月)
params.put("sameMonthLastYear", sameMonthLastYearStr);//同比(去年同月)
/**
* date
*/
int year = Integer.valueOf(date.substring(0, 4));
int month = Integer.valueOf(date.substring(5, 7));
int currentQuarter = (month - 1) / 3 + 1;
List<String> currentQuarterMonths = DateUtils.getQuarterMonths(year, currentQuarter); //当前季度日期
List<String> previousQuarterMonths = DateUtils.getQuarterMonths(year, currentQuarter - 1);//季度环比日期
List<String> yoyQuarterMonth = DateUtils.getQuarterMonths(year - 1, currentQuarter);//同比(去年同季度)
params.put("currentQuarterStartDate", currentQuarterMonths.get(0));//当前季度开始日期
params.put("currentQuarterEndDate", currentQuarterMonths.get(2));//当前季度结束日期
params.put("previousQuarterStartDate", previousQuarterMonths.get(0));//环比(上季度开始日期)
params.put("previousQuarterEndDate", previousQuarterMonths.get(2));//环比(上季度结束日期)
params.put("yoyQuarterStartDate", yoyQuarterMonth.get(0));//同比(去年同季度开始日期)
params.put("yoyQuarterEndDate", yoyQuarterMonth.get(2));//同比(去年同季度结束日期)
/**
* date
*/
List<String> halfYearMonths;
List<String> previousHalfYearMonths;
List<String> yoyHalfYearMonths;
// 判断是上半年还是下半年
if (month >= 1 && month <= 6) {
halfYearMonths = DateUtils.getHalfYearMonths(year, true);//上半年日期
//计算环比
previousHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, false);//环比(去年下半年日期)
//计算同比
yoyHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, true);//同比(去年上半年日期)
} else {
halfYearMonths = DateUtils.getHalfYearMonths(year, false);//下半年日期
//计算环比
previousHalfYearMonths = DateUtils.getHalfYearMonths(year, true);//环比(上半年日期)
//计算同比
yoyHalfYearMonths = DateUtils.getHalfYearMonths(year - 1, false);//同比(去年下半年日期)
}
params.put("halfYearStartDate", halfYearMonths.get(0));//半年开始日期
params.put("halfYearEndDate", halfYearMonths.get(5));//半年结束日期
params.put("previousHalfYearStartDate", previousHalfYearMonths.get(0));//环比(上半年开始日期)
params.put("previousHalfYearEndDate", previousHalfYearMonths.get(5));//环比(上半年结束日期)
params.put("yoyHalfYearStartDate", yoyHalfYearMonths.get(0));//同比(去年上半年开始日期)
params.put("yoyHalfYearEndDate", yoyHalfYearMonths.get(5));//同比(去年上半年结束日期)
/**
* date
*/
params.put("year", String.valueOf(year));//当前年份
params.put("previousYearStartDate", year + "-01");//环比 开始时间
params.put("previousYearEndDate", lastMonthStr);//环比 结束时间
params.put("lastYear", String.valueOf(year - 1));//同比
List<Map<String, Object>> dataMap = bloodPurificationService.queryDocumentSum(params);
//保留两位有效数字
DecimalFormat df = new DecimalFormat("0.00");
//遍历 获取有问题数量和总数
if (!CollectionUtils.isEmpty(dataMap)) {
dataMap.forEach(e -> {
/**
*
*/
double bloodFillIncompleteRate = 0;
double healtheduFillIncompleteRate = 0;
double informedconDocNosignRate = 0;
double bloodFillIncompleteRateHb = 0;
double healtheduFillIncompleteRateHb = 0;
double informedconDocNosignRateHb = 0;
double bloodFillIncompleteRateYoy = 0;
double healtheduFillIncompleteRateYoy = 0;
double informedconDocNosignRateYoy = 0;
double totalNum = ObjectUtils.isEmpty(e.get("total_num")) ? 0 : Double.parseDouble(e.get("total_num").toString());//总数
double bloodTotalNum = ObjectUtils.isEmpty(e.get("blood_total_num")) ? 0 : Double.parseDouble(e.get("blood_total_num").toString());//血净记录缺失总数
double healtheduTotalNum = ObjectUtils.isEmpty(e.get("healthedu_total_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_num").toString());//健康教育缺失总数
double informedconTotalNum = ObjectUtils.isEmpty(e.get("informedcon_total_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_num").toString());//血透知情同意合格总数
if(totalNum > 0){
bloodFillIncompleteRate = Double.parseDouble(df.format(bloodTotalNum / totalNum * 100));//血净记录缺失率
healtheduFillIncompleteRate = Double.parseDouble(df.format(healtheduTotalNum / totalNum * 100)); //健康教育缺失率
informedconDocNosignRate = Double.parseDouble(df.format(informedconTotalNum / totalNum * 100));//知情同意合格率
}
resultMap.put("bloodFillIncompleteRate", bloodFillIncompleteRate);
resultMap.put("healtheduFillIncompleteRate", healtheduFillIncompleteRate);
resultMap.put("informedconDocNosignRate", informedconDocNosignRate);
//计算环比
double totalHbNum = ObjectUtils.isEmpty(e.get("total_hb_num")) ? 0 : Double.parseDouble(e.get("total_hb_num").toString());//环比 总数
double bloodTotalHbNum = ObjectUtils.isEmpty(e.get("blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("blood_total_hb_num").toString());//环比 血净记录缺失总数
double healtheduTotalHbNum = ObjectUtils.isEmpty(e.get("healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_hb_num").toString());//环比 健康教育缺失总数
double informedconTotalHbNum = ObjectUtils.isEmpty(e.get("informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_hb_num").toString());//环比 知情同意合格总数
if(totalHbNum > 0){
bloodFillIncompleteRateHb = Double.parseDouble(df.format(bloodTotalHbNum / totalHbNum * 100));//环比 血净记录缺失率
healtheduFillIncompleteRateHb = Double.parseDouble(df.format(healtheduTotalHbNum / totalHbNum * 100)); //环比 健康教育缺失率
informedconDocNosignRateHb = Double.parseDouble(df.format(informedconTotalHbNum / totalHbNum * 100));//环比 知情同意合格率
}
resultMap.put("bloodFillIncompleteRateHb", bloodFillIncompleteRateHb);
resultMap.put("healtheduFillIncompleteRateHb", healtheduFillIncompleteRateHb);
resultMap.put("informedconDocNosignRateHb", informedconDocNosignRateHb);
//计算同比
double totalYoyNum = ObjectUtils.isEmpty(e.get("total_tb_num")) ? 0 : Double.parseDouble(e.get("total_tb_num").toString());//同比 总数
double bloodTotalYoyNum = ObjectUtils.isEmpty(e.get("blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("blood_total_tb_num").toString());//同比 血净记录缺失总数
double healtheduTotalYoyNum = ObjectUtils.isEmpty(e.get("healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("healthedu_total_tb_num").toString());//同比 健康教育缺失总数
double informedconTotalYoyNum = ObjectUtils.isEmpty(e.get("informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("informedcon_total_tb_num").toString());//同比 知情同意合格总数
if(totalYoyNum > 0){
bloodFillIncompleteRateYoy = Double.parseDouble(df.format(bloodTotalYoyNum / totalYoyNum * 100));//同比 血净记录缺失率
healtheduFillIncompleteRateYoy = Double.parseDouble(df.format(healtheduTotalYoyNum / totalYoyNum * 100)); //同比 健康教育缺失率
informedconDocNosignRateYoy = Double.parseDouble(df.format(informedconTotalYoyNum / totalYoyNum * 100));//同比
}
resultMap.put("bloodFillIncompleteRateYoy", bloodFillIncompleteRateYoy);
resultMap.put("healtheduFillIncompleteRateYoy", healtheduFillIncompleteRateYoy);
resultMap.put("informedconDocNosignRateYoy", informedconDocNosignRateYoy);
/**
*
*/
double bloodFillIncompleteRateQuarter = 0;
double healtheduFillIncompleteRateQuarter = 0;
double informedconDocNosignRateQuarter = 0;
double bloodFillIncompleteRateQuarterHb = 0;
double healtheduFillIncompleteRateQuarterHb = 0;
double informedconDocNosignRateQuarterHb = 0;
double bloodFillIncompleteRateQuarterYoy = 0;
double healtheduFillIncompleteRateQuarterYoy = 0;
double informedconDocNosignRateQuarterYoy = 0;
double quarterTotalNum = ObjectUtils.isEmpty(e.get("quarter_total_num")) ? 0 : Double.parseDouble(e.get("quarter_total_num").toString());//总数
double bloodTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_num").toString());//当季 血净记录缺失总数
double healtheduTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_num").toString());//当季 健康教育缺失总数
double informedconTotalQuarterNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_num").toString());//当季 知情同意合格总数
if(quarterTotalNum > 0){
bloodFillIncompleteRateQuarter = Double.parseDouble(df.format(bloodTotalQuarterNum / quarterTotalNum * 100));//当季 血净记录缺失率
healtheduFillIncompleteRateQuarter = Double.parseDouble(df.format(healtheduTotalQuarterNum / quarterTotalNum * 100)); //当季 健康教育缺失率
informedconDocNosignRateQuarter = Double.parseDouble(df.format(informedconTotalQuarterNum / quarterTotalNum * 100));//当季 知
}
resultMap.put("bloodFillIncompleteRateQuarter", bloodFillIncompleteRateQuarter);
resultMap.put("healtheduFillIncompleteRateQuarter", healtheduFillIncompleteRateQuarter);
resultMap.put("informedconDocNosignRateQuarter", informedconDocNosignRateQuarter);
//计算环比
double quarterTotalHbNum = ObjectUtils.isEmpty(e.get("quarter_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_total_hb_num").toString());//环比 总数
double bloodTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_hb_num").toString());//环比 血净记录缺失总数
double healtheduTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_hb_num").toString());//环比 健康教育缺失总数
double informedconTotalQuarterHbNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_hb_num").toString());//环比 知情同意合格总数
if(quarterTotalHbNum > 0){
bloodFillIncompleteRateQuarterHb = Double.parseDouble(df.format(bloodTotalQuarterHbNum / quarterTotalHbNum * 100));//环比 血净记录缺失率
healtheduFillIncompleteRateQuarterHb = Double.parseDouble(df.format(healtheduTotalQuarterHbNum / quarterTotalHbNum * 100));//环比 健康教育缺失率
informedconDocNosignRateQuarterHb = Double.parseDouble(df.format(informedconTotalQuarterHbNum / quarterTotalHbNum * 100));//环比
}
resultMap.put("bloodFillIncompleteRateQuarterHb", bloodFillIncompleteRateQuarterHb);
resultMap.put("healtheduFillIncompleteRateQuarterHb", healtheduFillIncompleteRateQuarterHb);
resultMap.put("informedconDocNosignRateQuarterHb", informedconDocNosignRateQuarterHb);
//计算同比
double quarterTotalYoyNum = ObjectUtils.isEmpty(e.get("quarter_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_total_tb_num").toString());//同比 总数
double bloodTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_blood_total_tb_num").toString());//同比 血净记录缺失总数
double healtheduTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_informedcon_total_tb_num").toString());//同比 健康教育缺失总数
double informedconTotalQuarterYoyNum = ObjectUtils.isEmpty(e.get("quarter_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("quarter_healthedu_total_tb_num").toString());//同比 知情同意合格总数
if(quarterTotalYoyNum > 0){
bloodFillIncompleteRateQuarterYoy = Double.parseDouble(df.format(bloodTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比 血净记录缺失率
healtheduFillIncompleteRateQuarterYoy = Double.parseDouble(df.format(healtheduTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比 健康教育缺失率
informedconDocNosignRateQuarterYoy = Double.parseDouble(df.format(informedconTotalQuarterYoyNum / quarterTotalYoyNum * 100));//同比
}
resultMap.put("bloodFillIncompleteRateQuarterYoy", bloodFillIncompleteRateQuarterYoy);
resultMap.put("healtheduFillIncompleteRateQuarterYoy", healtheduFillIncompleteRateQuarterYoy);
resultMap.put("informedconDocNosignRateQuarterYoy", informedconDocNosignRateQuarterYoy);
/**
*
*/
double bloodFillIncompleteRateHalfYear = 0;
double healtheduFillIncompleteRateHalfYear = 0;
double informedconDocNosignRateHalfYear = 0;
double bloodFillIncompleteRateHalfYearHb = 0;
double healtheduFillIncompleteRateHalfYearHb = 0;
double informedconDocNosignRateHalfYearHb = 0;
double bloodFillIncompleteRateHalfYearYoy = 0;
double healtheduFillIncompleteRateHalfYearYoy = 0;
double informedconDocNosignRateHalfYearYoy = 0;
double halfYearTotalNum = ObjectUtils.isEmpty(e.get("halfYear_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_num").toString());//半年 总数
double bloodTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_num").toString());//半年 血净记录缺失总数
double healtheduTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_num").toString());//半年 健康教育缺失总数
double informedconTotalHalfYearNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_num").toString());//半年 知情同意合格总数
if(halfYearTotalNum > 0){
bloodFillIncompleteRateHalfYear = Double.parseDouble(df.format(bloodTotalHalfYearNum / halfYearTotalNum * 100));//半年 血净记录缺失率
healtheduFillIncompleteRateHalfYear = Double.parseDouble(df.format(healtheduTotalHalfYearNum / halfYearTotalNum * 100));//半年 健康教育缺失率
informedconDocNosignRateHalfYear = Double.parseDouble(df.format(informedconTotalHalfYearNum / halfYearTotalNum * 100));
}
resultMap.put("bloodFillIncompleteRateHalfYear", bloodFillIncompleteRateHalfYear);
resultMap.put("healtheduFillIncompleteRateHalfYear", healtheduFillIncompleteRateHalfYear);
resultMap.put("informedconDocNosignRateHalfYear", informedconDocNosignRateHalfYear);
//计算环比
double halfYearTotalHbNum = ObjectUtils.isEmpty(e.get("halfYear_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_hb_num").toString());//环比 总数
double bloodTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_hb_num").toString());//环比 血净记录缺失总数
double healtheduTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_hb_num").toString());//环比 健康教育缺失总数
double informedconTotalHalfYearHbNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_hb_num").toString());//环比 知情同意合格总数
if(halfYearTotalHbNum > 0){
bloodFillIncompleteRateHalfYearHb = Double.parseDouble(df.format(bloodTotalHalfYearHbNum / halfYearTotalHbNum * 100));//环比 血净记录缺失率
healtheduFillIncompleteRateHalfYearHb = Double.parseDouble(df.format(healtheduTotalHalfYearHbNum / halfYearTotalHbNum * 100));//环比 健康教育缺失率
informedconDocNosignRateHalfYearHb = Double.parseDouble(df.format(informedconTotalHalfYearHbNum / halfYearTotalHbNum * 100));
}
resultMap.put("bloodFillIncompleteRateHalfYearHb", bloodFillIncompleteRateHalfYearHb);
resultMap.put("healtheduFillIncompleteRateHalfYearHb", healtheduFillIncompleteRateHalfYearHb);
resultMap.put("informedconDocNosignRateHalfYearHb", informedconDocNosignRateHalfYearHb);
//计算同比
double halfYearTotalYoyNum = ObjectUtils.isEmpty(e.get("halfYear_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_total_tb_num").toString());//同比 总数
double bloodTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_blood_total_tb_num").toString());//同比 血净记录缺失总数
double healtheduTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_healthedu_total_tb_num").toString());//同比 健康教育缺失总数
double informedconTotalHalfYearYoyNum = ObjectUtils.isEmpty(e.get("halfYear_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("halfYear_informedcon_total_tb_num").toString());//
if(halfYearTotalYoyNum > 0){
bloodFillIncompleteRateHalfYearYoy = Double.parseDouble(df.format(bloodTotalHalfYearYoyNum / halfYearTotalYoyNum * 100));//同比 血净记录缺失率
healtheduFillIncompleteRateHalfYearYoy = Double.parseDouble(df.format(healtheduTotalHalfYearYoyNum / halfYearTotalYoyNum * 100));//同比 健康教育缺失率
informedconDocNosignRateHalfYearYoy = Double.parseDouble(df.format(informedconTotalHalfYearYoyNum / halfYearTotalYoyNum * 100));
}
resultMap.put("bloodFillIncompleteRateHalfYearYoy", bloodFillIncompleteRateHalfYearYoy);
resultMap.put("healtheduFillIncompleteRateHalfYearYoy", healtheduFillIncompleteRateHalfYearYoy);
resultMap.put("informedconDocNosignRateHalfYearYoy", informedconDocNosignRateHalfYearYoy);
/**
*
*/
double bloodFillIncompleteRateYear = 0;
double healtheduFillIncompleteRateYear = 0;
double informedconDocNosignRateYear = 0;
double bloodFillIncompleteRateYearHb = 0;
double healtheduFillIncompleteRateYearHb = 0;
double informedconDocNosignRateYearHb = 0;
double bloodFillIncompleteRateYearYoy = 0;
double healtheduFillIncompleteRateYearYoy = 0;
double informedconDocNosignRateYearYoy = 0;
double yearTotalNum = ObjectUtils.isEmpty(e.get("year_total_num")) ? 0 : Double.parseDouble(e.get("year_total_num").toString());//当前年 总数
double bloodTotalYearNum = ObjectUtils.isEmpty(e.get("year_blood_total_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_num").toString());//当前年 血净记录缺失总数
double healtheduTotalYearNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_num").toString());//当前年 健康教育缺失总数
double informedconTotalYearNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_num").toString());//当前年 知情同意合格总数
if(yearTotalNum > 0){
bloodFillIncompleteRateYear = Double.parseDouble(df.format(bloodTotalYearNum / yearTotalNum * 100));//环比 血净记录缺失率
healtheduFillIncompleteRateYear = Double.parseDouble(df.format(healtheduTotalYearNum / yearTotalNum * 100));//环比 健康教育缺失率
informedconDocNosignRateYear = Double.parseDouble(df.format(informedconTotalYearNum / yearTotalNum * 100));
}
resultMap.put("bloodFillIncompleteRateYear", bloodFillIncompleteRateYear);
resultMap.put("healtheduFillIncompleteRateYear", healtheduFillIncompleteRateYear);
resultMap.put("informedconDocNosignRateYear", informedconDocNosignRateYear);
//计算环比
double yearTotalHbNum = ObjectUtils.isEmpty(e.get("year_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_total_hb_num").toString());//环比 总数
double bloodTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_blood_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_hb_num").toString());//环比 血净记录缺失总数
double healtheduTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_hb_num").toString());//环比 健康教育缺失总数
double informedconTotalYearHbNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_hb_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_hb_num").toString());//当前年 知情同意合格总数
if(yearTotalHbNum > 0){
bloodFillIncompleteRateYearHb = Double.parseDouble(df.format(bloodTotalYearHbNum / yearTotalHbNum * 100));//同比 血净记录缺失率
healtheduFillIncompleteRateYearHb = Double.parseDouble(df.format(healtheduTotalYearHbNum / yearTotalHbNum * 100));//同比 健康教育缺失率
informedconDocNosignRateYearHb = Double.parseDouble(df.format(informedconTotalYearHbNum / yearTotalHbNum * 100));
}
resultMap.put("bloodFillIncompleteRateYearHb", bloodFillIncompleteRateYearHb);
resultMap.put("healtheduFillIncompleteRateYearHb", healtheduFillIncompleteRateYearHb);
resultMap.put("informedconDocNosignRateYearHb", informedconDocNosignRateYearHb);
//计算同比
double yearTotalYoyNum = ObjectUtils.isEmpty(e.get("year_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_total_tb_num").toString());//同比 总数
double bloodTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_blood_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_blood_total_tb_num").toString());//同比 血净记录缺失总数
double healtheduTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_healthedu_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_healthedu_total_tb_num").toString());//同比 健康教育缺失总数
double informedconTotalYearYoyNum = ObjectUtils.isEmpty(e.get("year_informedcon_total_tb_num")) ? 0 : Double.parseDouble(e.get("year_informedcon_total_tb_num").toString());//同比 知情同意合格总数
if(yearTotalYoyNum > 0){
bloodFillIncompleteRateYearYoy = Double.parseDouble(df.format(bloodTotalYearYoyNum / yearTotalYoyNum * 100));//同比 血净记录缺失率
healtheduFillIncompleteRateYearYoy = Double.parseDouble(df.format(healtheduTotalYearYoyNum / yearTotalYoyNum * 100));//同比 健康教育缺失率
informedconDocNosignRateYearYoy = Double.parseDouble(df.format(informedconTotalYearYoyNum / yearTotalYoyNum * 100));
}
resultMap.put("bloodFillIncompleteRateYearYoy", bloodFillIncompleteRateYearYoy);
resultMap.put("healtheduFillIncompleteRateYearYoy", healtheduFillIncompleteRateYearYoy);
resultMap.put("informedconDocNosignRateYearYoy", informedconDocNosignRateYearYoy);
});
}
return ResultUtil.ok(resultMap);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return ResultUtil.error("统计过程出错,请检查代码");
}
}
/**
*
* @param page
@ -263,7 +669,7 @@ public class bloodPurificationController {
EmrBloodDialysisDoc emrBloodDialysisDoc = new EmrBloodDialysisDoc();
emrBloodDialysisDoc.setExportDate(new Date());
emrBloodDialysisDoc.setExportNo(user.getUserName());
emrBloodDialysisDoc.setIsDel(0);
//实例化
ImportExcelUtil.newInstance("bloodPurificationMapper", emrBloodDialysisDoc, EmrBloodDialysisDoc.class);
//导入excel的操作
@ -288,4 +694,173 @@ public class bloodPurificationController {
return new ResponseEntity<String>(e.getMessage(), responseHeaders, HttpStatus.OK);
}
}
/**
*
* @param id
* @return
* @throws Exception
*/
@RequestMapping(value = "queryInspectionInfoById", method = RequestMethod.POST)
@ResponseBody
public ResultUtil queryInspectionInfoById(String id){
if(StringUtils.isEmpty(id)){
return ResultUtil.error("参数错误");
}
List<EmrBloodDialysisDoc> list = bloodPurificationService.queryInspectionInfoById(id);
return ResultUtil.ok(list);
}
/**
*
* @param emrBloodDialysisDoc
* @return
*/
@OptionalLog(module = "修改",methods = "检查记录病历操作")
@RequestMapping(value = "updateInspectionInfo", method = RequestMethod.POST)
@ResponseBody
public ResultUtil updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc){
try {
bloodPurificationService.updateInspectionInfo(emrBloodDialysisDoc);
return ResultUtil.ok();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return ResultUtil.error("更新时出错");
}
}
/**
*
* @param emrBloodApplyInfo
* @return
*/
@RequestMapping(value = "insertFlowInfo", method = RequestMethod.POST)
@ResponseBody
public ResultUtil insertFlowInfo(HttpServletRequest request,String ids, EmrBloodApplyInfo emrBloodApplyInfo){
try {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
String[] bloodIds = ids.split(",");
for(int i = 0; i < bloodIds.length; i++){
emrBloodApplyInfo.setBloodId(Integer.parseInt(bloodIds[i]));
emrBloodApplyInfo.setApplyNo(user.getUserName());
emrBloodApplyInfo.setAppNo(String.valueOf(UUID.randomUUID()));
emrBloodApplyInfo.setStatus(1);
//插入流程表
bloodPurificationService.insertFlowInfo(emrBloodApplyInfo);
}
return ResultUtil.ok();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return ResultUtil.error("流程处理出错");
}
}
/**
*
* @param page
* @param limit
* @param emrBloodApplyInfo
* @param request
* @return
*/
@RequestMapping("queryBloodApproveList")
@ResponseBody
public String queryBloodApproveList(Integer page, Integer limit, EmrBloodApplyInfo emrBloodApplyInfo, HttpServletRequest request){
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
try{
HttpSession session = request.getSession();
emrBloodApplyInfo.setStatus(Integer.valueOf((String) session.getAttribute("status")));
List<EmrBloodApplyInfo> emrBloodDialysisDocs = bloodPurificationMapper.queryBloodApproveList(emrBloodApplyInfo);
PageInfo pageInfo = new PageInfo<>(emrBloodDialysisDocs);
return JSON.toJSONString(pageInfo);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
*
* @param page
* @param limit
* @param emrBloodApplyInfo
* @return
*/
@RequestMapping("queryFlowLogList")
@ResponseBody
public String queryFlowLogList(Integer page, Integer limit, EmrBloodApplyInfo emrBloodApplyInfo){
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
try{
List<EmrBloodApplyInfo> emrBloodDialysisDocs = bloodPurificationMapper.queryFlowLogList(emrBloodApplyInfo);
PageInfo pageInfo = new PageInfo<>(emrBloodDialysisDocs);
return JSON.toJSONString(pageInfo);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
*
* @param emrBloodApplyInfo
* @return
*/
@RequestMapping(value = "handleFlowInfo", method = RequestMethod.POST)
@ResponseBody
public ResultUtil handleFlowInfo(HttpServletRequest request, EmrBloodApplyInfo emrBloodApplyInfo){
try {
HttpSession session = request.getSession();
Integer status = Integer.valueOf((String) session.getAttribute("status"));
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
String appNo = emrBloodApplyInfo.getAppNo();
String[] appNos = appNo.split(",");
for(int i = 0; i < appNos.length; i++){
emrBloodApplyInfo.setAppNo(appNos[i]);
emrBloodApplyInfo.setApproveNo(user.getUserName());
Integer isAgree = emrBloodApplyInfo.getIsAgree();
//如果不通过,则打回
if(isAgree == 1){
emrBloodApplyInfo.setStatus(status + 1);
}else{
emrBloodApplyInfo.setStatus(status - 1);
}
if(emrBloodApplyInfo.getStatus() == 0){
//删除当前流程,重新申请新流程
bloodPurificationService.delFlowInfo(emrBloodApplyInfo);
}else{
bloodPurificationService.handleFlowInfo(emrBloodApplyInfo);
}
}
return ResultUtil.ok();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return ResultUtil.error("流程处理出错");
}
}
@OptionalLog(module = "删除",methods = "检查记录病历操作")
@RequestMapping(value = "delApplyInfo", method = RequestMethod.POST)
@ResponseBody
public ResultUtil delApplyInfo(String id){
if(StringUtils.isEmpty(id)){
return ResultUtil.error("参数错误");
}
try {
bloodPurificationService.delApplyInfo(id);
return ResultUtil.ok();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return ResultUtil.error("流程处理出错");
}
}
}

@ -1,6 +1,9 @@
package com.emr.dao.bloodPurification;
import com.emr.entity.EmrBloodApplyInfo;
import com.emr.entity.EmrBloodDialysisDoc;
import com.emr.entity.emrLog.Emr_Log;
import java.util.List;
import java.util.Map;
@ -11,4 +14,26 @@ public interface BloodPurificationMapper{
List<EmrBloodDialysisDoc> queryDocumentList(EmrBloodDialysisDoc emrBloodDialysisDoc);
List<Map<String, Object>> queryInspectionRecordsSum(EmrBloodDialysisDoc emrBloodDialysisDoc);
List<EmrBloodDialysisDoc> queryInspectionInfoById(String id);
void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc);
void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
List<EmrBloodApplyInfo> queryBloodApproveList(EmrBloodApplyInfo emrBloodApplyInfo);
void insertFlowProcessInfo(EmrBloodApplyInfo emrBloodApplyInfo);
void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
List<EmrBloodApplyInfo> queryFlowLogList(EmrBloodApplyInfo emrBloodApplyInfo);
void delApplyInfo(String id);
List<Map<String, Object>> queryDocumentSum(Map<String,Object> params);
List<Emr_Log> selectAll(Emr_Log log, String startTime, String endTime);
}

@ -6,6 +6,7 @@ import java.util.Date;
@Data
public class EmrBloodDialysisDoc {
private Integer id;
private Integer xh;
private String inspectionDate;
private String name;
@ -26,5 +27,6 @@ public class EmrBloodDialysisDoc {
private String remark;
private Date exportDate;
private String exportNo;
private Integer isDel;
private String status;
}

@ -1,5 +1,27 @@
package com.emr.service.bloodPurification;
import com.emr.entity.EmrBloodApplyInfo;
import com.emr.entity.EmrBloodDialysisDoc;
import com.emr.entity.emrLog.Emr_Log;
import java.util.List;
import java.util.Map;
public interface BloodPurificationService{
List<EmrBloodDialysisDoc> queryInspectionInfoById(String id);
void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc);
void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo);
void delApplyInfo(String id);
List<Map<String, Object>> queryDocumentSum(Map<String, Object> params);
List<Emr_Log> selectAll(Emr_Log log, String startTime, String endTime);
}

@ -1,14 +1,70 @@
package com.emr.service.bloodPurification.impl;
import com.emr.dao.bloodPurification.BloodPurificationMapper;
import com.emr.entity.EmrBloodApplyInfo;
import com.emr.entity.EmrBloodDialysisDoc;
import com.emr.entity.emrLog.Emr_Log;
import com.emr.service.bloodPurification.BloodPurificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.List;
import java.util.Map;
@Service
public class BloodPurificationServiceImpl implements BloodPurificationService {
@Autowired
BloodPurificationMapper bloodPurificationMapper;
@Override
public List<EmrBloodDialysisDoc> queryInspectionInfoById(String id) {
return bloodPurificationMapper.queryInspectionInfoById(id);
}
@Override
public void updateInspectionInfo(EmrBloodDialysisDoc emrBloodDialysisDoc) {
bloodPurificationMapper.updateInspectionInfo(emrBloodDialysisDoc);
}
@Override
public void insertFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) {
try {
bloodPurificationMapper.insertFlowInfo(emrBloodApplyInfo);
//插入流程记录表
bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo);
}catch (Exception e){
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
e.printStackTrace();
}
}
@Override
public void handleFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) {
bloodPurificationMapper.handleFlowInfo(emrBloodApplyInfo);
//插入流程记录表
bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo);
}
@Override
public void delFlowInfo(EmrBloodApplyInfo emrBloodApplyInfo) {
bloodPurificationMapper.delFlowInfo(emrBloodApplyInfo);
//插入流程记录表
bloodPurificationMapper.insertFlowProcessInfo(emrBloodApplyInfo);
}
@Override
public void delApplyInfo(String id) {
bloodPurificationMapper.delApplyInfo(id);
}
@Override
public List<Map<String, Object>> queryDocumentSum(Map<String, Object> params) {
return bloodPurificationMapper.queryDocumentSum(params);
}
@Override
public List<Emr_Log> selectAll(Emr_Log log, String startTime, String endTime) {
return bloodPurificationMapper.selectAll(log, startTime, endTime);
}
}

@ -162,10 +162,10 @@ public class PrintOrDownLoadInfoService {
}
vo.setPrintCount(printCount);
vo.setPrintFee(printCount * printPrice);
if (vo.getTypeName().equals("院内查阅")){
if ("院内查阅".equals(vo.getTypeName())){
vo.setPrintFee(0 * printPrice);
}
if (vo.getTypeName().equals("公检法单位")){
if ("公检法单位".equals(vo.getTypeName())){
vo.setPrintFee(0 * printPrice);
}
}

@ -3,9 +3,9 @@ package com.emr.util;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import lombok.extern.slf4j.Slf4j;
@ -290,4 +290,52 @@ public class DateUtils {
}
return result.toString();
}
/**
*
* @param year
* @param quarter
* @return
*/
public static List<String> getQuarterMonths(int year, int quarter) {
List<String> months = new ArrayList<>();
int startMonth = (quarter - 1) * 3 + 1;
int endMonth = startMonth + 2;
if (quarter <= 0) {
year--;
startMonth = 10;
endMonth = 12;
} else if (quarter > 4) {
year++;
startMonth = 1;
endMonth = 3;
}
for (int month = startMonth; month <= endMonth; month++) {
months.add(LocalDate.of(year, month, 1).format(DateTimeFormatter.ofPattern("yyyy-MM")));
}
return months;
}
/**
*
* @param year
* @param isFirstHalf
* @return
*/
public static List<String> getHalfYearMonths(int year, boolean isFirstHalf) {
List<String> months = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
int startMonth = isFirstHalf ? 1 : 7;
int endMonth = isFirstHalf ? 6 : 12;
for (int month = startMonth; month <= endMonth; month++) {
LocalDate date = LocalDate.of(year, month, 1);
months.add(date.format(formatter));
}
return months;
}
}

@ -366,47 +366,68 @@ public class img2PdfUtil {
//图片合成pdf
private static void imgToPdf(Document document, List<String> filePaths) throws Exception {
document.open(); //打开容器
document.open();
float percent = 100;
float w, h;
for (String filePath : filePaths) {
try {
File file = new File(filePath);
if (file.isFile()) {
Image img = Image.getInstance(filePath);
/*处理图片缩放比例*/
w = img.getWidth();
h = img.getHeight();
if ((w > A4_weight) && (h < A4_height)) {
percent = (A4_weight * 100) / w;
} else if ((w < A4_weight) && (h > A4_height)) {
percent = (A4_height * 100) / h;
} else if ((w > A4_weight) && (h > A4_height)) {
float w = img.getWidth();
float h = img.getHeight();
// 计算缩放比例,基于宽度和高度中较大的值
float scaleWidth = A4_weight / w;
float scaleHeight = A4_height / h;
percent = Math.min(scaleWidth, scaleHeight) * 100;
percent = (A4_weight * 100) / w;
h = (h * percent) / 100;
if (h > A4_height) {
percent = (A4_height * 100) / h;
}
}
img.setAlignment(com.lowagie.text.Image.ALIGN_CENTER);
if(percent != 100){
img.scaleAbsolute(A4_weight,A4_height);
}else{
img.scalePercent(percent);
}
img.scalePercent(percent);
document.add(img);
}
} catch (Exception e) {
throw new RuntimeException(e);
throw new RuntimeException("Error processing file: " + filePath, e);
}
}
document.close(); //关闭容器
document.close();
// document.open(); //打开容器
// float percent = 100;
// float w, h;
// for (String filePath : filePaths) {
// try {
// File file = new File(filePath);
// if (file.isFile()) {
// Image img = Image.getInstance(filePath);
// /*处理图片缩放比例*/
// w = img.getWidth();
// h = img.getHeight();
// if ((w > A4_weight) && (h < A4_height)) {
// percent = (A4_weight * 100) / w;
// } else if ((w < A4_weight) && (h > A4_height)) {
// percent = (A4_height * 100) / h;
// } else if ((w > A4_weight) && (h > A4_height)) {
//
// percent = (A4_weight * 100) / w;
// h = (h * percent) / 100;
// if (h > A4_height) {
// percent = (A4_height * 100) / h;
// }
// }
// img.setAlignment(com.lowagie.text.Image.ALIGN_CENTER);
// if(percent != 100){
// img.scaleAbsolute(A4_weight,A4_height);
// }else{
// img.scalePercent(percent);
// }
// document.add(img);
// }
// } catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
// document.close(); //关闭容器
}
//图片合成pdf
private static void imgToPdf2(Document document, String filePath) throws Exception {
document.open(); //打开容器

@ -83,6 +83,7 @@ public class imgToPdfUtil {
cb.endText();
// 创建目录
PdfOutline root = cb.getRootOutline();
float percent = 100;
// 添加图片到PDF
for (int i = 0; i < scanPathVos.size(); i++) {
String assortName = scanPathVos.get(i).getAssortName();
@ -101,12 +102,16 @@ public class imgToPdfUtil {
}
String imagePath = scanPathVos.get(i).getFileRealPath();
Image image = Image.getInstance(imagePath);
float w = image.getWidth();
float h = image.getHeight();
image.setAlignment(Image.MIDDLE);
image.scaleToFit(PageSize.A4.getWidth(), PageSize.A4.getHeight());
// 等比例缩放图片以填满PDF页面
// 计算缩放比例,基于宽度和高度中较大的值
float scaleWidth = PageSize.A4.getWidth() / w;
float scaleHeight = PageSize.A4.getHeight() / h;
percent = Math.min(scaleWidth, scaleHeight) * 100;
image.scaleAbsolute(document.getPageSize());
image.setAlignment(image.MIDDLE);
image.scalePercent(percent);
// 创建新页面并添加图片
//document.newPage();
document.add(image);

@ -1222,7 +1222,7 @@
commomtable
<where>
<if test="inpatientNo != null and inpatientNo != ''">
AND admiss_id =#{inpatientNo}
AND inpatient_no =#{inpatientNo}
</if>
<if test="admissId != null and admissId != ''">
AND admiss_id = #{admissId}

@ -4,39 +4,40 @@
<select id="queryDocumentList" parameterType="com.emr.entity.EmrBloodDialysisDoc" resultType="com.emr.entity.EmrBloodDialysisDoc">
select
xh,
inspection_date as inspectionDate,
name,
dialysis_date as dialysisDate,
blood_fill_incomplete as bloodFillIncomplete,
blood_sign_nonstandard as bloodSignNonstandard,
blood_medicalstaff_nosign as bloodMedicalstaffNosign,
healthedu_fill_incomplete as healtheduFillIncomplete,
healthedu_sign_nonstandard as healtheduSignNonstandard,
healthedu_medicalstaff_nosign as healtheduMedicalstaffNosign,
informedcon_doc_nosign as informedconDocNosign,
informedcon_familymembers_miss as informedconFamilymembersMiss,
informedcon_name_nonstandard as informedconNameNonstandard,
other,
responsible_nurse as responsibleNurse,
rectification_date as rectificationDate,
rectification_sgin as rectificationSgin,
remark,
export_date as exportDate,
export_no as exportNo
from emr_blood_dialysis_doc
<where>
<if test="inspectionDate != null and inspectionDate != ''">
and inspection_date = #{inspectionDate}
</if>
<if test="name != null and name != ''">
and name like '%'+ #{name} + '%'
</if>
<if test="dialysisDate != null and dialysisDate != ''">
and dialysis_date = #{dialysisDate}
</if>
</where>
order by xh
b.status,
a.id,
a.xh,
a.inspection_date as inspectionDate,
a.name,
a.dialysis_date as dialysisDate,
a.blood_fill_incomplete as bloodFillIncomplete,
a.blood_sign_nonstandard as bloodSignNonstandard,
a.blood_medicalstaff_nosign as bloodMedicalstaffNosign,
a.healthedu_fill_incomplete as healtheduFillIncomplete,
a.healthedu_sign_nonstandard as healtheduSignNonstandard,
a.healthedu_medicalstaff_nosign as healtheduMedicalstaffNosign,
a.informedcon_doc_nosign as informedconDocNosign,
a.informedcon_familymembers_miss as informedconFamilymembersMiss,
a.informedcon_name_nonstandard as informedconNameNonstandard,
a.other,
a.responsible_nurse as responsibleNurse,
a.rectification_date as rectificationDate,
a.rectification_sgin as rectificationSgin,
a.remark,
a.export_date as exportDate,
a.export_no as exportNo
from emr_blood_dialysis_doc a left join emr_blood_apply_info b on a.id = b.blood_id
where is_del != 1
<if test="inspectionDate != null and inspectionDate != ''">
and a.inspection_date = #{inspectionDate}
</if>
<if test="name != null and name != ''">
and a.name like '%'+ #{name} + '%'
</if>
<if test="dialysisDate != null and dialysisDate != ''">
and a.dialysis_date = #{dialysisDate}
</if>
order by a.xh
</select>
<insert id="SimpleInsert" parameterType="java.util.List">
@ -61,7 +62,8 @@
rectification_sgin,
remark,
export_date,
export_no
export_no,
is_del
)
<foreach collection="list" item="item" separator="union">
select
@ -147,7 +149,8 @@
#{item.rectificationSgin},
#{item.remark},
#{item.exportDate},
#{item.exportNo}
#{item.exportNo},
#{item.isDel}
</foreach>
</insert>
@ -156,6 +159,7 @@
inspection_date inspectionDate,
name,
dialysis_date dialysisDate,
responsible_nurse responsibleNurse,
total_num,
blood_fill_incomplete_num,
blood_sign_nonstandard_num,
@ -179,4 +183,384 @@
</if>
</where>
</select>
<select id="queryInspectionInfoById" parameterType="String" resultType="com.emr.entity.EmrBloodDialysisDoc">
select
id,
xh,
inspection_date as inspectionDate,
name,
dialysis_date as dialysisDate,
blood_fill_incomplete as bloodFillIncomplete,
blood_sign_nonstandard as bloodSignNonstandard,
blood_medicalstaff_nosign as bloodMedicalstaffNosign,
healthedu_fill_incomplete as healtheduFillIncomplete,
healthedu_sign_nonstandard as healtheduSignNonstandard,
healthedu_medicalstaff_nosign as healtheduMedicalstaffNosign,
informedcon_doc_nosign as informedconDocNosign,
informedcon_familymembers_miss as informedconFamilymembersMiss,
informedcon_name_nonstandard as informedconNameNonstandard,
other,
responsible_nurse as responsibleNurse,
rectification_date as rectificationDate,
rectification_sgin as rectificationSgin,
remark
from emr_blood_dialysis_doc where id = #{id}
</select>
<update id="updateInspectionInfo" parameterType="com.emr.entity.EmrBloodDialysisDoc">
update emr_blood_dialysis_doc
<set>
<if test="inspectionDate != null and inspectionDate != ''">
inspection_date = #{inspectionDate},
</if>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="dialysisDate != null and dialysisDate != ''">
dialysis_date = #{dialysisDate},
</if>
<if test="bloodFillIncomplete != null and bloodFillIncomplete != ''">
blood_fill_incomplete = #{bloodFillIncomplete},
</if>
<if test="bloodSignNonstandard != null and bloodSignNonstandard != ''">
blood_sign_nonstandard = #{bloodSignNonstandard},
</if>
<if test="bloodMedicalstaffNosign != null and bloodMedicalstaffNosign != ''">
blood_medicalstaff_nosign = #{bloodMedicalstaffNosign},
</if>
<if test="healtheduFillIncomplete != null and healtheduFillIncomplete != ''">
healthedu_fill_incomplete = #{healtheduFillIncomplete},
</if>
<if test="healtheduSignNonstandard != null and healtheduSignNonstandard != ''">
healthedu_sign_nonstandard = #{healtheduSignNonstandard},
</if>
<if test="healtheduMedicalstaffNosign != null and healtheduMedicalstaffNosign != ''">
healthedu_medicalstaff_nosign = #{healtheduMedicalstaffNosign},
</if>
<if test="informedconDocNosign != null and informedconDocNosign != ''">
informedcon_doc_nosign = #{informedconDocNosign},
</if>
<if test="informedconFamilymembersMiss != null and informedconFamilymembersMiss != ''">
informedcon_familymembers_miss = #{informedconFamilymembersMiss},
</if>
<if test="informedconNameNonstandard != null and informedconNameNonstandard != ''">
informedcon_name_nonstandard = #{informedconNameNonstandard},
</if>
<if test="other != null and other != ''">
other = #{other},
</if>
<if test="responsibleNurse != null and responsibleNurse != ''">
responsible_nurse = #{responsibleNurse},
</if>
<if test="rectificationDate != null and rectificationDate != ''">
rectification_date = #{rectificationDate},
</if>
<if test="rectificationSgin != null and rectificationSgin != ''">
rectification_sgin = #{rectificationSgin},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
</set>
where id = #{id}
</update>
<insert id="insertFlowInfo" parameterType="com.emr.entity.EmrBloodApplyInfo">
insert into
emr_blood_apply_info
(
<if test="bloodId != null and bloodId != ''">
blood_id,
</if>
<if test="appNo != null and appNo != ''">
app_no,
</if>
<if test="applyNo != null and applyNo != ''">
apply_no,
</if>
<if test="applyReason != null and applyReason != ''">
apply_reason,
</if>
<if test="approveNo != null and approveNo != ''">
approve_no,
</if>
<if test="approveDate != null and approveDate != ''">
approve_date,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
apply_date,
status
)
values
(
<if test="bloodId != null and bloodId != ''">
#{bloodId},
</if>
<if test="appNo != null and appNo != ''">
#{appNo},
</if>
<if test="applyNo != null and applyNo != ''">
#{applyNo},
</if>
<if test="applyReason != null and applyReason != ''">
#{applyReason},
</if>
<if test="approveNo != null and approveNo != ''">
#{approveNo},
</if>
<if test="approveDate != null and approveDate != ''">
#{approveDate},
</if>
<if test="remark != null and remark != ''">
#{remark},
</if>
GETDATE(),
#{status}
)
</insert>
<insert id="insertFlowProcessInfo" parameterType="com.emr.entity.EmrBloodApplyInfo">
insert into emr_blood_flow_info
(
blood_id,
app_no,
apply_no,
apply_date,
apply_reason,
status,
approve_no,
approve_date,
remark,
is_agree
)
select
blood_id,
app_no,
apply_no,
apply_date,
apply_reason,
status,
approve_no,
approve_date,
remark,
is_agree
from emr_blood_apply_info
where app_no = #{appNo}
</insert>
<update id="handleFlowInfo" parameterType="com.emr.entity.EmrBloodApplyInfo">
update
emr_blood_apply_info
set
approve_no = #{approveNo},
approve_date = GETDATE(),
status = #{status},
is_agree = #{isAgree},
remark = #{remark}
where
app_no = #{appNo}
</update>
<select id="queryBloodApproveList" parameterType="com.emr.entity.EmrBloodApplyInfo" resultType="map">
select
blood_id bloodId,
app_no appNo,
apply_no applyNo,
CONVERT(varchar, apply_date, 120) applyDate,
apply_reason applyReason,
status,
approve_no approveNo,
CONVERT(varchar, approve_date, 120) approveDate,
remark,
is_agree isAgree
from emr_blood_apply_info where status = #{status}
<if test="appNo != null and appNo != ''">
and app_no like '%'+ #{appNo} + '%'
</if>
<if test="applyNo != null and applyNo != ''">
and applyNo like '%'+ #{applyNo} + '%'
</if>
<if test="applyDate != null and applyDate != ''">
and CAST(apply_date AS DATE) = #{applyDate}
</if>
</select>
<delete id="delFlowInfo" parameterType="com.emr.entity.EmrBloodApplyInfo">
delete from emr_blood_apply_info where app_no = #{appNo}
</delete>
<select id="queryFlowLogList" parameterType="com.emr.entity.EmrBloodApplyInfo" resultType="map">
select
a.app_no appNo,
a.apply_no applyNo,
CONVERT(varchar, a.apply_date, 120) applyDate,
a.apply_reason applyReason,
a.status,
a.approve_no approveNo,
CONVERT(varchar, a.approve_date, 120) approveDate,
a.remark,
a.is_agree isAgree,
b.inspection_date inspectionDate,
b.name,
b.dialysis_date dialysisDate,
b.responsible_nurse responsibleNurse
from emr_blood_flow_info a join emr_blood_dialysis_doc b on a.blood_id = b.id
<where>
<if test="appNo != null and appNo != ''">
and a.app_no like '%'+ #{appNo} + '%'
</if>
<if test="applyNo != null and applyNo != ''">
and a.applyNo like '%'+ #{applyNo} + '%'
</if>
<if test="applyDate != null and applyDate != ''">
and CAST(a.apply_date AS DATE) = #{applyDate}
</if>
</where>
</select>
<delete id="delApplyInfo" parameterType="java.lang.String">
update emr_blood_dialysis_doc set is_del = 1 where id = #{id}
</delete>
<select id="queryDocumentSum" parameterType="map" resultType="map">
select
/**
当月
*/
sum(case when dialysis_date = #{date} then total_num else null end) total_num,
sum(case when dialysis_date = #{date} then blood_total_num else null end) blood_total_num,
sum(case when dialysis_date = #{date} then informedcon_total_num else null end) informedcon_total_num,
sum(case when dialysis_date = #{date} then healthedu_total_num else null end) healthedu_total_num,
/**
环比(上月)
*/
sum(case when dialysis_date = #{lastMonth} then total_num else null end) total_hb_num,
sum(case when dialysis_date = #{lastMonth} then blood_total_num else null end) blood_total_hb_num,
sum(case when dialysis_date = #{lastMonth} then informedcon_total_num else null end) informedcon_total_hb_num,
sum(case when dialysis_date = #{lastMonth} then healthedu_total_num else null end) healthedu_total_hb_num,
/**
同比(去年同月)
*/
sum(case when dialysis_date = #{sameMonthLastYear} then total_num else null end) total_tb_num,
sum(case when dialysis_date = #{sameMonthLastYear} then blood_total_num else null end) blood_total_tb_num,
sum(case when dialysis_date = #{sameMonthLastYear} then informedcon_total_num else null end) informedcon_total_tb_num,
sum(case when dialysis_date = #{sameMonthLastYear} then healthedu_total_num else null end) healthedu_total_tb_num,
/**
当季
*/
sum(case when dialysis_date &lt;= #{currentQuarterEndDate} and dialysis_date >= #{currentQuarterStartDate} then total_num else null end) quarter_total_num,
sum(case when dialysis_date &lt;= #{currentQuarterEndDate} and dialysis_date >= #{currentQuarterStartDate} then blood_total_num else null end) quarter_blood_total_num,
sum(case when dialysis_date &lt;= #{currentQuarterEndDate} and dialysis_date >= #{currentQuarterStartDate} then informedcon_total_num else null end) quarter_informedcon_total_num,
sum(case when dialysis_date &lt;= #{currentQuarterEndDate} and dialysis_date >= #{currentQuarterStartDate} then healthedu_total_num else null end) quarter_healthedu_total_num,
/**
环比(上个季度)
*/
sum(case when dialysis_date &lt;= #{previousQuarterEndDate} and dialysis_date >= #{previousQuarterStartDate} then total_num else null end) quarter_total_hb_num,
sum(case when dialysis_date &lt;= #{previousQuarterEndDate} and dialysis_date >= #{previousQuarterStartDate} then blood_total_num else null end) quarter_blood_total_hb_num,
sum(case when dialysis_date &lt;= #{previousQuarterEndDate} and dialysis_date >= #{previousQuarterStartDate} then informedcon_total_num else null end) quarter_informedcon_total_hb_num,
sum(case when dialysis_date &lt;= #{previousQuarterEndDate} and dialysis_date >= #{previousQuarterStartDate} then healthedu_total_num else null end) quarter_healthedu_total_hb_num,
/**
同比(去年同季度)
*/
sum(case when dialysis_date &lt;= #{yoyQuarterEndDate} and dialysis_date >= #{yoyQuarterStartDate} then total_num else null end) quarter_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyQuarterEndDate} and dialysis_date >= #{yoyQuarterStartDate} then blood_total_num else null end) quarter_blood_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyQuarterEndDate} and dialysis_date >= #{yoyQuarterStartDate} then informedcon_total_num else null end) quarter_informedcon_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyQuarterEndDate} and dialysis_date >= #{yoyQuarterStartDate} then healthedu_total_num else null end) quarter_healthedu_total_tb_num,
/**
半年
*/
sum(case when dialysis_date &lt;= #{halfYearEndDate} and dialysis_date >= #{halfYearStartDate} then total_num else null end) halfYear_total_num,
sum(case when dialysis_date &lt;= #{halfYearEndDate} and dialysis_date >= #{halfYearStartDate} then blood_total_num else null end) halfYear_blood_total_num,
sum(case when dialysis_date &lt;= #{halfYearEndDate} and dialysis_date >= #{halfYearStartDate} then informedcon_total_num else null end) halfYear_informedcon_total_num,
sum(case when dialysis_date &lt;= #{halfYearEndDate} and dialysis_date >= #{halfYearStartDate} then healthedu_total_num else null end) halfYear_healthedu_total_num,
/**
半年环比
*/
sum(case when dialysis_date &lt;= #{previousHalfYearEndDate} and dialysis_date >= #{previousHalfYearStartDate} then total_num else null end) halfYear_total_hb_num,
sum(case when dialysis_date &lt;= #{previousHalfYearEndDate} and dialysis_date >= #{previousHalfYearStartDate} then blood_total_num else null end) halfYear_blood_total_hb_num,
sum(case when dialysis_date &lt;= #{previousHalfYearEndDate} and dialysis_date >= #{previousHalfYearStartDate} then informedcon_total_num else null end) halfYear_informedcon_total_hb_num,
sum(case when dialysis_date &lt;= #{previousHalfYearEndDate} and dialysis_date >= #{previousHalfYearStartDate} then healthedu_total_num else null end) halfYear_healthedu_total_hb_num,
/**
半年同比
*/
sum(case when dialysis_date &lt;= #{yoyHalfYearEndDate} and dialysis_date >= #{yoyHalfYearStartDate} then total_num else null end) halfYear_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyHalfYearEndDate} and dialysis_date >= #{yoyHalfYearStartDate} then blood_total_num else null end) halfYear_blood_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyHalfYearEndDate} and dialysis_date >= #{yoyHalfYearStartDate} then informedcon_total_num else null end) halfYear_informedcon_total_tb_num,
sum(case when dialysis_date &lt;= #{yoyHalfYearEndDate} and dialysis_date >= #{yoyHalfYearStartDate} then healthedu_total_num else null end) halfYear_healthedu_total_tb_num,
/**
当前年
*/
sum(case when dialysis_date like #{year} + '%' then total_num else null end) year_total_num,
sum(case when dialysis_date like #{year} + '%' then blood_total_num else null end) year_blood_total_num,
sum(case when dialysis_date like #{year} + '%' then informedcon_total_num else null end) year_informedcon_total_num,
sum(case when dialysis_date like #{year} + '%' then healthedu_total_num else null end) year_healthedu_total_num,
/**
当前年的环比
*/
sum(case when dialysis_date &lt;= #{previousYearEndDate} and dialysis_date >= #{previousYearStartDate} then total_num else null end) year_total_hb_num,
sum(case when dialysis_date &lt;= #{previousYearEndDate} and dialysis_date >= #{previousYearStartDate} then blood_total_num else null end) year_blood_total_hb_num,
sum(case when dialysis_date &lt;= #{previousYearEndDate} and dialysis_date >= #{previousYearStartDate} then informedcon_total_num else null end) year_informedcon_total_hb_num,
sum(case when dialysis_date &lt;= #{previousYearEndDate} and dialysis_date >= #{previousYearStartDate} then healthedu_total_num else null end) year_healthedu_total_hb_num,
/**
当前年的同比
*/
sum(case when dialysis_date like #{lastYear} + '%' then total_num else null end) year_total_tb_num,
sum(case when dialysis_date like #{lastYear} + '%' then blood_total_num else null end) year_blood_total_tb_num,
sum(case when dialysis_date like #{lastYear} + '%' then informedcon_total_num else null end) year_informedcon_total_tb_num,
sum(case when dialysis_date like #{lastYear} + '%' then healthedu_total_num else null end) year_healthedu_total_tb_num
from emr_blood_document_summary_view
</select>
<resultMap id="BaseResultMap" type="com.emr.entity.emrLog.Emr_Log" >
<id column="log_id" property="logId" jdbcType="INTEGER" />
<result column="log_title" property="logTitle" jdbcType="NVARCHAR" />
<result column="log_content" property="logContent" jdbcType="NVARCHAR" />
<result column="ip" property="ip" jdbcType="NCHAR" />
<result column="create_date" property="createDate" jdbcType="NCHAR" />
<result column="creater" property="creater" jdbcType="NVARCHAR" />
<result column="remark" property="remark" jdbcType="NVARCHAR" />
<result column="sys_flag" property="sysFlag" jdbcType="VARCHAR" />
<result column="sys_id" property="sysId" jdbcType="INTEGER" />
</resultMap>
<select id="selectAll" resultMap="BaseResultMap">
SELECT
*
FROM
emr_log
<where>
<if test="record.logTitle != '' and record.logTitle != null">
log_title LIKE '%${record.logTitle}%'
</if>
<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'
</where>
ORDER BY create_date DESC,log_id DESC
</select>
</mapper>

@ -85,7 +85,6 @@
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9vw;
}
.contentTypeValue span{
@ -104,7 +103,7 @@
</div>
<div class="searchDiv">
<div class="searchCondition">
<span style="font-weight: bold">年月</span>
<span style="font-weight: bold">透析日期</span>
<input type="text" id="yearMonth" name="yearMonth" class="form-control" style="width: 150px;"/>
</div>
<div class="btns" style="display: flex;align-items: center;">
@ -123,6 +122,7 @@
<div class="contentTypeName">
<span>当前月份:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue">
<div>知情同意合格率
<span id="quarter_infoConQualRate">0%</span>
@ -164,6 +164,7 @@
<div class="contentTypeName">
<span>当前季度:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue">
<div>知情同意合格率
<span id="month_infoConQualRate">0%</span>
@ -178,25 +179,25 @@
</div>
<div class="contentTypeValue">
<div>血净记录缺失率
<span id="month_bloodPurRate">0%</span>
<span id="month_bloodPurQualRate">0%</span>
(环比
<span id="month_bloodPurHbArrow">上升</span>
<span id="month_bloodPurHbRate">0%</span>
<span id="month_bloodPurQualHbArrow">上升</span>
<span id="month_bloodPurQualHbRate">0%</span>
,同比
<span id="month_bloodPurTbArrow">上升</span>
<span id="month_bloodPurTbRate">0%</span>
<span id="month_bloodPurQualTbArrow">上升</span>
<span id="month_bloodPurQualTbRate">0%</span>
)
</div>
</div>
<div class="contentTypeValue">
<div>健康教育缺失率
<span id="month_educaDefectRate">0%</span>
<span id="month_educaDefectQualRate">0%</span>
(环比
<span id="month_educaDefectHbArrow">上升</span>
<span id="month_educaDefectHbRate">0%</span>
<span id="month_educaDefectQualHbArrow">上升</span>
<span id="month_educaDefectQualHbRate">0%</span>
,同比
<span id="month_educaDefectTbArrow">上升</span>
<span id="month_educaDefectTbRate">0%</span>
<span id="month_educaDefectQualTbArrow">上升</span>
<span id="month_educaDefectQualTbRate">0%</span>
)
</div>
</div>
@ -205,6 +206,7 @@
<div class="contentTypeName">
<span>当前半年:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue">
<div>知情同意合格率
<span id="halfyear_infoConQualRate">0%</span>
@ -246,6 +248,7 @@
<div class="contentTypeName">
<span>当前一年:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue">
<div>知情同意合格率
<span id="year_infoConQualRate">0%</span>
@ -294,6 +297,7 @@
<div class="contentTypeName">
<span>当前月份:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue" style="width: 23%">
<div>血净人次
<span id="scan_month_bloodPurPeoNum">0</span>次
@ -347,6 +351,7 @@
<div class="contentTypeName">
<span>当前季度:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue" style="width: 23%">
<div>血净人次
<span id="scan_quarter_bloodPurPeoNum">0</span>次
@ -400,6 +405,7 @@
<div class="contentTypeName">
<span>当前半年:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue" style="width: 23%">
<div>血净人次
<span id="scan_halfyear_bloodPurPeoNum">0</span>次
@ -453,6 +459,7 @@
<div class="contentTypeName">
<span>当前一年:</span>
</div>
<div style="width: 2%"></div>
<div class="contentTypeValue" style="width: 23%">
<div>血净人次
<span id="scan_year_bloodPurPeoNum">0</span>次
@ -509,6 +516,7 @@
<script>
</script>
<script type="text/javascript" src="${path}/static/js/recordManage/bloodPurification/documentList.js?t=4"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>
</body>

@ -93,6 +93,39 @@
.tableDiv{
width: 100%;
}
.modal-dialog {
width: 600px;
margin: 30px auto auto;
}
.form-group{
width: 100%;
height: 50%;
display: flex;
flex-direction: column
}
.form-group-content{
width: 100%;
height: 20%;
display: flex
}
.form-group-content-input{
width: 33%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.form-group-content-input label{
width: 9vw;
text-align: right;
}
.form-group-content-title{
width: 20%;
height: 20%;
display: flex;
justify-content: left;
}
.
</style>
</head>
<body>
@ -110,21 +143,24 @@
<div class="searcInputDiv">
<div class="inputDiv">
<span>检查日期:</span>
<input type="text" class="form-control input-sm" id="inspectionDate">
<input type="text" class="form-control input-sm" id="s_inspectionDate">
</div>
<div class="inputDiv">
<span>患者姓名:</span>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="s_name">
</div>
<div class="inputDiv">
<span>透析日期:</span>
<input type="text" class="form-control input-sm" id="dialysisDate">
<input type="text" class="form-control input-sm" id="s_dialysisDate">
</div>
<div class="searchButton">
<button type="button" class="btn btn-sm btn-primary" style="width: 5vw" onclick="refreshTable()">查询</button>
</div>
</div>
<div class="importExcelDiv">
<div class="importExcelButton">
<button type="button" class="btn btn-sm btn-primary btns" onclick="applyFlow()">申请</button>
</div>
<div class="importExcelButton">
<button type="button" class="btn btn-sm btn-primary btns" onclick="window.open('${path }/static/js/template/血透文书检查登记表.xls');">下载模板</button>
</div>
@ -134,6 +170,7 @@
</div>
</div>
<div class="tableDiv">
<input type="hidden" id="checks">
<table id="mytab" class="table text-nowrap table-bordered"></table>
</div>
</div>
@ -155,7 +192,7 @@
<input id="upfile" type="file" name="upfile" calss="layui-btn">
</div>
<div class="modelBtns">
<input class="btn btn-primary btn-sm" type="button" value="确定"
<input id="excelSubmitBtn" class="btn btn-primary btn-sm" type="button" value="确定"
onclick="importExcel('/bloodPurification/impExcelTask','血透文书检查登记表')">
</div>
<%--<div class="formDiv">
@ -170,6 +207,203 @@
</div>
</div>
</div>
<!-- 模态框2Modal修改 -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="margin: 2% 0% 0% 20%;">
<div class="modal-content" style="width: 60vw">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel2">修改</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" id="form">
<div class="form-group">
<div class="form-group-content">
<input type="hidden" id="id" name="id"/>
<div class="form-group-content-input">
<label>检查日期:</label>
<input type="text" class="form-control input-sm input" id="inspectionDate" name="inspectionDate"/>
</div>
<div class="form-group-content-input">
<label>患者姓名:</label>
<input type="text" class="form-control input-sm input" id="name" name="name"/>
</div>
<div class="form-group-content-input">
<label>透析日期:</label>
<input type="text" class="form-control input-sm input" id="dialysisDate" name="dialysisDate"/>
</div>
</div>
<div class="form-group-content">
<div class="form-group-content-input">
<label>其他:</label>
<input type="text" class="form-control input-sm input" id="other" name="other"/>
</div>
<div class="form-group-content-input">
<label>责任护士:</label>
<input type="text" class="form-control input-sm input" id="responsibleNurse" name="responsibleNurse"/>
</div>
<div class="form-group-content-input">
<label>整改日期:</label>
<input type="text" class="form-control input-sm input" id="rectificationDate" name="rectificationDate"/>
</div>
</div>
<div class="form-group-content">
<div class="form-group-content-input">
<label>整改签名:</label>
<input type="text" class="form-control input-sm input" id="rectificationSgin" name="rectificationSgin"/>
</div>
<div class="form-group-content-input" style="width: 66%;">
<label>备注:</label>
<input type="text" class="form-control input-sm input" style="width: 74%" id="remark" name="remark"/>
</div>
</div>
<div class="form-group-content" style="flex-direction: column">
<div class="form-group-content-title">
<div style="width: 10%"></div>
<p>血液净化记录存在问题</p>
</div>
<div class="form-group-content" style="height: 80%">
<div class="form-group-content-input">
<label>记录填写不完整:</label>
<select class="selectpicker form-control input-sm inputValue" id="bloodFillIncomplete" name="bloodFillIncomplete" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>医嘱执行签名不规范:</label>
<select class="selectpicker form-control input-sm inputValue" id="bloodSignNonstandard" name="bloodSignNonstandard" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>医护未签名:</label>
<select class="selectpicker form-control input-sm inputValue" id="bloodMedicalstaffNosign" name="bloodMedicalstaffNosign" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
</div>
<div class="form-group-content" style="flex-direction: column">
<div class="form-group-content-title">
<div style="width: 10%"></div>
<p>健康教育存在问题</p>
</div>
<div class="form-group-content" style="height: 80%">
<div class="form-group-content-input">
<label>未做宣教:</label>
<select class="selectpicker form-control input-sm inputValue" id="healtheduFillIncomplete" name="healtheduFillIncomplete" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>宣教填写不完整体:</label>
<select class="selectpicker form-control input-sm inputValue" id="healtheduSignNonstandard" name="healtheduSignNonstandard" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>护患未签名:</label>
<select class="selectpicker form-control input-sm inputValue" id="healtheduMedicalstaffNosign" name="healtheduMedicalstaffNosign" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
</div>
<div class="form-group-content" style="flex-direction: column">
<div class="form-group-content-title">
<div style="width: 10%"></div>
<p>血透知情同意书存在问题</p>
</div>
<div class="form-group-content" style="height: 80%">
<div class="form-group-content-input">
<label>医生未签名:</label>
<select class="selectpicker form-control input-sm inputValue" id="informedconDocNosign" name="informedconDocNosign" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>患者家属关系缺项:</label>
<select class="selectpicker form-control input-sm inputValue" id="informedconFamilymembersMiss" name="informedconFamilymembersMiss" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<div class="form-group-content-input">
<label>通路名称不规范:</label>
<select class="selectpicker form-control input-sm inputValue" id="informedconNameNonstandard" name="informedconNameNonstandard" style="max-height:400px!important;overflow:scroll;"
data-live-search="true">
<option>请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<button id="editSubmitBtn" type="button" class="btn btn-sm btn-primary" onclick="updateInspectionInfo()">
提交
</button>
</div>
</div>
</div>
</div>
<!-- 模态框4Modal申请 -->
<div class="modal fade" id="myModal4" 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">×</button>
<h4 class="modal-title" id="myModalLabel4">申请</h4>
</div>
<div class="modal-body">
<div style="width: 100%;height: 20%;">
<input type="hidden" id="bloodId" name="bloodId"/>
<div class="form-group-content-input" style="width: 90%;justify-content: flex-start;">
<label>申请原因:</label>
<input type="text" class="form-control input-sm input" id="applyReason" name="applyReason" style="width: 90%;height: 80%"/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<button id="submitBtn" type="button" class="btn btn-sm btn-primary" onclick="submitApply()">
确认提交
</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/recordManage/bloodPurification/inspectionRecords.js?t=4"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
</body>

@ -328,7 +328,7 @@
<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>
data-live-search="true" data-actions-box="true"></select>
</div>
</div>
</div>
@ -1031,7 +1031,7 @@
<select class="selectpicker form-control input-sm inputValue" id="disDept"
name="disDept"
style="max-height:400px!important;overflow:scroll;"
data-live-search="true"></select>
data-live-search="true" data-actions-box="true"></select>
</div>
<div class="col-sm-1"></div>
</div>

@ -48,12 +48,28 @@
#indexTreeMenu::-webkit-scrollbar{
display: none;
}
.seal-result {
transform: rotate(-14deg);
/* border: solid 2px #ddd; */
border-radius: 100%;
text-align: center;
color: #37485061;
font-size: 1vw;
font-weight: bold;
line-height: 60px;
left: 6%;
top: 64%;
position: absolute;
/* background-color: rgba(255, 255, 255, 0.8); */
z-index: 1000;
}
</style>
<%
String POWER_URLHEAD = (String) request.getParameter("POWER_URLHEAD");
String POWER_JSP = (String) request.getParameter("POWER_JSP");
String token = (String) request.getSession().getAttribute("token");
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String hospitalName = (String) request.getParameter("hospitalName");
Set<String> menus = user.getMenus();
Integer approvePower = 0;
for(String menu : menus){
@ -101,6 +117,7 @@
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<%-- <div class="seal-result"><%= hospitalName %></div>--%>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li class="user user-menu">

@ -12,10 +12,42 @@ $('#mytab').bootstrapTable({
pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*
columns:[
[
{
title:'操作',
field:'id',
align:'center',
valign: "middle",
rowspan: 2,
formatter: function(value,row,index){
if(row.status == '4'){
var html = '';
html += '<button type="button" onclick="editApply('+row.id+')" class="btn btn-sm btn-primary btns">修改</button>';
html += '<button type="button" onclick="delApply('+row.id+')" class="btn btn-sm btn-danger" style="margin-left: 1vw">删除</button>';
return html;
}else{
return '-';
}
}
},
{
title:'全选',
field:'select',
checkbox:true,
align:'center',
valign:'middle',
rowspan: 2,
formatter: function(value, row, index) {
if(row.status == 0 || isEmpty(row.status)){
return { disabled : false,}
}else{
return { disabled : true,}
}
}
},
{
field: 'xh',
title: '序号',
sortable: true,
align:'center',
valign: "middle",
rowspan: 2
@ -214,20 +246,20 @@ $('#mytab').bootstrapTable({
limit : params.limit, // 每页显示数量
offset : params.offset, // SQL语句起始索引
page : (params.offset / params.limit) + 1, //当前页码,
inspectionDate:$("#inspectionDate").val(),
name:$("#name").val(),
dialysisDate:$("#dialysisDate").val(),
inspectionDate:$("#s_inspectionDate").val(),
name:$("#s_name").val(),
dialysisDate:$("#s_dialysisDate").val(),
}
},
//选中单个复选框
onCheck:function(row){
var checks = $("#checks").val();
$("#checks").val(checks+=row.logId + ",");
$("#checks").val(checks+=row.id + ",");
},
//取消单个复选框
onUncheck:function(row){
var checks = $("#checks").val();
checks = checks.replace(row.logId + ",");
checks = checks.replace(row.id + ",");
$("#checks").val(checks);
},
//全选
@ -236,7 +268,7 @@ $('#mytab').bootstrapTable({
var checks = '';
for(var i=0;i<rows.length;i++)
{
checks += rows[i].logId + ","
checks += rows[i].id + ","
}
$("#checks").val(checks);
},
@ -245,15 +277,21 @@ $('#mytab').bootstrapTable({
$("#checks").val("");
},
responseHandler:function(res){
console.log("resresresresresresresresresresresresresresresresresres", res);
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total:res.total,rows:res.list});
return nres[0];
},
onLoadSuccess:function(){
onLoadSuccess:function(data){
$(".page-list").show();
$(".fixed-table-body").css("overflow","auto");
$('#mytab').bootstrapTable('hideColumn', 'id');
for(var i = 0; i < data.rows.length; i++){
if(data.rows[i].status == '4'){
$('#mytab').bootstrapTable('showColumn', 'id');
}
}
},
//监听分页点击事件
onPageChange: function(num, type) {
@ -270,10 +308,184 @@ function refreshTable(){
}
//导入按钮
function exportExcel(){
$("#myModalLabel3").text('导入');
$('#myModal3').modal('show')
}
function editApply(id){
if(id == ''){
toastr.warning("请选择一条记录")
return;
}
$('#myModal2').modal('show')
$.ajax({
type: 'post',
url: path + "/bloodPurification/queryInspectionInfoById",
data: {
id: id,
},
datType: 'json',
success: function (data) {
if (data.code == 0) {
$("#id").val(data.data[0].id);
$("#xh").val(data.data[0].xh);
$("#inspectionDate").val(data.data[0].inspectionDate);
$("#name").val(data.data[0].name);
$("#dialysisDate").val(data.data[0].dialysisDate);
$("#other").val(data.data[0].other);
$("#responsibleNurse").val(data.data[0].responsibleNurse);
$("#rectificationDate").val(data.data[0].rectificationDate);
$("#rectificationSgin").val(data.data[0].rectificationSgin);
$("#remark").val(data.data[0].remark);
$("#bloodFillIncomplete").val(data.data[0].bloodFillIncomplete);
$("#bloodSignNonstandard").val(data.data[0].bloodSignNonstandard);
$("#bloodMedicalstaffNosign").val(data.data[0].bloodMedicalstaffNosign);
$("#healtheduFillIncomplete").val(data.data[0].healtheduFillIncomplete);
$("#healtheduSignNonstandard").val(data.data[0].healtheduSignNonstandard);
$("#healtheduMedicalstaffNosign").val(data.data[0].healtheduMedicalstaffNosign);
$("#informedconDocNosign").val(data.data[0].informedconDocNosign);
$("#informedconFamilymembersMiss").val(data.data[0].informedconFamilymembersMiss);
$("#informedconNameNonstandard").val(data.data[0].informedconNameNonstandard);
initDate();
} else {
toastr.warning(data.msg);
}
}
})
}
function delApply(id){
Common.confirm({
title: "提示",
message: "您确定要删除该条数据吗?",
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + "/bloodPurification/delApplyInfo",
data: {
id: id,
},
datType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("删除成功")
refreshTable();
} else {
toastr.warning(data.msg);
}
}
})
}
}
})
}
function initDate(){
$('#inspectionDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
clearOnHide: false,
autoclose: true,//选中之后自动隐藏日期选择框
})
$('#dialysisDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
clearOnHide: false,
autoclose: true//选中之后自动隐藏日期选择框
})
$('#rectificationDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
clearOnHide: false,
autoclose: true//选中之后自动隐藏日期选择框
})
}
function updateInspectionInfo(){
var isSubmitting = false;
var submitBtn = $('#editSubmitBtn');
var formData = $("#form").serialize();
if (!isSubmitting) {
isSubmitting = true;
submitBtn.prop('disabled', true);
$.ajax({
type: 'post',
url: path + "/bloodPurification/updateInspectionInfo",
data: formData,
datType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("修改成功")
$('#myModal2').modal('hide')
refreshTable();
} else {
toastr.warning(data.msg);
}
},
complete: function() {
isSubmitting = false;
submitBtn.prop('disabled', false);
}
})
} else {
toastr.warning("请求正在进行中,请勿重复提交!");
}
}
function isEmpty(str) {
return !str || str === '' || str === null || str === undefined;
}
function applyFlow(){
var ids = $("#checks").val();
if(ids == ''){
toastr.warning("请至少选择一条记录")
return;
}
$("#bloodId").val(ids)
$('#myModal4').modal('show')
}
function submitApply(){
var isSubmitting = false;
var submitBtn = $('#submitBtn');
var applyReason = $("#applyReason").val();
if (applyReason == '') {
toastr.warning("请填写申请原因");
return;
}
var bloodId = $("#bloodId").val();
if (!isSubmitting) {
isSubmitting = true;
submitBtn.prop('disabled', true);
$.ajax({
type: 'post',
url: path + "/bloodPurification/insertFlowInfo",
data: { ids: bloodId, applyReason: applyReason },
dataType: 'json',
success: function (data) {
if (data.code == 0) {
toastr.success("申请成功");
$('#myModal4').modal('hide');
refreshTable();
} else {
toastr.warning(data.msg);
}
},
complete: function() {
isSubmitting = false;
submitBtn.prop('disabled', false);
}
});
} else {
toastr.warning("请求正在进行中,请勿重复提交!");
}
}
function importExcel(url,exportFileName){
var isSubmitting = false;
var submitBtn = $('#excelSubmitBtn');
var fileDir = $("#upfile").val();
var suffix = fileDir.substr(fileDir.lastIndexOf("."));
if ("" == fileDir) {
@ -288,55 +500,66 @@ function importExcel(url,exportFileName){
var url = path + url;
$('#loadingModel').modal('show');
$("#loading").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%");
$('#form1').ajaxSubmit({
type:'POST',
url : url,
dataType : 'text',//服务器返回的数据类型 可选XML ,Json jsonp script html text等
data:{upfile:$("#upfile").val()},
error : function() {
$("#form1").removeAttr('disabled');
toastr.warning("导入excel出错!")
},
success : function(data) {
$('#loadingModel').modal('hide');
if(data == null || data == ''){
toastr.success("全部导入成功!");
setTimeout(function(){
window.location.reload();
},1000)
}else{
if(data.indexOf("@") != -1){
var datas = data.split("@");
var workBookKey = datas[0];
debugger;
data = datas[1];
Common.confirm({
title: "提示",
message: data,
operate: function (reselt) {
if (reselt) {
var url = path + "/exportWrongExcel?fileName="+exportFileName+"&workBookKey=" + workBookKey;
window.location.href = url;
}
}
})
if (!isSubmitting) {
isSubmitting = true;
submitBtn.prop('disabled', true);
$('#form1').ajaxSubmit({
type:'POST',
url : url,
dataType : 'text',//服务器返回的数据类型 可选XML ,Json jsonp script html text等
data:{upfile:$("#upfile").val()},
error : function() {
$("#form1").removeAttr('disabled');
toastr.warning("导入excel出错!")
},
success : function(data) {
$('#loadingModel').modal('hide');
if(data == null || data == ''){
toastr.success("全部导入成功!");
setTimeout(function(){
window.location.reload();
},1000)
}else{
toastr.error(data);
if(data.indexOf("@") != -1){
var datas = data.split("@");
var workBookKey = datas[0];
debugger;
data = datas[1];
Common.confirm({
title: "提示",
message: data,
operate: function (reselt) {
if (reselt) {
var url = path + "/exportWrongExcel?fileName="+exportFileName+"&workBookKey=" + workBookKey;
window.location.href = url;
}
}
})
}else{
toastr.error(data);
}
}
$("#upfile").val("");
$("#form1").removeAttr('disabled');
},
complete: function() {
isSubmitting = false;
submitBtn.prop('disabled', false);
}
$("#upfile").val("");
$("#form1").removeAttr('disabled');
}
});
});
} else {
toastr.warning("请求正在进行中,请勿重复提交!");
}
}
$(function () {
$('#inspectionDate').datepicker({
$('#s_inspectionDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框
})
$('#dialysisDate').datepicker({
$('#s_dialysisDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框

@ -31,6 +31,12 @@ $('#mytab').bootstrapTable({
align:'center',
valign: "middle",
},
{
title:'责任护士',
field:'responsibleNurse',
align:'center',
valign: "middle",
},
{
title: '血净记录完整率(%',
field: 'bloodFillIncompleteRate',

@ -197,11 +197,12 @@ function selectPrintPic(patientId, rootPaths, scanPages, sources) {
if (null != resultList) {
var img = '';
for (var i = 0; i < resultList.length; i++) {
img += "<img src='" + resultList[i] + "' width='850' height='1190'>";
img += "<img src='" + resultList[i] + "' class='a4-image'>";
}
var interval = setInterval(function () {
if ($("#iframeLoad").val() == 1) {
iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
initImage();
$("#printPicLoaded").val(1);
iframe.contentDocument.getElementById("printLoading").style.display = 'none';
iframe.contentDocument.getElementById("print").style.display = 'block';
@ -237,6 +238,33 @@ function selectPrintPic(patientId, rootPaths, scanPages, sources) {
// }, 100);
}
function initImage(){
// 获取A4纸的尺寸
const A4_WIDTH = 850;
const A4_HEIGHT = 1190;
// 获取图片元素
const images = document.querySelectorAll('.a4-image');
// 遍历所有图片并设置尺寸
images.forEach(img => {
const imgNaturalWidth = img.naturalWidth;
const imgNaturalHeight = img.naturalHeight;
const ratio = imgNaturalWidth / imgNaturalHeight;
// 根据A4纸的尺寸计算新的宽度和高度
let newWidth = A4_WIDTH;
let newHeight = A4_WIDTH / ratio;
if (newHeight > A4_HEIGHT) {
newHeight = A4_HEIGHT;
newWidth = A4_HEIGHT * ratio;
}
img.style.maxWidth = `${newWidth}px`;
img.style.maxHeight = `${newHeight}px`;
});
}
function selectPrintPic2(patientId, scanPages, sources) {
$.ajax({
type: 'post',

@ -493,6 +493,34 @@ function clearForm(){
* @param patientId
*/
function getUpdateCommomInfo(patientId) {
/**
* 初始化时间框
*/
//出院时间
$('#disDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框
})
//手术日期
$('#operationTime').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框
})
//就诊时间
$('#visitTime').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框
})
//血透时间
$('#hemodialysisDate').datepicker({
language: "zh-CN",
format: "yyyy-mm-dd",
autoclose: true//选中之后自动隐藏日期选择框
})
$.ajax({
type:'get',
url:path+'/commom/getCommomInfoById',
@ -521,7 +549,7 @@ function getUpdateCommomInfo(patientId) {
$("#hemodialysisDate").val(data.hemodialysisDate);
$("#radiotherapyNo").val(data.radiotherapyNo);
}
}
},
})
}

@ -96,6 +96,12 @@ http://sourceforge.net/adobe/cmap/wiki/License/
visibility: visible;
opacity: 1;
}
.a4-image {
max-width: 850px;
max-height: 1190px;
object-fit: contain;
}
</style>
</head>
@ -440,7 +446,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/
</div> <!-- outerContainer -->
<div id="printContainer"></div>
<div style="display: none">
<div id="printContainer1">
<div id="printContainer1" class="a4-image">
</div>
</div>

Loading…
Cancel
Save