更新版本20201229

zengwh 5 years ago
parent f4082898a3
commit 6beb6edd20

@ -1,6 +1,7 @@
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.entity.*;
import com.emr.service.Archive_DetailService;
@ -9,15 +10,19 @@ import com.emr.service.ipml.ArchiveFlowInfoService;
import com.emr.service.ipml.ArchiveOtherService;
import com.emr.service.ipml.TPrintinfoService;
import com.emr.service.ipml.ZdAssortService;
import com.emr.util.DateUtil;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.ArchiveOtherExtVo;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@ -31,10 +36,7 @@ import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
/**
* @author zwh
@ -62,6 +64,8 @@ public class FontController {
private ArchiveOtherService archiveOtherService;
@Autowired
private ArchiveFlowInfoService archiveFlowInfoService;
@Autowired
private ArchiveOtherExtMapper archiveOtherExtMapper;
@RequestMapping("selectIsPrintByPatienId")
@ResponseBody
@ -118,6 +122,44 @@ public class FontController {
return "font/showRecord";
}
/**
* pdf
* */
@RequestMapping("showRecordByOpId")
public String showRecordByPatientId(String userName, String opID,Model model){
//判断各参数
if(StringUtils.isBlank(userName)){
return retrunErrorPage(model,"工号不能为空!");
}
if(StringUtils.isBlank(opID)){
return retrunErrorPage(model,"门诊号不能为空!");
}
List<ArchiveOtherExtVo> list = new ArrayList<>();
//判断工号是否存在
try {
String checkUserName = checkUserName(userName);
if(StringUtils.isNotBlank(checkUserName)){
return retrunErrorPage(model,checkUserName);
}
//判断门诊号是否存在
list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,opID,null,null,null);
if(null == list || list.isEmpty()){
return retrunErrorPage(model,"门诊号不存在!");
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
model.addAttribute("jzh",opID);
if(list.size() > 1){
//个数超过一个,科室和主治医生置空
list.get(0).setC7(null);
list.get(0).setC8(null);
}
model.addAttribute("record",list.get(0));
return "font/showRecordByOpId";
}
/**
*
*/
@ -229,6 +271,28 @@ public class FontController {
}
}
/**
*
* @param filePath
* @return
*/
@ResponseBody
@RequestMapping(value = "/getRecordByFilePath")
public String getRecordByFilePath(String filePath,String jzh){
try {
List<ArchiveOtherExtVo> list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,null,null,filePath);
if(!CollectionUtils.isEmpty(list)){
return JSON.toJSONString(list.get(0));
}else{
return null;
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
//e.printStackTrace();
return null;
}
}
/**
* masterid
* @return
@ -288,7 +352,6 @@ public class FontController {
int oneParentId = 0;
//定义第二层的id为第三层父id
int twoParentId = 0;
AssortTypeTree tree = new AssortTypeTree();
//第一层,根目录全部影像资料
tree.setId(id);
@ -368,6 +431,98 @@ public class FontController {
return JSON.toJSONString(treeList);
}
/**
* archive_other_ext
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping(value = "/getRecordTypeTreeByOpId")
public String getRecordTypeTreeByOpId(String jzh,Integer isSearch,String startDateTo,String endDateTo){
List<AssortTypeTree> treeList = new ArrayList<>();
if(StringUtils.isNotBlank(jzh)){
List<ArchiveOtherExtVo> list = new ArrayList<>();
//assortIds等于协商的全查的分类id全查
try {
list = archiveOtherExtMapper.selectListBySysFlagAndJzh(-100,jzh,startDateTo,endDateTo,null);
List<String> dateList = new ArrayList<>();
if(!CollectionUtils.isEmpty(list)) {
//开始时间为空时,取集合最后一个时间
if (StringUtils.isBlank(startDateTo)) {
startDateTo = list.get(list.size() - 1).getSysupdatetimeStr();
}
//结束时间为空时,取集合第一个时间
if (StringUtils.isBlank(endDateTo)) {
endDateTo = list.get(0).getSysupdatetimeStr();
}
//组织查询的日期间的集合
dateList = DateUtil.getDays(startDateTo, endDateTo);
Collections.reverse(dateList);
}
//组织树
int id = 1;
//定义第一层的id为第二层父id
int oneParentId = 0;
//定义第二层的id为第三层父id
int twoParentId = 0;
AssortTypeTree tree = new AssortTypeTree();
//第一层,根目录全部影像资料
tree.setId(id);
tree.setParentId(0);
tree.setName("全部影像资料");
tree.setChecked("true");
treeList.add(tree);
oneParentId = id;
id++;
if(!CollectionUtils.isEmpty(dateList) && !CollectionUtils.isEmpty(list)) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd");
for (String date : dateList) {
AssortTypeTree tree1 = new AssortTypeTree();
//第二层,分类名称,日期
tree1.setId(id);
tree1.setParentId(oneParentId);
twoParentId = id;
id++;
//定义该类是否有记录
boolean flag = false;
for (ArchiveOtherExtVo archiveOtherExtVo : list) {
String sysupdatetimeStr = archiveOtherExtVo.getSysupdatetimeStr();
if (StringUtils.isNotBlank(sysupdatetimeStr) && sysupdatetimeStr.equals(date)) {
if (StringUtils.isNotBlank(archiveOtherExtVo.getC1())) {
AssortTypeTree tree2 = new AssortTypeTree();
//第三层,资料名称
tree2.setId(id);
tree2.setParentId(twoParentId);
tree2.setName(archiveOtherExtVo.getC1());
tree2.setSelfId(archiveOtherExtVo.getSycobj());
tree2.setChecked("true");
treeList.add(tree2);
id++;
}
if (!flag) {
flag = true;
}
}
}
//初始化时或有记录时添加日期节点
if (isSearch == 0 || flag) {
//格式化日期
String returnDate = fmt.format(fmt1.parse(date));
tree1.setName(returnDate);
tree1.setChecked("true");
treeList.add(tree1);
}
}
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
return JSON.toJSONString(treeList);
}
/**
* idPDFpdf
* @param response
@ -394,6 +549,39 @@ public class FontController {
//e.printStackTrace();
}
}
/**
* pdf
* @param detailIds
* @return
* @throws Exception
*/
@ResponseBody
@RequestMapping(value = "/getPdfToPdfByOpId",method = RequestMethod.POST)
public Msg getPdfToPdfByOpId(String detailIds,HttpSession session){
try {
if(StringUtils.isNotBlank(detailIds)){
List<String> pathList= new ArrayList<>();
String[] filePathArr = detailIds.split(",");
for(String pdfFilePath : filePathArr){
if(StringUtils.isNotBlank(pdfFilePath)){
pdfFilePath = pdfFilePath.replaceAll("\'", "");
pathList.add(pdfFilePath);
}
}
//存至session
session.setAttribute("showRecord",pathList);
}else{
//存至session
session.setAttribute("showRecord",null);
}
return Msg.success();
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
return Msg.fail("查看出错了,请联系系统管理员");
//e.printStackTrace();
}
}
@ResponseBody
@RequestMapping(value = "showPdf")
public void showPdf(HttpServletResponse response,HttpSession session){
@ -482,4 +670,6 @@ public class FontController {
List<Emr_Dictionary> list = dictionaryMapper.selectAllByParentId("dept_code",null);
return Msg.success().add("list",list);
}
}

