diff --git a/src/main/java/com/emr/controller/FontShowRecordController.java b/src/main/java/com/emr/controller/FontShowRecordController.java index 1d3c7dd..42be6dd 100644 --- a/src/main/java/com/emr/controller/FontShowRecordController.java +++ b/src/main/java/com/emr/controller/FontShowRecordController.java @@ -1097,4 +1097,53 @@ public class FontShowRecordController { } return "recordManage/commomSearch/showRecord174"; } + + /*@RequestMapping("sendFileManage") + public String sendFileManage(String patientId, Model model, HttpServletRequest request) throws Exception { + //创建连接工厂 + JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); + //创建客户端 + Object[] objects = new Object[0]; + Client client = null; + try { + //http://172.16.60.202:9083/HtMongoDBWebServiceInterface/services/Manage?wsdl + client = dcf.createClient("http://172.16.60.202:9083/HtMongoDBWebServiceInterface/services/Manage?wsdl"); + + // 构造 XML 参数字符串 + String xmlParam = "\n" + + "\n" + + " Js\n" + + " 嘉时采集资料\n" + + " 17.1\n" + + " 费用结算清单\n" + + " 患者EMPI\n" + + " 患者PID\n" + + " 患者ID\n" + + " 患者住院号、门诊号\n" + + " 报告来源\n" + + " 文档流水号(唯一)\n" + + " 报告名称、文档名称(唯一)\n" + + " 报告PDF转base64\n" + + " 报告处理类型(CRUD)\n" + + " 应传报告数\n" + + " 实传报告数\n" + + " 关联申请单号\n" + + " 报告时间(不是上传时间、当前时间)\n" + + "排序码\n" + + "< relOutRecSn>\n" + + ""; + + // 调用 WebService 方法,并传递 XML 参数 + Object[] response = client.invoke("reportFileManage", xmlParam); + // 处理返回结果 + System.out.println("Response: " + response[0]); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != client) { + client.destroy(); + } + } + }*/ } diff --git a/src/main/java/com/emr/controller/templateSearch/TemplateSearchController.java b/src/main/java/com/emr/controller/templateSearch/TemplateSearchController.java index 7f6cf24..08e4358 100644 --- a/src/main/java/com/emr/controller/templateSearch/TemplateSearchController.java +++ b/src/main/java/com/emr/controller/templateSearch/TemplateSearchController.java @@ -1716,7 +1716,7 @@ public class TemplateSearchController { //批量添加打印记录 printOrDownLoadInfoService.SimpleInsert(scanPathVos, typeId, Short.valueOf("1")); //调用湘雅附二病历复印打印状态同步接口 - this.MedicalPrintSyncPrintStatusAction(patientIds , printDate); + //this.MedicalPrintSyncPrintStatusAction(patientIds , printDate); } } catch (Exception e) { ExceptionPrintUtil.printException(e); @@ -1733,7 +1733,7 @@ public class TemplateSearchController { JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); //创建客户端 Object[] objects; - Client client = dcf.createClient("http://172.16.198.250:13023/openapi/health"); + Client client = dcf.createClient("http://172.16.198.250:13023/services/ws"); // http://172.16.198.250:13023/services/ws http://172.16.198.250:13023/openapi/health //合作方密钥 String partnerKey = "53fd4f5ff132528e2e071baeeb3f99a2"; @@ -1767,7 +1767,7 @@ public class TemplateSearchController { // 1、创建document对象 Document document = DocumentHelper.createDocument(); // 2、创建根节点rss - Element requestElement = document.addElement("Request"); + Element requestElement = document.addElement("request"); requestElement.addElement("serviceCode").setText("MedicalPrintSyncPrintStatusAction"); requestElement.addElement("partnerId").setText("XYEYYHIS"); requestElement.addElement("timeStamp").setText(printDate); diff --git a/src/main/java/com/emr/dao/Zd_AssortMapper.java b/src/main/java/com/emr/dao/Zd_AssortMapper.java index c976abe..48ce8cb 100644 --- a/src/main/java/com/emr/dao/Zd_AssortMapper.java +++ b/src/main/java/com/emr/dao/Zd_AssortMapper.java @@ -44,8 +44,8 @@ public interface Zd_AssortMapper { /** * 根据分类名称查询分类对象 - * @param assortName + * @param patientId * @return */ - Zd_Assort getZdAssortByName(@Param("assortName") String assortName); + Zd_Assort getZdAssortByName(@Param("patientId") String patientId); } \ No newline at end of file diff --git a/src/main/java/com/emr/service/CommomService.java b/src/main/java/com/emr/service/CommomService.java index 594f8fa..6fd0585 100644 --- a/src/main/java/com/emr/service/CommomService.java +++ b/src/main/java/com/emr/service/CommomService.java @@ -1245,8 +1245,6 @@ public class CommomService { //定义导出异常病案号,出院日期实体对象 ExportInpVo exportInpVo = null; - Zd_Assort zd_assort = zd_assortMapper.getZdAssortByName("费用"); - if (pdfNameList != null && pdfNameList.size() > 0) { //病案号 String inpatientNo = ""; @@ -1289,6 +1287,8 @@ public class CommomService { //pdf转jpg图片生成到指定路徑 List picNameList = Pdf2ImgUtil.pdfToPic(saveFileName, pdfName, "jpg", commomVo.getFilePath()); + Zd_Assort zd_assort = zd_assortMapper.getZdAssortByName(commomVo.getPatientId()); + if (picNameList != null && picNameList.size() > 0) { List insertList = new ArrayList<>(); T_Scan_Assort t_scan_assort; diff --git a/src/main/java/com/emr/util/img2PdfUtil.java b/src/main/java/com/emr/util/img2PdfUtil.java index ca5fb21..029c6d9 100644 --- a/src/main/java/com/emr/util/img2PdfUtil.java +++ b/src/main/java/com/emr/util/img2PdfUtil.java @@ -478,6 +478,9 @@ public class img2PdfUtil { img.setAlignment(Image.ALIGN_CENTER); img.scalePercent(percent); + // 新增页面 + document.newPage(); // 新增页面 + //添加图像 document.add(img); if (bufferedImage != null){ diff --git a/src/main/resources/config/config.properties b/src/main/resources/config/config.properties index d37133d..bda5c8a 100644 --- a/src/main/resources/config/config.properties +++ b/src/main/resources/config/config.properties @@ -45,7 +45,7 @@ applyApproveFlag =0 #//????? initialization =0 -export_pdf_hospital_info = \u5e7f\u4e1c\u7701\u005f\u6e5b\u6c5f\u5e02\u005f\u9042\u6eaa\u53bf\u4eba\u6c11\u533b\u9662 +export_pdf_hospital_info = \u5e7f\u4e1c\u7701\u005f\u5e7f\u5dde\u5e02\u5929\u6cb3\u533a\u4eba\u6c11\u533b\u9662 #\u5e7f\u4e1c\u7701\u005f\u6e5b\u6c5f\u5e02\u005f\u9042\u6eaa\u53bf\u4eba\u6c11\u533b\u9662 ?? #\u5e7f\u4e1c\u7701\u005f\u5e7f\u5dde\u5e02\u5929\u6cb3\u533a\u4eba\u6c11\u533b\u9662 ?? diff --git a/src/main/resources/mapper/Zd_AssortMapper.xml b/src/main/resources/mapper/Zd_AssortMapper.xml index 4b29432..5dc435c 100644 --- a/src/main/resources/mapper/Zd_AssortMapper.xml +++ b/src/main/resources/mapper/Zd_AssortMapper.xml @@ -157,6 +157,9 @@ select * from emr_type \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp new file mode 100644 index 0000000..6326b43 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/scanReviewList.jsp @@ -0,0 +1,176 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> + + + + + 其他管理 + + + + + + + + +
+
+
+ + 扫描审核统计 + +
+
+
+ <%--
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
--%> + +
+ + +
+
+
+
+ + + + + diff --git a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js index 052983f..6feb45f 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js @@ -361,36 +361,6 @@ function getSql() { if(!isEmpty(dataSource)){ if(dataSource == 6){ name = 'data_source'; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - whereNames += "len(commomtable.inpatient_no) > 10 AND "; }else{ name = 'data_source'; diff --git a/src/main/webapp/static/js/recordManage/commomSearch/scanReview.js b/src/main/webapp/static/js/recordManage/commomSearch/scanReview.js new file mode 100644 index 0000000..4cdb1cc --- /dev/null +++ b/src/main/webapp/static/js/recordManage/commomSearch/scanReview.js @@ -0,0 +1,48 @@ +var pageNumber; +$('#mytab').bootstrapTable({ + toolbar: '#toolbar', //工具按钮用哪个容器 + striped: true, //是否显示行间隔色 + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) + pagination: true, //是否显示分页(*) + sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) + paginationPreText : '上一页', + paginationNextText : '下一页', + pageNumber: 1, //初始化加载第一页,默认第一页 + pageSize: 10, //每页的记录行数(*) + pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*) + height: $(window).height()-109, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 + columns:[ + { + title:'审核日期', + field:'reviewDate', + align:'center', + }, + { + title:'审核人', + field:'reviewNo', + align:'center', + }, + { + title:'审核盘号', + field:'reviewPh', + align:'center', + }, + { + title:'审核病历数', + field:'reviewBLnum', + align:'center', + }, + { + title:'审核结果', + field:'reviewResult', + align:'center', + }, + ], + locale:'zh-CN',//中文支持, + data: [ // 写死的数据 + { reviewDate: '2024-03-01', reviewNo: '苏华丽', reviewPh: 990, reviewBLnum: 43032, reviewResult: '已通过' }, + { reviewDate: '2024-06-01', reviewNo: '苏华丽', reviewPh: 935, reviewBLnum: 42241, reviewResult: '已通过' }, + { reviewDate: '2024-09-01', reviewNo: '苏华丽', reviewPh: 910, reviewBLnum: 46534, reviewResult: '已通过' }, + { reviewDate: '2024-12-01', reviewNo: '苏华丽', reviewPh: 976, reviewBLnum: 45849, reviewResult: '已通过' }, + ], +}) diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showMegerPDFView.js b/src/main/webapp/static/js/recordManage/commomSearch/showMegerPDFView.js new file mode 100644 index 0000000..02559c0 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/commomSearch/showMegerPDFView.js @@ -0,0 +1,194 @@ +let pageNum = 1;//自动跳转页码,默认为0 +let currentPage = 0;//当前页码 +//初始化函数 +$(function(){ + //加载iframe + $("#megerIframe").prop("src",path+"/commom/showMegerRecordIframeBlood?patientId="+$("#patientId").val()+"&flag=file_path"); + initAssort(); +}) +function initAssort(){ + $.ajax({ + type: 'post', + url: path+'/commom/selectIsPowerByUser', + dataType:'json', + success:function (data) { + let html = ""; + let xh = 1; + if(data.length > 0){ + for(let i = 0; i < data.length; i++){ + if( i != data.length - 1){ + html += + '
\n' + + '
\n' + + ' \n' + + '
\n' + + '
\n' + + '
\n' + + ' \n' + + '
\n' + + '
'; + }else{ + html += + '
\n' + + '
\n' + + ' \n' + + '
\n' + + '
'; + } + } + + $("#assortHtml").html(html); + } + } + }) +} + +let assortId = ""; +let assortName = ""; +let rightContentHtml = ""; +let base64DataArray = []; +let assortIdArray = []; +let assortTexteArray = []; +let pageDataArray = []; +function indexCatalogue(event){ + const button = event.target; // 获取触发事件的按钮元素 + assortId = button.id; + assortName = button.textContent; // 获取按钮的文本内容 + turningPage(assortName,false); +} + +function turningPage(assortName, backPageFlag){ + // 获取父页面中的iframe + const parentIframe = document.getElementById('megerIframe'); + // 访问iframe的内容窗口 + const childWindow = parentIframe.contentWindow; + // 获取子页面中的nestedIframe + const nestedIframe = childWindow.document.getElementById('showMegerPdfIframe'); + //获取子页面的上传文件属性 + const pdfUpFile = childWindow.document.getElementById('pdf-file-input'); + // 获取当前的src属性值 + let currentSrc = nestedIframe.src; + //获取选中的目录分类的图像base64 + getBlobAsBase64(currentSrc).then(base64Data => { + base64DataArray.push(base64Data); + }) + // 定义需要更改的参数及其新值 + const paramToChange = 'page'; + let newValue = ++pageNum; + // 使用正则表达式替换参数值 + const newSrc = currentSrc.replace(new RegExp(`${paramToChange}=([^&]*)`), `${paramToChange}=${newValue}`); + // 生成当前的时间戳 + const timestamp = new Date().getTime(); + // 检查是否已存在时间戳参数 + const hasTimestamp = newSrc.includes('timestamp='); + // 更新或添加时间戳参数 + let finalSrc; + if (hasTimestamp) { + // 替换现有的时间戳参数 + finalSrc = newSrc.replace(/timestamp=([0-9]+)/, `timestamp=${timestamp}`); + } else { + // 添加新的时间戳参数 + finalSrc = `${newSrc}×tamp=${timestamp}`; + } + // 设置新的src属性值 + nestedIframe.src = finalSrc; + // 重新加载nestedIframe + nestedIframe.contentWindow.location.reload(true); + + if(!backPageFlag){ + if (pdfUpFile.files.length > 0) { + currentPage++; + //拼接右侧内容 + rightContentHtml = + '
\n' + + '

'+ currentPage +'_' + assortName + '

\n' + + '
'; + // 检查ID是否存在 + if ($("#page_" + currentPage).length) { + // 替换旧的HTML内容 + let newHtml = '

'+ currentPage +'_' + assortName + '

\n'; + $("#page_" + currentPage).html(newHtml); + } else { + // 新增HTML内容 + $("#rightContentHtml").append(rightContentHtml); + } + //放入数据 + assortIdArray.push(assortId); + assortTexteArray.push(currentPage +'_' + assortName) + pageDataArray.push(currentPage); + } else { + toastr.warning("请先上传pdf文件") + } + } +} +async function getBlobAsBase64(blobUrl) { + const response = await fetch(blobUrl); + const blob = await response.blob(); + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => resolve(reader.result); + reader.onerror = reject; + reader.readAsDataURL(blob); + }); +} +function backPage(){ + Common.confirm({ + title: "提示", + message: "是否要回上一页?", + operate: function (result) { + if (result) { + pageNum = pageNum - 2; + currentPage--; + turningPage(assortName,true); + } + } + }) +} +function submitIndex(){ + if(base64DataArray.length == 0){ + return toastr.warning("索引分类为空,请先对图像进行索引分类") + } + var patientId = $("#patientId").val(); + Common.confirm({ + title: "提示", + message: "确认提交以上索引分类吗?", + operate: function (result) { + if (result) { + $.ajax({ + type: 'post', + contentType: 'application/json; charset=utf-8', // 设置内容类型为 application/json + url: path+'/commom/savePdfPage', + data: JSON.stringify({ + base64Data: base64DataArray, + assortIdData: assortIdArray, + pageData: pageDataArray, + patientId: patientId + }), + success:function(data){ + if(data.code == 0){ + toastr.warning("合并成功!") + //记录已提交的索引分类 + //saveSubmitAssort(patientId); + } + } + }) + } + } + }) +} +function saveSubmitAssort(patientId){ + $.ajax({ + type: 'post', + contentType: 'application/json; charset=utf-8', // 设置内容类型为 application/json + url: path+'/commom/saveSubmitAssortLog', + data: JSON.stringify({ + patientId: patientId, + assortIdData: assortIdArray, + assortTexteData: assortTexteArray, + pageData: pageDataArray, + }), + success:function(data){ + + } + }) +} \ No newline at end of file diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js b/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js new file mode 100644 index 0000000..62ace67 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/commomSearch/showMegerRecordIframeBlood.js @@ -0,0 +1,90 @@ +let pdfUrl = ''; +let pageNum = 1; +$().ready(function (data) { + document.getElementById('pdf-file-input').addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const fileReader = new FileReader(); + fileReader.onload = function() { + pdfUrl = URL.createObjectURL(new Blob([this.result], { type: 'application/pdf' })); + document.getElementById('showMegerPdfIframe').src = `${pdfUrl}#page=${pageNum}×tamp=${Date.now()}`; + //updatePage(); + }; + fileReader.readAsArrayBuffer(file); + } + }); + + // document.getElementById('download-page').addEventListener('click', function() { + // const iframe = document.getElementById('iframe1'); + // const pdfUrl = iframe.src; + // const pageNum = getSelectedPageNumber(); // 假设有一个函数getSelectedPageNumber()来获取当前页码 + // + // if (pdfUrl) { + // getBlobAsBase64(pdfUrl).then(base64Data => { + // fetch(path + '/commom/savePdfPage', { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json' + // }, + // body: JSON.stringify({ base64Data, pageNum }) + // }) + // .then(response => response.json()) + // .then(data => { + // if(data.status == 'success'){ + // toastr.success(data.message); + // } + // }) + // .catch(error => { + // toastr.error(error); + // }); + // }) + // } + // }); + + // document.getElementById('next-page-btn').addEventListener('click', function() { + // pageNum++; + // updatePage(); + // }); + // + // document.getElementById('prev-page-btn').addEventListener('click', function() { + // if (pageNum > 1) { + // pageNum--; + // updatePage(); + // } + // }); +}); + +function updatePage() { + if (pdfUrl) { + document.getElementById('current-page').textContent = pageNum; + const iframe = document.getElementById('showMegerPdfIframe'); + // 重新创建 iframe 元素以强制重新加载 + const newIframe = document.createElement('iframe'); + newIframe.id = 'showMegerPdfIframe'; + newIframe.width = '100%'; + newIframe.height = '100%'; + newIframe.src = `${pdfUrl}#page=${pageNum}×tamp=${Date.now()}`; + // 替换旧的 iframe 元素 + iframe.parentNode.replaceChild(newIframe, iframe) + } +} + +var iframe = document.getElementById("showMegerPdfIframe"); +if (iframe.attachEvent) { + iframe.attachEvent("onreadystatechange", function () { + //此事件在内容没有被载入时候也会被触发,所以我们要判断状态 + //有时候会比较怪异 readyState状态会跳过 complete 所以我们loaded状态也要判断 + if (iframe.readyState === "complete" || iframe.readyState == "loaded") { + //代码能执行到这里说明已经载入成功完毕了 + //要清除掉事件 + iframe.detachEvent("onreadystatechange", arguments.callee); + //这里是回调函数 + } + }); +} else { + iframe.addEventListener("load", function () { + $("#iframeLoad").val(1); + //代码能执行到这里说明已经载入成功完毕了 + this.removeEventListener("load", arguments.call, false); + }, false); +} \ No newline at end of file diff --git a/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js b/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js index 9e34739..04e32b7 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/showRecordIframeBlood.js @@ -147,55 +147,6 @@ function onloadPdfMethod() { //加载pdf按钮功能 function onloadPdf(scanPages, sources) { - /*var batchSize = 10; // 每批处理10个PDF文件 - var scanPagesArray = scanPages.split(','); - var sourcesArray = sources.split(','); - var totalFiles = scanPagesArray.length; - var batches = Math.ceil(totalFiles / batchSize); - function processBatch(batchIndex){ - var start = batchIndex * batchSize; - var end = Math.min(start + batchSize, totalFiles); - var batchScanPages = scanPagesArray.slice(start, end) + ""; - var batchSources = sourcesArray.slice(start, end) + ""; - - $("#iframeLoad").val(""); - $("#printPicLoaded").val(""); - var patientId = $("#patientId").val(); - //根目录字段识别名称 - var flag = parent.$("#flag").val(); - $.ajax({ - type: 'post', - url: path + "/commom/showRecordContentBlood", - data: { - patientId: patientId, - scanPages: batchScanPages, - flag: flag, - sources: batchSources, - batchIndex: batchIndex - }, - datType: 'json', - success: function (data) { - if (data.code == 0) { - var str = path + "/commom/getRecordContentBlood?patientId=" + patientId + "&batchIndex=" + batchIndex; - if (sources.includes("99") ||sources.includes("服务") ||sources.includes("null")||sources.includes("pacs")||sources.includes("扫描上传")) { - $("#iframe1").attr("src", path + "/static/pdfjs/web/viewer.html?file=" + encodeURIComponent(str)) - } else { - $("#iframe1").attr("src", path + "/static/pdfjs/web/viewer2.html?file=" + encodeURIComponent(str)) - var rootPaths = parent.$("#rootPaths").val(); - var print = $("#print").val(); - if (print == 1) { - selectPrintPic(patientId, rootPaths, scanPages, sources); - } - } - } - } - }) - } - // 处理每个批次 - for (var i = 0; i < batches; i++) { - processBatch(i); - }*/ - $("#iframeLoad").val(""); $("#printPicLoaded").val(""); var patientId = $("#patientId").val(); diff --git a/src/main/webapp/static/pdfjs/web/viewer2.html b/src/main/webapp/static/pdfjs/web/viewer2.html index 316a0b6..6644876 100644 --- a/src/main/webapp/static/pdfjs/web/viewer2.html +++ b/src/main/webapp/static/pdfjs/web/viewer2.html @@ -97,6 +97,16 @@ http://sourceforge.net/adobe/cmap/wiki/License/ opacity: 1; } + .a4-image { + display: block; + width: 90vw; + height: auto; + max-height: 90vh; + object-fit: contain; + margin: 10px auto; + page-break-after: auto; + } + /* 设置打印时的样式 */ @media print { body { @@ -113,10 +123,9 @@ http://sourceforge.net/adobe/cmap/wiki/License/ } .a4-image { - max-width: 100%; /* 图像最大宽度为容器宽度 */ - max-height: 100%; /* 图像最大高度为容器高度 */ - height: auto; /* 保持图像比例 */ - width: auto; /* 保持图像比例 */ + width: 850px !important; + height: 1190px !important; + page-break-after: always; } } @@ -490,7 +499,6 @@ http://sourceforge.net/adobe/cmap/wiki/License/ height: 100%; width: 100%; z-index: 9999999; - display: block; text-align: center; background-color: rgba(0, 0, 0, 0.5);