@ -53,5 +53,16 @@ public interface ArchiveOtherExtMapper {
*/
String selectMaxETimeByNursingAndJzh(@Param("patientId")String patientId);
List<ArchiveOtherExt> selectListBySysFlagAndIds(@Param("sysFlag")Integer sysFlag,@Param("ids")String ids);
List<ArchiveOtherExt> selectListBySysFlagAndIds(@Param("sysFlag")Integer sysFlag,
@Param("ids")String ids);
/**
*
* @param
* @return
*/
List<ArchiveOtherExtVo> selectListBySysFlagAndJzh(@Param("sysFlag")Integer sysFlag,
@Param("jzh")String jzh,
@Param("startDateTo")String startDateTo,
@Param("endDateTo")String endDateTo,
@Param("filePath")String filePath);
}

@ -0,0 +1,33 @@
package com.emr.singleton;
import com.lowagie.text.pdf.PdfReader;
import static org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.HOLDER;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/12/3 13:40
* @UpdateUser:
* @UpdateDate: 2020/12/3 13:40
* @UpdateRemark:
* @Version: 1.0
*/
public class PdfReaderSingleton extends PdfReader {
private PdfReaderSingleton(){};
public static PdfReaderSingleton getInstance(){
return ContainerHolder.HOLDER.singleton;
}
private enum ContainerHolder{
HOLDER;
private PdfReaderSingleton singleton;
ContainerHolder(){
singleton = new PdfReaderSingleton();
}
}
}

@ -0,0 +1,46 @@
package com.emr.util;
import com.sun.tools.example.debug.expr.ParseException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/12/29 10:48
* @UpdateUser:
* @UpdateDate: 2020/12/29 10:48
* @UpdateRemark:
* @Version: 1.0
*/
public class DateUtil {
public static List<String> getDays(String startTime, String endTime) {
// 返回的日期集合
List<String> days = new ArrayList<String>();
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date start = dateFormat.parse(startTime);
Date end = dateFormat.parse(endTime);
Calendar tempStart = Calendar.getInstance();
tempStart.setTime(start);
Calendar tempEnd = Calendar.getInstance();
tempEnd.setTime(end);
tempEnd.add(Calendar.DATE, +1);// 日期加1(包含结束)
while (tempStart.before(tempEnd)) {
days.add(dateFormat.format(tempStart.getTime()));
tempStart.add(Calendar.DAY_OF_YEAR, 1);
}
} catch (Exception e) {
e.printStackTrace();
}
return days;
}
}

@ -418,6 +418,7 @@
</update>
<!--统一查询语句-->
<sql id="selectWhereSql">
and sysFlag in (1,2,3,4,5,6,7,8,9)
<if test="jzh != null and jzh != ''">
and jzh = #{jzh,jdbcType=NVARCHAR}
</if>
@ -624,4 +625,47 @@
</if>
</where>
</select>
<!--根据记账号sysFlag,日期查询其他文档信息-->
<select id="selectListBySysFlagAndJzh" resultMap="BaseResultMap">
select
id,
convert(varchar(10),sysUpdateTime,120) sysupdatetimeStr,
jzh,
C3,
C4,
C5,
C6,
C7,
C8,
SycObj,
C1
from archive_other_ext
<where>
<if test="sysFlag != null">
and sysFlag = #{sysFlag}
</if>
<if test="jzh != null and jzh != ''">
and jzh = #{jzh}
</if>
<if test="filePath != null and filePath != ''">
and SycObj = #{filePath}
</if>
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
and sysUpdateTime between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
<when test="startDateTo != null and startDateTo != ''">
and sysUpdateTime >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
</when>
<when test="endDateTo != null and endDateTo != ''">
and sysUpdateTime &lt;= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
</when>
</choose>
</where>
<if test="jzh != null and jzh != ''">
ORDER BY sysUpdateTime desc
</if>
</select>
</mapper>

@ -95,6 +95,8 @@
<!--记账号-->
<input type="hidden" id="accountNumber" value="${accountNumber}">
<input type="hidden" id="assortIds" value="${assortIds}">
<!--业务识别码1:护理按需采集预览-->
<input type="hidden" id="typeFlag" value="1">
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">

@ -0,0 +1,214 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/comm.jspf" %>
<%@ include file="/WEB-INF/jspf/ztreeCommom.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>病案浏览</title>
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="shortcut icon" href="${path}/static/favicon.ico">
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
body{
width:100%;
height:100%;
margin:0;
padding:0;
background-color: #F2F2F2;
}
.main{
width:100%;
background-color: #c1d7e3;
}
/*
*页头div
*/
.headDiv{
height:43px;
background-color: #1D9ED7;
}
/*
*页头标题div
*/
.headSpanDiv{
padding:10px 15px;
}
/*
*页头标题
*/
.headspan{
color: #fff;
font-size: 1.2em;
font-weight: bold;
}
.searchDiv{
width:100%;
height:17%;
background-color: #FFF;
}
.contentDiv{
width:100%;
height: calc(100vh - 17% - 43px - 1vh);
margin-top:1vh;
background-color: #FFF;
}
.labelDiv{
padding-top: 2%;
padding-right: 0;
text-align: right;
}
.rowDiv{
padding-top:0.5%;
}
.inputDiv{
padding:0!important;
margin-left: -3%!important;
}
h4{
color: #fff;
font-size: 1.0em;
font-weight: bold;
}
hr{
margin:0!important;
}
#iframe{
height: 100%;
}
</style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<!--pdf地址集合-->
<input type="hidden" id="jzh" value="${jzh}">
<!--pdf地址集合-->
<input type="hidden" id="detailIds">
<!--业务识别码2:his系统需要的其他文档预览sysFlag=-100-->
<input type="hidden" id="typeFlag" value="2">
<!--隐藏是否是初始化-->
<input type="hidden" id="isSearch" value="0">
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
病案浏览
</span>
</div>
</div>
<!--病案详情-->
<div class="searchDiv">
<div class="row rowDiv">
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">就诊日期:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input input-sm input" value="${record.sysupdatetimeStr}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">门诊号:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.jzh}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">身份证:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.c3}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">姓名:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.c4}"/>
</div>
</div>
</div>
</div>
<div class="row rowDiv">
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">性别:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.c5}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">卡号:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" value="${record.c6}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">就诊科室:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" id="c7" value="${record.c7}"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">主治医生:</label>
<div class="col-sm-7">
<input type="text" readonly class="form-control input-sm input" id="c8" value="${record.c8}"/>
</div>
</div>
</div>
</div>
<div class="row rowDiv">
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">就诊开始:</label>
<div class="col-sm-7">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"
maxlength="10" autocomplete="off"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<label class="col-sm-5 control-label labelDiv">就诊结束日期</label>
<div class="col-sm-7">
<input type="text" class="input-sm form-control" name="start" id="endDateTo"
maxlength="10" autocomplete="off"/>
</div>
</div>
</div>
<div class="col-sm-3 inputDiv">
<div class="form-group">
<div class="col-sm-3">
<button id="searchBtn" style="margin-left: 66px;" class="input-sm form-control btn-primary">查询</button>
</div>
</div>
</div>
</div>
</div>
<div class="contentDiv">
<iframe width="100%" src="" id="iframe" frameborder="0" scrolling="no"></iframe>
</div>
</div>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordByOpId.js"></script>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframeCommom.js"></script>
</body>
</html>

@ -68,11 +68,11 @@
<div class="row" style="margin-top: 5px">
<div class="col-md-4">
</div>
<div class="col-md-4" style="padding:0 2px">
<button type="button" class="btn btn-xs btn-primary" onclick="onloadPdf()">加载PDF</button>
<div class="col-md-4" style="padding:0 2px;" >
<button type="button" class="btn btn-xs btn-primary" style="display: none" onclick="flashPdf()" id="freshBtnDiv">刷新</button>
</div>
<div class="col-md-4" style="padding:0 2px">
<button type="button" class="btn btn-xs btn-primary" onclick="flashPdf()">刷新</button>
<button type="button" class="btn btn-xs btn-primary" onclick="onloadPdf()">加载PDF</button>
</div>
</div>
<div class="row">
@ -86,7 +86,7 @@
<div class="content-right">
<iframe width="100%" src="" id="iframe1" frameborder="0" scrolling="yes"></iframe>
</div>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframe.js?time=2020-09-04"></script>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframe.js?time=2020-12-29"></script>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframeCommom.js"></script>
</body>
</html>

@ -355,7 +355,7 @@
</div>
<footer class="main-footer">
<div class="pull-right">
<b>Version</b> 20201201
<b>Version</b> 20201229
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.

@ -0,0 +1,17 @@
//初始化函数
$(function(){
//加载iframe
$("#iframe").prop("src",path+"/font/showRecordIframe");
initDateInput('startDateTo','endDateTo');
//开始时间为上月今天
$("#startDateTo").val(getHisDay(6));
//结束时间为今天
$("#endDateTo").val(getNowDay());
});
//查询按钮
$("#searchBtn").click(function(){
$("#isSearch").val(1);
//加载iframe
$("#iframe").prop("src",path+"/font/showRecordIframe");
})

@ -12,8 +12,8 @@ var menu = {
chkStyle: "checkbox",
enable: true,
idKey: "id",
pIdKey: "parentId",
},
pIdKey: "parentId"
}
},
check:{
enable:true
@ -23,10 +23,21 @@ var menu = {
onClick:onClick}
},
loadMenuTree:function(){
var url = '';
var params = '';
//获取业务识别编码
var typeFlag = parent.$("#typeFlag").val();
if(typeFlag == 1){
url = path+"/font/getRecordTypeTree";
params = {patientId:parent.$("#patientId").val(),assortIds:parent.$("#assortIds").val()};
}else if(typeFlag == 2){
url = path+"/font/getRecordTypeTreeByOpId";
params = {jzh:parent.$("#jzh").val(),startDateTo:parent.$("#startDateTo").val(),endDateTo:parent.$("#endDateTo").val(),isSearch:parent.$("#isSearch").val()};
}
$.ajax({
type: "post",
url:path+"/font/getRecordTypeTree",
data:{patientId:parent.$("#patientId").val(),assortIds:parent.$("#assortIds").val()},
url: url,
data: params,
dataType:"json",
async:false,
success:function(data){
@ -57,6 +68,11 @@ $().ready(function(data){
menu.loadMenuTree();
//加载pdf
onloadPdf();
//判断是否是护理按需采集,是显示刷新按钮
var typeFlag = parent.$("#typeFlag").val();
if(typeFlag == 1){
$("#freshBtnDiv").show();
}
});
//获取获取树选中节点赋值隐藏域并加载pdf
@ -88,14 +104,60 @@ function onClick(e, treeId, treeNode) {
zTree.checkNode(treeNode,!treeNode.checked, true);
onPdfLoadByselected();
};
//加载病案信息
function loadRecord(detailIds){
$.ajax({
type:'get',
url:path+'/font/getRecordByFilePath',
data:{filePath:detailIds,jzh:parent.$("#jzh").val()},
async:false,
dataType:'json',
success:function (data) {
if(null != data && data != ''){
parent.$("#c7").val(data.c7);
parent.$("#c8").val(data.c8);
}
}
})
}
//加载pdfan按钮功能
function onloadPdf(){
var detailIds = $("#detailIds").val();
var url = path + "/font/getPdfToPdf";
var url = '';
var params = '';
//获取业务识别编码
var typeFlag = parent.$("#typeFlag").val();
var detailIds = $("#detailIds").val();
if(typeFlag == 1){
url = path + "/font/getPdfToPdf";
params = {detailIds: detailIds};
}else if(typeFlag == 2) {
url = path + "/font/getPdfToPdfByOpId";
params = {detailIds: detailIds};
if (detailIds != '') {
var detailIdArr = detailIds.split(",");
//只有一个需要查询病案资料,赋值就诊科室和主治医生
var count = 0;
var filePath = '';
for(var i = 0;i<detailIdArr.length;i++){
if(detailIdArr[i] != ''){
count++;
filePath = detailIdArr[i].replaceAll("\'","");
}
}
if (count == 1) {
loadRecord(filePath);
}else{
parent.$("#c7").val('');
parent.$("#c8").val('');
}
}
}
$.ajax({
type: 'post',
url: url,
data: {detailIds: detailIds},
data: params,
success: function (data) {
if (data.code == 100) {
var pdfUrl = path + "/static/pdfjs/web/viewer.html?file=" + path + "/font/showPdf";

Loading…
Cancel
Save