Commit ca382128 by 谢永涛

无锡九院

parents
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.hanyun</groupId>
<artifactId>hip</artifactId>
<version>4.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wxjy-mrqc</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.1.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>2.1.1.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hanyun</groupId>
<artifactId>mrqc-admin</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!--JSON Path-->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.8.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>
package com.hanyun.hip.mrqc.jms;
import com.hanyun.hip.message.annotation.EnableHanyunMessage;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
@Configuration
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ComponentScan(value = { "com.ruoyi.*", "com.hanyun.hip.mrqc.**", "com.hanyun.hip.sso.*", "com.hanyun.hip.kgms.*",
"com.hanyun.kgms.*", "com.hanyun.hip.term.*", "com.hanyun.hip.license.*","com.hanyun.hip.knowledge.*",
"com.hanyun.hip.drools.*","com.hanyun.hip.ai.*","com.hanyun.ai.*" })
@MapperScan(value = { "com.ruoyi.*.mapper", "com.hanyun.**.mapper" })
@EnableAsync
@EnableHanyunMessage
public class Wx9yMrqcApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Wx9yMrqcApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(Wx9yMrqcApplication.class, args);
}
}
package com.hanyun.hip.mrqc.jms.api;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.hanyun.hip.mrqc.service.entity.EmrContent;
import com.hanyun.hip.mrqc.service.mapper.IMrqcEmrContentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List;
import java.util.stream.Collectors;
/**
* ------------------------------------------------------------------------<br>
*
* @描述: ExcelImportUtil
* <br>---------------------------------------------
* @时间: 2024/3/22
* @版本: 1.0
* @创建人: Yurl
*/
@Controller
@RequestMapping("/mrqc/jms/test")
public class ExcelImportTest {
@Autowired
private IMrqcEmrContentMapper mrqcEmrContentMapper;
@GetMapping("/import/userInfo")
public String importUserInfo() throws Exception {
File file = new File("C:\\Users\\16979\\Downloads\\聂佳祥.xls");
// 1.获取上传文件输入流
InputStream inputStream = null;
try {
inputStream = new FileInputStream(file);
} catch (Exception e) {
e.printStackTrace();
}
// 2.应用HUtool ExcelUtil获取ExcelReader指定输入流和sheet
ExcelReader excelReader = ExcelUtil.getReader(inputStream, "Sheet1");
// 可以加上表头验证
// 3.读取第二行到最后一行数据
List<List<Object>> read = excelReader.read(1, excelReader.getRowCount());
if (CollUtil.isNotEmpty(read)){
List<EmrContent> collect = read.stream()
.filter(item-> item.size() > 3)
.map(item -> {
EmrContent var1 = new EmrContent();
var1.setContentId(StrUtil.toString(item.get(0)));
var1.setContentText(null);
var1.setContentXml(StrUtil.toString(item.get(2)));
var1.setStructJson(StrUtil.toString(item.get(3)));
return var1;
}).collect(Collectors.toList());
for (EmrContent emrContent : collect) {
mrqcEmrContentMapper.insertOrUpdateEmrContentDoc(emrContent);
}
}
return read.size() + "条";
}
}
package com.hanyun.hip.mrqc.jms.api;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.setting.Setting;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.hanyun.hip.mrqc.common.EmrETLApi;
import com.hanyun.hip.mrqc.common.PageRequest;
import com.hanyun.hip.mrqc.rule.util.EngrUtil;
import com.hanyun.hip.mrqc.service.entity.EmrContent;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import com.hanyun.hip.mrqc.service.service.IMrqcEtlService;
import com.hanyun.hip.mrqc.service.util.CommonUtil;
import com.hanyun.hip.mrqc.service.util.DateUtils;
import com.hanyun.hip.mrqc.service.util.EncryptUtil;
import com.hanyun.hip.mrqc.service.util.XmlTool;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.net.ssl.SSLContext;
import java.io.File;
import java.nio.charset.Charset;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.*;
import java.util.concurrent.ConcurrentMap;
import java.util.regex.Matcher;
import java.util.stream.Collectors;
@Service("JmsEmrETLApi")
public class JmsEmrETLApi implements EmrETLApi {
private static final Logger LOGGER = LogManager.getLogger(JmsEmrETLApi.class);
private static final JdbcTemplate jyJdbcTemplate = new JdbcTemplate();
private static final JdbcTemplate vteJdbcTemplate = new JdbcTemplate();
private static final String CDATA_START = "<!\\[CDATA\\[";
private static final String CDATA_END = "]]>";
private static final String HOSPITAL_CODE = "41427642-9";
private static final String HOSPITAL_CODE_0 = "41427642-0";
private static final String HOSPITAL_NAME = "佳木斯市中心医院";
private static final String WEBSERVICE_URL = "http://172.17.0.206/csp/hsb/DHC.Published.PUB0010.BS.PUB0010.CLS";
private static final String WEBSERVICE_SOAPACTION = "http://www.dhcc.com.cn/DHC.Published.PUB0010.BS.PUB0010.GetHISInfo";
private static final String WEBSERVICE_XML = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:dhcc=\"http://www.dhcc.com.cn\">\n" +
"<soapenv:Header/>\n" +
"<soapenv:Body>\n" +
" <dhcc:GetHISInfo>\n" +
" <dhcc:action>%s</dhcc:action>\n" +
" <dhcc:Input><![CDATA[%s]]></dhcc:Input>\n" +
" </dhcc:GetHISInfo>\n" +
"</soapenv:Body>\n" +
"</soapenv:Envelope>";
private static final String YZ_HTML = "<!DOCTYPE html>\r\n"
+ "<html lang=\"zh\" xmlns:th=\"http://www.thymeleaf.org\" xmlns:shiro=\"http://www.pollix.at/thymeleaf/shiro\">\r\n"
+ "<head>\r\n" + " <th:block th:include=\"include :: header('医嘱列表')\" />\r\n" + "</head>\r\n"
+ "<body class=\"gray-bg\">" + " \r\n" + "<!-- 你的HTML代码 -->${yzTableHtml}\r\n" + " \r\n"
+ "<th:block th:include=\"include :: footer\" />\r\n" + "</body>\r\n" + "</html>";
private static String XMLNS_FLAG = "xmlns=\"http://www.abisource.com/awml.dtd\"";
private static String html = "<!DOCTYPE html>\r\n"
+ "<html lang=\"zh\" xmlns:th=\"http://www.thymeleaf.org\" xmlns:shiro=\"http://www.pollix.at/thymeleaf/shiro\">\r\n"
+ "<head>\r\n" + " <th:block th:include=\"include :: header('医嘱列表')\" />\r\n" + "</head>\r\n"
+ "<body class=\"gray-bg\">" + " \r\n" + "<!-- 你的HTML代码 -->${yzTableHtml}\r\n" + " \r\n"
+ "<th:block th:include=\"include :: footer\" />\r\n" + "</body>\r\n" + "</html>";
private static String vteHtml = "<!DOCTYPE html>\n" +
"<html lang=\"zh\" xmlns:th=\"http://www.thymeleaf.org\" xmlns:shiro=\"http://www.pollix.at/thymeleaf/shiro\">\n" +
" <head>\n" +
" <th:block th:include=\"include :: header('VTE评估表')\" />\n" +
" <style>\n" +
" table {\n" +
" width: 100%;\n" +
" border-collapse: collapse;\n" +
" }\n" +
" table tr {\n" +
" }\n" +
" table td {\n" +
"\t\t\t\tfont-size: 14px;\n" +
" border-bottom: 1px solid #ccc;\n" +
" padding: 6px 8px;\n" +
" line-height: 2em;\n" +
" width: 16.66%;\n" +
" text-align: center;\n" +
" border: 1px solid #2f4050 !important;\n" +
" }\n" +
" </style>\n" +
" </head>\n" +
" <body class=\"gray-bg\">\n" +
" <!-- 你的HTML代码 -->\n" +
" <div class=\"fixed-table-body\">\n" +
" <table id=\"bootstrap-table\" class=\"table table-hover\">${yzTableHtml}\n" +
" </table>\n" +
" </div>\n" +
" <th:block th:include=\"include :: footer\" />\n" +
" </body>\n" +
"</html>";
private static class StaticParams {
// MES0422 获取病案首页信息 入参格式:<Request><AdmRowId>3</AdmRowId></Request>
private static final String SY_CODE = "MES0001";
private static final String SY_PARAM = "<Request><AdmRowId>%s</AdmRowId></Request>";
// MES0431 区间病历质控-获取出院范围内的就诊号 <Request><StDate>2022-09-01</StDate><EnDate>2022-09-01</EnDate></Request>
private static final String QJBL_CODE = "MES0004";
private static final String IJBL_CODE = "MES0010";
private static final String QJBL_PARAM = "<Request><StDate>%S</StDate><EnDate>%S</EnDate></Request>";
// MES0002 获取病程记录信息
private static final String BC_CODE = "MES0002";
// MES0006 获取入院记录信息 入参格式:就诊号
private static final String RY_CODE = "MES0006";
// MES0008 获取知情同意书信息 入参格式:就诊号
private static final String ZQTYS_CODE = "MES0008";
// MES0003 获取出院记录信息 入参格式:就诊号
private static final String CY_CODE = "MES0003";
// MES0007 获取手术信息 入参格式:就诊号
private static final String SS_CODE = "MES0007";
// MES0007 文档检索-病历质控
private static final String JS_CODE = "MES0428";
// MES0429 文档调阅-病历质控
private static final String DY_CODE = "MES0429";
// MES0430 获取医嘱信息-病历质控 入参格式:就诊号
private static final String YZ_CODE = "MES0005";
// MES0517 获取手术信息-麻醉术前访视记录 入参格式:就诊号
private static final String SQFSJL_CODE = "MES0517";
// MES0518 获取手术信息-麻醉术后访视记录 入参格式:就诊号
private static final String SHFSJL_CODE = "MES0518";
// MES0519 获取手术信息-手术安全核查表 入参格式:就诊号
private static final String AQHCB_CODE = "MES0519";
//MES0428 检验检查报告
private static final String JYJCBG_CODE = "MES0428";
private static final String JYJCBG_PARAM = "<Request><Header><SourceSystem></SourceSystem><MessageID></MessageID></Header><Body><DocumentRetrievalRt><PATPatientID></PATPatientID><PAADMVisitNumber>%s</PAADMVisitNumber><DocumentType>%s</DocumentType><StartDate></StartDate><EndDate></EndDate><DocumentFormat>xml</DocumentFormat></DocumentRetrievalRt></Body></Request>";
//MES0429 检验检查明细
private static final String JYJCMX_CODE = "MES0429";
private static final String JYJCMX_PARAM = "<Request><Header><SourceSystem></SourceSystem><MessageID></MessageID></Header><Body><DocumentSearchRt><PATPatientID></PATPatientID><PAADMVisitNumber>%s</PAADMVisitNumber><DocumentType>%s</DocumentType><DocumentID>%s</DocumentID></DocumentSearchRt></Body></Request>";
//检查报告类型
private static final String INSPECT_TYPES = "02001,02002,02003,02004,02005,02006";
//检验报告类型
private static final String TEST_TYPES = "01001,01002";
private static String HTML = "<!DOCTYPE html>\r\n"
+ "<html lang=\"zh\" xmlns:th=\"http://www.thymeleaf.org\" xmlns:shiro=\"http://www.pollix.at/thymeleaf/shiro\">\r\n"
+ "<head>\r\n" + " <th:block th:include=\"include :: header('医嘱列表')\" />\r\n" + "</head>\r\n"
+ "<body class=\"gray-bg\">" + " \r\n" + "<!-- 你的HTML代码 -->${yzTableHtml}\r\n" + " \r\n"
+ "<th:block th:include=\"include :: footer\" />\r\n" + "</body>\r\n" + "</html>";
private static String YZ_TABLE_HTML = "<div class=\"fixed-table-body\">\r\n"
+ " <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n" + " <thead>\r\n"
+ " <tr>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" colspan=\"5\" tabindex=\"0\"><div\r\n"
+ " class=\"th-inner \">开始</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" colspan=\"3\" tabindex=\"0\"><div\r\n"
+ " class=\"th-inner \">结束</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n" + " </tr>"
+ " <tr>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userName\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>类型</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" style='width:100px' nowrap>日期时间</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>医嘱</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userName\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>医生</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userPhone\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>护士</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userEmail\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" style='width:100px' nowrap>日期时间</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userBalance\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>医生</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userBalance\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>护士</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n" + " </tr>\r\n"
+ " </thead>" + " <tbody>";
private static String jcSql = "SELECT * from web_test.JYJCST_HDICLIEXAINFO(\"%s\",\"%s\") WHERE business_id= ? ";
private static String jySql = "SELECT * from web_test.JYJCST_HDILAREXADETLIST(\"%s\",\"%s\") WHERE business_id= ? ";
private static String vteSql = "select * from view_single_disease_vte_reporting where ass_type != 'meTaboo' and patient_no = ? and sub_trigger_type is not null group by ass_type,risk_id order by sub_trigger_type";
}
static {
Setting poolSetting = new Setting();
poolSetting.put("initialSize", "20");
poolSetting.put("maxActive", "50");
poolSetting.put("maxWait", "60000");
poolSetting.put("validationQuery", "SELECT 1");
jyJdbcTemplate.setDataSource(createDataSource("jdbc:Cache://172.17.0.34:1972/dhc-app",
"com.intersys.jdbc.CacheDriver", "JSHYUsers", "JSHYUsers", poolSetting));
poolSetting.put("validationQuery", "SELECT 1 FROM DUAL");
vteJdbcTemplate.setDataSource(createDataSource("jdbc:mysql://172.17.0.218:3307/vte3_cdss?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8", "com.mysql.cj.jdbc.Driver", "root", "vte_m_2021", poolSetting));
}
protected static DruidDataSource createDataSource(String jdbcUrl, String driver, String user, String pass,
Setting poolSetting) {
final DruidDataSource ds = new DruidDataSource();
ds.setUrl(jdbcUrl);
ds.setDriverClassName(driver);
ds.setUsername(user);
ds.setPassword(pass);
// 规范化属性名
Properties druidProps = new Properties();
String keyStr;
for (Map.Entry<String, String> entry : poolSetting.entrySet()) {
keyStr = StrUtil.addPrefixIfNot(entry.getKey(), "druid.");
druidProps.put(keyStr, entry.getValue());
}
// 连接池信息
ds.configFromPropety(druidProps);
// 检查关联配置,在用户未设置某项配置时,
if (null == ds.getValidationQuery()) {
// 在validationQuery未设置的情况下,以下三项设置都将无效
ds.setTestOnBorrow(false);
ds.setTestOnReturn(false);
ds.setTestWhileIdle(false);
}
return ds;
}
@Override
public List<EmrRecord> selectEmrRecordList(String hospitalCode, String recordId, String hospitalNum, Date beginDate, Date endDate, PageRequest pager, List<String> logMsg, Boolean notExtract) throws Exception {
LinkedList<EmrRecord> emrRecords = Lists.newLinkedList();
if (StringUtils.isNotBlank(recordId)) {
List<String> recordIds = Lists.newArrayList();
recordIds.add(recordId);
return assembleRecordIndex(recordIds);
} else if (null != beginDate && null != endDate) {
List<String> recordIds = assembleTimeInterval(DateUtils.dateToString(beginDate, DateUtils.DATE_FORMAT), DateUtils.dateToString(endDate, DateUtils.DATE_FORMAT));
return assembleRecordIndex(recordIds);
}
return emrRecords;
}
@Override
public List<EmrContent> selectEmrContentList(EmrRecord record, List<String> logMsg) throws Exception {
String recordId = record.getRecordId();
List<EmrContent> result = new ArrayList<>();
if (StringUtils.isNotBlank(recordId)) {
//首页
EmrContent basy = assembleRecordIndex(record);
result.add(basy);
//入院记录
List<EmrContent> ryEmrContents = assembleOtherContent(StaticParams.RY_CODE, recordId);
if (!CollectionUtils.isEmpty(ryEmrContents)) result.addAll(ryEmrContents);
//出院记录
List<EmrContent> cyEmrContents = assembleOtherContent(StaticParams.CY_CODE, recordId);
if (!CollectionUtils.isEmpty(cyEmrContents)) result.addAll(cyEmrContents);
//手术记录
List<EmrContent> ssEmrContents = assembleOtherContent(StaticParams.SS_CODE, recordId);
if (!CollectionUtils.isEmpty(ssEmrContents)) result.addAll(ssEmrContents);
//知情同意书记录
List<EmrContent> zqEmrContents = assembleOtherContent(StaticParams.ZQTYS_CODE, recordId);
if (!CollectionUtils.isEmpty(zqEmrContents)) result.addAll(zqEmrContents);
//病程记录
List<EmrContent> bcEmrContents = assembleOtherContent(StaticParams.BC_CODE, recordId);
if (!CollectionUtils.isEmpty(bcEmrContents)) result.addAll(bcEmrContents);
/* //术前访视记录
LinkedList<EmrContent> sqEmrContents = assembleOtherContent(StaticParams.SQFSJL_CODE, recordId);
if(!CollectionUtils.isEmpty(sqEmrContents)) result.addAll(sqEmrContents);
//术后访视记录
LinkedList<EmrContent> shEmrContents = assembleOtherContent(StaticParams.SHFSJL_CODE, recordId);
if(!CollectionUtils.isEmpty(shEmrContents)) result.addAll(shEmrContents);*/
//安全核查记录
EmrContent anhcEmrContents = assembleSafetyChecklist(StaticParams.AQHCB_CODE, recordId);
if (null != anhcEmrContents) result.add(anhcEmrContents);
//医嘱
LinkedHashMap<String, JSONArray> advice = findDoctorAdvice(StaticParams.YZ_CODE, recordId);
JSONArray lsJsonArray = advice.get("临时医嘱");
EmrContent lsContent = assembleDoctorAdvice("临时医嘱", "1", lsJsonArray);
if (null != lsContent && StringUtils.isNotBlank(lsContent.getContentId())) result.add(lsContent);
JSONArray cqJsonArray = advice.get("长期医嘱");
EmrContent cqContent = assembleDoctorAdvice("长期医嘱", "0", cqJsonArray);
if (null != cqContent && StringUtils.isNotBlank(cqContent.getContentId())) result.add(cqContent);
// //检验检查
// List<EmrContent> inspectionContent = getAndInspectionContent(record);
// result.addAll(inspectionContent);
EmrContent vteContent = assembleVTE(recordId);
if (null != vteContent && StringUtils.isNotBlank(vteContent.getContentId())) result.add(vteContent);
result = result.stream().sorted(Comparator.comparing(emr -> {
if (ObjectUtil.isNotEmpty(emr.getContentTime())) {
return emr.getContentTime();
} else {
return new Date();
}
})).collect(Collectors.toList());
}
return result;
}
private static List<EmrContent> getAndInspectionContent(EmrRecord record) {
List<EmrContent> emrContentList = new ArrayList<EmrContent>();
String recordId = record.getRecordId();
Date inTime = record.getInTime();
Date outTime = null == record.getOutTime() ? Calendar.getInstance().getTime() : record.getOutTime();
List<HashMap<String, Object>> jcList = new ArrayList<>();
ConcurrentMap<String, HashMap<String, Object>> jcDistinctMap = Maps.newConcurrentMap();
try {
/** 检查 */
jyJdbcTemplate.query(String.format(StaticParams.jcSql, DateUtil.format(inTime, "yyyy-MM-dd"), DateUtil.format(outTime, "yyyy-MM-dd")), new Object[]{recordId}, new RowCallbackHandler() {
@Override
public void processRow(ResultSet rs) throws SQLException {
HashMap<String, Object> blwsJsonMap = Maps.newHashMap();
ResultSetMetaData rsMeta = rs.getMetaData();
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columName = rsMeta.getColumnLabel(i + 1);
Object value = rs.getObject(i + 1);
blwsJsonMap.put(columName, value);
}
jcList.add(blwsJsonMap);
}
});
} catch (Exception e) {
}
EmrContent jcEmrContent = getJcEmrContent(jcList, record);
if (null != jcEmrContent) {
emrContentList.add(jcEmrContent);
}
/** 检验 */
List<HashMap<String, Object>> jyList = new ArrayList<>();
try {
jyJdbcTemplate.query(String.format(StaticParams.jySql, DateUtil.format(inTime, "yyyyMMdd"), DateUtil.format(outTime, "yyyyMMdd")), new Object[]{recordId}, new RowCallbackHandler() {
@Override
public void processRow(ResultSet rs) throws SQLException {
HashMap<String, Object> blwsJsonMap = Maps.newHashMap();
ResultSetMetaData rsMeta = rs.getMetaData();
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columName = rsMeta.getColumnLabel(i + 1);
Object value = rs.getObject(i + 1);
blwsJsonMap.put(columName, value);
}
jyList.add(blwsJsonMap);
}
});
} catch (Exception e) {
}
EmrContent jyEmrContent = getJyEmrContent(jyList, record);
if (null != jyEmrContent) {
emrContentList.add(jyEmrContent);
}
return emrContentList;
}
private static EmrContent getJyEmrContent(List<HashMap<String, Object>> yzLists, EmrRecord emrRecord) {
EmrContent emrContent = null;
String recordId = emrRecord.getRecordId();
Date inTime = emrRecord.getInTime();
Date outTime = null == emrRecord.getOutTime() ? Calendar.getInstance().getTime() : emrRecord.getOutTime();
if (!CollectionUtils.isEmpty(yzLists)) {
emrContent = new EmrContent();
emrContent.isAutoJson = false;
emrContent.setContentId("jy" + recordId);
emrContent.setTitle("检验报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(new Date());
// emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(new Date());
Map<String, List<HashMap<String, Object>>> map = new HashMap<String, List<HashMap<String, Object>>>();
map.put("datas", yzLists);
String structJson = JSON.toJSONString(map);
emrContent.setStructJson(structJson);
int j = 0;
StringBuffer jyTableHtml = new StringBuffer();
jyTableHtml.append("<div class=\"fixed-table-body\">\r\n");
jyTableHtml.append(" <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n" + " <thead>\r\n");
jyTableHtml.append(" <tr>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验类别</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验项目</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验结果</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>参考值</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>单位</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>执行医生</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>异常提示</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验日期时间</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" </tr>\r\n </thead>\r\n <tbody>\r\n");
for (Map<String, Object> tempMap : yzLists) {
String exeDate = mapNullValueReplace(tempMap.get("AP090002500"));
Date jyTime = DateUtils.stringToDate(exeDate, "yyyyMMddHHmmss");
jyTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("TestSetName")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("TestName")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("Result")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("Ranges")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("Unit")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("AuthUserName")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(tempMap.get("ResFlag")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(exeDate);
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" </tr>");
j++;
}
jyTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(html.replaceAll("\\$\\{yzTableHtml\\}", Matcher.quoteReplacement(jyTableHtml.toString())));
}
return emrContent;
}
private EmrContent assembleVTE(String recordId) {
EmrContent emrContent = null;
try {
List<HashMap<String, Object>> vteList = new ArrayList<>();
/** VTE */
vteJdbcTemplate.query(StaticParams.vteSql, new Object[]{recordId}, new RowCallbackHandler() {
@Override
public void processRow(ResultSet rs) throws SQLException {
HashMap<String, Object> blwsJsonMap = Maps.newHashMap();
ResultSetMetaData rsMeta = rs.getMetaData();
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columName = rsMeta.getColumnLabel(i + 1);
Object value = rs.getObject(i + 1);
blwsJsonMap.put(columName, value);
}
vteList.add(blwsJsonMap);
}
});
if (CollUtil.isNotEmpty(vteList)) {
emrContent = new EmrContent();
StringBuffer tableStr = new StringBuffer();
emrContent.isAutoJson = false;
emrContent.setContentId("vte" + recordId);
emrContent.setTitle("VTE相关风险动态评估表");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(new Date());
// emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(new Date());
Map<String, List<HashMap<String, Object>>> map = new HashMap<String, List<HashMap<String, Object>>>();
map.put("datas", vteList);
String structJson = JSON.toJSONString(map);
emrContent.setStructJson(structJson);
Map<Object, List<HashMap<String, Object>>> typeMap = vteList.stream().collect(Collectors.groupingBy(o -> o.get("sub_trigger_type")));
typeMap.forEach((key, list) -> {
tableStr.append("<tr><td>评估时间</td><td colspan=\"5\">" + list.get(0).get("ass_time") + "</td></tr>");
tableStr.append("<tr><td>评估科室</td><td colspan=\"5\">" + list.get(0).get("emergency_dept") + "</td></tr>");
Map<Object, List<HashMap<String, Object>>> ass_type = list.stream().collect(Collectors.groupingBy(o -> o.get("ass_type")));
ass_type.forEach((assKey, dataList) -> {
tableStr.append("<tr><td>量表名称</td><td>" + assKey + "</td> <td>评估时机</td><td>" + key + "</td><td>评估分数</td><td>" + dataList.get(0).get("scores") + "</td></tr>");
String itemName = "";
for (int i = 0; i < dataList.size(); i++) {
int n = i + 1;
Object ass_item_name = dataList.get(i).get("ass_item_name");
if (ObjectUtil.isEmpty(ass_item_name)) break;
itemName += n + "." + ass_item_name + "(" + dataList.get(i).get("score") + ") ";
}
tableStr.append("<tr><td>危险因素</td><td colspan=\"3\">" + itemName + "</td> <td>风险评估等级</td><td>" + dataList.get(0).get("risk_level") + "</td></tr>");
});
tableStr.append("<tr><td>护士签名</td><td colspan=\"1\">" + list.get(0).get("nurse_confirm_name") + "</td><td>医生签名</td><td >" + list.get(0).get("doc_confirm_name") + "</td><td>签名时间</td><td >" + list.get(0).get("doc_confirm_time") + "</td></tr>");
});
emrContent.setContentText(vteHtml.replaceAll("\\$\\{yzTableHtml\\}", tableStr.toString()));
}
} catch (DataAccessException e) {
LOGGER.error("assembleVTE error", e);
}
return emrContent;
}
private static EmrContent getJcEmrContent(List<HashMap<String, Object>> jyList, EmrRecord emrRecord) {
EmrContent emrContent = null;
String recordId = emrRecord.getRecordId();
Date inTime = emrRecord.getInTime();
Date outTime = null == emrRecord.getOutTime() ? Calendar.getInstance().getTime() : emrRecord.getOutTime();
if (!CollectionUtils.isEmpty(jyList)) {
emrContent = new EmrContent();
emrContent.isAutoJson = false;
emrContent.setContentId("jc" + recordId);
emrContent.setTitle("检查报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(new Date());
// emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(new Date());
Map<String, List<HashMap<String, Object>>> map = new HashMap<String, List<HashMap<String, Object>>>();
map.put("datas", jyList);
String structJson = JSON.toJSONString(map);
emrContent.setStructJson(structJson);
int j = 0;
StringBuffer jcTableHtml = new StringBuffer();
jcTableHtml.append("<div class=\"fixed-table-body\">\r\n");
jcTableHtml.append(" <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n");
jcTableHtml.append(" <thead>\r\n");
jcTableHtml.append(" <tr>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查类别</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查项目</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查医生</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查结果</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查日期时间</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" </tr>\r\n");
for (HashMap<String, Object> tempMap : jyList) {
String exeDate = CommonUtil.getMap(tempMap, "WS06_00_924_01", "yyyy-MM-dd'T'HH:mm:ss");
Date jyTime = DateUtils.stringToDate(exeDate, "yyyy-MM-dd HH:mm:ss");
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(tempMap.get("DE04_30_019_01")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(tempMap.get("DE04_30_020_00")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(tempMap.get("DE02_01_039_064")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(tempMap.get("DE04_50_131_00")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(exeDate);
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" </tr>\r\n");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(html.replaceAll("\\$\\{yzTableHtml\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
}
return emrContent;
}
@Override
public void writeEndDate(Date endDate) {
}
@Override
public void deleteEmrContentList(IMrqcEtlService mrqcEtlService, EmrRecord record, List<String> logMsg)
throws Exception {
mrqcEtlService.deleteEmrContentsByRecord(record);
logMsg.add("删除病历文书成功: [" + record.getRecordId() + "]");
}
/**
* 组装首页及Record表数据
*
* @return 质控病历对象
* @author ouyang0810@foxmail.com
* @Date 2022/10/14
*/
private LinkedList<EmrRecord> assembleRecordIndex(List<String> recordIds) {
LinkedList<EmrRecord> emrRecords = Lists.newLinkedList();
LOGGER.info("开始获取病例并组装,共:{} 条。", recordIds.size());
for (String recordId : recordIds) {
String response = doPostSoap(WEBSERVICE_URL, StaticParams.SY_CODE, recordId, WEBSERVICE_SOAPACTION);
try {
JSONObject jsonObject = XmlTool.documentToJSONObject(response);
JSONObject serviceResponse = jsonObject.getJSONObject("Body").getJSONObject("GetHISInfoResponse");
if (null != serviceResponse && serviceResponse.size() != 0) {
String resultResponse = serviceResponse.getString("GetHISInfoResult");
JSONObject admFirstPage = XmlTool.documentToJSONObject(resultResponse);
// JSONObject admFirstPage = resultResponse;
EmrRecord emrRecord = new EmrRecord();
String record_id = mapNullValueReplace(admFirstPage.getString("AdmNo"));
emrRecord.setStructDataJson(admFirstPage.toJSONString());
emrRecord.setRecordId(record_id);// 记录id
emrRecord.setPatientNum(mapNullValueReplace(admFirstPage.getString("HealthCardId")));// 就诊号
emrRecord.setHospitNum(mapNullValueReplace(admFirstPage.getString("DocumentID")));// 门诊号/住院号
emrRecord.setPatientName(mapNullValueReplace(admFirstPage.getString("PatName"))); // 患者姓名
emrRecord.setHospitCode(HOSPITAL_CODE);
// if (StrUtil.startWith(emrRecord.getHospitNum(), "9")) {
// emrRecord.setHospitCode(HOSPITAL_CODE);// 医院编码
// }else {
// emrRecord.setHospitCode(HOSPITAL_CODE_0);// 医院编码
// }
emrRecord.setHospitName(HOSPITAL_NAME);// 医院名称
emrRecord.setPatientSex(mapNullValueReplace(admFirstPage.getString("Sex"))); // 患者性别
emrRecord.setBirthday(DateUtils.stringToDate(mapNullValueReplace(admFirstPage.getString("Birthday")), "YYYYmmdd"));// 出生日期
emrRecord.setAge(mapNullValueReplace(admFirstPage.getString("AgeYear")));
//主治
String zzys = mapNullValueReplace(admFirstPage.getString("AesculapiusDesc"));
String zzysCode = mapNullValueReplace(admFirstPage.getString("AttendingCode"));
if (EngrUtil.isNone(zzys)) {
zzys = mapNullValueReplace(admFirstPage.getString("DirectorDesc"));
zzysCode = mapNullValueReplace(admFirstPage.getString("DirectorCode"));
}
// 诊疗医生 --取主治医师
emrRecord.setHospitDoctor(zzys);
emrRecord.setDoctorCode(zzysCode);
// 病历评分
emrRecord.setRecordScore(null);
emrRecord.setHomepageScore(null);
emrRecord.setCreater("admin"); // 创建者
emrRecord.setCreateTime(Calendar.getInstance().getTime());// 修改时间
emrRecord.setModifyer("admin"); // 修改者
emrRecord.setModifyTime(Calendar.getInstance().getTime()); // 修改时间
emrRecord.setInTime(DateUtils.stringToDate(mapNullValueReplace(admFirstPage.getString("AdmSDate")), DateUtils.DATE_TIME_MINUTE));//入院时间
emrRecord.setOutTime(DateUtils.stringToDate(mapNullValueReplace(admFirstPage.getString("AdmDDate")), DateUtils.DATE_TIME_MINUTE));//出院时间
// emrRecord.setEtlTime(Calendar.getInstance().getTime());
if (null != emrRecord.getOutTime()) {
// 诊疗时间--对应出院院时间
emrRecord.setHospitTime(DateUtils.stringToDate(mapNullValueReplace(admFirstPage.getString("AdmDDate")), DateUtils.DATE_TIME_FORMAT));
emrRecord.setDepartmentCode(mapNullValueReplace(admFirstPage.getString("AdmDWardCode"))); // 病区编码
emrRecord.setDepartmentName(mapNullValueReplace(admFirstPage.getString("AdmDWard"))); // 病区名称
emrRecord.setInpatientCode(mapNullValueReplace(admFirstPage.getString("AdmDDeptCode")));
emrRecord.setInpatientArea(mapNullValueReplace(admFirstPage.getString("AdmDDept"))); //科室
emrRecord.setEmrStatus("4");
} else {
// 诊疗时间--对应入院院时间
emrRecord.setHospitTime(DateUtils.stringToDate(mapNullValueReplace(admFirstPage.getString("AdmSDate")), DateUtils.DATE_TIME_FORMAT));
emrRecord.setDepartmentCode(mapNullValueReplace(admFirstPage.getString("AdmSWardCode"))); // 病区编码
emrRecord.setDepartmentName(mapNullValueReplace(admFirstPage.getString("AdmSWard"))); // 病区名称
emrRecord.setInpatientCode(mapNullValueReplace(admFirstPage.getString("AdmSDeptCode")));
emrRecord.setInpatientArea(mapNullValueReplace(admFirstPage.getString("AdmSDept"))); // 科室名称
emrRecord.setEmrStatus("1");
}
JSONArray diagnoseInfos = new JSONArray();
if (admFirstPage.getJSONObject("DiagnoseInfo").get("Diagnose") instanceof JSONObject) {
diagnoseInfos.add(admFirstPage.getJSONObject("DiagnoseInfo").getJSONObject("Diagnose"));
}
if (admFirstPage.getJSONObject("DiagnoseInfo").get("Diagnose") instanceof JSONArray) {
diagnoseInfos.addAll(admFirstPage.getJSONObject("DiagnoseInfo").getJSONArray("Diagnose"));
}
if (!CollectionUtils.isEmpty(diagnoseInfos)) {
for (Object info : diagnoseInfos) {
JSONObject diagnose = (JSONObject) info;
String diagnoseMarker = diagnose.getString("DiagnoseMarker");
if ("1".equals(diagnoseMarker)) {
emrRecord.setDiagnosisCode(diagnose.getString("DiagnoseCode"));
emrRecord.setDiagnosisName(diagnose.getString("DiagnoseDesc"));
}
}
}
emrRecords.add(emrRecord);
}
} catch (DocumentException e) {
LOGGER.error("数据抽提, 病历recordId: {} ,病案数据XML转换异常! ExceptionMsg: {}", recordId, e.getMessage());
}
}
LOGGER.info("病历Record组装完成,共{} 份。", emrRecords.size());
return emrRecords;
}
/**
* 根据时间区间获取病历ID
*
* @param beginDate 起始时间[YYYYmmdd]
* @param endDate 截止时间[YYYYmmdd]
* @return 病历唯一标识集合
* @author ouyang0810@foxmail.com
* @Date 2022/10/14
*/
private List<String> assembleTimeInterval(String beginDate, String endDate) {
List<String> result = new ArrayList<>();
String response = doPostSoap(WEBSERVICE_URL, StaticParams.QJBL_CODE, String.format(StaticParams.QJBL_PARAM, beginDate, endDate), WEBSERVICE_SOAPACTION);
String responseIn = doPostSoap(WEBSERVICE_URL, StaticParams.IJBL_CODE, String.format(StaticParams.QJBL_PARAM, beginDate, endDate), WEBSERVICE_SOAPACTION);
try {
getRecordIds(result, response);
getRecordIds(result, responseIn);
} catch (DocumentException e) {
LOGGER.error("数据抽提, 病历起始时间: {} ,截止时间: {} ,病案数据XML转换异常! ExceptionMsg: {}", beginDate, endDate, ExceptionUtils.getStackTrace(e));
}
return result;
}
private static void getRecordIds(List<String> result, String response) throws DocumentException {
JSONObject jsonObject = XmlTool.documentToJSONObject(response);
JSONObject serviceResponse = jsonObject.getJSONObject("Body").getJSONObject("GetHISInfoResponse");
if (null != serviceResponse && serviceResponse.size() != 0) {
String resultResponse = serviceResponse.getString("GetHISInfoResult");
if (StringUtils.isNotBlank(resultResponse)) {
String[] split = resultResponse.split("\\^");
result.addAll(Arrays.asList(split));
}
}
}
/**
* 组装病案首页
*
* @param record 病历对象
* @return 首页文书对象
*/
private EmrContent assembleRecordIndex(EmrRecord record) {
String recordId = record.getRecordId();
EmrContent basy = new EmrContent();
basy.setContentId(recordId);
basy.setTitle("病案首页");
basy.setEmrId("emr01");
basy.setShowOrder("1");
basy.setContentTime(record.getOutTime());
basy.setRecordId(recordId);
String dataJson = record.getStructDataJson();
if (StringUtils.isNotBlank(dataJson)) {
try {
JSONObject jsonObject = JSON.parseObject(dataJson);
String kezhuren = jsonObject.getString("kezhuren");
if (StrUtil.isNotEmpty(kezhuren)&&!"^^".equals(kezhuren)) {
String[] split = kezhuren.split("\\^");
if (split.length>=3) {
String timeStr = split[1];
Date date = DateUtils.stringToDate(timeStr, DateUtils.DATE_TIME_FORMAT);
basy.setContentTime(date);
}
}
} catch (Exception e) {
LOGGER.error("病案首页组装异常;病历:{},异常:{}", recordId, e.getMessage());
}
}
basy.setStructJson(dataJson);
return basy;
}
/**
* 组装文书对象
*
* @return LinkedList<EmrContent>
*/
private List<EmrContent> assembleOtherContent(String code, String recordId) throws Exception {
List<EmrContent> emrContents = new ArrayList<>();
try {
Element GetHISInfoResult = findGetHISInfoResult(code, recordId);
if (null != GetHISInfoResult) {
Element root = GetHISInfoResult.element("root");
if (null != root) {
List<Element> elements = root.elements();
for (Element element : elements) {
EmrContent content = new EmrContent();
String contentId = element.elementText("content_id");
contentId = contentId.replaceAll("\\|\\|", "_");
content.setContentId(contentId);
content.setTitle(element.elementText("title"));
// content.setEmrId(element.elementText("emr_id"));
content.setShowUrl(element.elementText("content_html").replaceFirst(CDATA_START, "").replaceAll(CDATA_END, ""));
content.setShowOrder(element.elementText("show_order"));
String contentTime = element.elementText("content_time");
content.setContentTime(DateUtils.stringToDate(contentTime, DateUtils.DATE_TIME_FORMAT));
content.setRecordId(element.elementText("record_id"));
JSONObject object = setContentTimeByOrderTime(element, content);
try {
Element NInstanceData = element.element("content_xml").element("NInstanceData");
if (null == NInstanceData) {
NInstanceData = element.element("content_xml").element("Document").element("StructuredBody").element("NInstanceData");
}
if (null != NInstanceData) {
String xml = getXmlContent(NInstanceData);
content.setContentXml(xml);
JSONObject jsonObject = XmlTool.documentToJSONObject(xml);
jsonObject.put("object", object);
content.setStructJson(jsonObject.toJSONString());
} else {
LOGGER.error("获取文书正文【NInstanceData】异常! recordId: {},code: {}, Title: {}", recordId, code, content.getTitle());
}
} catch (Exception e) {
LOGGER.error("获取文书正文section异常! recordId: {},code: {}, Title: {}", recordId, code, content.getTitle());
LOGGER.error(ExceptionUtils.getStackTrace(e));
continue;
}
if (StringUtils.isNotBlank(content.getContentId())) {
emrContents.add(content);
}
}
return emrContents;
}
}
} catch (Exception e) {
LOGGER.error("获取文书异常! recordId: {},code: {}, param: {}; ExceptionMsg: {}", recordId, code, ExceptionUtils.getStackTrace(e));
return Lists.newLinkedList();
}
return Lists.newLinkedList();
}
private static JSONObject setContentTimeByOrderTime(Element element, EmrContent content) {
JSONObject object = new JSONObject();
//主任医生
String resident = element.elementText("Resident");
object.put("Resident", resident);
//主治医生
String attending = element.elementText("Attending");
object.put("Attending", attending);
//住院医生
String chief = element.elementText("Chief");
object.put("Chief", chief);
List<Date> dateList = new ArrayList<>();
if (StrUtil.isNotEmpty(resident)&&!"^^".equals(resident)) {
String[] split = resident.split("\\^");
if (split.length>=3) {
String timeStr = split[2];
Date date = DateUtils.stringToDate(timeStr, DateUtils.DATE_TIME_FORMAT);
dateList.add(date);
}
}
if (StrUtil.isNotEmpty(attending)&&!"^^".equals(attending)) {
String[] split = attending.split("\\^");
if (split.length>=3) {
String timeStr = split[2];
Date date = DateUtils.stringToDate(timeStr, DateUtils.DATE_TIME_FORMAT);
dateList.add(date);
}
}
if (StrUtil.isNotEmpty(chief)&&!"^^".equals(chief)) {
String[] split = chief.split("\\^");
if (split.length>=3) {
String timeStr = split[2];
Date date = DateUtils.stringToDate(timeStr, DateUtils.DATE_TIME_FORMAT);
dateList.add(date);
}
}
Date maxDate = null;
if (CollUtil.isNotEmpty(dateList)) {
maxDate = dateList.stream()
.max(Date::compareTo)
.orElse(null);
}
if (ObjectUtil.isNotNull(maxDate)) {
content.setContentTime(maxDate);
}
return object;
}
private static String getXmlContent(Element nInstanceData) {
String xml = "";
Element scatterData = nInstanceData.element("ScatterData");
if (null != scatterData) {
xml = xml + scatterData.asXML();
xml = replaceXmlFlag(xml);
return xml;
}
Element abiword = nInstanceData.element("abiword");
if (null != abiword) {
List<Element> abiwords = abiword.elements();
for (Element e : abiwords) {
if ("section".equals(e.getName())) {
//仅取第一个 section
Element data = abiword.element("data");
if (null != data) {
Element data1 = e.addElement("data");
List<Element> elementsB = data.elements("d");
Element elB = elementsB.get(0);
data1.setText("data:image/jpeg;base64," + elB.getText());
}
xml = e.asXML();
xml = replaceXmlFlag(xml);
break;
}
}
return xml;
}
Element iEditor = nInstanceData.element("iEditor");
if (null != iEditor) {
xml = replaceXmlFlag(xml + iEditor.asXML());
return xml;
}
return xml;
}
private static String replaceXmlFlag(String xml) {
if (StrUtil.isNotBlank(xml) && xml.contains("xmlns")) {
xml = xml.replace(XMLNS_FLAG, "");
}
return xml;
}
/**
* 根据接口代码,获取结果元素
*
* @author ouyang0810@foxmail.com
* @Date 2023/3/23
*/
private Element findGetHISInfoResult(String code, String recordId) throws Exception {
String response = doPostSoapNew(WEBSERVICE_URL, code, recordId, WEBSERVICE_SOAPACTION);
Document document = XmlTool.strToDocument(response);
Element rootElement = document.getRootElement();
Element GetHISInfoResponse = rootElement.element("Body").element("GetHISInfoResponse");
return GetHISInfoResponse.element("GetHISInfoResult");
}
/**
* 获取医嘱集
*
* @param
* @return LinkedHashMap
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private LinkedHashMap<String, JSONArray> findDoctorAdvice(String code, String recordId) throws Exception {
LinkedHashMap<String, JSONArray> hashMap = Maps.newLinkedHashMap();
try {
String response = doPostSoap(WEBSERVICE_URL, code, recordId, WEBSERVICE_SOAPACTION);
JSONObject jsonObject = XmlTool.documentToJSONObject(response);
JSONObject body = jsonObject.getJSONObject("Body");
JSONObject GetHISInfoResponse = body.getJSONObject("GetHISInfoResponse");
String GetHISInfoResult = GetHISInfoResponse.getString("GetHISInfoResult");
if (!CollectionUtils.isEmpty(GetHISInfoResponse) && StrUtil.isNotEmpty(GetHISInfoResult)) {
JSONObject orderList = XmlTool.documentToJSONObject(GetHISInfoResult);
if (!CollectionUtils.isEmpty(orderList)) {
JSONArray orderInfo = new JSONArray();
if (orderList.get("OrderInfo") instanceof JSONArray) {
orderInfo = orderList.getJSONArray("OrderInfo");
}
if (orderList.get("OrderInfo") instanceof JSONObject) {
orderInfo.add(orderList.getJSONObject("OrderInfo"));
}
for (Object o : orderInfo) {
JSONObject order = (JSONObject) o;
EmrContent content = new EmrContent();
String title = order.getString("HDSD0015022");
if (hashMap.containsKey(title)) {
JSONArray jsonValues = hashMap.get(title);
jsonValues.add(order);
hashMap.put(title, jsonValues);
} else {
JSONArray jsonValues = new JSONArray();
jsonValues.add(order);
hashMap.put(title, jsonValues);
}
}
}
}
} catch (Exception e) {
LOGGER.error("获取医嘱异常! recordId: {},code: {}, param: {}; ExceptionMsg: {}", recordId, code, ExceptionUtils.getStackTrace(e));
return Maps.newLinkedHashMap();
}
return hashMap;
}
/**
* 组装医嘱
*
* @param
* @return EmrContent
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private EmrContent assembleDoctorAdvice(String title, String xh, JSONArray jsonArray) throws Exception {
EmrContent content = new EmrContent();
try {
if (CollectionUtils.isEmpty(jsonArray)) {
return null;
}
content.isAutoJson = false;
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
content.setContentId(jsonObject.getString("RECORDID") + "_yz" + xh);
content.setTitle(title);
content.setRecordId(jsonObject.getString("RECORDID"));
content.setCreateBy("admin");
String startDateTime = CommonUtil.getMap(jsonObject.getInnerMap(), "HDSD0015018", "yyyy-MM-dd HH:mm:ss");
content.setCreateTime(DateUtils.stringToDate(startDateTime, "yyyy-MM-dd HH:mm:ss"));
// content.setEmrId("emr03");
content.setShowOrder("1");
content.setUpdateBy("admin");
content.setUpdateTime(Calendar.getInstance().getTime());
String yzTableHtml = StaticParams.YZ_TABLE_HTML;
int j = 0;
for (Object o : jsonArray) {
JSONObject object = (JSONObject) o;
Map<String, Object> map = object.getInnerMap();
String BeginDate = (String) CommonUtil.getMap(map, "HDSD0015018", "yyyy-MM-dd HH:mm:ss");
String EndDate = (String) CommonUtil.getMap(map, "HDSD0015026", "yyyy-MM-dd HH:mm:ss");
String InputDoctorName = (String) CommonUtil.getMap(map, "HDSD0015021", null);
String StopDoctorName = (String) CommonUtil.getMap(map, "HDSD0015013", null);
String startStaffName = (String) CommonUtil.getMap(map, "HDSD0015006", null);
String ExecStaffName = (String) CommonUtil.getMap(map, "HDSD0015014", null);
String OrderContent = (String) CommonUtil.getMap(map, "HDSD0015028", null);
String classType = (String) CommonUtil.getMap(map, "HDSD0015027", null);
yzTableHtml += " <tr data-index=\"" + j + "\">\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ classType + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ BeginDate + "</td>\r\n"
+ " <td style=\"border: 1px solid #2f4050!important;\" name = \"contentText\">"
+ OrderContent + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ InputDoctorName + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ startStaffName + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ EndDate + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ StopDoctorName + "</td>\r\n"
+ " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">"
+ ExecStaffName + "</td>\r\n" + " </tr>";
j++;
}
yzTableHtml += " </tbody>\r\n" + " </table>\r\n" + "</div>";
content.setContentText(StaticParams.HTML.replaceAll("\\$\\{yzTableHtml\\}", Matcher.quoteReplacement(yzTableHtml)));
JSONObject object = new JSONObject();
object.put("datas", jsonArray);
content.setStructJson(object.toJSONString());
} catch (Exception e) {
LOGGER.error("组装医嘱异常! title: {}, xh: {}; ExceptionMsg: {}", title, xh, ExceptionUtils.getStackTrace(e));
return null;
}
return content;
}
/**
* 组装检查
*
* @param
* @return EmrContent
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private EmrContent assembleExamination(String recordId) throws Exception {
EmrContent emrContent = new EmrContent();
//检查
try {
List<String> inspectTypes = Arrays.asList(StaticParams.INSPECT_TYPES.split(","));
JSONArray resultJSONArray = new JSONArray();
for (String s : inspectTypes) {
JSONArray examination = findExamination(StaticParams.JYJCBG_CODE, StaticParams.JYJCBG_PARAM, s, "", recordId);
if (!CollectionUtils.isEmpty(examination)) resultJSONArray.addAll(examination);
}
JSONArray details = findExaminationDetail(resultJSONArray, recordId);
if (!CollectionUtils.isEmpty(details)) {
emrContent = new EmrContent();
emrContent.isAutoJson = false;
emrContent.setContentId("jc_" + recordId);
emrContent.setTitle("检查报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(Calendar.getInstance().getTime());
emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(Calendar.getInstance().getTime());
JSONObject object1 = new JSONObject();
object1.put("datas", details);
emrContent.setStructJson(object1.toJSONString());
StringBuffer jcTableHtml = new StringBuffer();
jcTableHtml.append("<div class=\"fixed-table-body\">\r\n");
jcTableHtml.append(" <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n");
jcTableHtml.append(" <thead>\r\n");
jcTableHtml.append(" <tr>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查项目</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查医生</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查所见</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查结果</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userCode\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检查日期时间</div>\r\n");
jcTableHtml.append(" <div class=\"fht-cell\"></div></th>\r\n");
jcTableHtml.append(" </tr>\r\n");
for (int i = 0; i < details.size(); i++) {
JSONObject object = details.getJSONObject(i);
jcTableHtml.append(" <tr data-index=\"" + i + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(object.getJSONObject("E21").getString("nodeText")));
jcTableHtml.append(")</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(object.getJSONObject("E11").getString("nodeText")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(object.getJSONObject("E08").getString("nodeText")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(mapNullValueReplace(object.getJSONObject("E09").getString("nodeText")));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(object.getJSONObject("E23").getString("nodeText") + " " + object.getJSONObject("E24").getString("nodeText"));
jcTableHtml.append("</td>\r\n");
jcTableHtml.append(" </tr>\r\n");
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(StaticParams.HTML.replaceAll("\\$\\{yzTableHtml\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
}
} catch (Exception e) {
LOGGER.error("组装检查异常! recordId: {}; ExceptionMsg: {}", recordId, ExceptionUtils.getStackTrace(e));
return null;
}
return emrContent;
}
/**
* 组装检验
*
* @param
* @return EmrContent
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private EmrContent assembleProof(String recordId) throws Exception {
EmrContent emrContent = null;
//检验
try {
List<String> tests = Arrays.asList(StaticParams.TEST_TYPES.split(","));
JSONArray resultJSONArray = new JSONArray();
for (String s : tests) {
JSONArray examination = findExamination(StaticParams.JYJCBG_CODE, StaticParams.JYJCBG_PARAM, s, "", recordId);
if (!CollectionUtils.isEmpty(examination)) resultJSONArray.addAll(examination);
}
JSONArray details = findExaminationDetail(resultJSONArray, recordId);
if (!CollectionUtils.isEmpty(details)) {
emrContent = new EmrContent();
emrContent.isAutoJson = false;
emrContent.setContentId("jy_" + recordId);
emrContent.setTitle("检验报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(Calendar.getInstance().getTime());
emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(Calendar.getInstance().getTime());
StringBuffer jyTableHtml = new StringBuffer();
jyTableHtml.append("<div class=\"fixed-table-body\">\r\n");
jyTableHtml.append(" <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n" + " <thead>\r\n");
jyTableHtml.append(" <tr>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验项目</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验子项</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验结果</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>参考值</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>单位</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>审核医生</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
jyTableHtml.append(" <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div class=\"th-inner \" nowrap>检验日期时间</div>\r\n <div class=\"fht-cell\"></div></th>\r\n");
JSONArray detailJSONArray = new JSONArray();
jyTableHtml.append(" </tr>\r\n </thead>\r\n <tbody>\r\n");
for (int i = 0; i < details.size(); i++) {
JSONObject object = details.getJSONObject(i);
JSONArray sections = new JSONArray();
if (object.get("section") instanceof JSONObject) {
sections.add(object.getJSONObject("section"));
}
if (object.get("section") instanceof JSONArray) {
sections.addAll(object.getJSONArray("section"));
}
detailJSONArray.addAll(sections);
for (int j = 0; j < sections.size(); j++) {
JSONObject section = sections.getJSONObject(j);
jyTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
if (j == 0) {
jyTableHtml.append(" <td rowspan=\"" + sections.size() + "\" style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(object.getJSONObject("E02").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
}
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(section.getJSONObject("E02").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(section.getJSONObject("E03").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(section.getJSONObject("E06").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(section.getJSONObject("E04").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
if (j == 0) {
jyTableHtml.append(" <td rowspan=\"" + sections.size() + "\" style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(mapNullValueReplace(object.getJSONObject("E20").getString("nodeText")));
jyTableHtml.append("</td>\r\n");
jyTableHtml.append(" <td rowspan=\"" + sections.size() + "\" style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append(object.getJSONObject("E03").getString("nodeText") + " " + object.getJSONObject("E04").getString("nodeText"));
jyTableHtml.append("</td>\r\n");
}
jyTableHtml.append(" </tr>");
}
}
jyTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(StaticParams.HTML.replaceAll("\\$\\{yzTableHtml\\}", Matcher.quoteReplacement(jyTableHtml.toString())));
JSONObject structJson = new JSONObject();
structJson.put("datas", detailJSONArray);
emrContent.setStructJson(structJson.toJSONString());
}
} catch (Exception e) {
LOGGER.error("组装检验异常! recordId: {}; ExceptionMsg: {}", recordId, ExceptionUtils.getStackTrace(e));
return null;
}
return emrContent;
}
/**
* 获取检验检查报告
*
* @param
* @return LinkedHashMap
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private JSONArray findExamination(String code, String param, String type, String documentId, String recordId) throws Exception {
String response = "";
JSONArray resultArray = new JSONArray();
try {
if (StringUtils.isNotBlank(documentId)) {
response = doPostSoap(WEBSERVICE_URL, StaticParams.JYJCMX_CODE, String.format(param, recordId, type, documentId), WEBSERVICE_SOAPACTION);
response = response.replaceFirst(CDATA_START, "").replace("]]]]><![CDATA[>", "");
} else {
response = doPostSoap(WEBSERVICE_URL, code, String.format(param, recordId, type), WEBSERVICE_SOAPACTION);
}
JSONObject jsonObject = XmlTool.documentToJSONObject(response);
JSONObject body1 = jsonObject.getJSONObject("Body");
JSONObject GetHISInfoResponse = body1.getJSONObject("GetHISInfoResponse");
if (null == GetHISInfoResponse || !GetHISInfoResponse.containsKey("GetHISInfoResult")) return resultArray;
JSONObject GetHISInfoResult = GetHISInfoResponse.getJSONObject("GetHISInfoResult");
if (!CollectionUtils.isEmpty(GetHISInfoResponse) && !CollectionUtils.isEmpty(GetHISInfoResult)) {
JSONObject response1 = GetHISInfoResult.getJSONObject("Response");
//Body DocumentRetrievalRp Documents
if (response1.containsKey("Body")) {
JSONObject body = response1.getJSONObject("Body");
String rpKey = "";
if (StringUtils.isNotBlank(documentId)) {
rpKey = "DocumentSearchRp";
} else {
rpKey = "DocumentRetrievalRp";
}
if (null == body || !body.containsKey(rpKey)) return resultArray;
JSONObject documentRetrievalRp = body.getJSONObject(rpKey);
if (null == documentRetrievalRp || !documentRetrievalRp.containsKey("Documents"))
return resultArray;
JSONObject documents = documentRetrievalRp.getJSONObject("Documents");
if (null == documents || !documents.containsKey("Document")) return resultArray;
if (documents.get("Document") instanceof JSONObject) {
JSONObject document = documents.getJSONObject("Document");
resultArray.add(document);
}
if (documents.get("Document") instanceof JSONArray) {
resultArray = documents.getJSONArray("Document");
}
return resultArray;
}
}
} catch (Exception e) {
LOGGER.error("获取检验检查报告! recordId: {}, code: {}, type: {}, documentId: {}; ExceptionMsg: {}", recordId, code, type, documentId, ExceptionUtils.getStackTrace(e));
return new JSONArray();
}
return resultArray;
}
/**
* 获取检验检查报告明细
*
* @param
* @return LinkedHashMap
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private JSONArray findExaminationDetail(JSONArray resultJSONArray, String recordId) throws Exception {
//明细结果
JSONArray resultMxJSONArray = new JSONArray();
String documentID = "";
String documentType = "";
try {
//明细
JSONArray resultMxs = new JSONArray();
if (!CollectionUtils.isEmpty(resultJSONArray)) {
for (Object o : resultJSONArray) {
JSONObject jsonObject = (JSONObject) o;
documentID = jsonObject.getString("DocumentID");
documentType = jsonObject.getString("DocumentType");
JSONArray examination = findExamination(StaticParams.JYJCMX_CODE, StaticParams.JYJCMX_PARAM, documentType, documentID, recordId);
if (!CollectionUtils.isEmpty(examination)) resultMxs.addAll(examination);
}
}
if (!CollectionUtils.isEmpty(resultMxs)) {
for (Object o : resultMxs) {
JSONObject jsonObject = (JSONObject) o;
String documentContent = jsonObject.getString("DocumentContent");
documentID = jsonObject.getString("DocumentID");
EncryptUtil instance = EncryptUtil.getInstance();
String content = instance.Base64Decode(documentContent);
JSONObject documentToJSONObject = XmlTool.documentToJSONObject(content);
JSONObject structuredBody = documentToJSONObject.getJSONObject("structuredBody");
if (null == structuredBody) {
LOGGER.warn("病历: {},报告ID: {}, 返回数据结构异常, 无[structuredBody]节点。", recordId, documentID);
}
if (!structuredBody.containsKey("section")) {
LOGGER.warn("病历: {},报告ID: {}, 返回数据结构异常, [section]节点数据异常。", recordId, documentID);
}
JSONArray sections = new JSONArray();
if (structuredBody.get("section") instanceof JSONArray) {
sections = structuredBody.getJSONArray("section");
}
if (structuredBody.get("section") instanceof JSONObject) {
sections.add(structuredBody.getJSONObject("section"));
}
resultMxJSONArray.add(sections.get(1));
}
}
} catch (Exception e) {
LOGGER.error("获取检验检查报告明细! recordId: {}, 报告ID:{}, 类型:{}; ExceptionMsg: {}", recordId, documentID, documentType, ExceptionUtils.getStackTrace(e));
return new JSONArray();
}
return resultMxJSONArray;
}
/**
* 组装安全核查表
*
* @param
* @return EmrContent
* @author ouyang0810@foxmail.com
* @Date 2022/10/25
*/
private EmrContent assembleSafetyChecklist(String code, String recordId) throws Exception {
EmrContent scEmrContent = null;
Element GetHISInfoResult = findGetHISInfoResult(code, recordId);
if (null != GetHISInfoResult) {
Element anData = GetHISInfoResult.element("AnData");
if (null != anData) {
Element row = anData.element("Row");
if (null != row) {
scEmrContent = new EmrContent();
String contentId = row.elementText("content_id");
String title = row.elementText("title");
Element contentXml = row.element("content_xml");
if (null != contentXml) {
scEmrContent.setContentXml(contentXml.asXML());
}
scEmrContent.setContentId(contentId);
scEmrContent.setTitle(title);
scEmrContent.setEmrId("emr07");
scEmrContent.setShowOrder(row.elementText("show_order"));
String contentTime = row.elementText("content_time");
scEmrContent.setContentTime(DateUtils.stringToDate(contentTime, DateUtils.DATE_TIME_FORMAT));
scEmrContent.setRecordId(row.elementText("record_id"));
}
}
}
return scEmrContent;
}
/**
* map null值转换
*
* @return void
*/
private static String mapNullValueReplace(Object value) {
return null == value ? "" : String.valueOf(value);
}
/**
* 使用SOAP发送消息(HttpClient方式)
*
* @param postUrl 请求地址
* @return
*/
private static String doPostSoap(String postUrl, String requestCode, String requestParam, String soapAction) {
int socketTimeout = 60000;// 请求超时时间
int connectTimeout = 60000;// 传输超时时间
String retStr = "";
// 创建HttpClientBuilder
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
try {
//忽略SSL证书(https时需要证书)
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (arg0, arg1) -> true).build();
httpClientBuilder.setSSLContext(sslContext);
httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) {
throw new RuntimeException("Could not disable SSL on HttpClient builder.", e);
}
// HttpClient
CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
HttpPost httpPost = new HttpPost(postUrl);
// 设置请求和传输超时时间
RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(socketTimeout)
.setConnectTimeout(connectTimeout).build();
httpPost.setConfig(requestConfig);
try {
httpPost.setHeader("Content-Type", "text/xml;charset=UTF-8");
httpPost.setHeader("SOAPAction", soapAction);
StringEntity data = new StringEntity(String.format(WEBSERVICE_XML, requestCode, requestParam), Charset.forName("UTF-8"));
httpPost.setEntity(data);
CloseableHttpResponse response = closeableHttpClient
.execute(httpPost);
HttpEntity httpEntity = response.getEntity();
if (httpEntity != null) {
// 打印响应内容
retStr = EntityUtils.toString(httpEntity, "UTF-8");
//LOGGER.info("response:" + retStr);
}
// 释放资源
closeableHttpClient.close();
} catch (Exception e) {
LOGGER.error("文书编号:{};获取文书请求出错! 异常信息:{}", e.getMessage());
}
// if (retStr.contains(CDATA_START.replaceAll("\\\\", ""))) {
// retStr = retStr.replaceAll(CDATA_START, "");
// }
// if (retStr.contains("]]>")) {
// retStr = retStr.replaceAll("]]>", "");
// }
// if (retStr.contains("<content_html>")) {
// retStr = retStr.replaceAll("<content_html>", "<content_html><![CDATA[");
// retStr = retStr.replaceAll("</content_html>", "]]></content_html>");
// }
return retStr;
}
private static String doPostSoapNew(String postUrl, String requestCode, String requestParam, String soapAction) {
int socketTimeout = 60000;// 请求超时时间
int connectTimeout = 60000;// 传输超时时间
String retStr = "";
// 创建HttpClientBuilder
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
try {
//忽略SSL证书(https时需要证书)
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (arg0, arg1) -> true).build();
httpClientBuilder.setSSLContext(sslContext);
httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) {
throw new RuntimeException("Could not disable SSL on HttpClient builder.", e);
}
// HttpClient
CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
HttpPost httpPost = new HttpPost(postUrl);
// 设置请求和传输超时时间
RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(socketTimeout)
.setConnectTimeout(connectTimeout).build();
httpPost.setConfig(requestConfig);
try {
httpPost.setHeader("Content-Type", "text/xml;charset=UTF-8");
httpPost.setHeader("SOAPAction", soapAction);
StringEntity data = new StringEntity(String.format(WEBSERVICE_XML, requestCode, requestParam), Charset.forName("UTF-8"));
httpPost.setEntity(data);
CloseableHttpResponse response = closeableHttpClient
.execute(httpPost);
HttpEntity httpEntity = response.getEntity();
if (httpEntity != null) {
// 打印响应内容
retStr = EntityUtils.toString(httpEntity, "UTF-8");
//LOGGER.info("response:" + retStr);
}
// 释放资源
closeableHttpClient.close();
} catch (Exception e) {
LOGGER.error("文书编号:{};获取文书请求出错! 异常信息:{}", e.getMessage());
}
if (retStr.contains(CDATA_START.replaceAll("\\\\", ""))) {
retStr = retStr.replaceFirst(CDATA_START, "");
int i = retStr.lastIndexOf(CDATA_END);
retStr = retStr.substring(0, i) + retStr.substring(i + CDATA_END.length(), retStr.length());
}
if (retStr.contains("<content_html>")) {
retStr = retStr.replaceAll("<content_html>", "<content_html><![CDATA[");
retStr = retStr.replaceAll("</content_html>", "]]></content_html>");
}
return retStr;
}
@Override
public List<EmrContent> selectEmrContentList(String contentId, EmrRecord record, List<String> logMsg) throws Exception {
return null;
}
public static void main(String[] args) throws Exception {
String filePath = "C:/Users/Administrator/Desktop/emrFile/";
String ryjr = "MES0006根据就诊号获取入院记录.txt";
String bcjl = "MES0002根据就诊号获取患者病程记录.txt";
File file = new File(filePath + bcjl);
StringBuffer stringBuffer = new StringBuffer();
Scanner scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
stringBuffer.append(line);
}
scanner.close();
String retStr = stringBuffer.toString();
if (retStr.contains(CDATA_START.replaceAll("\\\\", ""))) {
retStr = retStr.replaceFirst(CDATA_START, "");
int i = retStr.lastIndexOf(CDATA_END);
retStr = retStr.substring(0, i) + retStr.substring(i + CDATA_END.length(), retStr.length());
}
if (retStr.contains("<content_html>")) {
retStr = retStr.replaceAll("<content_html>", "<content_html><![CDATA[");
retStr = retStr.replaceAll("</content_html>", "]]></content_html>");
}
Document document = XmlTool.strToDocument(retStr);
Element rootElement = document.getRootElement();
Element GetHISInfoResponse = rootElement.element("Body").element("GetHISInfoResponse");
Element getHISInfoResult = GetHISInfoResponse.element("GetHISInfoResult");
LinkedList<EmrContent> emrContents = Lists.newLinkedList();
try {
if (null != getHISInfoResult) {
Element root = getHISInfoResult.element("root");
if (null != root) {
List<Element> elements = root.elements();
for (Element element : elements) {
EmrContent content = new EmrContent();
String contentId = element.elementText("content_id");
contentId = contentId.replaceAll("\\|\\|", "_");
content.setContentId(contentId);
content.setTitle(element.elementText("title"));
content.setEmrId(element.elementText("emr_id"));
content.setShowUrl(element.elementText("content_html").replaceFirst(CDATA_START, "").replaceAll(CDATA_END, ""));
content.setShowOrder(element.elementText("show_order"));
String contentTime = element.elementText("content_time");
content.setContentTime(DateUtils.stringToDate(contentTime, DateUtils.DATE_TIME_FORMAT));
content.setRecordId(element.elementText("record_id"));
try {
Element NInstanceData = element.element("content_xml").element("NInstanceData");
if (null == NInstanceData) {
NInstanceData = element.element("content_xml").element("Document").element("StructuredBody").element("NInstanceData");
}
if (null != NInstanceData) {
String xml = "";
Element abiword = NInstanceData.element("abiword");
if (null != abiword) {
List<Element> abiwords = abiword.elements();
for (Element e : abiwords) {
if ("section".equals(e.getName())) {
//仅取第一个 section
Element data = abiword.element("data");
if (null != data) {
Element data1 = e.addElement("data");
List<Element> elementsB = data.elements("d");
Element elB = elementsB.get(0);
data1.setText("data:image/jpeg;base64," + elB.getText());
}
xml = e.asXML();
if (xml.contains("xmlns")) {
xml = xml.replace("xmlns=\"http://www.abisource.com/awml.dtd\"", "");
}
content.setContentXml(xml);
break;
}
}
} else {
Element iEditor = NInstanceData.element("iEditor");
if (null != iEditor) {
xml = xml + iEditor.asXML();
if (xml.contains("xmlns")) {
xml = xml.replace("xmlns=\"http://www.abisource.com/awml.dtd\"", "");
}
content.setContentXml(xml);
}
}
} else {
}
} catch (Exception e) {
continue;
}
if (StringUtils.isNotBlank(content.getContentId())) {
emrContents.add(content);
}
}
}
}
} catch (Exception e) {
}
int size = emrContents.size();
}
}
package com.hanyun.hip.mrqc.jms.api;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hanyun.hip.mrqc.jms.constants.JmsConstant;
import com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig;
import com.hanyun.hip.mrqc.jms.service.IMrqcEmrConfigService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.util.ShiroUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
;
/**
* 通大分配规则数据控制层
*/
@Controller
@RequestMapping("/jms/manageRecord")
public class TdfyManageRecordController extends BaseController {
public static final Logger LOGGER = LoggerFactory.getLogger(TdfyManageRecordController.class);
@Autowired
private IMrqcEmrConfigService mrqcEmrConfigService;
@RequestMapping(value = "/saveDistributeRule", method = RequestMethod.POST)
@ResponseBody
public AjaxResult saveDistributeRule(@RequestBody JSONObject jsonObject) {
AjaxResult ret;
try {
MrqcEmrConfig mrqcEmrConfig = new MrqcEmrConfig();
jsonObject.keySet().forEach(key -> {
mrqcEmrConfig.setConfigKey(key);
if(key.equals(JmsConstant.EMRS_PERDAY)){
mrqcEmrConfig.setConfigValue(jsonObject.getString(key));
mrqcEmrConfig.setCreateTime(DateUtils.getNowDate());
mrqcEmrConfig.setUpdateTime(DateUtils.getNowDate());
mrqcEmrConfig.setCreateBy(ShiroUtils.getLoginName());
}else if(key.equals(JmsConstant.EMS)){
JSONArray value=jsonObject.getJSONArray(key);
mrqcEmrConfig.setConfigValue(value.toJSONString());
mrqcEmrConfig.setCreateTime(DateUtils.getNowDate());
mrqcEmrConfig.setUpdateTime(DateUtils.getNowDate());
mrqcEmrConfig.setCreateBy(ShiroUtils.getLoginName());
}
MrqcEmrConfig mrqcEmrConfigTemp =mrqcEmrConfigService.selectMrqcEmrConfigByKey(key);
if(mrqcEmrConfigTemp!=null){
mrqcEmrConfigService.deleteMrqcEmrConfigByIds(mrqcEmrConfigTemp.getConfigId().toString());
}
mrqcEmrConfigService.insertMrqcEmrConfig(mrqcEmrConfig);
});
ret = AjaxResult.success();
} catch (Exception e) {
logger.error("保存分配规则异常", e);
ret = AjaxResult.error("保存分配规则异常," + e);
}
return ret;
}
}
package com.hanyun.hip.mrqc.jms.api;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import cn.hutool.setting.Setting;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.hanyun.hip.mrqc.common.EmrETLApi;
import com.hanyun.hip.mrqc.common.PageRequest;
import com.hanyun.hip.mrqc.common.impl.Wx9yEmrETLApi;
import com.hanyun.hip.mrqc.service.constant.ContentConstant;
import com.hanyun.hip.mrqc.service.entity.*;
import com.hanyun.hip.mrqc.service.entity.mdb.MdbObject;
import com.hanyun.hip.mrqc.service.entity.mdb.MdbObjectAttr;
import com.hanyun.hip.mrqc.service.service.IMrqcEtlService;
import com.hanyun.hip.mrqc.service.util.CommonUtil;
import com.hanyun.hip.mrqc.service.util.DateUtils;
import com.hanyun.hip.mrqc.service.util.HtmlUtils;
import oracle.sql.BLOB;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.BigDecimalConverter;
import org.apache.commons.beanutils.converters.DateConverter;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.sql.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.*;
import java.util.regex.Matcher;
/**
* @author yrl
* @version V1.0
* @Title: Wx9yEmrETLApi.java
* @Package com.hanyun.hip.mrqc.common.impl
* @Description: 无锡九院病历抽提服务
* @date 2021年1月26日
*/
@Service("Wx9yEmrETLApiNew")
public class Wx9yEmrETLApiNew implements EmrETLApi {
private static JdbcTemplate wxjyJdbcTemplate = new JdbcTemplate();
private static JdbcTemplate wxjyBasyJdbcTemplate = new JdbcTemplate();
private static final Logger LOGGER = LoggerFactory.getLogger(Wx9yEmrETLApi.class);
static {
Setting poolSetting = new Setting();
poolSetting.put("initialSize", "20");
poolSetting.put("maxActive", "100");
poolSetting.put("maxWait", "60000");
poolSetting.put("validationQuery", "SELECT 1 FROM DUAL");
wxjyJdbcTemplate.setDataSource(createDataSource("jdbc:oracle:thin:@129.1.1.20:1521/dbserver",
"oracle.jdbc.driver.OracleDriver", "hanyun", "hanyun", poolSetting));
// 最新无锡九院提交的His病案首页数据库连接
wxjyBasyJdbcTemplate.setDataSource(createDataSource("jdbc:oracle:thin:@129.1.8.178:1521/dbserver",
"oracle.jdbc.driver.OracleDriver", "ek_thdhanyun", "ek_thdhanyun123", poolSetting));
}
protected static DruidDataSource createDataSource(String jdbcUrl, String driver, String user, String pass,
Setting poolSetting) {
final DruidDataSource ds = new DruidDataSource();
ds.setUrl(jdbcUrl);
ds.setDriverClassName(driver);
ds.setUsername(user);
ds.setPassword(pass);
// 规范化属性名
Properties druidProps = new Properties();
String keyStr;
for (Map.Entry<String, String> entry : poolSetting.entrySet()) {
keyStr = StrUtil.addPrefixIfNot(entry.getKey(), "druid.");
druidProps.put(keyStr, entry.getValue());
}
// 连接池信息
ds.configFromPropety(druidProps);
// 检查关联配置,在用户未设置某项配置时,
if (null == ds.getValidationQuery()) {
// 在validationQuery未设置的情况下,以下三项设置都将无效
ds.setTestOnBorrow(false);
ds.setTestOnReturn(false);
ds.setTestWhileIdle(false);
}
return ds;
}
List<MrqcDatasource> mrqcDatasourceList = new ArrayList<MrqcDatasource>() {
private static final long serialVersionUID = 1L;
{
add(new MrqcDatasource("EmrRecord", "EmrRecord", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.8.178:1521/dbserver", "ek_thdhanyun", "ek_thdhanyun123", "电子病历记录数据源",
"EmrRecord",
"select HDSD00_11_006||'_'||HDSD00_11_139 as record_id, HDSD00_11_006 as patient_num\n" +
"'1001500' as hospit_code,'无锡市第九人民医院' as hospit_name,HDSD00_11_006||HDSD00_11_139 as hospit_num,HDSD00_11_110 as patient_name,\n" +
" decode(HDSD00_11_109,'1','男','女' )as patient_sex,HDSD00_11_014 as birthday,HDSD00_11_079 as age , '1' as auto,decode(HDSD00_11_019,NULL,'1','4') as emr_status,HDSD00_11_075 as diagnosis_code,\n" +
" HDSD00_11_076 as diagnosis_name,HDSD00_11_141 as hospit_doctor, '' as record_score,\n" +
"(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_083) as department_name ,\n" +
"HDSD00_11_083 AS department_code,(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_084) as inpatient_area,\n" +
"HDSD00_11_084 AS inpatient_code,HDSD00_11_019 as hospit_time,HDSD00_11_085 as in_time,HDSD00_11_019 as out_time\n" +
" from ek_thdhanyun.his_ddinp_basy where HDSD00_11_019 is not null",
"select HDSD00_11_006||'_'||HDSD00_11_139 as record_id, HDSD00_11_006 as patient_num, \n" +
"'1001500' as hospit_code,'无锡市第九人民医院' as hospit_name,HDSD00_11_006||HDSD00_11_139 as hospit_num,HDSD00_11_110 as patient_name,\n" +
" decode(HDSD00_11_109,'1','男','女' )as patient_sex,HDSD00_11_014 as birthday,HDSD00_11_079 as age , '1' as auto,decode(HDSD00_11_019,NULL,'1','4') as emr_status,HDSD00_11_075 as diagnosis_code,\n" +
" HDSD00_11_076 as diagnosis_name,HDSD00_11_141 as hospit_doctor, '' as record_score,\n" +
"(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_084) as inpatient_area,\n" +
"HDSD00_11_084 AS inpatient_code,(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_083) as department_name,\n" +
"HDSD00_11_083 AS department_code,HDSD00_11_019 as hospit_time,HDSD00_11_085 as in_time,HDSD00_11_019 as out_time\n" +
" from ek_thdhanyun.his_ddinp_basy where record_id = ?",
""));
add(new MrqcDatasource("EmrContent", "EmrContent", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.1.103:1521:jhemr", "EMRZK", "EMRZK", "电子病历文书数据源",
"EmrContent",
"SELECT EFCH.FILE_UNIQUE_ID || '__' || replace(EFCH.mr_code,'.','_') AS content_id, NULL AS emr_id, EFCH.PATIENT_ID || '_' || EFCH.VISIT_ID AS record_id, EFCH.TOPIC AS title, EFCH.MR_CONTENT AS content_text, EFCC.MR_CONTENT AS content_xml, EFCH.FILE_NO AS show_order, EFCH.first_mr_sign_date_time AS content_time FROM EMRZK_FILE_CONTENT_HTM EFCH LEFT JOIN EMRZK_FILE_CONTENT_CDA EFCC ON EFCH.FILE_UNIQUE_ID = EFCC.FILE_UNIQUE_ID",
"SELECT EFCH.FILE_UNIQUE_ID || '__' || replace(EFCH.mr_code,'.','_') AS content_id, NULL AS emr_id, EFCH.PATIENT_ID || '_' || EFCH.VISIT_ID AS record_id, EFCH.TOPIC AS title, EFCH.MR_CONTENT AS content_text, EFCC.MR_CONTENT AS content_xml, EFCH.FILE_NO AS show_order, EFCH.first_mr_sign_date_time AS content_time FROM EMRZK_FILE_CONTENT_HTM EFCH LEFT JOIN EMRZK_FILE_CONTENT_CDA EFCC ON EFCH.FILE_UNIQUE_ID = EFCC.FILE_UNIQUE_ID WHERE EFCH.PATIENT_ID = ? and EFCH.VISIT_ID = ?",
""));
add(new MrqcDatasource("EmrPageRecord", "EmrPageRecord", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.8.178:1521/dbserver", "ek_thdhanyun", "ek_thdhanyun123", "电子病历病案首页数据源",
"EmrPageRecord",
"select * from ek_thdhanyun.his_ddinp_basy ",
"select * from ek_thdhanyun.his_ddinp_basy where record_id = ?",
""));
add(new MrqcDatasource("EmrMedicalRecord", "EmrMedicalRecord", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.8.178:1521/dbserver", "ek_thdhanyun", "ek_thdhanyun123", "病程记录--医嘱"
, "EmrMedicalRecord"
, "SELECT * FROM his_ddinp_order t ORDER BY t.\"医嘱主号\" "
, "SELECT * FROM his_ddinp_order t WHERE t.\"住院号\"= ? and t.就诊次数 = ? ORDER BY t.\"医嘱主号\" ",
""));
// // 检验申请单
// add(new MrqcDatasource("EmrLisApplyRecord", "EmrLisApplyRecord", "oracle",
// "oracle.jdbc.driver.OracleDriver",
// "jdbc:oracle:thin:@129.1.1.20:1521/dbserver", "hanyun", "hanyun", "病程记录--检验申请单"
// , "EmrLisApplyRecord"
// , "select * from hanyun.his_hhlab_req t order by t.申请时间"
// , "select * from hanyun.his_hhlab_req t where t.住院号 = ? and t.就诊次数 = ? order by t.申请时间", ""));
// // 检查申请单
// add(new MrqcDatasource("EmrPacsApplyRecord", "EmrPacsApplyRecord", "oracle",
// "oracle.jdbc.driver.OracleDriver",
// "jdbc:oracle:thin:@129.1.1.20:1521/dbserver", "hanyun", "hanyun", "病程记录--检查申请单"
// , "EmrPacsApplyRecord"
// , "select * from hanyun.his_hhexam_req t order by t.申请时间"
// , "select * from hanyun.his_hhexam_req t where t.住院号 = ? and t.就诊次数 = ? order by t.申请时间", ""));
// // 手术通知单
// add(new MrqcDatasource("EmrOpeNoticeRecord", "EmrOpeNoticeRecord", "oracle",
// "oracle.jdbc.driver.OracleDriver",
// "jdbc:oracle:thin:@129.1.1.20:1521/dbserver", "hanyun", "hanyun", "知情同意书--手术通知单"
// , "EmrOpeNoticeRecord"
// , "select * from hanyun.his_hhinp_operation_schedule t order by t.结束时间"
// , "select * from hanyun.his_hhinp_operation_schedule t where t.住院号 = ? and 住院次数 = ? order by t.结束时间", ""));
// // 会诊记录
// add(new MrqcDatasource("EmrConsultationRecord", "EmrConsultationRecord", "oracle",
// "oracle.jdbc.driver.OracleDriver",
// "jdbc:oracle:thin:@129.1.1.20:1521/dbserver", "hanyun", "hanyun", "病程记录--会诊申请"
// , "EmrConsultationRecord"
// , "SELECT * FROM hanyun.hhapply_diagnosis_record t order by t.会诊时间"
// , "SELECT * FROM hanyun.hhapply_diagnosis_record t where t.住院号 = ? and 就诊次数 = ? order by t.会诊时间", ""));
// add(new MrqcDatasource("EmrNursingRecord", "EmrNursingRecord", "oracle",
// "oracle.jdbc.driver.OracleDriver",
// "jdbc:oracle:thin:@129.1.1.218:1521:WXJYKYEE", "hanyun", "hanyun", "电子病历护理数据源",
// "EmrNursingRecord",
// "SELECT * FROM V_KYEE_RECORDS",
// "SELECT * FROM V_KYEE_RECORDS v WHERE v.HDSD00_08_095 = ? and v.visit_id = ?",
// ""));
add(new MrqcDatasource("EmrLisRecord", "EmrLisRecord", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.1.71:1521/oraclelis", "nis", "admin123", "病程记录--检验",
"EmrLisRecord",
"SELECT * FROM dbo.hy_lis_result t",
"select b.结果, c.* from (SELECT a.报告单号, a.病人编号, wmsys.wm_concat(a.结果) 结果 FROM (SELECT T.*, '</br>' || t.检验结果名称 || ':' || t.检验结果 || '(' || t.检验计量单位 || ')' 结果 FROM dbo.hy_lis_result t) a group by a.报告单号, a.病人编号) b left join (SELECT distinct T.报告单号, t.病人编号, t.就诊次数, t.标本, t.检验项目名称, t.检验人员, t.检验日期 FROM dbo.hy_lis_result t) c on b.报告单号 = c.报告单号 where b.病人编号 = ? and c.就诊次数 = ? order by c.检验日期",
""));
add(new MrqcDatasource("EmrPacsRecord", "EmrPacsRecord", "sqlserver"
, "com.microsoft.sqlserver.jdbc.SQLServerDriver"
, "jdbc:sqlserver://129.1.1.2:1433;databasename=eBL", "sa", "eWorldPACS", "病程记录--检查"
, "EmrPacsRecord"
, "select * from view_1 a order by a.exam_date_time"//-------------------------------------缺少第几次就诊
, "select * from view_1 a where a.patient_id = ? and 1 = ? order by a.exam_date_time", ""));
// 手麻系统
add(new MrqcDatasource("EmrSurgeryRecord", "EmrSurgeryRecord", "oracle",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@129.1.1.213:1521/docare", "jx", "jx", "手术记录--麻醉记录",
"EmrSurgeryRecord",
"select * from medsurgery.v_mzd",
"select * from medsurgery.v_mzd t where t.会员号 = ? and t.就诊次数 = ? ",
""));
}
};
@Override
public List<EmrRecord> selectEmrRecordList(String hospitalCode, String recordId, String hospitalNum, Date beginDate, Date endDate,
PageRequest pager, List<String> logMsg, Boolean notExtract) throws Exception {
List<EmrRecord> result = new ArrayList<EmrRecord>();
if (!CollectionUtils.isEmpty(mrqcDatasourceList)) {
for (MrqcDatasource mrqcDatasource : mrqcDatasourceList) {
String emrType = mrqcDatasource.getEmrType();
String emrSql = mrqcDatasource.getEmrSql();
String oneEmrSql = mrqcDatasource.getOneEmrSql();
if ("EmrRecord".equalsIgnoreCase(emrType)) {
DruidDataSource druidDataSource = CommonUtil.getDruidDataSource(mrqcDatasource);
if (druidDataSource == null) {
continue;
}
List<EmrRecord> temp = null;
if (!StringUtils.isEmpty(recordId)) { // 查询一条记录
temp = executeSql(druidDataSource, oneEmrSql, EmrRecord.class, recordId);
} else if (beginDate != null && endDate != null) {
emrSql = "select * from (" + emrSql + ") a where a.out_time>=? and a.out_time<=?";
emrSql = emrSql + " union all \n" +
"\tselect HDSD00_11_006||'_'||HDSD00_11_139 as record_id, HDSD00_11_006 as patient_num, RECORD_ID as hisRecordId,\n" +
"'1001500' as hospit_code,'无锡市第九人民医院' as hospit_name,HDSD00_11_006||HDSD00_11_139 as hospit_num,HDSD00_11_110 as patient_name,\n" +
" decode(HDSD00_11_109,'1','男','女' )as patient_sex,HDSD00_11_014 as birthday,HDSD00_11_079 as age , '1' as auto,1 as emr_status,HDSD00_11_075 as diagnosis_code,\n" +
" HDSD00_11_076 as diagnosis_name,HDSD00_11_141 as hospit_doctor, '' as record_score,\n" +
"(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_084) as inpatient_area,\n" +
"HDSD00_11_084 AS inpatient_code,(select ITEMNAME from ek_thdhanyun.his_dict where ITEMCODE = HDSD00_11_083) as department_name,\n" +
"HDSD00_11_083 AS department_code,HDSD00_11_019 as hospit_time,HDSD00_11_085 as in_time,HDSD00_11_019 as out_time\n" +
"from ek_thdhanyun.his_ddinp_basy where HDSD00_11_019 is null";
temp = executeSqlByPage(druidDataSource, emrSql, EmrRecord.class, " order by out_time ",
pager, beginDate, endDate);
} else if (beginDate != null) {
emrSql = "select * from (" + emrSql + ") a where a.out_time>=?";
temp = executeSqlByPage(druidDataSource, emrSql, EmrRecord.class, " order by out_time ",
pager, beginDate);
} else if (endDate != null) {
emrSql = "select * from (" + emrSql + ") a where a.out_time<=?";
temp = executeSqlByPage(druidDataSource, emrSql, EmrRecord.class, " order by out_time ",
pager, endDate);
} else { // 查询全部记录
temp = executeSqlByPage(druidDataSource, emrSql, EmrRecord.class, " order by out_time ",
pager);
}
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
}
}
}
return result;
}
// 根据结束时间获取一天的病例数据
@Override
public Date getDefaultBeginDate(String hospitalCode) {
Date endDate = getDefaultEndDate();
if (endDate != null) {
try {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.DATE, -2);
String dateStr = sdfTime.format(calendar.getTime());
return sdfTime.parse(dateStr);
} catch (Exception ignore) {
return null;
}
}
return null;
}
@Override
public List<EmrContent> selectEmrContentList(EmrRecord record, List<String> logMsg) throws Exception {
// 一进来就设置不自动转换JSON
EmrContent.isAutoJson = false;
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(mrqcDatasourceList)) {
for (MrqcDatasource mrqcDatasource : mrqcDatasourceList) {
DruidDataSource druidDataSource = CommonUtil.getDruidDataSource(mrqcDatasource);
if (druidDataSource == null) {
continue;
}
String emrType = mrqcDatasource.getEmrType();
String oneEmrSql = mrqcDatasource.getOneEmrSql();
String recordId = record.getRecordId();
if ("EmrContent".equalsIgnoreCase(emrType)) { // 获取病历文书
String[] params = recordId.split("_");
List<EmrContent> temp = executeSql(druidDataSource, oneEmrSql, EmrContent.class, params[0], params[1]);
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
} else if ("EmrPageRecord".equalsIgnoreCase(emrType)) { // 获取病案首页文书
// 病案首页进行了升级,所以这里recordId,用字段searchValue字段代替
List<EmrContent> temp = extractEmrPageRecord(druidDataSource, oneEmrSql, recordId);
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
// } else if ("EmrNursingRecord".equalsIgnoreCase(emrType)) { // 获取护理文书
// List<EmrContent> temp = extractEmrNursingRecord(druidDataSource, oneEmrSql, recordId);
// if (!CollectionUtils.isEmpty(temp)) {
// result.addAll(temp);
// }
} else if ("EmrMedicalRecord".equalsIgnoreCase(emrType)) { // 获取医嘱
List<EmrContent> temp = extractEmrMedicalRecord(druidDataSource, oneEmrSql, recordId);
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
} else if ("EmrLisRecord".equalsIgnoreCase(emrType)) { // 获取检验报告
List<EmrContent> temp = extractEmrLISRecord(druidDataSource, oneEmrSql, recordId);
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
} else if ("EmrPacsRecord".equalsIgnoreCase(emrType)) { // 获取检查报告
List<EmrContent> temp = extractEmrPacsRecord(druidDataSource, oneEmrSql, recordId);
if (!CollectionUtils.isEmpty(temp)) {
result.addAll(temp);
}
// } else if ("EmrLisApplyRecord".equalsIgnoreCase(emrType)) { // 获取检验申请单
// List<EmrContent> temp = extractEmrLisApplyRecord(druidDataSource, oneEmrSql, recordId);
// if (!CollectionUtils.isEmpty(temp)) {
// result.addAll(temp);
// }
// } else if ("EmrPacsApplyRecord".equalsIgnoreCase(emrType)) { // 获取检查申请单
// List<EmrContent> temp = extractEmrPacsApplyRecord(druidDataSource, oneEmrSql, recordId);
// if (!CollectionUtils.isEmpty(temp)) {
// result.addAll(temp);
// }
// } else if ("EmrOpeNoticeRecord".equalsIgnoreCase(emrType)) { // 获取手术通知单
// List<EmrContent> temp = extractEmrOpeNoticeRecord(druidDataSource, oneEmrSql, recordId);
// if (!CollectionUtils.isEmpty(temp)) {
// result.addAll(temp);
// }
// } else if ("EmrConsultationRecord".equalsIgnoreCase(emrType)) { // 获取会诊申请
// List<EmrContent> temp = extractEmrConsultationRecord(druidDataSource, oneEmrSql, recordId);
// if (!CollectionUtils.isEmpty(temp)) {
// result.addAll(temp);
// }
} else if ("EmrSurgeryRecord".equalsIgnoreCase(emrType)) { // 获取手麻系统数据
// 手麻系统对接
List<EmrContent> smlist = getSmEmrContentList(druidDataSource, oneEmrSql, record);
if (!CollectionUtils.isEmpty(smlist)) {
result.addAll(smlist);
}
}
}
}
LOGGER.info("emrrecord" + JSONUtil.toJsonStr(record));
// 重症系统对接
List<EmrContent> zzlist = getZzEmrContentList(record);
if (!CollectionUtils.isEmpty(zzlist)) {
result.addAll(zzlist);
}
return result;
}
/**
* 手麻系统接口
* @param record
* @return
*/
public static List<EmrContent> getSmEmrContentList(DruidDataSource druidDataSource, String emrSql, EmrRecord record) {
List<EmrContent> result = new ArrayList<>();
CloseableHttpClient httpclient = HttpClients.createDefault();
String hisVisitId = record.getHospitNum().replace(record.getPatientNum(),"");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
HttpPost post = new HttpPost("http://129.1.1.213/EmrView/Emr/GetEmrList?MrClass=麻醉&PatientID=" + record.getPatientNum()
+ "&VisitID=" + hisVisitId + "&StrStartDate=&StrEndDate=");
try {
CloseableHttpResponse httpResponse = httpclient.execute(post);
int statusCode = httpResponse.getStatusLine().getStatusCode();
HttpEntity resEntity = httpResponse.getEntity();
if (resEntity != null && 200 == statusCode) {
String str = EntityUtils.toString(resEntity, "UTF-8");
JSONObject json1 = JSON.parseObject(str);
Object resValue = json1.get("resValue");
if(null != resValue){
JSONArray arry = JSONArray.parseArray(resValue.toString());
// 手麻接口返回的文书列表
List<Map<String, Object>> resultList = (List) arry;
int j = 0;
for(Map<String, Object> tempMap : resultList){
String archiveDate = tempMap.get("ARCHIVE_DATE").toString();
String fileName = tempMap.get("FileNAME").toString();
String path = tempMap.get("PATH").toString();
EmrContent emrContent = new EmrContent();
emrContent.setContentId("sm_" + record.getRecordId() + j);
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
emrContent.setContentTime(sdf.parse(archiveDate));
emrContent.setTitle(fileName);
emrContent.setRecordId(record.getRecordId());
emrContent.setCreateBy("admin");
emrContent.setCreateTime(sdf.parse(archiveDate));
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(sdf.parse(archiveDate));
if(fileName.contains("同意书")){
emrContent.setEmrId("emr05");
} else if(fileName.contains("麻醉记录单") || fileName.contains("访视")) {
emrContent.setEmrId("emr07");
// 麻醉记录StructJson,其他手麻系统的文书没有StructJson
if(fileName.contains("麻醉记录单")){
Map<String, List<Map<String, Object>>> map = Maps.newHashMap();
// 查询麻醉记录
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, record.getRecordId());
if(null != allColumnNameAndValue && allColumnNameAndValue.size() > 0){
for(int idx = 0; idx < allColumnNameAndValue.size(); idx++){
// 查询麻醉记录对应的备注栏数据
Map<String, Object> mzjl = allColumnNameAndValue.get(idx);
emrSql = "select * from med_anesthesia_event t where t.patient_id = ? and t.visit_id = ?";
if(null != mzjl.get("手术ID")){
emrSql = emrSql + " and t.oper_id = '" + mzjl.get("手术ID") + "'";
}
List<Map<String, Object>> bzList = getALLColumnNameAndValue(druidDataSource, emrSql, record.getRecordId());
if(null != bzList && bzList.size() > 0){
mzjl.put("bzContent", bzList);
}
}
}
map.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(map));
}
} else {
emrContent.setEmrId("emr06");
}
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jyTableHtml = new StringBuffer();
String uri = "http://129.1.1.213/EmrView/View?FilePath=" + path + "&dateTime=1623033444000";
jyTableHtml.append("<iframe id='' src='" + uri + "' style='width:100%;height:100%;'></iframe>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jyTableHtml.toString())));
result.add(emrContent);
j++;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
/**
* 重症系统接口调用
* @param record
* @return
*/
public static List<EmrContent> getZzEmrContentList(EmrRecord record) {
List<EmrContent> result = new ArrayList<>();
CloseableHttpClient httpclient = HttpClients.createDefault();
// String hisVisitId = record.getHospitNum().replace(record.getPatientNum(),"");
String[] split = record.getRecordId().split("_");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
HttpGet httpget = new HttpGet("http://129.1.1.220:8089/api/WorkStation/Document/GetDocumentDataByHisPatientId?hisPatientId=" + split[0]+"_"+split[1]
+ "&hisVisitId=" + split[1] + "&documentCode=CARE_DOC_WXJYF&startTime=" + format.format(record.getInTime()) + "&endTime=" + format.format(null == record.getOutTime()? new Date() : record.getOutTime()));
// HttpGet httpget = new HttpGet("http://129.1.1.220:8089/api/WorkStation/Document/GetDocumentDataByHisPatientId?hisPatientId=202112733&hisVisitId=1&documentCode=CARE_DOC_WXJYF&startTime=2021-06-06&endTime=2021-06-07");
try {
CloseableHttpResponse httpResponse = httpclient.execute(httpget);
int statusCode = httpResponse.getStatusLine().getStatusCode();
HttpEntity resEntity = httpResponse.getEntity();
if (resEntity != null && 200 == statusCode) {
String str = EntityUtils.toString(resEntity, "UTF-8");
JSONObject json1 = JSON.parseObject(str);
if(null != json1.get("RetObj")){
String retObj = json1.get("RetObj").toString();
JSONObject jsonRetObj = JSON.parseObject(retObj);
Object NursingMemoList = jsonRetObj.get("NursingMemoList");
if(null != NursingMemoList){
JSONArray arry = JSONArray.parseArray(NursingMemoList.toString());
List<Map<String, Object>> nursingList = (List) arry;
EmrContent emrContent = new EmrContent();
emrContent.setContentId("zz_" + record.getRecordId());
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setTitle("病重(病危)护理记录");
emrContent.setRecordId(record.getRecordId());
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> map = Maps.newHashMap();
map.put("datas", nursingList);
emrContent.setStructJson(JSON.toJSONString(map));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jyTableHtml = new StringBuffer(ContentConstant.EMRZZRECORD_HTML_TITLE);
int j = 0;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
for (Map<String, Object> tempMap : nursingList) {
jyTableHtml.append( " <tr data-index=\"" + j + "\">\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( tempMap.get("TimePoint").toString().substring(0,10) + "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( tempMap.get("TimePoint").toString().substring(11,16) + "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( tempMap.get("NursingDesc")+ "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( tempMap.get("CreatorName") + "</td>\r\n" + " </tr>");
j++;
}
jyTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jyTableHtml.toString())));
result.add(emrContent);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
/**
* 组装护理记录单
*
* @param druidDataSource
* @param oneEmrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrNursingRecord(DruidDataSource druidDataSource, String oneEmrSql, String recordId) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, oneEmrSql, recordId);
// LOGGER.info("抽取护理记录单: 记录编号 = {}, 护理记录条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = null;
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
result = new ArrayList<>();
Map<String, String> emrContentMap = Maps.newHashMap();
for ( int k = 0; k < allColumnNameAndValue.size(); k++) {
Map<String, Object> map = allColumnNameAndValue.get(k);
StringBuilder htmlTr = new StringBuilder();
htmlTr.append("<tr data-index=\"" + k + "\">\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_052")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_075")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_041")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_025")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("血压")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_081")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("意识")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_080")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("伤口敷料外观")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("瞳孔大小左")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("瞳孔大小右")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("瞳孔对光反应左")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("瞳孔对光反应右")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("入量名称")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("入量量")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("出量名称")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("出量量")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("管道名称")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("管道量")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("病情观察与护理")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("HDSD00_08_033")) + "</td>\r\n");
htmlTr.append("</tr>\r\n");
String title = map.get("THEME_CODE").toString();
if (emrContentMap.containsKey(title)) {
String contentText = emrContentMap.get(title) + htmlTr.toString();
emrContentMap.put(title, contentText);
} else {
emrContentMap.put(title, htmlTr.toString());
}
}
String htmlHead = ContentConstant.HTML_HEAD;
String jcTableHtml = ContentConstant.NURSING_RECORDS_HTML_BODY;
int j = 1;
for (Map.Entry<String, String> entry : emrContentMap.entrySet()) {
EmrContent content = new EmrContent();
Date date = new Date();
content.setContentId("hljld_" + recordId + '_' + j);
content.setRecordId(recordId);
content.setContentTime(date);
content.setCreateBy("admin");
content.setCreateTime(date);
content.setEmrId("emr06");
content.setShowOrder("1");
content.setUpdateBy("admin");
content.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
content.setStructJson(JSON.toJSONString(maps));
content.setTitle(entry.getKey());// 护理记录单\科室护理记录单
String htmlTbody = jcTableHtml.replaceAll("\\$\\{htmlTbody\\}", Matcher.quoteReplacement(entry.getValue()));//htmlTr.toString()
content.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", htmlTbody));
result.add(content);
htmlTbody = null;
maps = null;
j++;
}
}
return result;
}
/**
* 默认获取昨天00点为取数开始时间
*
* @return
*/
// @Override
public Date getDefaltBeginDate(String hospitalCode) {
try {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.MONTH, -1);
String dateStr = sdfDay.format(calendar.getTime()) + " 00:00:00";
return sdfTime.parse(dateStr);
} catch (Exception e) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.MONTH, -1);
String dateStr = sdfDay.format(calendar.getTime()) + " 00:00:00";
try {
return sdfTime.parse(dateStr);
} catch (ParseException e1) {
e1.printStackTrace();
}
}
return null;
}
@Override
public void writeEndDate(Date endDate) {
String hospitalCode = hospitalUSCC;// 根据条件批量更新
String dateStr = sdfTime.format(endDate);
try {
FileUtils.writeStringToFile(CommonUtil.getGxsjFile(hospitalCode), dateStr, "utf-8");
System.out.println("设置最大更新时间:" + CommonUtil.getGxsjFile(hospitalCode).getAbsolutePath());
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 动态分页执行sql语句
*
* @param <T>
* @param druidDataSource
* @param executeSql
* @param clazz
* @param parameters
* @return
* @throws Exception
*/
private <T> List<T> executeSqlByPage(DruidDataSource druidDataSource, String executeSql, Class<T> clazz,
String orderBy, PageRequest pager, Object... parameters) throws Exception {
PreparedStatement stmt = null;
ResultSet rs = null;
DruidPooledConnection conn = null;
Integer startIndex = pager.getStartIndex();
Integer pageSize = pager.getPageSize();
try {
PageParam pp = new PageParam(executeSql, orderBy, startIndex.intValue(), pageSize.intValue());
String pageSql = pp.getPageSqlByDbType(druidDataSource.getDbType());
return executeSql(druidDataSource, pageSql, clazz, parameters);
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
JdbcUtils.close(rs);
JdbcUtils.close(stmt);
JdbcUtils.close(conn);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
return null;
}
/**
* 动态执行sql语句
*
* @param <T>
* @param druidDataSource
* @param executeSql
* @param clazz
* @param parameters
* @return
* @throws Exception
*/
public <T> List<T> executeSql(DruidDataSource druidDataSource, String executeSql, Class<T> clazz,
Object... parameters) throws Exception {
List<T> ret = new ArrayList<T>();
PreparedStatement stmt = null;
ResultSet rs = null;
DruidPooledConnection conn = null;
try {
conn = druidDataSource.getConnection();
stmt = conn.prepareStatement(executeSql);
setParameters(stmt, parameters);
// LOGGER.info("抽取病历文书:executeSql: {}, 参数:{} , preparedSql: {}", executeSql, Arrays.asList(parameters), stmt.toString());
rs = stmt.executeQuery();
ResultSetMetaData rsMeta = rs.getMetaData();
Set<String> pkids = new HashSet<String>();
while (rs.next()) {
Map<String, Object> row = new LinkedHashMap<String, Object>();
boolean isContinue = false;
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columName = rsMeta.getColumnLabel(i + 1);
Object value = rs.getObject(i + 1);
if (value instanceof Clob) {
value = CommonUtil.ClobToString((Clob) value);
}
if(value instanceof BLOB){
// 无语了都两个不是同一个字符集
if(StringUtils.endsWithIgnoreCase(columName,"content_xml")){
value = CommonUtil.BLOBToString((BLOB) value, StandardCharsets.UTF_8);
} else { // content_text
value = CommonUtil.BLOBToString((BLOB) value, Charset.forName("GBK"));
// 要对HTML格式进行校验并修正,否则展示可能有问题
value = HtmlUtils.formatFix((String) value);
}
}
if ("outTime".equals(CommonUtil.lineToHump(columName)) || "inTime".equals(CommonUtil.lineToHump(columName)) || "hospitTime".equals(CommonUtil.lineToHump(columName))) {
if (ObjectUtil.isNotEmpty(value)){
value = DateUtil.parse(value.toString(), "yyyy-MM-dd HH:mm:ss");
}
}
// 临时用一下,这个是His登记的患者ID,暂时用searchValue来进行代替
if ("hisRecordId".equals(CommonUtil.lineToHump(columName))) {
if (ObjectUtil.isNotEmpty(value)) {
row.put(CommonUtil.lineToHump("searchValue"), value);
continue;
}
}
if ("birthday".equals(CommonUtil.lineToHump(columName))) {
if (ObjectUtil.isNotEmpty(value)) {
value = DateUtil.parse(value.toString());
}
}
if (value == null && columName.equalsIgnoreCase("content_text")) {
isContinue = true;
break;
}
row.put(CommonUtil.lineToHump(columName), value);
}
if (isContinue) {
continue;
}
T bean = clazz.newInstance();
try {
ConvertUtils.register(new DateConverter(null), Date.class);
ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
BeanUtils.populate(bean, row);
} catch (Exception e) {
e.printStackTrace();
continue;
}
boolean hasId = false;
if (bean instanceof EmrTree) {
if (pkids.contains(((EmrTree) bean).getEmrId())) {
hasId = true;
} else {
pkids.add(((EmrTree) bean).getEmrId());
}
} else if (bean instanceof EmrRecord) {
if (pkids.contains(((EmrRecord) bean).getRecordId())) {
hasId = true;
} else {
pkids.add(((EmrRecord) bean).getRecordId());
}
} else if (bean instanceof EmrContent) {
if (pkids.contains(((EmrContent) bean).getContentId())) {
hasId = true;
} else {
pkids.add(((EmrContent) bean).getContentId());
}
}
if (!hasId) {
ret.add(bean);
}
}
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
try {
JdbcUtils.close(rs);
JdbcUtils.close(stmt);
JdbcUtils.close(conn);
} catch (Exception e) {
LOGGER.error(e.getMessage());
}
}
return ret;
}
private void setParameters(PreparedStatement stmt, Object[] parameters) throws SQLException {
for (int i = 0, size = parameters.length; i < size; ++i) {
Object param = parameters[i];
if (param instanceof Date) {
stmt.setObject(i + 1, new Timestamp(((Date) param).getTime()));
} else {
stmt.setObject(i + 1, param);
}
}
}
/**
* 抽取病程记录--病案首页
*
* @param
* @return
*/
private List<EmrContent> extractEmrPageRecord(DruidDataSource druidDataSource, String emrSql, String recordId) {
List<EmrContent> emrContents = Lists.newArrayList();
List<Map<String, Object>> emrPage = getEmrHomePage(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病案首页: 记录编号 = {}, 记录条数 = {}", recordId, emrPage.size());
if (!CollectionUtils.isEmpty(emrPage)) {
EmrContent emrContent = new EmrContent();
emrContent.setContentId("emrPage_" + recordId);
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setTitle("病案首页");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr01");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> map = Maps.newHashMap();
map.put("datas", emrPage);
emrContent.setStructJson(JSON.toJSONString(map));
emrContents.add(emrContent);
}
return emrContents;
}
/**
* 抽取病程记录--医嘱
*
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrMedicalRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病程记录--医嘱: 记录编号 = {}, 医嘱条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = null;
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
result = new ArrayList<>();
Map<String, String> emrContentMap = Maps.newHashMap();
int j = 0;
for ( int k = 0; k < allColumnNameAndValue.size(); k++) {
Map<String, Object> map = allColumnNameAndValue.get(k);
// 医嘱开立日期事件 HDSD00_15_020
// 医嘱内容 HDSD00_15_028
// 医嘱开立医生 HDSD00_15_021
// 核对医嘱护士签名 HDSD00_15_006
// 医嘱停止日期时间 HDSD00_15_026,
// 停止医嘱者签名 HDSD00_15_013,
// 医嘱执行者签名 HDSD00_15_031,
StringBuilder htmlTr = new StringBuilder();
htmlTr.append(" <tr data-index=\"" + k + "\">\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱计划开始日期时间")) + "</td>\r\n");
htmlTr.append(" <td style=\"border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱项目内容")) + "" + nullFilter(map.get("医嘱备注信息")) + "</td>\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱开立者签名")) + "</td>\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱执行者签名")) + "</td>\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱停止日期时间")) + "</td>\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("停止医嘱者签名")) + "</td>\r\n");
htmlTr.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
htmlTr.append(nullFilter(map.get("医嘱执行者签名")) + "</td>\r\n" + " </tr>");
// 当前只有长期医嘱
String title = map.get("医嘱类型").toString();
if (emrContentMap.containsKey(title)) {
String contentText = emrContentMap.get(title) + htmlTr.toString();
emrContentMap.put(title, contentText);
} else {
emrContentMap.put(title, htmlTr.toString());
}
}
j = 1;
String htmlHead = ContentConstant.HTML_HEAD;
String jcTableHtml = ContentConstant.EMRMEDICALRECORD_HTML_BODY;
for (Map.Entry<String, String> entry : emrContentMap.entrySet()) {
EmrContent content = new EmrContent();
Date date = new Date();
content.setContentId("yz_" + recordId + '_' + j);
content.setRecordId(recordId);
content.setContentTime(date);
content.setCreateBy("admin");
content.setCreateTime(date);
content.setEmrId("emr03");
content.setShowOrder("1");
content.setUpdateBy("admin");
content.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
content.setStructJson(JSON.toJSONString(maps));
content.setTitle(entry.getKey());
String htmlTbody = jcTableHtml.replaceAll("\\$\\{htmlTbody\\}", Matcher.quoteReplacement(entry.getValue()));
content.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", htmlTbody));
result.add(content);
htmlTbody = null;
maps = null;
j++;
}
}
return result;
}
/**
* 检查报告
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrPacsRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病程记录--检查报告: 记录编号 = {}, 条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setContentId("jc_" + recordId);
emrContent.setTitle("检查报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(maps));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jcTableHtml = new StringBuffer(ContentConstant.EMRRISRECORD_HTML_BODY);
int j = 0;
for (Map<String, Object> map : allColumnNameAndValue) {
// 检查类别 JCLB;检查项目 JCXM;检查医生 JCYS ; 检查结果客观 JCJG;检查结果主观 JCJG
// 检查报告日期时间 JCRQSJ
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("EXAM_CLASS")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("EXAM_SUB_CLASS")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("PERFORMED_BY")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("REPORT_TEXT1")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("REPORT_TEXT")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("EXAM_DATE_TIME")) + "</td>\r\n" + " </tr>");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
result.add(emrContent);
jcTableHtml = null;
}
return result;
}
/**
* 检验文书
* @param druidDataSource
* @param emrSql
* @return
*/
private List<EmrContent> extractEmrLISRecord(DruidDataSource druidDataSource, String emrSql, String recordId){
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病程记录--检验文书: 记录编号 = {}, 检验项目条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = Lists.newArrayList();
if (!org.apache.commons.collections4.CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
emrContent.setContentId("jy_" + recordId);
Date date = Calendar.getInstance().getTime();
// emrContent.setContentTime(date);
emrContent.setTitle("检验报告单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr06");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> map = Maps.newHashMap();
map.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(map));
int j = 0;
String htmlHead = ContentConstant.HTML_HEAD;
String EMRLISRECORD_HTML_TITLE
= "<div class=\"fixed-table-body\">\r\n"
+ " <table id=\"bootstrap-table\" class=\"table table-hover\">\r\n" + " <thead>\r\n"
+ " <tr>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userId\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" style='width:100px' nowrap>检验类别</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userName\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>检验项目</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userName\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>检验结果</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userPhone\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" nowrap>执行医生</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n"
+ " <th style=\"text-align: center;border: 1px solid #2f4050!important;\" data-field=\"userEmail\" tabindex=\"0\" nowrap><div\r\n"
+ " class=\"th-inner \" style='width:100px' nowrap>检验日期时间</div>\r\n"
+ " <div class=\"fht-cell\"></div></th>\r\n" + " </tr>\r\n"
+ " </thead>" + " <tbody>";
StringBuffer jyTableHtml = new StringBuffer(EMRLISRECORD_HTML_TITLE);
for (Map<String, Object> tempMap : allColumnNameAndValue) {
// SFXM, --收费项目
// JYXM, --检验项目
// jyjg, --检验结果
// MZZD, --门诊诊断
// --ZXYS, --执行医生
// JYRQSJ, --检验日期时间
jyTableHtml.append( " <tr data-index=\"" + j + "\">\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( nullFilter(tempMap.get("标本")) + "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( nullFilter(tempMap.get("检验项目名称")) + "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( nullFilter(tempMap.get("结果"))+ "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( nullFilter(tempMap.get("检验人员")) + "</td>\r\n");
jyTableHtml.append( " <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jyTableHtml.append( nullFilter(tempMap.get("检验日期")) + "</td>\r\n" + " </tr>");
j++;
}
jyTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jyTableHtml.toString())));
result.add(emrContent);
jyTableHtml = null;
}
return result;
}
/**
* 获取检验申请单
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrLisApplyRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病程记录--检验申请单: 记录编号 = {}, 条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setContentId("jysqd_" + recordId);
emrContent.setTitle("检验申请单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr03");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(maps));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jcTableHtml = new StringBuffer(ContentConstant.EMRLisApplyRECORD_HTML_TITLE);
int j = 0;
for (Map<String, Object> map : allColumnNameAndValue) {
// 检查类别 JCLB;检查项目 JCXM;检查医生 JCYS ; 检查结果客观 JCJG;检查结果主观 JCJG
// 检查报告日期时间 JCRQSJ
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("标本")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("项目名称")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("临床印象")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请医师")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请时间")) + "</td>\r\n" + " </tr>");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
result.add(emrContent);
jcTableHtml = null;
}
return result;
}
/**
* 获取检查申请单
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrPacsApplyRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取病程记录--检查申请单: 记录编号 = {}, 条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setContentId("jcsqd_" + recordId);
emrContent.setTitle("检查申请单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr03");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(maps));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jcTableHtml = new StringBuffer(ContentConstant.EMRPacsApplyRECORD_HTML_TITLE);
int j = 0;
for (Map<String, Object> map : allColumnNameAndValue) {
// 检查类别 JCLB;检查项目 JCXM;检查医生 JCYS ; 检查结果客观 JCJG;检查结果主观 JCJG
// 检查报告日期时间 JCRQSJ
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("PACS类别")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("项目名称")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("临床印象")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("病例摘要")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请医师")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请时间")) + "</td>\r\n" + " </tr>");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
result.add(emrContent);
jcTableHtml = null;
}
return result;
}
/**
* 获取手术通知单
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrOpeNoticeRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("抽取知情同意书--手术通知单: 记录编号 = {}, 条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setContentId("sstzd_" + recordId);
emrContent.setTitle("手术通知单");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr05");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(maps));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jcTableHtml = new StringBuffer(ContentConstant.EMROpeNoticeRECORD_HTML_TITLE);
int j = 0;
for (Map<String, Object> map : allColumnNameAndValue) {
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("手术名称")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("手术等级")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("切口等级")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请医生")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("术前诊断")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("麻醉方法")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("手术医师")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("手术日期")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("I助")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("II助")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("麻醉医师")) + "</td>\r\n" + " </tr>");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
result.add(emrContent);
jcTableHtml = null;
}
return result;
}
/**
* 获取会诊记录
* @param druidDataSource
* @param emrSql
* @param recordId
* @return
*/
private List<EmrContent> extractEmrConsultationRecord(DruidDataSource druidDataSource, String emrSql, String recordId ) {
List<Map<String, Object>> allColumnNameAndValue = getALLColumnNameAndValue(druidDataSource, emrSql, recordId);
// LOGGER.info("病程记录--会诊申请: 记录编号 = {}, 条数 = {}", recordId, allColumnNameAndValue.size());
List<EmrContent> result = new ArrayList<EmrContent>();
if (!CollectionUtils.isEmpty(allColumnNameAndValue)) {
EmrContent emrContent = new EmrContent();
Date date = Calendar.getInstance().getTime();
emrContent.setContentTime(date);
emrContent.setContentId("hzjl_" + recordId);
emrContent.setTitle("会诊申请");
emrContent.setRecordId(recordId);
emrContent.setCreateBy("admin");
emrContent.setCreateTime(date);
emrContent.setEmrId("emr03");
emrContent.setShowOrder("1");
emrContent.setUpdateBy("admin");
emrContent.setUpdateTime(date);
Map<String, List<Map<String, Object>>> maps = Maps.newHashMap();
maps.put("datas", allColumnNameAndValue);
emrContent.setStructJson(JSON.toJSONString(maps));
String htmlHead = ContentConstant.HTML_HEAD;
StringBuffer jcTableHtml = new StringBuffer(ContentConstant.EMRConsultationRECORD_HTML_TITLE);
int j = 0;
for (Map<String, Object> map : allColumnNameAndValue) {
jcTableHtml.append(" <tr data-index=\"" + j + "\">\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("病历摘要")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("申请会诊目的")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("会诊时间")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("主诉")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("辅助检查")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("诊疗过程")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("会诊科室")) + "</td>\r\n");
jcTableHtml.append(" <td style=\"text-align: center;border: 1px solid #2f4050!important;\">");
jcTableHtml.append(nullFilter(map.get("会诊地点")) + "</td>\r\n" + " </tr>");
j++;
}
jcTableHtml.append(" </tbody>\r\n" + " </table>\r\n" + "</div>");
emrContent.setContentText(htmlHead.replaceAll("\\$\\{htmlBody\\}", Matcher.quoteReplacement(jcTableHtml.toString())));
result.add(emrContent);
jcTableHtml = null;
}
return result;
}
/**
* 获取SQL所有字段和值
*
* @param druidDataSource 数据源
* @param sql SQL语句
* @param recordId
* @return List<Map < String, Object>> [{columnName:value}]
* @author ouyang0810@foxmail.com
* @Date 2020/6/4 16:58
*/
public static List<Map<String, Object>> getALLColumnNameAndValue(DruidDataSource druidDataSource, String sql, String recordId) {
List<Map<String, Object>> result = new ArrayList<>();
ResultSet rs = null;
PreparedStatement pst = null;
Connection conn = null;
try {
conn = druidDataSource.getConnection();
pst = conn.prepareStatement(sql);
String[] params = recordId.split("_");
pst.setString(1, params[0]);
pst.setString(2, params[1]);
rs = pst.executeQuery();
ResultSetMetaData rsMeta = rs.getMetaData();
while (rs.next()) {
Map<String, Object> map = Maps.newHashMap();
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columName = rsMeta.getColumnLabel(i + 1).trim(); // 移除两边的空格
Object value = rs.getObject(i + 1);
if (null != value && value instanceof Timestamp) {
value = DateUtils.dateToString(DateUtils.stringToDate(value.toString(), DateUtils.DATE_TIME_FORMAT), DateUtils.DATE_TIME_FORMAT);
}
map.put(columName, value);
}
result.add(map);
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("连接失败");
} finally {
try {
if (rs != null) {
rs.close();
}
if (pst != null) {
pst.close();
}
if (conn != null) {
conn.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return result;
}
public static List<Map<String, Object>> getEmrHomePage(DruidDataSource druidDataSource, String sql, String recordId) {
String[] param = {recordId};
List<Map<String, Object>> result = new ArrayList<>();
Map<String, String> diag;
Map<String, String> oper;
Map<String, String> ddzzfy;
List<Map<String, String>> list = null;
ResultSet rs = null;
PreparedStatement pst = null;
Connection conn = null;
try {
conn = druidDataSource.getConnection();
pst = conn.prepareStatement(sql);
pst.setString(1, recordId);
rs = pst.executeQuery();
LOGGER.info("查询病案首页数据sql {}, {}", sql, recordId);
ResultSetMetaData rsMeta = rs.getMetaData();
while (rs.next()) {
// 加载病案首页数据
Map<String, Object> map = Maps.newLinkedHashMap();
for (int i = 0, size = rsMeta.getColumnCount(); i < size; ++i) {
String columnName = rsMeta.getColumnLabel(i + 1).trim();
Object value = rs.getObject(i + 1);
if (value instanceof Timestamp) {
value = DateUtils.dateToString(DateUtils.stringToDate(value.toString(), DateUtils.DATE_TIME_FORMAT), DateUtils.DATE_TIME_FORMAT);
}
map.put(columnName, value);
}
// 加载诊断数据
ResultSet rs1 = null;
PreparedStatement pst1 = null;
Connection conn1 = null;
try {
String diagInfoSql = "SELECT * FROM ek_thdhanyun.his_ddinp_diag t WHERE t.record_id = ?";
conn1 = druidDataSource.getConnection();
pst1 = conn1.prepareStatement(diagInfoSql);
pst1.setString(1, param[0]);
rs1 = pst1.executeQuery();
list = new ArrayList<Map<String, String>>();
ResultSetMetaData rsMeta1 = rs1.getMetaData();
while (rs1.next()) {
diag = new LinkedHashMap<String, String>();
for (int i = 1, size = rsMeta1.getColumnCount(); i <= size; i++) {
String columnName = rsMeta1.getColumnLabel(i).trim();
String value = rs1.getString(i);
diag.put(lineToHump(columnName), value);
}
list.add(diag);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (rs1 != null) {
rs1.close();
}
if (pst1 != null) {
pst1.close();
}
if (conn1 != null) {
conn1.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
map.put("zdxxs", list);
// 手术信息
ResultSet rs2 = null;
PreparedStatement pst2 = null;
Connection conn2 = null;
try {
String operInfoSql = "select * from ek_thdhanyun.his_ddinp_oper t WHERE t.record_id = ? ORDER BY t.hdsd00_11_090_order ";
conn2 = druidDataSource.getConnection();
pst2 = conn2.prepareStatement(operInfoSql);
pst2.setString(1, param[0]);
rs2 = pst2.executeQuery();
list = new ArrayList<Map<String, String>>();
ResultSetMetaData rsMeta2 = rs2.getMetaData();
while (rs2.next()) {
oper = new LinkedHashMap<String, String>();
for (int i = 1, size = rsMeta2.getColumnCount(); i <= size; i++) {
String columnName = rsMeta2.getColumnLabel(i).trim();
String value = rs2.getString(i);
oper.put(lineToHump(columnName), value);
}
list.add(oper);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (rs2 != null) {
rs2.close();
}
if (pst2 != null) {
pst2.close();
}
if (conn2 != null) {
conn2.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
map.put("ssxxs", list);
// 重症监护室
ResultSet rs3 = null;
PreparedStatement pst3 = null;
Connection conn3 = null;
try {
String ddzzfyInfoSql = "select * from ek_thdhanyun.his_ddinp_icu t WHERE t.record_id = ? ORDER BY t.HDSD00_11_151 ";
conn3 = druidDataSource.getConnection();
pst3 = conn3.prepareStatement(ddzzfyInfoSql);
pst3.setString(1, param[0]);
rs3 = pst3.executeQuery();
list = new ArrayList<Map<String, String>>();
ResultSetMetaData rsMeta3 = rs3.getMetaData();
while (rs3.next()) {
ddzzfy = new LinkedHashMap<String, String>();
for (int i = 1, size = rsMeta3.getColumnCount(); i <= size; i++) {
String columnName = rsMeta3.getColumnLabel(i).trim();
String value = rs3.getString(i);
ddzzfy.put(lineToHump(columnName), value);
}
list.add(ddzzfy);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (rs3 != null) {
rs3.close();
}
if (pst3 != null) {
pst3.close();
}
if (conn3 != null) {
conn3.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
map.put("zzjhs", list);
result.add(map);
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("连接失败");
} finally {
try {
if (rs != null) {
rs.close();
}
if (pst != null) {
pst.close();
}
if (conn != null) {
conn.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return result;
}
private static final char UNDERLINE = '_';
private String nullFilter(Object o) {
if (o == null) {
return "";
} else if (o instanceof String) {
return (String) o;
} else {
return String.valueOf(o);
}
}
public static String lineToHump(String param) {
if (StringUtils.isBlank(param)) {
return "";
}
param = param.toLowerCase();
int len = param.length();
StringBuilder sb = new StringBuilder(len);
for (int i = 0; i < len; i++) {
char c = Character.toLowerCase(param.charAt(i));
if (c == UNDERLINE) {
if (++i < len) {
sb.append(Character.toUpperCase(param.charAt(i)));
}
} else {
sb.append(c);
}
}
return sb.toString();
}
/**
* 基础数据抽取
* @param mrqcEtlService
* @param objectType
* @throws Exception
*/
@Override
public void etlMdb(IMrqcEtlService mrqcEtlService, String objectType) throws Exception {
/*
* 科室数据同步
*/
if (org.springframework.util.StringUtils.isEmpty(objectType) || com.ruoyi.common.utils.StringUtils.equals(objectType, "科室")) {
String ksSql = "select distinct * from hanyun.his_hhdept_dict";
List<Map<String, Object>> ksList = wxjyJdbcTemplate.queryForList(ksSql);
if (!CollectionUtils.isEmpty(ksList)) {// 添加科室主数据
List<MdbObject> objectList = new ArrayList<MdbObject>();
for (Map<String, Object> ks : ksList) {
List<MdbObjectAttr> attrs = new ArrayList<MdbObjectAttr>();
MdbObject object = new MdbObject();
String orgId = (String) ks.get("科室代码");//????
String ksCode = (String) ks.get("科室代码");
String ksName = (String) ks.get("科室名称");
String objectId = orgId + ksCode;
object.setOrgId(orgId);
object.setObjectId(objectId);
object.setObjectCode(ksCode);
object.setObjectName(ksName);
object.setObjectType("科室");
object.setParentId("0");
object.setRemark(ksName);
for (String key : ks.keySet()) {
MdbObjectAttr attr = new MdbObjectAttr();
attr.setAttrId(objectId + "_" + key);
attr.setAttrCode(key);
attr.setAttrName(key);
attr.setAttrValue((String) ks.get(key));
attr.setObjectId(objectId);
attr.setRemark(key);
attrs.add(attr);
}
object.setAttrs(attrs);
objectList.add(object);
if (objectList.size() >= 200) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
}
if (objectList.size() >= 1) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
System.out.println("完成主数据同步,科室[" + ksList.size() + "]");
}
}
/*
* 人员信息同步
*/
if (org.springframework.util.StringUtils.isEmpty(objectType) || com.ruoyi.common.utils.StringUtils.equals(objectType, "人员")) {
String rySql = "select distinct * from hanyun.his_hhstaff_dict";
List<Map<String, Object>> ryList = wxjyJdbcTemplate.queryForList(rySql);
if (!CollectionUtils.isEmpty(ryList)) {// 添加科室主数据
List<MdbObject> objectList = new ArrayList<MdbObject>();
for (Map<String, Object> ry : ryList) {
List<MdbObjectAttr> attrs = new ArrayList<MdbObjectAttr>();
MdbObject object = new MdbObject();
String orgId = (String) ry.get("唯一号");// ???
String ryCode = (String) ry.get("唯一号");
String ryName = (String) ry.get("NAME");
String ksCode = (String) ry.get("DEPT_ID");
String objectId = orgId + ryCode;
String parentId = orgId + ksCode;
object.setOrgId(orgId);
object.setObjectId(objectId);
object.setObjectCode(ryCode);
object.setObjectName(ryName);
object.setObjectType("人员");
object.setParentId(parentId);
object.setRemark(ryName);
for (String key : ry.keySet()) {
MdbObjectAttr attr = new MdbObjectAttr();
attr.setAttrId(objectId + "_" + key);
attr.setAttrCode(key);
attr.setAttrName(key);
attr.setAttrValue(ry.get(key) + "");
attr.setObjectId(objectId);
attr.setRemark(key);
attrs.add(attr);
}
object.setAttrs(attrs);
objectList.add(object);
if (objectList.size() >= 200) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
}
if (objectList.size() >= 1) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
System.out.println("完成主数据同步,人员[" + ryList.size() + "]");
}
}
/*
* 床位数据同步
*/
if (org.springframework.util.StringUtils.isEmpty(objectType) || com.ruoyi.common.utils.StringUtils.equals(objectType, "病床")) {
String bcSql = "select distinct * from hanyun.his_hhbed_rec";
List<Map<String, Object>> bcList = wxjyJdbcTemplate.queryForList(bcSql);
if (!CollectionUtils.isEmpty(bcList)) {// 添加科室主数据
List<MdbObject> objectList = new ArrayList<MdbObject>();
for (Map<String, Object> bc : bcList) {
List<MdbObjectAttr> attrs = new ArrayList<MdbObjectAttr>();
MdbObject object = new MdbObject();
String orgId = (String) bc.get("床号"); // ????
String bcCode = bc.get("床号") + "";
String bcName = (String) bc.get("床号");
String bfName = (String) bc.get("房间号");
bcCode = org.springframework.util.StringUtils.isEmpty(bfName) ? bcCode : bfName;
bfName = org.springframework.util.StringUtils.isEmpty(bfName) ? bcName : bfName;
String ksCode = (String) bc.get("科室编码");
String objectId = orgId + bcCode;
String parentId = orgId + ksCode;
object.setOrgId(orgId);
object.setObjectId(objectId);
object.setObjectCode(bcCode);
object.setObjectName(bfName);
object.setObjectType("病房");
object.setParentId(parentId);
object.setRemark(bcName);
for (String key : bc.keySet()) {
MdbObjectAttr attr = new MdbObjectAttr();
attr.setAttrId(objectId + "_" + key);
attr.setAttrCode(key);
attr.setAttrName(key);
attr.setAttrValue(bc.get(key) + "");
attr.setObjectId(objectId);
attr.setRemark(key);
attrs.add(attr);
}
object.setAttrs(attrs);
objectList.add(object);
if (objectList.size() >= 200) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
}
if (objectList.size() >= 1) {
mrqcEtlService.insertOrUpdateMdbObjects(objectList);
objectList.clear();
}
System.out.println("完成主数据同步,病房[" + bcList.size() + "]");
}
}
/*
* 基础字典同步
*/
// if (org.springframework.util.StringUtils.isEmpty(objectType) || com.ruoyi.common.utils.StringUtils.equals(objectType, "字典")) {
// String zdSql = "select distinct * from \"字典信息视图\"";
// List<Map<String, Object>> zdList = wxjyJdbcTemplate.queryForList(zdSql);
// if (!CollectionUtils.isEmpty(zdList)) {// 添加科室主数据
// List<MdbObject> objectList = new ArrayList<MdbObject>();
// for (Map<String, Object> zd : zdList) {
// List<MdbObjectAttr> attrs = new ArrayList<MdbObjectAttr>();
// MdbObject object = new MdbObject();
// String orgId = (String) zd.get("ORGID");
// String zdCode = zd.get("DICTID") + "";
// String zdName = (String) zd.get("DICTNAME");
// String zdType = (String) zd.get("TYPENAME");
// String objectId = orgId + zdType + zdCode;
// String parentId = orgId + zdType + zdCode;
// object.setOrgId(orgId);
// object.setObjectId(objectId);
// object.setObjectCode(zdCode);
// object.setObjectName(zdName);
// object.setObjectType(zdType);
// object.setParentId("0");
// object.setRemark(zdName);
//
// for (String key : zd.keySet()) {
// MdbObjectAttr attr = new MdbObjectAttr();
// attr.setAttrId(objectId + "_" + key);
// attr.setAttrCode(key);
// attr.setAttrName(key);
// attr.setAttrValue(zd.get(key) + "");
// attr.setObjectId(objectId);
// attr.setRemark(key);
// attrs.add(attr);
// }
// object.setAttrs(attrs);
// objectList.add(object);
// if (objectList.size() >= 200) {
// mrqcEtlService.insertOrUpdateMdbObjects(objectList);
// objectList.clear();
// }
// }
// if (objectList.size() >= 1) {
// mrqcEtlService.insertOrUpdateMdbObjects(objectList);
// objectList.clear();
// }
// System.out.println("完成主数据同步,字典数据[" + zdList.size() + "]");
// }
// }
}
}
package com.hanyun.hip.mrqc.jms.constants;
/**
* 常量
*/
public class JmsConstant {
/**质控病历份数**/
public static final String EMRS_PERDAY = "emrsPerDay";
/**质控员列表**/
public static final String EMS ="emrs";
}
package com.hanyun.hip.mrqc.jms.controller;
/**
* @ClassName:HomePigeonholeController
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/5
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/5
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class HomePigeonholeController {
}
package com.hanyun.hip.mrqc.jms.controller;
import com.ruoyi.common.core.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("/mrqc/jump")
public class JumpController extends BaseController {
/**
* 跳转到病历模板详情页面
*
* @param recordId
* @return
*/
@GetMapping("/todetail")
public String typeDetail(@RequestParam("recordId") String recordId) {
// 重定向到另一个路径
return "redirect:/mrqc/emrrecord/todetail/" + recordId;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:HomePigeonhole
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/5
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/5
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class HomePigeonhole {
private String beginDate;
private String endDate;
private String inpatientArea;
private int hospitCount;
private int twoDayCount;
private int twoDayNotCount;
private String twoDayPigeonhole;
private int threeDayCount;
private String threeDayPigeonhole;
private int fourDayCount;
private String fourDayPigeonhole;
private int fiveDayCount;
private String fiveDayPigeonhole;
private int sevenDayCount;
private String sevenDayPigeonhole;
private int moreThanSevenDayCount;
private String moreThanDayPigeonhole;
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
public int getHospitCount() {
return hospitCount;
}
public void setHospitCount(int hospitCount) {
this.hospitCount = hospitCount;
}
public int getTwoDayCount() {
return twoDayCount;
}
public void setTwoDayCount(int twoDayCount) {
this.twoDayCount = twoDayCount;
}
public int getTwoDayNotCount() {
return twoDayNotCount;
}
public void setTwoDayNotCount(int twoDayNotCount) {
this.twoDayNotCount = twoDayNotCount;
}
public String getTwoDayPigeonhole() {
return twoDayPigeonhole;
}
public void setTwoDayPigeonhole(String twoDayPigeonhole) {
this.twoDayPigeonhole = twoDayPigeonhole;
}
public int getThreeDayCount() {
return threeDayCount;
}
public void setThreeDayCount(int threeDayCount) {
this.threeDayCount = threeDayCount;
}
public String getThreeDayPigeonhole() {
return threeDayPigeonhole;
}
public void setThreeDayPigeonhole(String threeDayPigeonhole) {
this.threeDayPigeonhole = threeDayPigeonhole;
}
public int getFourDayCount() {
return fourDayCount;
}
public void setFourDayCount(int fourDayCount) {
this.fourDayCount = fourDayCount;
}
public String getFourDayPigeonhole() {
return fourDayPigeonhole;
}
public void setFourDayPigeonhole(String fourDayPigeonhole) {
this.fourDayPigeonhole = fourDayPigeonhole;
}
public int getFiveDayCount() {
return fiveDayCount;
}
public void setFiveDayCount(int fiveDayCount) {
this.fiveDayCount = fiveDayCount;
}
public String getFiveDayPigeonhole() {
return fiveDayPigeonhole;
}
public void setFiveDayPigeonhole(String fiveDayPigeonhole) {
this.fiveDayPigeonhole = fiveDayPigeonhole;
}
public int getSevenDayCount() {
return sevenDayCount;
}
public void setSevenDayCount(int sevenDayCount) {
this.sevenDayCount = sevenDayCount;
}
public String getSevenDayPigeonhole() {
return sevenDayPigeonhole;
}
public void setSevenDayPigeonhole(String sevenDayPigeonhole) {
this.sevenDayPigeonhole = sevenDayPigeonhole;
}
public int getMoreThanSevenDayCount() {
return moreThanSevenDayCount;
}
public void setMoreThanSevenDayCount(int moreThanSevenDayCount) {
this.moreThanSevenDayCount = moreThanSevenDayCount;
}
public String getMoreThanDayPigeonhole() {
return moreThanDayPigeonhole;
}
public void setMoreThanDayPigeonhole(String moreThanDayPigeonhole) {
this.moreThanDayPigeonhole = moreThanDayPigeonhole;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:HomePigeonholeSum
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/5
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/5
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class HomePigeonholeSum {
private String hospitCountSum;
private String twoDayCountSum;
private String twoDayNotCountSum;
private String twoDayPigeonholeSum;
private String threeDayCountSum;
private String threeDayPigeonholeSum;
private String fourDayCountSum;
private String fourDayPigeonholeSum;
private String fiveDayCountSum;
private String fiveDayPigeonholeSum;
private String sevenDayCountSum;
private String sevenDayPigeonholeSum;
private String moreThanSevenDayCountSum;
private String moreThanDayPigeonholeSum;
public String getHospitCountSum() {
return hospitCountSum;
}
public void setHospitCountSum(String hospitCountSum) {
this.hospitCountSum = hospitCountSum;
}
public String getTwoDayCountSum() {
return twoDayCountSum;
}
public void setTwoDayCountSum(String twoDayCountSum) {
this.twoDayCountSum = twoDayCountSum;
}
public String getTwoDayNotCountSum() {
return twoDayNotCountSum;
}
public void setTwoDayNotCountSum(String twoDayNotCountSum) {
this.twoDayNotCountSum = twoDayNotCountSum;
}
public String getTwoDayPigeonholeSum() {
return twoDayPigeonholeSum;
}
public void setTwoDayPigeonholeSum(String twoDayPigeonholeSum) {
this.twoDayPigeonholeSum = twoDayPigeonholeSum;
}
public String getThreeDayCountSum() {
return threeDayCountSum;
}
public void setThreeDayCountSum(String threeDayCountSum) {
this.threeDayCountSum = threeDayCountSum;
}
public String getThreeDayPigeonholeSum() {
return threeDayPigeonholeSum;
}
public void setThreeDayPigeonholeSum(String threeDayPigeonholeSum) {
this.threeDayPigeonholeSum = threeDayPigeonholeSum;
}
public String getFourDayCountSum() {
return fourDayCountSum;
}
public void setFourDayCountSum(String fourDayCountSum) {
this.fourDayCountSum = fourDayCountSum;
}
public String getFourDayPigeonholeSum() {
return fourDayPigeonholeSum;
}
public void setFourDayPigeonholeSum(String fourDayPigeonholeSum) {
this.fourDayPigeonholeSum = fourDayPigeonholeSum;
}
public String getFiveDayCountSum() {
return fiveDayCountSum;
}
public void setFiveDayCountSum(String fiveDayCountSum) {
this.fiveDayCountSum = fiveDayCountSum;
}
public String getFiveDayPigeonholeSum() {
return fiveDayPigeonholeSum;
}
public void setFiveDayPigeonholeSum(String fiveDayPigeonholeSum) {
this.fiveDayPigeonholeSum = fiveDayPigeonholeSum;
}
public String getSevenDayCountSum() {
return sevenDayCountSum;
}
public void setSevenDayCountSum(String sevenDayCountSum) {
this.sevenDayCountSum = sevenDayCountSum;
}
public String getSevenDayPigeonholeSum() {
return sevenDayPigeonholeSum;
}
public void setSevenDayPigeonholeSum(String sevenDayPigeonholeSum) {
this.sevenDayPigeonholeSum = sevenDayPigeonholeSum;
}
public String getMoreThanSevenDayCountSum() {
return moreThanSevenDayCountSum;
}
public void setMoreThanSevenDayCountSum(String moreThanSevenDayCountSum) {
this.moreThanSevenDayCountSum = moreThanSevenDayCountSum;
}
public String getMoreThanDayPigeonholeSum() {
return moreThanDayPigeonholeSum;
}
public void setMoreThanDayPigeonholeSum(String moreThanDayPigeonholeSum) {
this.moreThanDayPigeonholeSum = moreThanDayPigeonholeSum;
}
}
package com.hanyun.hip.mrqc.jms.entity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 电子病历规则分配表 mrqc_emr_config
*
* @author ruoyi
* @date 2024-04-22
*/
public class MrqcEmrConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long configId;
/** 配置key */
private String configKey;
/** 配置内容 */
private String configValue;
/** 配置状态(0正常 1停用) */
private String status;
public void setConfigId(Long configId)
{
this.configId = configId;
}
public Long getConfigId()
{
return configId;
}
public void setConfigKey(String configKey)
{
this.configKey = configKey;
}
public String getConfigKey()
{
return configKey;
}
public void setConfigValue(String configValue)
{
this.configValue = configValue;
}
public String getConfigValue()
{
return configValue;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("configId", getConfigId())
.append("configKey", getConfigKey())
.append("configValue", getConfigValue())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.hanyun.hip.mrqc.jms.entity;
import com.ruoyi.common.annotation.Excel;
/**
* @ClassName:ProcessDTO
* @author: ouyang0810@foxmail.com
* @CreateString: 2024/11/1
* @UpStringUser: ouyang0810@foxmail.com
* @UpStringString: 2024/11/1
* @UpStringRemark:
* @Description:
* @Version: [V1.0]
*/
public class ProcessDTO {
private String recordId;
@Excel(name = "科室", width = 200,type = Excel.Type.IMPORT)
private String inpatientArea;
@Excel(name = "医生", width = 200,type = Excel.Type.IMPORT)
private String hospitDoctor;
@Excel(name = "住院号", width = 200,type = Excel.Type.IMPORT)
private String hospitNum;
@Excel(name = "患者姓名", width = 200,type = Excel.Type.IMPORT)
private String patientName;
@Excel(name = "首页分数", width = 80,type = Excel.Type.IMPORT)
private String homepageScore;
@Excel(name = "出院时间", width = 200,type = Excel.Type.IMPORT)
private String outTime;
private String processName;
@Excel(name = "缺陷名称", width = 800)
private String remark;
@Excel(name = "扣分", width = 80)
private String score;
@Excel(name = "标准名称", width = 200)
private String stdName;
private String type;
@Excel(name = "提交时间", width = 200)
private String commitTime;
@Excel(name = "审核时间", width = 200)
private String auditTime;
@Excel(name = "时间差", width = 400)
private String diffTime;
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
public String getHospitDoctor() {
return hospitDoctor;
}
public void setHospitDoctor(String hospitDoctor) {
this.hospitDoctor = hospitDoctor;
}
public String getHospitNum() {
return hospitNum;
}
public void setHospitNum(String hospitNum) {
this.hospitNum = hospitNum;
}
public String getPatientName() {
return patientName;
}
public void setPatientName(String patientName) {
this.patientName = patientName;
}
public String getHomepageScore() {
return homepageScore;
}
public void setHomepageScore(String homepageScore) {
this.homepageScore = homepageScore;
}
public String getOutTime() {
return outTime;
}
public void setOutTime(String outTime) {
this.outTime = outTime;
}
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public String getStdName() {
return stdName;
}
public void setStdName(String stdName) {
this.stdName = stdName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCommitTime() {
return commitTime;
}
public void setCommitTime(String commitTime) {
this.commitTime = commitTime;
}
public String getAuditTime() {
return auditTime;
}
public void setAuditTime(String auditTime) {
this.auditTime = auditTime;
}
public String getDiffTime() {
return diffTime;
}
public void setDiffTime(String diffTime) {
this.diffTime = diffTime;
}
}
package com.hanyun.hip.mrqc.jms.entity;
import com.ruoyi.common.annotation.Excel;
/**
* @ClassName:ProcessDTO
* @author: ouyang0810@foxmail.com
* @CreateString: 2024/11/1
* @UpStringUser: ouyang0810@foxmail.com
* @UpStringString: 2024/11/1
* @UpStringRemark:
* @Description:
* @Version: [V1.0]
*/
public class ProcessYWKDTO {
private String recordId;
@Excel(name = "科室", width = 200,type = Excel.Type.IMPORT)
private String inpatientArea;
@Excel(name = "科主任", width = 200,type = Excel.Type.IMPORT)
private String kzr;
@Excel(name = "主治医生", width = 200,type = Excel.Type.IMPORT)
private String zzys;
@Excel(name = "住院医生", width = 200,type = Excel.Type.IMPORT)
private String zyys;
@Excel(name = "住院号", width = 200,type = Excel.Type.IMPORT)
private String hospitNum;
@Excel(name = "患者姓名", width = 200,type = Excel.Type.IMPORT)
private String patientName;
@Excel(name = "全病历分数", width = 80,type = Excel.Type.IMPORT)
private String homepageScore;
@Excel(name = "出院时间", width = 200,type = Excel.Type.IMPORT)
private String outTime;
private String processName;
@Excel(name = "缺陷名称", width = 800)
private String remark;
@Excel(name = "扣分", width = 80)
private String score;
private String stdName;
private String type;
private String commitTime;
private String auditTime;
private String diffTime;
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
public String getKzr() {
return kzr;
}
public void setKzr(String kzr) {
this.kzr = kzr;
}
public String getZzys() {
return zzys;
}
public void setZzys(String zzys) {
this.zzys = zzys;
}
public String getZyys() {
return zyys;
}
public void setZyys(String zyys) {
this.zyys = zyys;
}
public String getHospitNum() {
return hospitNum;
}
public void setHospitNum(String hospitNum) {
this.hospitNum = hospitNum;
}
public String getPatientName() {
return patientName;
}
public void setPatientName(String patientName) {
this.patientName = patientName;
}
public String getHomepageScore() {
return homepageScore;
}
public void setHomepageScore(String homepageScore) {
this.homepageScore = homepageScore;
}
public String getOutTime() {
return outTime;
}
public void setOutTime(String outTime) {
this.outTime = outTime;
}
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public String getStdName() {
return stdName;
}
public void setStdName(String stdName) {
this.stdName = stdName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCommitTime() {
return commitTime;
}
public void setCommitTime(String commitTime) {
this.commitTime = commitTime;
}
public String getAuditTime() {
return auditTime;
}
public void setAuditTime(String auditTime) {
this.auditTime = auditTime;
}
public String getDiffTime() {
return diffTime;
}
public void setDiffTime(String diffTime) {
this.diffTime = diffTime;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:ReportRecordDTO
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/5
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/5
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class ReportRecordDTO {
//SELECT
// distinct
// mr.record_id,
// mr.hospit_num,
// mr.patient_name,
// mr.hospit_doctor,
// mr.diagnosis_name,
// mr.in_time,
// mr.out_time,
// mr.inpatient_area
// FROM
// mrqc_record
private String recordId;
private String hospitNum;
private String patientName;
private String hospitDoctor;
private String diagnosisName;
private String inTime;
private String outTime;
private String inpatientArea;
private String etlTime;
public String getEtlTime() {
return etlTime;
}
public void setEtlTime(String etlTime) {
this.etlTime = etlTime;
}
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getHospitNum() {
return hospitNum;
}
public void setHospitNum(String hospitNum) {
this.hospitNum = hospitNum;
}
public String getPatientName() {
return patientName;
}
public void setPatientName(String patientName) {
this.patientName = patientName;
}
public String getHospitDoctor() {
return hospitDoctor;
}
public void setHospitDoctor(String hospitDoctor) {
this.hospitDoctor = hospitDoctor;
}
public String getDiagnosisName() {
return diagnosisName;
}
public void setDiagnosisName(String diagnosisName) {
this.diagnosisName = diagnosisName;
}
public String getInTime() {
return inTime;
}
public void setInTime(String inTime) {
this.inTime = inTime;
}
public String getOutTime() {
return outTime;
}
public void setOutTime(String outTime) {
this.outTime = outTime;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:UReportDeathDTO
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/12/1
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/12/1
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class UReportDeathDTO {
// select hospit_doctor as doctorName,inpatient_area as inpatientArea,out_time as outTime,record_id as recordId,(select lable_id from mrqc_record_label where label_id = '27' and record_id = u.record_id) as lableId, ( select approved from mrqc_operator_record where record_id = u.record_id) approved
private String doctorName;
private String inpatientArea;
private String outTime;
private String recordId;
private String labelId;
private String approved;
public String getDoctorName() {
return doctorName;
}
public void setDoctorName(String doctorName) {
this.doctorName = doctorName;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
public String getOutTime() {
return outTime;
}
public void setOutTime(String outTime) {
this.outTime = outTime;
}
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getLabelId() {
return labelId;
}
public void setLabelId(String labelId) {
this.labelId = labelId;
}
public String getApproved() {
return approved;
}
public void setApproved(String approved) {
this.approved = approved;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:UReportDeathDisplayDTO
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/12/1
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/12/1
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class UReportDeathDisplayDTO {
private String name;
private String beginDate;
private String endDate;
private long sumCount;
private long labelCount;
private String nameType;
public String getNameType() {
return nameType;
}
public void setNameType(String nameType) {
this.nameType = nameType;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public long getSumCount() {
return sumCount;
}
public void setSumCount(long sumCount) {
this.sumCount = sumCount;
}
public long getLabelCount() {
return labelCount;
}
public void setLabelCount(long labelCount) {
this.labelCount = labelCount;
}
public long getApproveCount() {
return approveCount;
}
public void setApproveCount(long approveCount) {
this.approveCount = approveCount;
}
private long approveCount;
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:UReportRectificationDTO
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/12/2
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/12/2
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class UReportRectificationDTO {
private String recordId;
private String inpatientArea;
private String hospitDoctor;
private Integer historyCount;
private Integer nowRCount;
private Integer nowPCount;
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getInpatientArea() {
return inpatientArea;
}
public void setInpatientArea(String inpatientArea) {
this.inpatientArea = inpatientArea;
}
public String getHospitDoctor() {
return hospitDoctor;
}
public void setHospitDoctor(String hospitDoctor) {
this.hospitDoctor = hospitDoctor;
}
public Integer getHistoryCount() {
return historyCount;
}
public void setHistoryCount(Integer historyCount) {
this.historyCount = historyCount;
}
public Integer getNowRCount() {
return nowRCount;
}
public void setNowRCount(Integer nowRCount) {
this.nowRCount = nowRCount;
}
public Integer getNowPCount() {
return nowPCount;
}
public void setNowPCount(Integer nowPCount) {
this.nowPCount = nowPCount;
}
}
package com.hanyun.hip.mrqc.jms.entity;
/**
* @ClassName:UReportRectificationDTO
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/12/2
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/12/2
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public class UReportRectificationDisplayDTO {
private String rectificationRate;
private String name;
private String lastRectificationRate;
private long sunCount;
private long rectificationCount;
private String beginDate;
private String endDate;
private double sort;
public long getSunCount() {
return sunCount;
}
public void setSunCount(long sunCount) {
this.sunCount = sunCount;
}
public long getRectificationCount() {
return rectificationCount;
}
public void setRectificationCount(long rectificationCount) {
this.rectificationCount = rectificationCount;
}
public double getSort() {
return sort;
}
public void setSort(double sort) {
this.sort = sort;
}
public String getRectificationRate() {
return rectificationRate;
}
public void setRectificationRate(String rectificationRate) {
this.rectificationRate = rectificationRate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLastRectificationRate() {
return lastRectificationRate;
}
public void setLastRectificationRate(String lastRectificationRate) {
this.lastRectificationRate = lastRectificationRate;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
}
package com.hanyun.hip.mrqc.jms.mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @ClassName:AutoAssignMapper
* @author: zgp
* @CreateDate: 2023/2/4
* @UpdateUser: zgp
* @UpdateDate: 2022/4/4
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Repository
public interface AutoAssignMapper {
List<Map<String,Object>> selecAllDeptsurgicalOperateList(@Param("qcMonth") String qcMonth,@Param("userId") Long userId,@Param("dataScope") String dataScope);
List<String> selectAllZyRecordId(@Param("department") String department);
}
package com.hanyun.hip.mrqc.jms.mapper;
import com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig;
import com.hanyun.hip.mrqc.jms.entity.ProcessDTO;
import com.hanyun.hip.mrqc.jms.entity.ProcessYWKDTO;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import com.hanyun.hip.mrqc.service.entity.MrqcProcess;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 电子病历规则分配 数据层
*
* @author ruoyi
* @date 2024-04-22
*/
public interface MrqcEmrConfigMapper {
/**
* 根据key查询电子病历分配信息
* @param configKey
* @return
*/
public MrqcEmrConfig selectMrqcEmrConfigByKey(@Param("configKey") String configKey);
/**
* 查询电子病历规则分配信息
*
* @param configId 电子病历规则分配ID
* @return 电子病历规则分配信息
*/
public MrqcEmrConfig selectMrqcEmrConfigById(Long configId);
/**
* 查询电子病历规则分配列表
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 电子病历规则分配集合
*/
public List<MrqcEmrConfig> selectMrqcEmrConfigList(MrqcEmrConfig mrqcEmrConfig);
/**
* 新增电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
public int insertMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig);
/**
* 修改电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
public int updateMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig);
/**
* 删除电子病历规则分配
*
* @param configId 电子病历规则分配ID
* @return 结果
*/
public int deleteMrqcEmrConfigById(Long configId);
/**
* 批量删除电子病历规则分配
*
* @param configIds 需要删除的数据ID
* @return 结果
*/
public int deleteMrqcEmrConfigByIds(String[] configIds);
List<ProcessDTO> getProcessList(MrqcProcess mrqcProcess);
List<ProcessYWKDTO> getProcessListByYWK(MrqcProcess mrqcProcess);
List<EmrRecord> selectEmrRecordList(EmrRecord emrRecord);
List<EmrRecord> selectEmrRecordNotLikeList(EmrRecord emrRecord);
List<EmrRecord> selectEmrRecordCommitList(EmrRecord emrRecord);
}
package com.hanyun.hip.mrqc.jms.mapper;
import com.ruoyi.system.domain.SysDept;
import java.util.List;
import java.util.Map;
public interface TdfyDeptMapper {
Integer insertDeptBackId(SysDept var1);
List<Map<String ,String>> findAllInpatientArea();
}
package com.hanyun.hip.mrqc.jms.mapper;
import com.hanyun.hip.mrqc.jms.entity.UReportDeathDTO;
import com.hanyun.hip.mrqc.jms.entity.UReportRectificationDTO;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @ClassName:UReportExportMapper
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/12/1
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/12/1
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Repository
public interface UReportExportMapper {
List<UReportDeathDTO> selectDeathList(EmrRecord record);
List<EmrRecord> selectEmrRecordList(EmrRecord emrRecord);
List<EmrRecord> selectEmrRecordListByLabelId(EmrRecord emrRecord);
List<EmrRecord> selectEmrRecordListByApproved(EmrRecord emrRecord);
List<UReportRectificationDTO> selectRectificationList(EmrRecord emrRecord);
}
package com.hanyun.hip.mrqc.jms.service;
import java.util.List;
import java.util.Map;
/**
* @ClassName:IAutoAssignService
* @author: zgp
* @CreateDate: 2023/2/4
* @UpdateUser: zgp
* @UpdateDate: 2022/4/4
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
public interface IAutoAssignService {
List<Map<String,Object>> selecAllDeptsurgicalOperateList(String qcMonth,Long userId,String dataScope);
}
package com.hanyun.hip.mrqc.jms.service;
import com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig;
import com.hanyun.hip.mrqc.jms.entity.ProcessDTO;
import com.hanyun.hip.mrqc.jms.entity.ProcessYWKDTO;
import com.hanyun.hip.mrqc.service.entity.MrqcProcess;
import java.util.List;
/**
* 电子病历规则分配 服务层
*
* @author ruoyi
* @date 2024-04-22
*/
public interface IMrqcEmrConfigService {
/**
* 根据key查询电子病历分配信息
* @param configKey
* @return
*/
public MrqcEmrConfig selectMrqcEmrConfigByKey(String configKey);
/**
* 查询电子病历规则分配信息
*
* @param configId 电子病历规则分配ID
* @return 电子病历规则分配信息
*/
public MrqcEmrConfig selectMrqcEmrConfigById(Long configId);
/**
* 查询电子病历规则分配列表
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 电子病历规则分配集合
*/
public List<MrqcEmrConfig> selectMrqcEmrConfigList(MrqcEmrConfig mrqcEmrConfig);
/**
* 新增电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
public int insertMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig);
/**
* 修改电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
public int updateMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig);
/**
* 删除电子病历规则分配信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteMrqcEmrConfigByIds(String ids);
List<ProcessDTO> getProcessList(MrqcProcess mrqcProcess);
List<ProcessYWKDTO> getProcessListByYWK(MrqcProcess mrqcProcess);
}
package com.hanyun.hip.mrqc.jms.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hanyun.hip.mrqc.common.DateUtils;
import com.hanyun.hip.mrqc.jms.constants.JmsConstant;
import com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig;
import com.hanyun.hip.mrqc.jms.mapper.AutoAssignMapper;
import com.hanyun.hip.mrqc.rule.constant.Constant;
import com.hanyun.hip.mrqc.service.Component.CommonComp;
import com.hanyun.hip.mrqc.service.entity.*;
import com.hanyun.hip.mrqc.service.manage.AutoAssignEMR;
import com.hanyun.hip.mrqc.service.manage.AutoAssignEMRToolService;
import com.hanyun.hip.mrqc.service.mapper.IEmrRecordMapper;
import com.hanyun.hip.mrqc.service.mapper.MrqcOperatorInfoMapper;
import com.hanyun.hip.mrqc.service.mapper.MrqcOperatorRecordMapper;
import com.hanyun.hip.mrqc.service.service.IMrqcOperatorInfoService;
import com.hanyun.hip.mrqc.service.service.IMrqcReportMonthService;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.mapper.SysConfigMapper;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import java.util.*;
/**
*
* 南通大学附属医院电子病历分配实现
*
*/
@Component("JmsAutoAssignEMRImpl")
public class JmsAutoAssignEMRImpl extends AutoAssignEMR {
private static final Logger logger = LoggerFactory.getLogger(JmsAutoAssignEMRImpl.class);
private static final String PREFIX_ZJSY_SYSCONFIG_RULE_KEY = "mrqc.rule.getEmr.tdfy.";
private final AutoAssignEMRToolService assignEMRToolService;
private final IMrqcReportMonthService mrqcReportMonthService;
private final MrqcOperatorRecordMapper mrqcOperatorRecordMapper;
private final SysConfigMapper sysConfigMapper;
private final SysUserMapper sysUserMapper;
private final SysDeptMapper sysDeptMapper;
private final IEmrRecordMapper emrRecordMapper;
private final AutoAssignMapper autoAssignMapper;
@Autowired
private IMrqcEmrConfigService mrqcEmrConfigService;
@Autowired
private IMrqcOperatorInfoService mrqcOperatorInfoServicel;
@Autowired
private MrqcOperatorInfoMapper mrqcOperatorInfoMapper;
@Autowired
private CommonComp commonComp;
public JmsAutoAssignEMRImpl(IEmrRecordMapper emrRecordMapper, SysDeptMapper sysDeptMapper,
SysUserMapper sysUserMapper, SysConfigMapper sysConfigMapper,
MrqcOperatorRecordMapper mrqcOperatorRecordMapper, IMrqcReportMonthService mrqcReportMonthService,
AutoAssignEMRToolService assignEMRToolService,AutoAssignMapper autoAssignMapper) {
this.emrRecordMapper = emrRecordMapper;
this.sysDeptMapper = sysDeptMapper;
this.sysUserMapper = sysUserMapper;
this.sysConfigMapper = sysConfigMapper;
this.mrqcOperatorRecordMapper = mrqcOperatorRecordMapper;
this.mrqcReportMonthService = mrqcReportMonthService;
this.assignEMRToolService = assignEMRToolService;
this.autoAssignMapper = autoAssignMapper;
}
@Override
public void pageParameters(ModelMap modelMap) {
commonComp.getLoginUserInfo(modelMap);
List<MrqcEmrConfig> list=mrqcEmrConfigService.selectMrqcEmrConfigList(null);
List<QcUser> qcUsers=mrqcOperatorInfoServicel.selectMrqcOeprInfoByList(null, null);
modelMap.put("list",list);
modelMap.put("qcUsers",qcUsers);
}
@Override
public List<MrqcOperatorInfo> obtainOperator(String qcMonth) {
List<MrqcOperatorInfo> operatorInfoList = new ArrayList<>();
HashMap<String,MrqcOperatorInfo> hashMap = new HashMap<>();
//规则中配置的质控员
JSONArray jsonArray =JSONArray.parseArray(mrqcEmrConfigService.selectMrqcEmrConfigByKey("emrs").getConfigValue());
for(int i=0;i<jsonArray.size();i++){
JSONObject jsonObject = jsonArray.getJSONObject(i);
String departmentSel = jsonObject.getString("departmentSel");
String inpatientAreaSel = jsonObject.getString("inpatientAreaSel");
String zkySel = jsonObject.getString("zkySel");
MrqcOperatorInfo operatorInfo = new MrqcOperatorInfo();
operatorInfo.setUserId(Long.parseLong(zkySel));
operatorInfo.setOperationDept(departmentSel);
operatorInfo.setMedicalGroup(inpatientAreaSel);
//判断是否存在
MrqcOperatorInfo userInfo = mrqcOperatorInfoMapper.selectMrqcOperatorInfoById(operatorInfo.getUserId()+"");
if(userInfo != null) {
if(com.ruoyi.common.utils.StringUtils.isNotBlank(departmentSel) || com.ruoyi.common.utils.StringUtils.isNotBlank(inpatientAreaSel)){
mrqcOperatorInfoMapper.updateMrqcOperatorInfo(operatorInfo);
}
}else {
// INFO表中插入一条质控员的数据
mrqcOperatorInfoMapper.insertMrqcOperatorInfo(operatorInfo);
}
//用map判断质控员是否已存在
hashMap.put(zkySel,operatorInfo);
operatorInfoList.add(operatorInfo);
}
//选择的质控员
// 获取上个月的质控员,作为这个月的质控员列表
String controlMonth = assignEMRToolService.calculateQualityControlMonth(qcMonth);
MrqcReportMonth mrqcReportMonth = new MrqcReportMonth();
mrqcReportMonth.setQcMonth(controlMonth);
List<MrqcReportMonth> reportMonths = mrqcReportMonthService.selectMrqcReportMonthList(mrqcReportMonth);
if (CollectionUtils.isNotEmpty(reportMonths)) {
for (MrqcReportMonth month : reportMonths) {
MrqcOperatorInfo operatorInfo = new MrqcOperatorInfo();
if(!hashMap.containsKey(month.getUserId())){
//不存在,添加
operatorInfo.setUserId(month.getUserId());
operatorInfoList.add(operatorInfo);
}
}
}
return operatorInfoList;
}
@Override
public List<EmrRecord> assignEmrToOperator(MrqcOperatorInfo currOperator, MrqcReportMonth reportMonth,
List<MrqcOperatorInfo> mrqcOpts) {
// 每个质控员质控病例数,默认每个质控员20份
int emrsPerMonth=Integer.parseInt(mrqcEmrConfigService.selectMrqcEmrConfigByKey(JmsConstant.EMRS_PERDAY).getConfigValue());
// 获取该质控员需要质控的科室
SysUser sysUser = sysUserMapper.selectUserById(currOperator.getUserId());
if(sysUser == null) {
return null;
}
MrqcOperatorRecord record = new MrqcOperatorRecord();
record.setUserId(currOperator.getUserId());
record.setReportId(reportMonth.getReportId());
List<MrqcOperatorRecord> records = mrqcOperatorRecordMapper.selectMrqcOperatorRecordList(record);
// if (CollectionUtils.isNotEmpty(records) && records.size() >= emrsPerMonth) {
// return new ArrayList<>();
// } else {
// emrsPerMonth = emrsPerMonth - records.size();
// }
List<EmrRecord> result = new ArrayList<>();
String dataScope = " AND (u.inpatient_area = '"+currOperator.getOperationDept()+"') ";
if(StringUtils.isNotBlank(currOperator.getMedicalGroup())){
//病区不为空
dataScope = " AND (u.inpatient_area = '"+currOperator.getOperationDept()+"') AND department_name = '"+currOperator.getMedicalGroup()+"' ";
}
List<Map<String,Object>> list = autoAssignMapper.selecAllDeptsurgicalOperateList(reportMonth.getQcMonth(),sysUser.getUserId(),dataScope);
if (CollectionUtils.isNotEmpty(list)) {
if (list.size() > emrsPerMonth) {
for(int i=0;i<emrsPerMonth;i++) {
Map<String,Object> map = list.get(i);
String recordId = (String)map.get("record_id");
String inTime = String.valueOf(map.get("in_time"));
String outTime = String.valueOf(map.get("out_time"));
String hospitDoctor = (String)map.get("hospit_Doctor");
EmrRecord emrRecord = new EmrRecord();
emrRecord.setRecordId(recordId);
try {
emrRecord.setInTime(DateUtils.stringToDate(inTime, DateUtils.DATE_TIME_FORMAT));
emrRecord.setOutTime(DateUtils.stringToDate(outTime, DateUtils.DATE_TIME_FORMAT));
} catch (Exception e) {
e.printStackTrace();
}
emrRecord.setHospitDoctor(hospitDoctor);
result.add(emrRecord);
}
} else {
for(Map<String,Object> map:list) {
String recordId = (String)map.get("record_id");
String inTime = String.valueOf(map.get("in_time"));
String outTime = String.valueOf(map.get("out_time"));
String hospitDoctor = (String)map.get("hospit_Doctor");
EmrRecord emrRecord = new EmrRecord();
emrRecord.setRecordId(recordId);
try {
emrRecord.setInTime(DateUtils.stringToDate(inTime, DateUtils.DATE_TIME_FORMAT));
emrRecord.setOutTime(DateUtils.stringToDate(outTime, DateUtils.DATE_TIME_FORMAT));
} catch (Exception e) {
e.printStackTrace();
}
emrRecord.setHospitDoctor(hospitDoctor);
result.add(emrRecord);
}
}
}
return result;
}
private static int getRandomNumberInRange(int min, int max) {
if (min >= max) {
throw new IllegalArgumentException("max must be greater than min");
}
Random r = new Random();
return r.nextInt((max - min) + 1) + min;
}
private String getConfigValue(List<SysConfig> configs, String configKey, String defaultValue) {
for (SysConfig config : configs) {
if (configKey.equals(config.getConfigKey())) {
return StringUtils.isNotBlank(config.getConfigValue()) ? config.getConfigValue() : defaultValue;
}
}
return defaultValue;
}
@Override
public List<MrqcOperatorRecord> builderMrqcOperatorRecord(MrqcOperatorInfo currOperator,
MrqcReportMonth reportMonth, List<EmrRecord> emrRecords) {
List<MrqcOperatorRecord> recordList = new ArrayList<>();
if(emrRecords != null) {
for (EmrRecord emrRecord : emrRecords) {
MrqcOperatorRecord record = new MrqcOperatorRecord();
record.setReportId(reportMonth.getReportId());
record.setRecordId(emrRecord.getRecordId());
record.setUserId(reportMonth.getUserId());
record.setApproved(Constant.UN_APPROVED);
record.setCreater(reportMonth.getUserId() + "");
record.setCreateTime(new Date());
record.setAdmissionTime(simpleFormatter.format(emrRecord.getInTime()));
record.setDischargeTime(simpleFormatter.format(emrRecord.getOutTime()));
record.setHomepagePhysician(emrRecord.getHospitDoctor());
recordList.add(record);
}
}
return recordList;
}
@Override
@Transactional
public void autoAssignEMRTemplate(String qcMonth) {
logger.info("开始进行通大病例数据分配任务...");
String controlMonth = super.obtainQualityControlMonth(qcMonth);
//质控员列表
List<MrqcOperatorInfo> mrqcOpts = obtainOperator(qcMonth);
if(CollectionUtils.isNotEmpty(mrqcOpts)){
for(MrqcOperatorInfo operator : mrqcOpts){
// 记录质控员的质控月信息
MrqcReportMonth reportMonth = assignEMRToolService.recordQCmonthlyInformation(operator, qcMonth);
if (operator.getUserId() != null){
if(hook(operator)){
// 获取质控员的质控病历列表
List<EmrRecord> emrRecords = assignEmrToOperator(operator, reportMonth, mrqcOpts);
// 组建质控病历记录信息
List<MrqcOperatorRecord> records = builderMrqcOperatorRecord(operator, reportMonth, emrRecords);
// 记录质控病历列表
assignEMRToolService.recordMonthQcEmrList(records);
}
}
}
}
}
}
package com.hanyun.hip.mrqc.jms.service.extractor;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.hanyun.hip.mrqc.rule.entity.fact.MrqcStructData;
import com.hanyun.hip.mrqc.service.entity.EmrContent;
import com.hanyun.hip.mrqc.service.entity.MrqcStructExtract;
import com.hanyun.hip.mrqc.service.service.CustomStructExtracter;
import com.hanyun.hip.mrqc.service.util.JsonUtil;
import com.hanyun.hip.mrqc.service.util.UUidUtil;
import com.jayway.jsonpath.JsonPath;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* ------------------------------------------------------------------------<br>
* (or): 表示由多个表达式时,如果有一个有值就退出,否则一直往下取值
* --> 表示对结果集需要做额外的出来:
* - [join] 表示对结果集进行全部拼接,获取的值是数组的时候,多个值拼接成一个
* - [PRE] 表示要在结构的前面添加额外的标识,该标识由参数固定
* - [END] 与[PRE]相对,表示要在结果的末尾添加额外的标识,该标识由参数固定
* - [DEL] 后续的表达式,以逗号隔开,进行遍历删除,删除首尾
* - [INDEX[1]] 若取值为列表时,获取指定下标的值,下标从 0 开始
* (and): 表示由多个表达式同时取出结果,并进行结果的拼接
$.ScatterData.Component.Section[?(@.Code.Code=="S004")].Composite[?(@.Code.Code=="V006")].StyleText-->[join](and)$.ScatterData.Component.Section[?(@.Code.Code=="S004")].Composite[?(@.Code.Code=="V006")].StyleText
[AAA,BBB] = AAABBB
*
* @描述: JaywayJsonPathExtractor
* <br>---------------------------------------------
* @时间: 2024/3/26
* @版本: 1.0
* @创建人: Yurl
*/
public class JaywayJsonPathExtractor implements CustomStructExtracter {
private static final String RESULT_ORIENTED_CHARACTERS = "-->";
private static final String MULTIPLE_EXPRESSION = "(and)";
private static final String OR_EXPRESSION = "(or)";
@Override
public MrqcStructData extract(MrqcStructExtract struct, EmrContent content, MrqcStructData parent) {
try {
parent = parent == null ? new MrqcStructData() : parent;
String structJson = content.getStructJson();
String jsonPath = struct.getExtScript();
if (StringUtils.isEmpty(jsonPath) || StringUtils.isEmpty(structJson)) {
return parent;
}
List<String> expressList = new ArrayList<>();
if (jsonPath.contains(OR_EXPRESSION)){
expressList = Arrays.asList(jsonPath.split("\\(or\\)"));
} else {
expressList.add(jsonPath);
}
String resultObj = "";
for (String express : expressList){
List<String> jsonPathList = new ArrayList<>();
if (express.contains(MULTIPLE_EXPRESSION)) {
jsonPathList = Arrays.asList(express.split("\\(and\\)"));
} else {
jsonPathList.add(express);
}
resultObj = getJsonPathValue(structJson, jsonPathList);
// 去除转义等字符
resultObj = StringEscapeUtils.unescapeJava(resultObj);
if (StrUtil.isNotBlank(resultObj) && !StrUtil.equalsIgnoreCase("null", resultObj)){
break;
}
}
parent.setDataValue(resultObj);
parent.setDataId(UUidUtil.getUUID());
parent.setContentId(content.getContentId());
parent.setRecordId(content.getRecordId());
parent.setStructId(struct.getStructId());
} catch (Exception e) {
e.printStackTrace();
}
return parent;
}
public static String getJsonPathValue(String structJson, List<String> jsonPathList) {
StringBuilder resultHandler = new StringBuilder();
for (String jsonPath : jsonPathList) {
String resultHandPath = null;
if (jsonPath.contains(RESULT_ORIENTED_CHARACTERS)) {
String[] split = jsonPath.split(RESULT_ORIENTED_CHARACTERS);
jsonPath = split[0];
resultHandPath = split[1];
}
// 格式化
jsonPath = JsonUtil.transferToJsonPath(jsonPath);
// 读取JSON数据
Object resultObj = JsonPath.read(structJson, jsonPath);
String result = arrayResultHandler(resultObj, resultHandPath);
resultHandler.append(result);
}
return resultHandler.toString();
}
private static String arrayResultHandler(Object resultObj, String resultHandPath) {
// 默认去掉首尾空格、双引号
if (ObjectUtil.isEmpty(resultObj)) {
return "";
}
String resultString = null;
if (resultObj instanceof String) {
resultString = resultObj.toString();
resultString = valueFilter(resultString);
} else if (resultObj instanceof ArrayList) {
ArrayList arrayList = (ArrayList) resultObj;
if (StrUtil.equalsIgnoreCase(resultHandPath, "[join]")) {
StringBuilder stringBuilder = new StringBuilder();
for (Object result : arrayList) {
stringBuilder.append("" + valueFilter(StrUtil.toString(result)));
}
resultString = stringBuilder.toString();
} else if (StrUtil.startWith(resultHandPath, "[INDEX[")){
int index = Integer.parseInt(resultHandPath.substring(7, resultHandPath.length() - 2));
resultString = valueFilter(arrayList.size() < index ? "" : arrayList.get(index).toString());
} else {
resultString = valueFilter(StrUtil.toString(arrayList.get(0)));
}
} else {
resultString = StrUtil.toString(resultObj);
}
if (StrUtil.isNotBlank(resultHandPath)) {
if (resultHandPath.startsWith("[PRE]")) {
// 添加后面的字符
resultString = resultHandPath.substring(5) + resultString;
} else if (resultHandPath.startsWith("[END]")) {
// 添加后面的字符
resultString = resultString + resultHandPath.substring(5);
} else if (resultHandPath.startsWith("[DEL]")) {
String handExpress = resultHandPath.substring(5);
for (String express : handExpress.split(",")) {
resultString = StrUtil.removeSuffix(resultString, express);
resultString = StrUtil.removePrefix(resultString, express);
}
}else if(resultHandPath.startsWith("[SUBSTR]")){
String handExpress = resultHandPath.substring(8);
String[] flag = handExpress.split(",");
if(flag.length>=2){
String start = flag[0];
String end = flag[1];
resultString = resultString.substring(resultString.indexOf(start)+start.length(),resultString.lastIndexOf(end));
}else {
resultString = resultString.substring(resultString.indexOf(flag[0])+flag[0].length(),resultString.length());
}
}
}
return resultString;
}
private static String valueFilter(String resultString) {
if (StrUtil.isBlank(resultString)) {
return "";
}
resultString = StrUtil.removeSuffix(resultString, "\"");
resultString = StrUtil.removePrefix(resultString, "\"");
if (StrUtil.equalsIgnoreCase("null", StrUtil.trim(resultString))) {
return "";
}
return resultString;
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hanyun.hip.mrqc.jms.mapper.AutoAssignMapper;
import com.hanyun.hip.mrqc.jms.service.IAutoAssignService;
import java.util.List;
import java.util.Map;
/**
* @ClassName:AutoAssignServiceImpl
* @author: zgp
* @CreateDate: 2023/6/27
* @UpdateUser: zgp
* @UpdateDate: 2022/6/27
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Service
public class AutoAssignServiceImpl implements IAutoAssignService {
private Logger logger = LogManager.getLogger(AutoAssignServiceImpl.class);
@Autowired
private AutoAssignMapper autoAssignMapper;
@Override
public List<Map<String,Object>> selecAllDeptsurgicalOperateList(String qcMonth,Long userId,String dataScope) {
return autoAssignMapper.selecAllDeptsurgicalOperateList(qcMonth,userId,dataScope);
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.hanyun.hip.mrqc.service.engine.EngineHookService;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import com.hanyun.hip.mrqc.service.mapper.IMrqcEmrContentMapper;
import com.hanyun.hip.mrqc.service.service.impl.MrqcEmrContentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName:EngineHookServiceImpl
* @author: xieyongtao
* @CreateDate: 2024/9/11
* @UpdateUser: xieyongtao
* @UpdateDate: 2024/9/11
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Service
public class EngineHookServiceImpl implements EngineHookService {
@Autowired
private IMrqcEmrContentMapper iMrqcEmrContentMapper;
@Override
public boolean hook(EmrRecord emrRecord) {
List<String> strings = iMrqcEmrContentMapper.selectContentIdsByRecordId(emrRecord.getRecordId());
if (CollUtil.isEmpty(strings)) {
return false;
}
return true;
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.hanyun.hip.mrqc.jms.entity.HomePigeonhole;
import com.hanyun.hip.mrqc.jms.entity.HomePigeonholeSum;
import com.hanyun.hip.mrqc.jms.entity.ReportRecordDTO;
import com.hanyun.hip.mrqc.jms.mapper.MrqcEmrConfigMapper;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import com.hanyun.hip.mrqc.service.mapper.IEmrRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* @ClassName:HomePigeonholeService
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/5
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/5
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Component
public class HomePigeonholeService {
@Autowired
private IEmrRecordMapper iEmrRecordMapper;
@Autowired
private MrqcEmrConfigMapper mrqcEmrConfigMapper;
public List<HomePigeonhole> getHomePigeonholeList(String s1, String s2, Map<String, Object> map) {
List<HomePigeonhole> homePigeonholes = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
List<EmrRecord> emrRecords = mrqcEmrConfigMapper.selectEmrRecordList(emrRecord);
Map<String, List<EmrRecord>> collect = emrRecords.stream().collect(Collectors.groupingBy(EmrRecord :: getInpatientArea));
AtomicInteger twoDayCountSum = new AtomicInteger();
AtomicInteger twoDayNotCountSum = new AtomicInteger();
AtomicInteger threeDayCountSum = new AtomicInteger();
AtomicInteger fourDayCountSum = new AtomicInteger();
AtomicInteger fiveDayCountSum = new AtomicInteger();
AtomicInteger moreThanSevenDayCountSum = new AtomicInteger();
AtomicInteger sevenDayCountSum = new AtomicInteger();
for (Map.Entry<String, List<EmrRecord>> entry : collect.entrySet()) {
List<EmrRecord> records = collect.get(entry.getKey());
HomePigeonhole homePigeonhole = new HomePigeonhole();
homePigeonhole.setBeginDate(DateUtil.formatDate(emrRecord.getBeginTime()));
homePigeonhole.setEndDate(DateUtil.formatDate(emrRecord.getEndTime()));
homePigeonhole.setInpatientArea(entry.getKey());
homePigeonhole.setHospitCount(records.size());
int twoDayCount = 0;
int twoDayNotCount = 0;
int threeDayCount = 0;
int fourDayCount = 0;
int fiveDayCount = 0;
int moreThanSevenDayCount = 0;
int sevenDayCount = 0;
for (EmrRecord record : records) {
//归档时间
Date etlTime = record.getEtlTime();
Date outTime = record.getOutTime();
if (ObjectUtil.isNotEmpty(etlTime)) {
long day = DateUtil.betweenDay(etlTime, outTime, false);
if (day <= 2) {
twoDayCount++;
twoDayCountSum.getAndIncrement();
}
if (day > 2) {
twoDayNotCount++;
twoDayNotCountSum.getAndIncrement();
}
if (day <= 3) {
threeDayCount++;
threeDayCountSum.getAndIncrement();
}
if (day <= 4) {
fourDayCount++;
fourDayCountSum.getAndIncrement();
}
if (day <= 5) {
fiveDayCount++;
fiveDayCountSum.getAndIncrement();
}
if (day <= 7) {
sevenDayCount++;
sevenDayCountSum.getAndIncrement();
}
if (day > 7) {
moreThanSevenDayCount++;
moreThanSevenDayCountSum.getAndIncrement();
}
}else {
twoDayNotCount++;
twoDayNotCountSum.getAndIncrement();
}
}
homePigeonhole.setTwoDayCount(twoDayCount);
homePigeonhole.setTwoDayPigeonhole(BigDecimal.valueOf(twoDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonhole.setTwoDayNotCount(twoDayNotCount);
homePigeonhole.setThreeDayCount(threeDayCount);
homePigeonhole.setThreeDayPigeonhole(BigDecimal.valueOf(threeDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonhole.setFourDayCount(fourDayCount);
homePigeonhole.setFourDayPigeonhole(BigDecimal.valueOf(fourDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonhole.setFiveDayCount(fiveDayCount);
homePigeonhole.setFiveDayPigeonhole(BigDecimal.valueOf(fiveDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonhole.setSevenDayCount(sevenDayCount);
homePigeonhole.setSevenDayPigeonhole(BigDecimal.valueOf(sevenDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonhole.setMoreThanSevenDayCount(moreThanSevenDayCount);
homePigeonhole.setMoreThanDayPigeonhole(BigDecimal.valueOf(moreThanSevenDayCount * 100).divide(BigDecimal.valueOf(records.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonholes.add(homePigeonhole);
}
return homePigeonholes;
}
public List<HomePigeonholeSum> getHomePigeonholeSum(String s1, String s2, Map<String, Object> map) {
List<HomePigeonholeSum> homePigeonholeSums = new ArrayList<>();
HomePigeonholeSum homePigeonholeSum = new HomePigeonholeSum();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
List<EmrRecord> emrRecords = mrqcEmrConfigMapper.selectEmrRecordList(emrRecord);
if (CollUtil.isEmpty(emrRecords)) {
return homePigeonholeSums;
}
Map<String, List<EmrRecord>> collect = emrRecords.stream().collect(Collectors.groupingBy(EmrRecord :: getInpatientArea));
AtomicInteger twoDayCountSum = new AtomicInteger();
AtomicInteger twoDayNotCountSum = new AtomicInteger();
AtomicInteger threeDayCountSum = new AtomicInteger();
AtomicInteger fourDayCountSum = new AtomicInteger();
AtomicInteger fiveDayCountSum = new AtomicInteger();
AtomicInteger moreThanSevenDayCountSum = new AtomicInteger();
AtomicInteger sevenDayCountSum = new AtomicInteger();
for (Map.Entry<String, List<EmrRecord>> entry : collect.entrySet()) {
List<EmrRecord> records = collect.get(entry.getKey());
Map<String, List<EmrRecord>> dateRecords = records.stream().collect(Collectors.groupingBy(o -> DateUtil.format(o.getOutTime(), "yyyy-MM")));
dateRecords.forEach((k, v) -> {
int twoDayCount = 0;
int twoDayNotCount = 0;
int threeDayCount = 0;
int fourDayCount = 0;
int fiveDayCount = 0;
int moreThanSevenDayCount = 0;
int sevenDayCount = 0;
for (EmrRecord record : v) {
//归档时间
Date etlTime = record.getEtlTime();
Date outTime = record.getOutTime();
if (ObjectUtil.isNotEmpty(etlTime)) {
long day = DateUtil.betweenDay(etlTime, outTime, false);
if (day <= 2) {
twoDayCount++;
twoDayCountSum.getAndIncrement();
}
if (day > 2) {
twoDayNotCount++;
twoDayNotCountSum.getAndIncrement();
}
if (day <= 3) {
threeDayCount++;
threeDayCountSum.getAndIncrement();
}
if (day <= 4) {
fourDayCount++;
fourDayCountSum.getAndIncrement();
}
if (day <= 5) {
fiveDayCount++;
fiveDayCountSum.getAndIncrement();
}
if (day <= 7) {
sevenDayCount++;
sevenDayCountSum.getAndIncrement();
}
if (day > 7) {
moreThanSevenDayCount++;
moreThanSevenDayCountSum.getAndIncrement();
}
}else {
twoDayNotCount++;
twoDayNotCountSum.getAndIncrement();
}
}
});
}
homePigeonholeSum.setTwoDayCountSum(twoDayCountSum.toString());
homePigeonholeSum.setTwoDayNotCountSum(twoDayNotCountSum.toString());
homePigeonholeSum.setThreeDayCountSum(threeDayCountSum.toString());
homePigeonholeSum.setFourDayCountSum(fourDayCountSum.toString());
homePigeonholeSum.setFiveDayCountSum(fiveDayCountSum.toString());
homePigeonholeSum.setSevenDayCountSum(sevenDayCountSum.toString());
homePigeonholeSum.setMoreThanSevenDayCountSum(moreThanSevenDayCountSum.toString());
homePigeonholeSum.setHospitCountSum(emrRecords.size() + "");
homePigeonholeSum.setTwoDayPigeonholeSum(BigDecimal.valueOf(twoDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP).toString());
homePigeonholeSum.setThreeDayPigeonholeSum(String.valueOf(BigDecimal.valueOf(threeDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP)));
homePigeonholeSum.setFourDayPigeonholeSum(String.valueOf(BigDecimal.valueOf(fourDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP)));
homePigeonholeSum.setFiveDayPigeonholeSum(String.valueOf(BigDecimal.valueOf(fiveDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP)));
homePigeonholeSum.setSevenDayPigeonholeSum(String.valueOf(BigDecimal.valueOf(sevenDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP)));
homePigeonholeSum.setMoreThanDayPigeonholeSum(String.valueOf(BigDecimal.valueOf(moreThanSevenDayCountSum.get() * 100).divide(BigDecimal.valueOf(emrRecords.size()), 2, RoundingMode.HALF_UP)));
homePigeonholeSums.add(homePigeonholeSum);
return homePigeonholeSums;
}
public List<ReportRecordDTO> getreportRecordList(String s1, String s2, Map<String, Object> map) {
List<ReportRecordDTO> reportRecordDTOS = new ArrayList<>();
List<HomePigeonhole> homePigeonholes = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
if ("null".equals(beginDate)) {
beginDate = null;
}
if ("null".equals(endDate)) {
endDate = null;
}
String type = (String) map.get("type");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
List<EmrRecord> emrRecords = mrqcEmrConfigMapper.selectEmrRecordNotLikeList(emrRecord);
for (EmrRecord record : emrRecords) {
Date etlTime = record.getEtlTime();
Date outTime = record.getOutTime();
long day = - 1;
if (ObjectUtil.isNotEmpty(etlTime)) {
day = DateUtil.betweenDay(etlTime, outTime, false);
}
ReportRecordDTO reportRecordDTO = new ReportRecordDTO();
reportRecordDTO.setRecordId(record.getRecordId());
reportRecordDTO.setPatientName(record.getPatientName());
reportRecordDTO.setInpatientArea(record.getInpatientArea());
reportRecordDTO.setDiagnosisName(record.getDiagnosisName());
reportRecordDTO.setHospitNum(record.getHospitNum());
reportRecordDTO.setHospitDoctor(record.getHospitDoctor());
reportRecordDTO.setInTime(DateUtil.formatDateTime(record.getInTime()));
reportRecordDTO.setOutTime(DateUtil.formatDateTime(record.getOutTime()));
switch (type) {
case "1":
reportRecordDTOS.add(reportRecordDTO);
break;
case "2":
if (day != - 1 && day <= 2) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "3":
if ( day > 2) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "4":
if (day != - 1 && day <= 3) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "5":
if (day != - 1 && day <= 4) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "6":
if (day != - 1 && day <= 5) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "7":
if (day != - 1 && day <= 7) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
case "8":
if (day != - 1 && day > 7) {
reportRecordDTOS.add(reportRecordDTO);
}
break;
default:
break;
}
}
return reportRecordDTOS;
}
public List<ReportRecordDTO> getRecordCommitList(String s1, String s2, Map<String, Object> map) {
List<ReportRecordDTO> reportRecordDTOS = new ArrayList<>();
List<HomePigeonhole> homePigeonholes = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
if ("null".equals(beginDate)) {
beginDate = null;
}
if ("null".equals(endDate)) {
endDate = null;
}
String type = (String) map.get("type");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
if (ObjectUtil.isNotEmpty(doctorName)) {
emrRecord.setHospitDoctor(doctorName);
}
List<EmrRecord> emrRecords = mrqcEmrConfigMapper.selectEmrRecordCommitList(emrRecord);
for (EmrRecord record : emrRecords) {
Date etlTime = record.getEtlTime();
Date outTime = record.getOutTime();
if (ObjectUtil.isEmpty(etlTime)) {
continue;
}
ReportRecordDTO reportRecordDTO = new ReportRecordDTO();
reportRecordDTO.setRecordId(record.getRecordId());
reportRecordDTO.setPatientName(record.getPatientName());
reportRecordDTO.setInpatientArea(record.getInpatientArea());
reportRecordDTO.setDiagnosisName(record.getDiagnosisName());
reportRecordDTO.setHospitNum(record.getHospitNum());
reportRecordDTO.setHospitDoctor(record.getHospitDoctor());
reportRecordDTO.setInTime(DateUtil.formatDateTime(record.getInTime()));
reportRecordDTO.setOutTime(DateUtil.formatDateTime(record.getOutTime()));
reportRecordDTO.setEtlTime(DateUtil.formatDateTime(record.getEtlTime()));
reportRecordDTOS.add(reportRecordDTO);
}
return reportRecordDTOS;
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.hanyun.hip.mrqc.common.EmrETLApi;
import com.hanyun.hip.mrqc.common.task.AdmissionAndDaysDischargeETLTask;
import com.hanyun.hip.mrqc.jms.api.JmsEmrETLApi;
import com.hanyun.hip.mrqc.rule.constant.Constant;
import com.hanyun.hip.mrqc.rule.util.SpringUtil;
import com.hanyun.hip.mrqc.service.service.IMrqcEtlService;
import com.hanyun.hip.mrqc.service.util.XmlTool;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import org.apache.commons.collections.CollectionUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.dom4j.DocumentException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import javax.net.ssl.SSLContext;
import java.nio.charset.Charset;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Component("JmsCommonTask")
public class JmsCommonTask {
private static final Logger logger = LoggerFactory.getLogger(JmsCommonTask.class);
@Autowired
IMrqcEtlService mrqcEtlService;
@Autowired
private JdbcTemplate jdbcTemplate;
private static final String WEBSERVICE_XML = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:dhcc=\"http://www.dhcc.com.cn\">\n" +
"<soapenv:Header/>\n" +
"<soapenv:Body>\n" +
" <dhcc:GetHISInfo>\n" +
" <dhcc:action>%s</dhcc:action>\n" +
" <dhcc:Input><![CDATA[%s]]></dhcc:Input>\n" +
" </dhcc:GetHISInfo>\n" +
"</soapenv:Body>\n" +
"</soapenv:Envelope>";
private static String doPostSoap(String postUrl, String requestCode, String requestParam, String soapAction) {
int socketTimeout = 60000;// 请求超时时间
int connectTimeout = 60000;// 传输超时时间
String retStr = "";
// 创建HttpClientBuilder
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
try {
//忽略SSL证书(https时需要证书)
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (arg0, arg1) -> true).build();
httpClientBuilder.setSSLContext(sslContext);
httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) {
throw new RuntimeException("Could not disable SSL on HttpClient builder.", e);
}
// HttpClient
CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
HttpPost httpPost = new HttpPost(postUrl);
// 设置请求和传输超时时间
RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(socketTimeout)
.setConnectTimeout(connectTimeout).build();
httpPost.setConfig(requestConfig);
try {
httpPost.setHeader("Content-Type", "text/xml;charset=UTF-8");
httpPost.setHeader("SOAPAction", soapAction);
StringEntity data = new StringEntity(String.format(WEBSERVICE_XML, requestCode, requestParam), Charset.forName("UTF-8"));
httpPost.setEntity(data);
CloseableHttpResponse response = closeableHttpClient
.execute(httpPost);
HttpEntity httpEntity = response.getEntity();
if (httpEntity != null) {
// 打印响应内容
retStr = EntityUtils.toString(httpEntity, "UTF-8");
//LOGGER.info("response:" + retStr);
}
// 释放资源
closeableHttpClient.close();
} catch (Exception e) {
logger.error("文书编号:{};获取文书请求出错! 异常信息:{}", e.getMessage());
}
return retStr;
}
public void refreshEtlTime() {
String querySql = "SELECT record_id FROM mrqc_record WHERE auto is null or auto = ''";
List<String> recordIds = jdbcTemplate.queryForList(querySql, String.class);
List<Map<String,String>> mapList = new ArrayList<>();
for (String recordId : recordIds) {
String response = doPostSoap("http://172.17.0.206/csp/hsb/DHC.Published.PUB0010.BS.PUB0010.CLS", "", recordId, "http://www.dhcc.com.cn/DHC.Published.PUB0010.BS.PUB0010.GetHISInfo");
try {
JSONObject jsonObject = XmlTool.documentToJSONObject(response);
JSONObject serviceResponse = jsonObject.getJSONObject("Body").getJSONObject("GetHISInfoResponse");
if (null != serviceResponse && serviceResponse.size() != 0) {
String resultResponse = serviceResponse.getString("GetHISInfoResult");
JSONObject admFirstPage = XmlTool.documentToJSONObject(resultResponse);
String gdsj = admFirstPage.getString("GDSJ");
if (StrUtil.isNotEmpty(gdsj)) {
Map<String, String> map = new HashMap<>();
map.put("recordId", recordId);
map.put("gdsj", gdsj);
mapList.add(map);
}
}
}catch (DocumentException e) {
logger.error("数据抽提, 病历recordId: {} ,病案数据XML转换异常! ExceptionMsg: {}", recordId, e.getMessage());
}
}
if (CollUtil.isNotEmpty(mapList)) {
String sql = "UPDATE mrqc_record SET etl_time = ? WHERE record_id = ?";
jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
Map<String, String> map = mapList.get(i);
ps.setString(1, map.get("recordId")); // 假设id是主键
ps.setString(2, map.get("gdsj")); // 假设columnName是要更新的字段
}
@Override
public int getBatchSize() {
return mapList.size();
}
});
}
}
@Log(title = "抽提未质控数据", businessType = BusinessType.OTHER)
public void etlAutoisNullTask() {
try {
if (CollectionUtils.isNotEmpty(Constant.ETL_APIS)) {
for (String etlApi : Constant.ETL_APIS) {
EmrETLApi emrETLApi = (EmrETLApi) SpringUtil.getBean(etlApi);
if (emrETLApi != null) {
// 先增量更新
String querySql = "SELECT record_id FROM mrqc_record WHERE auto is null or auto = ''";
List<String> recordIds = jdbcTemplate.queryForList(querySql, String.class);
if (CollectionUtils.isNotEmpty(recordIds)) {
ExecutorService executorService = Executors
.newFixedThreadPool(10);
final CountDownLatch countDownLatch = new CountDownLatch(recordIds.size());
try {
for (int i = 0; i < recordIds.size(); i++) {
String recordId = recordIds.get(i);
try {
emrETLApi.etlEmr(null, recordId, null, null, null, null, true, null, mrqcEtlService, 1, null);
logger.info("==================》增量抽取未质控病历,完成进度:{}/{}", i, recordIds.size());
} catch (Exception e) {
logger.error("电子病历文书抽取异常,recordID={}", recordId);
} finally {
countDownLatch.countDown();
}
}
// 保证所有的检查都完毕后才退出
countDownLatch.await();
} catch (InterruptedException ignore) {
logger.error("抽取未质控电子病历文书被中断。");
} finally {
executorService.shutdownNow();
}
}
}
}
}
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig;
import com.hanyun.hip.mrqc.jms.entity.ProcessDTO;
import com.hanyun.hip.mrqc.jms.entity.ProcessYWKDTO;
import com.hanyun.hip.mrqc.jms.mapper.MrqcEmrConfigMapper;
import com.hanyun.hip.mrqc.jms.service.IMrqcEmrConfigService;
import com.hanyun.hip.mrqc.service.entity.MrqcProcess;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* 电子病历规则分配 服务层实现
*
* @author ruoyi
* @date 2024-04-22
*/
@Service
public class MrqcEmrConfigServiceImpl implements IMrqcEmrConfigService {
@Autowired
private MrqcEmrConfigMapper mrqcEmrConfigMapper;
@Override
public MrqcEmrConfig selectMrqcEmrConfigByKey(String configKey) {
return mrqcEmrConfigMapper.selectMrqcEmrConfigByKey(configKey);
}
/**
* 查询电子病历规则分配信息
*
* @param configId 电子病历规则分配ID
* @return 电子病历规则分配信息
*/
@Override
public MrqcEmrConfig selectMrqcEmrConfigById(Long configId) {
return mrqcEmrConfigMapper.selectMrqcEmrConfigById(configId);
}
/**
* 查询电子病历规则分配列表
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 电子病历规则分配集合
*/
@Override
public List<MrqcEmrConfig> selectMrqcEmrConfigList(MrqcEmrConfig mrqcEmrConfig) {
return mrqcEmrConfigMapper.selectMrqcEmrConfigList(mrqcEmrConfig);
}
/**
* 新增电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
@Override
public int insertMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig) {
return mrqcEmrConfigMapper.insertMrqcEmrConfig(mrqcEmrConfig);
}
/**
* 修改电子病历规则分配
*
* @param mrqcEmrConfig 电子病历规则分配信息
* @return 结果
*/
@Override
public int updateMrqcEmrConfig(MrqcEmrConfig mrqcEmrConfig) {
return mrqcEmrConfigMapper.updateMrqcEmrConfig(mrqcEmrConfig);
}
/**
* 删除电子病历规则分配对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteMrqcEmrConfigByIds(String ids) {
return mrqcEmrConfigMapper.deleteMrqcEmrConfigByIds(Convert.toStrArray(ids));
}
@Override
public List<ProcessYWKDTO> getProcessListByYWK(MrqcProcess mrqcProcess) {
List<ProcessYWKDTO> processListByYWK = mrqcEmrConfigMapper.getProcessListByYWK(mrqcProcess);
return processListByYWK;
}
@Override
public List<ProcessDTO> getProcessList(MrqcProcess mrqcProcess) {
List<ProcessDTO> processList = mrqcEmrConfigMapper.getProcessList(mrqcProcess);
if (CollUtil.isNotEmpty(processList)) {
for (ProcessDTO process : processList) {
String commitTime = process.getCommitTime();
String auditTime = process.getAuditTime();
if (StrUtil.isEmpty(auditTime) || StrUtil.isEmpty(commitTime)) {
continue;
}
long diffInMillies = DateUtil.parse(commitTime).getTime() - DateUtil.parse(auditTime).getTime();
long diff = Math.abs(diffInMillies);
long days = TimeUnit.MILLISECONDS.toDays(diff);
long hours = TimeUnit.MILLISECONDS.toHours(diff) % 24;
long minutes = TimeUnit.MILLISECONDS.toMinutes(diff) % 60;
String sign = diffInMillies >= 0 ? "+" : "-";
process.setDiffTime("时间差: " + sign + days + " 天, " + hours + " 小时, " + minutes + " 分钟");
}
}
return processList;
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import com.hanyun.hip.mrqc.jms.entity.ProcessDTO;
import com.hanyun.hip.mrqc.jms.entity.ProcessYWKDTO;
import com.hanyun.hip.mrqc.jms.service.IMrqcEmrConfigService;
import com.hanyun.hip.mrqc.service.entity.MrqcProcess;
import com.hanyun.hip.mrqc.service.service.MrqcAsyncExportService;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysRole;
import com.ruoyi.system.domain.SysUser;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName:ProcessListExport
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/11/1
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/11/1
* @UpdateRemark:
* @Description:
* @Version: [V1.0]
*/
@Service("MrqcAsyncExportService")
public class ProcessListExportService implements MrqcAsyncExportService<MrqcProcess> {
Logger logger = LogManager.getLogger(ProcessListExportService.class);
@Autowired
private IMrqcEmrConfigService iMrqcEmrConfigService;
@Override
public List<?> export(MrqcProcess mrqcProcess) {
SysUser sysUser = ShiroUtils.getSysUser();
List<SysRole> roles = sysUser.getRoles();
boolean anyMatch = roles.stream().anyMatch(o -> "ywkdc".equals(o.getRoleKey()));
if (anyMatch){
List<ProcessYWKDTO> processList = iMrqcEmrConfigService.getProcessListByYWK(mrqcProcess);
return processList;
}else {
List<ProcessDTO> processList = iMrqcEmrConfigService.getProcessList(mrqcProcess);
return processList;
}
}
}
package com.hanyun.hip.mrqc.jms.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.hanyun.hip.mrqc.jms.entity.*;
import com.hanyun.hip.mrqc.jms.mapper.UReportExportMapper;
import com.hanyun.hip.mrqc.service.entity.EmrRecord;
import com.hanyun.hip.mrqc.service.mapper.IEmrRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@Component
public class UReportExportService {
@Autowired
private IEmrRecordMapper iEmrRecordMapper;
@Autowired
private UReportExportMapper uReportExportMapper;
public List<UReportDeathDisplayDTO> getHomePigeonholeList(String s1, String s2, Map<String, Object> map) {
List<UReportDeathDisplayDTO> result = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
if (ObjectUtil.isNotEmpty(doctorName)) {
emrRecord.setHospitDoctor(doctorName);
}
String type = (String) map.get("type");
List<UReportDeathDTO> homePigeonholes = uReportExportMapper.selectDeathList(emrRecord);
if (CollUtil.isEmpty(homePigeonholes)) {
return new ArrayList<>();
}
if (StrUtil.isEmpty(type) || "全院".equals(type)) {
long labelCount = homePigeonholes.stream()
.filter(homePigeonhole -> "27".equals(homePigeonhole.getLabelId()))
.count();
long approvedCount = homePigeonholes.stream()
.filter(homePigeonhole -> "1".equals(homePigeonhole.getApproved()))
.count();
long sumCount = homePigeonholes.size();
UReportDeathDisplayDTO deathDisplayDTO = new UReportDeathDisplayDTO();
deathDisplayDTO.setLabelCount(labelCount);
deathDisplayDTO.setApproveCount(approvedCount);
deathDisplayDTO.setSumCount(sumCount);
deathDisplayDTO.setName("全院");
deathDisplayDTO.setBeginDate(beginDate);
deathDisplayDTO.setEndDate(endDate);
deathDisplayDTO.setNameType(type);
result.add(deathDisplayDTO);
}
if (StrUtil.isNotEmpty(type) && "科室".equals(type)) {
Map<String, List<UReportDeathDTO>> collect = homePigeonholes.stream().collect(Collectors.groupingBy(UReportDeathDTO :: getInpatientArea));
collect.forEach((key, value) -> {
long labelCount = value.stream()
.filter(homePigeonhole -> "27".equals(homePigeonhole.getLabelId()))
.count();
long approvedCount = value.stream()
.filter(homePigeonhole -> "1".equals(homePigeonhole.getApproved()))
.count();
long sumCount = value.size();
UReportDeathDisplayDTO deathDisplayDTO = new UReportDeathDisplayDTO();
deathDisplayDTO.setLabelCount(labelCount);
deathDisplayDTO.setApproveCount(approvedCount);
deathDisplayDTO.setSumCount(sumCount);
deathDisplayDTO.setName(key);
deathDisplayDTO.setBeginDate(beginDate);
deathDisplayDTO.setEndDate(endDate);
deathDisplayDTO.setNameType(type);
result.add(deathDisplayDTO);
});
}
if (StrUtil.isNotEmpty(type) && "个人".equals(type)) {
Map<String, List<UReportDeathDTO>> collect = homePigeonholes.stream().collect(Collectors.groupingBy(UReportDeathDTO :: getDoctorName));
collect.forEach((key, value) -> {
long labelCount = value.stream()
.filter(homePigeonhole -> "27".equals(homePigeonhole.getLabelId()))
.count();
long approvedCount = value.stream()
.filter(homePigeonhole -> "1".equals(homePigeonhole.getApproved()))
.count();
long sumCount = value.size();
UReportDeathDisplayDTO deathDisplayDTO = new UReportDeathDisplayDTO();
deathDisplayDTO.setLabelCount(labelCount);
deathDisplayDTO.setApproveCount(approvedCount);
deathDisplayDTO.setSumCount(sumCount);
deathDisplayDTO.setName(key);
deathDisplayDTO.setBeginDate(beginDate);
deathDisplayDTO.setEndDate(endDate);
deathDisplayDTO.setNameType(type);
result.add(deathDisplayDTO);
});
}
return result;
}
public List<ReportRecordDTO> getreportRecordList(String s1, String s2, Map<String, Object> map) {
List<ReportRecordDTO> reportRecordDTOS = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String name = (String) map.get("name");
String nameType = (String) map.get("nameType");
if ("null".equals(beginDate)) {
beginDate = null;
}
if ("null".equals(endDate)) {
endDate = null;
}
String type = (String) map.get("type");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(name)) {
if ("科室".equals(nameType)) {
emrRecord.setInpatientArea(name);
}
if ("个人".equals(nameType)) {
emrRecord.setHospitDoctor(name);
}
}
emrRecord.setDateType(type);
List<EmrRecord> emrRecords = new ArrayList<>();
if ("2".equals(type)) {
emrRecords = uReportExportMapper.selectEmrRecordListByLabelId(emrRecord);
}
if ("3".equals(type)) {
emrRecords = uReportExportMapper.selectEmrRecordListByApproved(emrRecord);
}
if ("1".equals(type)) {
emrRecords = uReportExportMapper.selectEmrRecordList(emrRecord);
}
for (EmrRecord record : emrRecords) {
ReportRecordDTO reportRecordDTO = new ReportRecordDTO();
reportRecordDTO.setRecordId(record.getRecordId());
reportRecordDTO.setPatientName(record.getPatientName());
reportRecordDTO.setInpatientArea(record.getInpatientArea());
reportRecordDTO.setDiagnosisName(record.getDiagnosisName());
reportRecordDTO.setHospitNum(record.getHospitNum());
reportRecordDTO.setHospitDoctor(record.getHospitDoctor());
reportRecordDTO.setInTime(DateUtil.formatDateTime(record.getInTime()));
reportRecordDTO.setOutTime(DateUtil.formatDateTime(record.getOutTime()));
reportRecordDTOS.add(reportRecordDTO);
}
return reportRecordDTOS;
}
public List<UReportRectificationDisplayDTO> getRectificationList(String s1, String s2, Map<String, Object> map) {
List<UReportRectificationDisplayDTO> result = new ArrayList<>();
EmrRecord emrRecord = new EmrRecord();
emrRecord.setParams(map);
String beginDate = (String) map.get("startDate");
String endDate = (String) map.get("endDate");
String departmentName = (String) map.get("departmentName");
String doctorName = (String) map.get("doctorName");
String type = (String) map.get("type");
if (ObjectUtil.isEmpty(beginDate) && ObjectUtil.isEmpty(endDate)) {
emrRecord.setBeginTime(DateUtil.beginOfMonth(new Date()));
emrRecord.setEndTime(DateUtil.endOfMonth(new Date()));
}
if (ObjectUtil.isNotEmpty(beginDate)) {
emrRecord.setBeginTime(DateUtil.parse(beginDate));
}
if (ObjectUtil.isNotEmpty(endDate)) {
emrRecord.setEndTime(DateUtil.parse(endDate));
}
if (ObjectUtil.isNotEmpty(departmentName)) {
emrRecord.setInpatientArea(departmentName);
}
if (ObjectUtil.isNotEmpty(doctorName)) {
emrRecord.setHospitDoctor(doctorName);
}
List<UReportRectificationDTO> rectificationDTOS = uReportExportMapper.selectRectificationList(emrRecord);
if (StrUtil.isNotEmpty(type) && "个人".equals(type)) {
Map<String, List<UReportRectificationDTO>> collect = rectificationDTOS.stream().collect(Collectors.groupingBy(UReportRectificationDTO :: getHospitDoctor));
collect.forEach((key, value) -> {
setDisplay(result, beginDate, endDate, key, value);
});
}
if (StrUtil.isNotEmpty(type) && "科室".equals(type)) {
Map<String, List<UReportRectificationDTO>> collect = rectificationDTOS.stream().collect(Collectors.groupingBy(UReportRectificationDTO :: getInpatientArea));
collect.forEach((key, value) -> {
setDisplay(result, beginDate, endDate, key, value);
});
}
if (StrUtil.isEmpty(type) || "全院".equals(type)) {
setDisplay(result, beginDate, endDate, "全院", rectificationDTOS);
}
return result.stream().sorted(Comparator.comparing(UReportRectificationDisplayDTO::getSort).reversed()).collect(Collectors.toList());
}
private static void setDisplay(List<UReportRectificationDisplayDTO> result, String beginDate, String endDate, String key, List<UReportRectificationDTO> value) {
if (CollUtil.isEmpty(value)) {
return;
}
UReportRectificationDisplayDTO dto = new UReportRectificationDisplayDTO();
dto.setName(key);
dto.setBeginDate(beginDate);
dto.setEndDate(endDate);
dto.setSunCount(value.size());
long rectificationCount = value.stream().filter(o -> o.getHistoryCount() - (o.getNowPCount() + o.getNowRCount()) > 0).count();
dto.setRectificationCount(rectificationCount);
dto.setSort((double)rectificationCount / (double) value.size());
dto.setRectificationRate(new BigDecimal(rectificationCount).divide(new BigDecimal(value.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP).toString() + "%");
result.add(dto);
}
}
package com.hanyun.hip.mrqc.jms.service.impl.extract;
import com.hankcs.hanlp.HanLP;
import com.hankcs.hanlp.seg.common.Term;
import com.hanyun.hip.mrqc.rule.entity.fact.MrqcStructData;
import com.hanyun.hip.mrqc.service.entity.EmrContent;
import com.hanyun.hip.mrqc.service.entity.MrqcStructExtract;
import com.hanyun.hip.mrqc.service.service.CustomStructExtracter;
import com.hanyun.hip.mrqc.service.util.UUidUtil;
import com.ruoyi.common.utils.StringUtils;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import java.io.StringReader;
import java.util.List;
public class XmlLastIndexStringExtracter implements CustomStructExtracter {
final static String replaceChar1 = "/ ";
final static String replaceChar2 = " /";
@Override
public MrqcStructData extract(MrqcStructExtract struct, EmrContent content, MrqcStructData parent) {
try {
parent = parent == null ? new MrqcStructData() : parent;
String extScript = struct.getExtScript();
String value = null;
if(StringUtils.isNotEmpty(extScript)) {
//如xml不存在,从html提取
String contentXml = StringUtils.isNotBlank(content.getContentXml()) ? content.getContentXml() : content.getContentText();
if(StringUtils.isNotEmpty(contentXml)) {
SAXReader reader = new SAXReader();
StringReader sr = new StringReader(contentXml);
Document document = reader.read(sr);
// 3.获取根节点
Element rootElement = document.getRootElement();
String text = rootElement.getText();
if(text.contains(replaceChar1)) {
text = text.replace(replaceChar1, "/");
}
if(text.contains(replaceChar2)) {
String strLastString = StringUtils.substringBeforeLast(text, replaceChar2);
String[] spiltSignText = strLastString.split("\\s");
String strSign=spiltSignText[spiltSignText.length-1];
List<Term> termList = HanLP.segment(strSign);
if(termList.size()<3 ) {
text = text.replace(replaceChar2, "/");
}
}
String[] spiltText = text.split(extScript);
value=spiltText[spiltText.length-1];
}
}
if (parent.getDataId() == null) {
parent.setDataId(UUidUtil.getUUID());
}
parent.setDataValue(value == null ? "" : String.valueOf(value));
parent.setContentId(content.getContentId());
parent.setRecordId(content.getRecordId());
parent.setStructId(struct.getStructId());
} catch (Exception e) {
e.printStackTrace();
}
return parent;
}
}
package com.hanyun.hip.mrqc.jms.uitls;
import cn.hutool.core.collection.CollUtil;
import com.hanyun.hip.mrqc.service.engine.rule.QcUtil;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class DateConverterUtil {
private static final List<String> COMMON_DATE_FORMATS = Arrays.asList(
"yyyy-MM-dd HH:mm:ss",
"yyyy-MM-dd HH:mm",
"yyyy-MM-dd HH",
"yyyy/MM/dd HH:mm:ss",
"yyyy.MM.dd HH:mm:ss",
"yyyy-MM-dd'T'HH:mm:ss",
"yyyy-MM-dd",
"yyyy年MM月dd日",
"yyyy年MM月dd日HH:mm",
"yyyyMMddHHmmss"
);
/**
* 尝试使用正则表达式匹配并转换给定的日期字符串为"yyyy-MM-dd HH:mm:ss"格式。
*
* @param strDate 待转换的日期字符串
* @return 转换后的"yyyy-MM-dd HH:mm:ss"格式的日期字符串,若无法匹配或转换则返回null
*/
public static String convertToDate(String strDate) {
for (String format : COMMON_DATE_FORMATS) {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
LocalDateTime parsedDate = LocalDateTime.parse(strDate, formatter);
return parsedDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
} catch (DateTimeParseException ignored) {
// 若当前格式不匹配,则忽略异常并尝试下一个格式
}
}
return null; // 若所有格式都无法匹配,返回null
}
/**
* 尝试使用正则表达式匹配并转换给定的日期字符串为"yyyy-MM-dd HH:mm:ss"格式。
* 这个方法仅作为示例,实际应用中可能效果不佳,建议使用标准日期时间库进行解析。
*
* @param strDate 待转换的日期字符串
* @return 转换后的"yyyy-MM-dd HH:mm:ss"格式的日期字符串,若无法匹配或转换则返回null
*/
@Deprecated
public static String convertToDateRegex(String strDate) {
// 创建一个包含多种常见日期格式的正则表达式
String regex = "(\\d{4})[-/.](\\d{2})[-/.](\\d{2})[ T]?\\s?(\\d{2}):(\\d{2}):(\\d{2})?"; // 示例正则,可能需要根据实际需求调整
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(strDate);
if (matcher.matches()) {
int year = Integer.parseInt(matcher.group(1));
int month = Integer.parseInt(matcher.group(2));
int day = Integer.parseInt(matcher.group(3));
int hour = matcher.group(4) != null ? Integer.parseInt(matcher.group(4)) : 0;
int minute = matcher.group(5) != null ? Integer.parseInt(matcher.group(5)) : 0;
int second = matcher.group(6) != null ? Integer.parseInt(matcher.group(6)) : 0;
// 使用SimpleDateFormat将解析出的日期时间组件组合成"yyyy-MM-dd HH:mm:ss"格式
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date(year - 1900, month - 1, day, hour, minute, second); // 注意月份需要减1
return outputFormat.format(date);
} else {
return null; // 若无法匹配,返回null
}
}
/**
* 判断是否含有24小时入院记录
* @param recordId
* @return
*/
public static boolean isHave24HourRyEmrContent(String recordId){
if(recordId == null || recordId.isEmpty()){
return false;
}
List<Map<String, Object>> mapList = QcUtil.queryForList("select record_id from mrqc_emr_content where record_id = '" + recordId + "' and title like '%24小时入%'");
return CollUtil.isNotEmpty(mapList);
}
/**
* 判断是否含有入院记录
* @param recordId
* @return
*/
public static boolean isHaveInEmrContent(String recordId){
if(recordId == null || recordId.isEmpty()){
return false;
}
List<Map<String, Object>> mapList = QcUtil.queryForList("select record_id from mrqc_emr_content where record_id = '" + recordId + "' and title = '入院记录'");
return CollUtil.isNotEmpty(mapList);
}
/**
* 判断是否含有出院记录
* @param recordId
* @return
*/
public static boolean isHaveOutEmrContent(String recordId){
if(recordId == null || recordId.isEmpty()){
return false;
}
List<Map<String, Object>> mapList = QcUtil.queryForList("select record_id from mrqc_emr_content where record_id = '" + recordId + "' and title = '出院记录'");
return CollUtil.isNotEmpty(mapList);
}
}
package com.hanyun.hip.mrqc.jms.uitls;
import cn.hutool.core.collection.CollUtil;
import com.hanyun.hip.mrqc.service.engine.rule.QcUtil;
import java.util.List;
import java.util.Map;
/**
* @ClassName:JmsCommonUtil
* @author: ouyang0810@foxmail.com
* @CreateDate: 2024/10/23
* @UpdateUser: ouyang0810@foxmail.com
* @UpdateDate: 2024/10/23
* @UpdateRemark:统一处理工具类
* @Description:
* @Version: [V1.0]
*/
public class JmsCommonUtil {
/**
* 判断是否含有24小时入院记录
* @param recordId
* @return
*/
public static boolean isHaveRjEmrContent(String recordId){
if(recordId == null || recordId.isEmpty()){
return false;
}
List<Map<String, Object>> mapList = QcUtil.queryForList("select record_id from mrqc_emr_content where record_id = '" + recordId + "' and title like '%入出院记录'");
return CollUtil.isNotEmpty(mapList);
}
}
package com.hanyun.hip.mrqc.jms.uitls;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hanyun.hip.mrqc.service.util.DateUtils;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
import java.util.Date;
public class JsonUtil {
/**
* 将json转化为xml
* @param json
* @return
*/
public static String JsonToXml(Object json) {
if(json==null){
return null;
}else{
Element elements=new Element("xml");
getXMLFromObject(json,"xml",elements);
XMLOutputter xmlOut = new XMLOutputter();
String res=xmlOut.outputString(elements);
return res;
}
}
public static void getXMLFromObject(Object obj,String tag,Element parent) {
if(obj==null)
return;
Element child;
String eleStr;
Object childValue;
if(obj instanceof JSONObject)
{
JSONObject jsonObject=(JSONObject)obj;
for(Object temp:jsonObject.keySet())
{
eleStr=temp.toString();
childValue=jsonObject.get(temp);
child=new Element(eleStr);
if(childValue instanceof JSONArray)
getXMLFromObject(childValue,eleStr,parent);
else{
parent.addContent(child);
getXMLFromObject(childValue,eleStr,child);
}
}
}else if(obj instanceof JSONArray){
JSONArray jsonArray=(JSONArray)obj;
for(int i=0;i<jsonArray.size();i++)
{
childValue=jsonArray.get(i);
child=new Element(tag);
parent.addContent(child);
getXMLFromObject(childValue,tag,child);
}
}else if(obj instanceof Date){
parent.setText(DateUtils.dateToString((Date) obj,DateUtils.DATE_TIME_FORMAT));
}else{
parent.setText(obj.toString());
}
}
/**
*
* @param arr 需要转化为属性结构的arr
* @param id 数据唯一标示
* @param pid 父id唯一标识键
* @param child 子节点键
* @return
*/
public static JSONArray listToTree(JSONArray arr, String id, String pid, String child){
JSONArray r=new JSONArray();
JSONObject hash=new JSONObject();
for(int i=0;i<arr.size();i++){
JSONObject json= (JSONObject) arr.get(i);
hash.put(json.getString(id),json);
}
for(int j=0;j<arr.size();j++){
JSONObject aVal= (JSONObject) arr.get(j);
JSONObject hashVP =null;
if(aVal.getString(pid)!=null){
hashVP = (JSONObject)hash.get(aVal.getString(pid));
}
if(hashVP!=null){
if(hashVP.get(child)!=null){
JSONArray ch= (JSONArray) hashVP.get(child);
ch.add(aVal);
hashVP.put(child,ch);
} else{
JSONArray ch=new JSONArray();
ch.add(aVal);
hashVP.put(child,ch);
}
}else{
r.add(aVal);
}
}
return r;
}
}
package com.hanyun.hip.mrqc.jms.uitls;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import cn.easyes.common.utils.StringUtils;
/**
* @author zgp
* @version V1.0
* @Title:
* @Package
* @Description: 电子病历文书接口
* @date 2022年11月15日 上午15:12:04
*/
public class WsdlToSoapUtil {
public WsdlToSoapUtil() {
// TODO Auto-generated constructor stub
}
public static String sendData(String urlString,String soapActionString,String xml) {
StringBuffer sbXml = new StringBuffer();
try {
URL url = new URL(urlString);
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
//Content-Length长度会自动进行计算
httpConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
if(StringUtils.isNotEmpty(soapActionString)) {
httpConn.setRequestProperty("soapActionString",soapActionString);//Soap1.1使用 其实完全可以不需要
}
httpConn.setRequestMethod("POST");
httpConn.setDoOutput(true);
httpConn.setDoInput(true);
OutputStream out = httpConn.getOutputStream();
out.write(xml.getBytes());
out.close();
if (httpConn.getResponseCode() == HttpURLConnection.HTTP_OK)
{
InputStreamReader is = new InputStreamReader(httpConn.getInputStream());
BufferedReader in = new BufferedReader(is);
String inputLine;
while ((inputLine = in.readLine()) != null)
{
sbXml.append(inputLine);
}
in.close();
}
else{
//如果服务器返回的HTTP状态不是HTTP_OK,则表示发生了错误,此时可以通过如下方法了解错误原因。
InputStream is = httpConn.getErrorStream(); //通过getErrorStream了解错误的详情,因为错误详情也以XML格式返回,因此也可以用JDOM来获取。
InputStreamReader isr = new InputStreamReader(is,"utf-8");
BufferedReader in = new BufferedReader(isr);
String inputLine;
while ((inputLine = in.readLine()) != null)
{
System.out.println(inputLine);
}
in.close();
}
httpConn.disconnect();
}catch(Exception e) {
e.printStackTrace();
}
return sbXml.toString();
}
public static void main(String srg[]) {
}
}
baseUrl: http://127.0.0.1:8080/mrqc
#drg相关配置
drg:
version: NJ-CHS-DRG-1.1
monitor:
days: 60
icdConfig: 7:诊断-596954:疾病分类与代码医保版2.0,8:手术-206452:手术操作分类与代码医保版2.0
disease: 7
treat: 8
lowHeightMedicalRecordType: nanjinHeightLowMedicalRecordTypeAlgorithm
\ No newline at end of file
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
#佳木斯市中心医院
url: jdbc:mysql://localhost:3306/mrqc_jms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# url: jdbc:mysql://192.168.1.27:3306/jms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username: root
password: 123456
# password: HanYun#2021
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 200
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /monitor/druid/*
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 10000
merge-sql: false
wall:
config:
multi-statement-allow: true
mrqc:
lv1: 甲级|(@{score}>=85)|#60CD96
lv2: 乙级|(@{score}>70&&@{score}<85)|#4290E7
lv3: 丙级|(@{score}<=70)|#F04F5E
#logo的路径
logoPath: mrqc/jms/images/jms-mrqc-logo.png
logoIcoPath: mrqc/jms/images/logoIco.png
logoTitle: 智能病历质控
# 是否过滤敏感姓名
sensitiveFilter: false
sensitiveWord:
noqc-color: D9D9D9
totalscore: 100
#提醒标准
qcstandar:
#扣分标准
qcscorestdorg:
rulelv: 1|-1|#33CCFF,2|-2|#33CCFF,3|-3|#33CCFF,4|-4|#33CCFF,5|-5|#33CCFF,6|-6|#33CCFF,7|-7|#33CCFF
#病历模块过滤规则,格式如下:模块Id#关键词,关键词1...|模块Id1#关键词,关键词1...|...
emrFilter: emr02#入院记录|emr03#病程记录|emr04#出院记录,死亡记录|emr05#知情,同意|emr07#手术,安全核查单
smallDepartOfnewBorn: 儿科
#个人质控选择条件配置,包括住院时间,关键监测指标,手术级别
userEmrFilters:
#入院、出院时间#结构体编码 运算符
hospitTimes: admissionTime#HDSD00_11_085 >= | dischargeTime#HDSD00_11_019 <=
#关键指标#编码及运算结果#中文名称
keyIndices: death#HDSD00_11_057 = '5'#死亡 | operated#HDSD00_11_090 != ''#手术 | critical#HDSD00_11_153 = '1'#危重 | emergency#HDSD00_11_164 > '0'#抢救 | difficult#HDSD00_11_154 = '1'#疑难 | transfusion#HY_ZYYZ_SXSQ != ''#输血 | daySurgery#HDSD00_11_157 = '1'#日间手术
#手术级别#编码 运算符#中文名称
operationLevels: operationLevel6#HDSD00_11_092_6 =#六级 | operationLevel5#HDSD00_11_092_5 =#五级 | operationLevel4#HDSD00_11_092_4 =#四级 | operationLevel3#HDSD00_11_092_3 =#三级 | operationLevel2#HDSD00_11_092_2 =#二级 | operationLevel#HDSD00_11_092 =#一级
etlApi: JmsEmrETLApi
emrAssignApi: JmsAutoAssignEMRImpl
emrAssignRuleHtml: mrqc/jms/assign/jmsAutoAssign
hospitalCodes: 46600264-9
#是否自动拼接头部, content_text字段
emrHead: false
#是否中医院# 判断病案首页
isZyy: false
#显示中医病案首页的科室#
zyks:
aliasMap: department_name#病区 | inpatient_area#科室 | report_title#佳木斯市中心医院
#是否过滤科室
excludeDepts: true
admission:
# 住院登记处所关心的结构体ID,以结构体ID作
structId:
#单项否决 乙级病例和丙级病历的边界数
dxfjCount: 2
#是否为门诊质控
hasOutPatient: false
# 根据标准表二级ID初始化,如:2091:首页,2092:全病历
defaultMRScore: 2092
# 人工质控病历隐藏机器质控缺陷,如果不配置则默认为 false
hiddenDefectsWhenManualQc: false
#质控详情是否显示质控流程
showFlow: true
#是否隐藏主页机构选择下拉框; true: 隐藏; flase: 展示
hospitalListHidden: true
#详情页发送质控消息接收人配置,true:系统所有用户、false:病历相关医师
sendMessageShowAllUser: true
#详情页发送医疗组长配置,南通附属医院,需要在映射表中增加对应的医疗组长
sendRecordDoctor : true
#是否添加水印 true: 显示; flase: 隐藏
showWatermark: false
#水印文字
showWatermarkText: 江苏瀚云医疗信息技术有限公司
process.scene: 环节质控_23790
njwx:
ofdViewInf:
mrqc:
lv1: 甲级|(@{score}>=85)|#60CD96
lv2: 乙级|(@{score}>=70&&@{score}<85)|#4290E7
lv3: 丙级|(@{score}<70)|#F04F5E
#logo的路径
logoPath: /mrqc/images/logo/wxjy.png
# 是否过滤敏感姓名
sensitiveFilter: false
sensitiveWord: 鼓楼,鼓 楼
noqc-color: D9D9D9
totalscore: 100
#提醒标准
qcstandar: 鼓楼标准,江苏省标,书写规范
#扣分标准
qcscorestdorg: 鼓楼标准,江苏省标,书写规范
rulelv: 1|-1|#33CCFF,2|-2|#33CCFF,3|-3|#33CCFF,4|-4|#33CCFF,5|-5|#33CCFF,6|-6|#33CCFF,7|-7|#33CCFF
#病历模块过滤规则,格式如下:模块Id#关键词,关键词1...|模块Id1#关键词,关键词1...|...
emrFilter: emr02#入院记录|emr03#病程记录|emr04#出院记录,死亡记录|emr05#知情,同意|emr07#手术,安全核查单
smallDepartOfnewBorn: 儿科
#个人质控选择条件配置,包括住院时间,关键监测指标,手术级别
userEmrFilters:
#入院、出院时间#结构体编码 运算符
hospitTimes: admissionTime#HDSD00_11_085 >= | dischargeTime#HDSD00_11_019 <=
#关键指标#编码及运算结果#中文名称
keyIndices: death#HDSD00_11_057 = '5'#死亡 | operated#HDSD00_11_090 != ''#手术 | critical#HDSD00_11_153 = '1'#危重 | emergency#HDSD00_11_164 > '0'#抢救 | difficult#HDSD00_11_154 = '1'#疑难 | transfusion#HY_ZYYZ_SXSQ != ''#输血 | daySurgery#HDSD00_11_157 = '1'#日间手术
#手术级别#编码 运算符#中文名称
operationLevels: operationLevel6#HDSD00_11_092_6 =#六级 | operationLevel5#HDSD00_11_092_5 =#五级 | operationLevel4#HDSD00_11_092_4 =#四级 | operationLevel3#HDSD00_11_092_3 =#三级 | operationLevel2#HDSD00_11_092_2 =#二级 | operationLevel#HDSD00_11_092 =#一级
etlApi: Wx9yEmrETLApi
emrAssignApi: WxjyAutoAssignEMRImpl
emrAssignRuleHtml: mrqc/assign/zjsyAutoAssign
hospitalCodes: 1001500
emrHead: false
#是否中医院# 判断病案首页
isZyy: false
#显示中医病案首页的科室#
zyks:
aliasMap: inpatient_area#病区 | department_name#科室 | hospit_doctor#医生
excludeDepts: true
admission:
# 住院登记处所关心的结构体ID,以结构体ID作
structId: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,20,21,22,23,24,28,29,30,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,187,204,247,248
#单项否决 乙级病例和丙级病历的边界数
dxfjCount: 2
# 根据标准表二级ID初始化,如:2091:首页,2092:全病历
defaultMRScore: 2092
# 根据标准表一级ID初始化,如:2090
defaultRootStandard: 2090
depts: 创伤骨科A,创伤骨科B
njwx:
ofdViewInf: http://10.40.34.191:8080/web-reader/reader?file=http://10.40.36.19:8090/getPdfStream.do?viewType=qc%26fileid=
mrqc:
lv1: 甲级|(@{score}>=85)|#60CD96
lv2: 乙级|(@{score}>=70&&@{score}<85)|#4290E7
lv3: 丙级|(@{score}<70)|#F04F5E
#logo的路径
logoPath: /mrqc/images/logo/wxjy.png
# 是否过滤敏感姓名
sensitiveFilter: false
sensitiveWord: 鼓楼,鼓 楼
noqc-color: D9D9D9
totalscore: 100
#提醒标准
qcstandar: 鼓楼标准,江苏省标,书写规范
#扣分标准
qcscorestdorg: 鼓楼标准,江苏省标,书写规范
rulelv: 1|-1|#33CCFF,2|-2|#33CCFF,3|-3|#33CCFF,4|-4|#33CCFF,5|-5|#33CCFF,6|-6|#33CCFF,7|-7|#33CCFF
#病历模块过滤规则,格式如下:模块Id#关键词,关键词1...|模块Id1#关键词,关键词1...|...
emrFilter: emr02#入院记录|emr03#病程记录|emr04#出院记录,死亡记录|emr05#知情,同意|emr07#手术,安全核查单
smallDepartOfnewBorn: 儿科
#个人质控选择条件配置,包括住院时间,关键监测指标,手术级别
userEmrFilters:
#入院、出院时间#结构体编码 运算符
hospitTimes: admissionTime#HDSD00_11_085 >= | dischargeTime#HDSD00_11_019 <=
#关键指标#编码及运算结果#中文名称
keyIndices: death#HDSD00_11_057 = '5'#死亡 | operated#HDSD00_11_090 != ''#手术 | critical#HDSD00_11_153 = '1'#危重 | emergency#HDSD00_11_164 > '0'#抢救 | difficult#HDSD00_11_154 = '1'#疑难 | transfusion#HY_ZYYZ_SXSQ != ''#输血 | daySurgery#HDSD00_11_157 = '1'#日间手术
#手术级别#编码 运算符#中文名称
operationLevels: operationLevel6#HDSD00_11_092_6 =#六级 | operationLevel5#HDSD00_11_092_5 =#五级 | operationLevel4#HDSD00_11_092_4 =#四级 | operationLevel3#HDSD00_11_092_3 =#三级 | operationLevel2#HDSD00_11_092_2 =#二级 | operationLevel#HDSD00_11_092 =#一级
etlApi: Wx9yEmrETLApiNew
emrAssignApi: WxjyAutoAssignEMRImpl
emrAssignRuleHtml: mrqc/assign/zjsyAutoAssign
hospitalCodes: 1001500
emrHead: false
#是否中医院# 判断病案首页
isZyy: false
#显示中医病案首页的科室#
zyks:
aliasMap: inpatient_area#病区 | department_name#科室 | hospit_doctor#医生
excludeDepts: true
admission:
# 住院登记处所关心的结构体ID,以结构体ID作
structId: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,20,21,22,23,24,28,29,30,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,187,204,247,248
#单项否决 乙级病例和丙级病历的边界数
dxfjCount: 2
# 根据标准表二级ID初始化,如:2091:首页,2092:全病历
defaultMRScore: 2092
# 根据标准表一级ID初始化,如:2090
defaultRootStandard: 2090
depts: 创伤骨科A,创伤骨科B
njwx:
ofdViewInf: http://10.40.34.191:8080/web-reader/reader?file=http://10.40.36.19:8090/getPdfStream.do?viewType=qc%26fileid=
# 项目相关配置
ruoyi:
# 名称
name: hip
# 版本
version: 4.1.0
# 版权年份
copyrightYear: 2022
# 文件路径
profile: /u01/app/profile/
# 获取ip地址开关
addressEnabled: true
# 开发环境配置
server:
# 服务器的HTTP端口,默认为80
port: 81
servlet:
# 应用的访问路径
context-path: /
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# tomcat最大线程数,默认为200
max-threads: 800
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
# 日志配置
logging:
level:
com.ruoyi: warn
org.springframework: warn
com.hanyun.hip.mrqc.service: warn
com.hanyun.hip.mrqc.service.mapper: debug
com.hanyun.hip.mrqc.rule.mapper: warn
com.hanyun.hip.mrqc.sdis.mapper: warn
com.hanyun.hip.mrqc.cdss.mapper: warn
com.hanyun.hip.mrqc.rule: warn
com.hanyun.hip.mrqc.drgs: warn
# 用户配置
user:
password:
# 密码错误{maxRetryCount}次锁定10分钟
maxRetryCount: 10
# Spring配置
spring:
# 模板引擎
thymeleaf:
mode: HTML
encoding: utf-8
# 禁用缓存
cache: false
# 资源信息
messages:
# 国际化资源文件路径
basename: static/i18n/messages
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
profiles:
include: druid,wxjy,drg
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
# 设置总上传的文件大小
max-request-size: 20MB
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
additional-paths: src/main/java
# MyBatis
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi.system.domain,com.ruoyi.quartz.domain,com.ruoyi.generator.domain,com.hanyun.hip.kgms.service.tenant.domain,com.hanyun.kgms.maker.domain,com.hanyun.kgms.doc.domain,com.hanyun.hip.kgms.service.doc.domain,com.hanyun.kgms.term.domain,com.hanyun.kgms.term.domain,com.hanyun.hip.mrqc.drgs.domain,com.hanyun.hip.mrqc.service.analysis.domain,com.hanyun.hip.mrqc.sdis.domain,com.hanyun.hip.knowledge,com.ruoyi.activiti.domain,com.hanyun.hip.mrqc.cdss.domain,com.hanyun.hip.mrqc.drgs.entity
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
type-handlers-package: com.hanyun.hip.mrqc.service.handler
# PageHelper分页插件
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
# Shiro
shiro:
user:
# 登录地址
loginUrl: /mrqc/login
# 权限认证失败地址
unauthorizedUrl: /unauth
# 首页地址
indexUrl: /mrqc/index
# 验证码开关
captchaEnabled: false
# 验证码类型 math 数组计算 char 字符
captchaType: math
# 权限白名单
whitelist: /**/css/**,/**/js/**,/**/images/**,/mrqc/main,/mrqc/qualityScore,/mrqc/index/selectStdSourceStat,/mrqc/index/statTable,/mrqc/index/selectRuleTypeStat,/mrqc/index/ruleMonth,/mrqc/index/getEmrLvScoreRules,/mrqc/index/selectAreaAndDepartment,/mrqc/standard/selectAllDeparment,/mrqc/index/selectRecordScoreAvg,/mrqc/standard/**,/mrqc/standard/ksStat,/mrqc/standard/ysStat,/mrqc/hospitalTypeStat/**,/mrqc/mrqcQualityReport,/mrqc/qualityReport/**,/mrqc/findQualityDefectAll,/mrqc/countIndex,/mrqc/homeScreen/selectScreenCache/**,/mrqc/emrrecord/todetail/**,/mrqc/emrrecord/submitaudit/**,/mrqc/emrrecord/homeTracing/**,/mrqc/emrconfig/listemrmodel/**,/mrqc/emrrecord/initdetaildata/**,/mrqc/emrrecord/initdetailmenu/**,/mrqc/emrrecord/manualintervenqc/**,/mrqc/emrrecord/initdetailCount/**,/mrqc/emrrecord/toaddnewdefect/**,/api/refreshEmrScore/**,/api/refreshByRecord/**,/mrqc/emrrecord/toemrmodule/**,/mrqc/emrrecord/selectUrlByEmrIdAndRecordId/**,/mrqc/tempCache/selectScreenCache,/api/**,/sso/login**,/v2/api-docs/**,/ureport/**,/mrqc/notice/list,/kqyyApi/**,/mrqc/emrrecord/loadScoreLv/**,/drgs/groupOneRecord,/drg/drgMonitor/link/reminder/**,/mrqc/process/step/confirm/isModify
cookie:
# 设置Cookie的域名 默认空,即当前访问的域名
domain:
# 设置cookie的有效访问路径
path: /
# 设置HttpOnly属性
httpOnly: true
# 设置Cookie的过期时间,天为单位
maxAge: 30
session:
# Session超时时间(默认30分钟)
expireTime: 300000
# 同步session到数据库的周期(默认1分钟)
dbSyncPeriod: 1
# 相隔多久检查一次session的有效性,默认就是10分钟
validationInterval: 10
conf:
sysanon: /kgms/maker/index
#不拦截的路径
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
img: #//如果是Windows情况下,格式是 D:\\blog\\image linx 格式"/home/blog/image";
location: /home/blog/image
mrqc:
# demo 模式病历列表查询最新有数据的月份
query: dev
#================License相关配置===============#
license:
#证书名称
subject: hip-mrqc
#公钥别名
publicAlias: publicCert
#公钥库所在的位置
publicKeysStorePath: /publicCerts.store
#公钥库访问密码
storePass: HanYun@2020
#证书所在的位置
licensePath: /license.lic
#================License相关配置===============#
#================消息中心相关配置===============#
spring.rabbitmq.host: 192.168.1.13
spring.rabbitmq.port: 5672
spring.rabbitmq.username: root
spring.rabbitmq.password: root
spring.rabbitmq.virtual-host: /
hanyun.message.enable: false
#================消息中心相关配置===============#
nlp:
cache.enable: false
sso:
login.service: default
# ES 插件配置
easy-es:
enable: false
Application Version: ${ruoyi.version}
Spring Boot Version: ${spring-boot.version}
██╗███╗ ███╗███████╗ ███╗ ███╗██████╗ ██████╗ ██████╗
██║████╗ ████║██╔════╝ ████╗ ████║██╔══██╗██╔═══██╗██╔════╝
██║██╔████╔██║███████╗█████╗██╔████╔██║██████╔╝██║ ██║██║
██ ██║██║╚██╔╝██║╚════██║╚════╝██║╚██╔╝██║██╔══██╗██║▄▄ ██║██║
╚█████╔╝██║ ╚═╝ ██║███████║ ██║ ╚═╝ ██║██║ ██║╚██████╔╝╚██████╗
╚════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══▀▀═╝ ╚═════╝
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hanyun.hip.mrqc.jms.mapper.AutoAssignMapper">
<!-- 按四级、三级和住院时长查询数据 -->
<select id="selecAllDeptsurgicalOperateList" parameterType="String" resultType="map">
SELECT
record_id,department_name,inpatient_area,in_time,out_time,hospit_doctor
FROM mrqc_record u
WHERE DATE_FORMAT( out_time, '%Y-%m' ) = #{qcMonth}
AND u.record_id not in (
select mor.record_id from mrqc_operator_record mor,mrqc_report_month mrm
where mor.report_id=mrm.report_id
and mrm.qc_month = #{qcMonth}
)
${dataScope}
</select>
<select id="selectAllZyRecordId" resultType="java.lang.String" parameterType="java.lang.String">
SELECT
record_id
FROM
mrqc_record
WHERE
emr_status = '1'
<if test="department != null and department != ''">
AND inpatient_area IN (${department})
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hanyun.hip.mrqc.jms.mapper.MrqcEmrConfigMapper">
<resultMap type="com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig" id="MrqcEmrConfigResult">
<result property="configId" column="config_id" />
<result property="configKey" column="config_key" />
<result property="configValue" column="config_value" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<resultMap type="com.hanyun.hip.mrqc.service.entity.EmrRecord" id="EmrRecordResult">
<result property="recordId" column="record_id" />
<result property="patientNum" column="patient_num" />
<result property="hospitCode" column="hospit_code" />
<result property="hospitNum" column="hospit_num" />
<result property="patientName" column="patient_name" />
<result property="patientSex" column="patient_sex" />
<result property="birthday" column="birthday" />
<result property="age" column="age" />
<result property="auto" column="auto" />
<result property="diagnosisCode" column="diagnosis_code" />
<result property="diagnosisName" column="diagnosis_name" />
<result property="doctorCode" column="doctor_code" />
<result property="hospitDoctor" column="hospit_doctor" />
<result property="hospitTime" column="hospit_time" />
<result property="recordScore" column="record_score" />
<result property="homepageScore" column="homepage_score" />
<result property="inpatientArea" column="inpatient_area" />
<result property="departmentCode" column="department_code" />
<result property="departmentName" column="department_name" />
<result property="creater" column="creater" />
<result property="createTime" column="create_time" />
<result property="modifyer" column="modifyer" />
<result property="modifyTime" column="modify_time" />
<result property="hospitName" column="hospit_name" />
<result property="emrStatus" column="emr_status" />
<result property="inTime" column="in_time" />
<result property="outTime" column="out_time" />
<result property="etlTime" column="etl_time" />
<result property="approved" column="approved" />
<result property="reportId" column="report_id" />
<result property="bedNumber" column="bed_number" />
</resultMap>
<sql id="selectMrqcEmrConfigVo">
select config_id, config_key, config_value, status, create_by, create_time, update_by, update_time from mrqc_emr_config
</sql>
<select id="selectMrqcEmrConfigList" parameterType="com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig" resultMap="MrqcEmrConfigResult">
<include refid="selectMrqcEmrConfigVo"/>
<where>
<if test="configId != null "> and config_id = #{configId}</if>
<if test="configKey != null and configKey != '' "> and config_key = #{configKey}</if>
<if test="configValue != null and configValue != '' "> and config_value = #{configValue}</if>
<if test="status != null and status != '' "> and status = #{status}</if>
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
</where>
</select>
<select id="selectMrqcEmrConfigByKey" parameterType="String" resultMap="MrqcEmrConfigResult">
<include refid="selectMrqcEmrConfigVo"/>
where config_key = #{configKey}
</select>
<select id="selectMrqcEmrConfigById" parameterType="Long" resultMap="MrqcEmrConfigResult">
<include refid="selectMrqcEmrConfigVo"/>
where config_id = #{configId}
</select>
<select id="getProcessList" resultType="com.hanyun.hip.mrqc.jms.entity.ProcessDTO">
select r.hospit_num as hospitNum,
r.record_id as recordId,
r.patient_name as patientName,
r.homepage_score as homepageScore,
r.out_time as outTime,
r.hospit_doctor as hospitDoctor,
r.inpatient_area as inpatientArea,
(select audit_time from mrqc_record_audit mra where mra.record_id = r.record_id limit 1 ) as auditTime,
ss.remark as remark,
ss.score as score,
ss.type as type,
ss.std_name as stdName,
ss.commitTime as commitTime
from mrqc_record r
left join
(select score,
CONCAT('[首][人工]', defect_info, '') as remark,
std_name,
record_id,
'1' as type,
mmd.createTime as commitTime
from mrqc_manual_defect mmd
left join mrqc_standard_new msn on mmd.std_id = msn.std_id
where mmd.status = 2 and ancestors LIKE
CONCAT('%,', (SELECT std_id FROM mrqc_standard_new WHERE std_code = 'HOME_PAGE_STANDARD' LIMIT 1), ',%')
union all
select std_score as score,
CONCAT('[首][机器]', result_remark, '') as remark,
std_name,
record_id,
'2' as type,
mrr.create_time as commitTime
from mrqc_rule_result mrr
left join mrqc_standard_new m on mrr.std_id = m.std_id
where ancestors LIKE
CONCAT('%,', (SELECT std_id FROM mrqc_standard_new WHERE std_code = 'HOME_PAGE_STANDARD' LIMIT 1),
',%')) as ss
on r.record_id = ss.record_id
<if test="patientLabel != '' and patientLabel != null">
INNER JOIN mrqc_record_label mrl ON r.record_id = mrl.record_id and mrl.label_id = #{patientLabel}
</if>
where 1=1
<if test="status != null and status == 0">
and r.emr_status &lt; '2'
</if>
<if test="hospitNum != null and hospitNum != ''">
and r.hospit_num = #{hospitNum}
</if>
<if test="status != null and status == 1">
and r.emr_status &gt;= '2'
</if>
<if test="auditStatus != null">
<choose>
<when test="auditStatus == 1">
and NOT EXISTS (
select 1 from mrqc_record_audit mra where mra.record_id = r.record_id
)
</when>
<when test="auditStatus == 2">
and EXISTS (
select 1 from mrqc_record_audit mra where mra.record_id = r.record_id
<if test="mrqcAuditStatus != null">
and id = (
SELECT MAX(id) FROM mrqc_record_audit mra2 WHERE mra2.record_id = r.record_id
) and mra.audit_status = #{mrqcAuditStatus}
</if>
)
</when>
</choose>
</if>
<if test="patientNameSearch != null and patientNameSearch != ''">
and patient_name like CONCAT('%',trim(#{patientNameSearch}),'%')
</if>
<if test=" deptCode != null and deptCode != ''">
and department_code = trim(#{deptCode})
</if>
<if test="deptCode == null or deptCode == ''">
<if test="departmentName != null and departmentName != ''">
and department_name like CONCAT('%',trim(#{departmentName}),'%')
</if>
</if>
<if test="mainDoctor != null and mainDoctor!=''">
and hospit_doctor = #{mainDoctor}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name = #{department}
</if>
<if test='recordLevel != null and recordLevel != ""'>
and ${recordLevelSql}
</if>
<if test=" iptaCode != null and iptaCode != ''">
and inpatient_code = trim(#{iptaCode})
</if>
<if test="iptaCode == null or iptaCode == ''" >
<if test=" inpatientArea != null and inpatientArea != ''">
and inpatient_area like CONCAT('%',trim(#{inpatientArea}),'%')
</if>
</if>
<if test=" hospitDate != null and hospitDate != ''">
<if test="status != null and status == 1">
and DATE_FORMAT(out_time ,'%Y-%m') = #{hospitDate}
</if>
<if test="status != 1">
and DATE_FORMAT(in_time ,'%Y-%m') = #{hospitDate}
</if>
</if>
<if test="recordId != null and recordId != ''">
and record_id = #{recordId}
</if>
order by r.record_id,r.hospit_num desc
</select>
<select id="getProcessListByYWK" resultType="com.hanyun.hip.mrqc.jms.entity.ProcessYWKDTO">
select r.hospit_num as hospitNum,
r.record_id as recordId,
r.patient_name as patientName,
r.record_score as homepageScore,
r.out_time as outTime,
r.hospit_doctor as hospitDoctor,
r.inpatient_area as inpatientArea,
(select audit_time from mrqc_record_audit mra where mra.record_id = r.record_id limit 1 ) as auditTime,
msd.kzr,
msd.zzys,
msd.zyys,
ss.remark as remark,
ss.score as score,
ss.type as type,
ss.std_name as stdName,
ss.commitTime as commitTime
from mrqc_record r
left join
(select score,
CONCAT('[人工]', defect_info, '') as remark,
std_name,
record_id,
'1' as type,
mmd.createTime as commitTime
from mrqc_manual_defect mmd
left join mrqc_standard_new msn on mmd.std_id = msn.std_id
where mmd.status = 2 and ancestors LIKE
CONCAT('%,', (SELECT std_id FROM mrqc_standard_new WHERE std_code = 'FULL_CASE_STANDARD' LIMIT 1), ',%')
union all
select std_score as score,
CONCAT('[机器]', result_remark, '') as remark,
std_name,
record_id,
'2' as type,
mrr.create_time as commitTime
from mrqc_rule_result mrr
left join mrqc_standard_new m on mrr.std_id = m.std_id
where ancestors LIKE
CONCAT('%,', (SELECT std_id FROM mrqc_standard_new WHERE std_code = 'FULL_CASE_STANDARD' LIMIT 1),
',%')) as ss
on r.record_id = ss.record_id
LEFT JOIN (SELECT
IFNULL(MAX(CASE struct_id WHEN '560' THEN data_value END), '') as kzr,
IFNULL(MAX(CASE struct_id WHEN '562' THEN data_value END), '') as zzys,
IFNULL(MAX(CASE struct_id WHEN '563' THEN data_value END), '') AS zyys,
record_id
FROM
mrqc_struct_data sd
WHERE
sd.struct_id IN ('560', '561', '562', '563')
GROUP BY
record_id
) msd ON msd.record_id = r.record_id
<if test="patientLabel != '' and patientLabel != null">
INNER JOIN mrqc_record_label mrl ON r.record_id = mrl.record_id and mrl.label_id = #{patientLabel}
</if>
where 1=1
<if test="status != null and status == 0">
and r.emr_status &lt; '2'
</if>
<if test="hospitNum != null and hospitNum != ''">
and r.hospit_num = #{hospitNum}
</if>
<if test="status != null and status == 1">
and r.emr_status &gt;= '2'
</if>
<if test="auditStatus != null">
<choose>
<when test="auditStatus == 1">
and NOT EXISTS (
select 1 from mrqc_record_audit mra where mra.record_id = r.record_id
)
</when>
<when test="auditStatus == 2">
and EXISTS (
select 1 from mrqc_record_audit mra where mra.record_id = r.record_id
<if test="mrqcAuditStatus != null">
and id = (
SELECT MAX(id) FROM mrqc_record_audit mra2 WHERE mra2.record_id = r.record_id
) and mra.audit_status = #{mrqcAuditStatus}
</if>
)
</when>
</choose>
</if>
<if test="patientNameSearch != null and patientNameSearch != ''">
and patient_name like CONCAT('%',trim(#{patientNameSearch}),'%')
</if>
<if test=" deptCode != null and deptCode != ''">
and department_code = trim(#{deptCode})
</if>
<if test="deptCode == null or deptCode == ''">
<if test="departmentName != null and departmentName != ''">
and department_name like CONCAT('%',trim(#{departmentName}),'%')
</if>
</if>
<if test="mainDoctor != null and mainDoctor!=''">
and hospit_doctor = #{mainDoctor}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name = #{department}
</if>
<if test='recordLevel != null and recordLevel != ""'>
and ${recordLevelSql}
</if>
<if test=" iptaCode != null and iptaCode != ''">
and inpatient_code = trim(#{iptaCode})
</if>
<if test="iptaCode == null or iptaCode == ''" >
<if test=" inpatientArea != null and inpatientArea != ''">
and inpatient_area like CONCAT('%',trim(#{inpatientArea}),'%')
</if>
</if>
<if test=" hospitDate != null and hospitDate != ''">
<if test="status != null and status == 1">
and DATE_FORMAT(out_time ,'%Y-%m') = #{hospitDate}
</if>
<if test="status != 1">
and DATE_FORMAT(in_time ,'%Y-%m') = #{hospitDate}
</if>
</if>
<if test="recordId != null and recordId != ''">
and record_id = #{recordId}
</if>
order by r.record_id,r.hospit_num desc
</select>
<select id="selectEmrRecordNotLikeList" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select * from mrqc_record u
where 1=1 and emr_status >=2
and inpatient_area is not null and inpatient_area != ''
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area = #{inpatientArea}
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null" ><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectEmrRecordList" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select * from mrqc_record u
where 1=1 and emr_status >=2
and inpatient_area is not null and inpatient_area != ''
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area like concat('%', #{inpatientArea},'%')
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null" ><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectEmrRecordCommitList" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select * from mrqc_record u
where 1=1 and emr_status >=2
and inpatient_area is not null and inpatient_area != ''
and NOT EXISTS (
select 1 from mrqc_record_audit mra where mra.record_id = u.record_id
)
and etl_time is not null
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area like concat('%', #{inpatientArea},'%')
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null" ><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<insert id="insertMrqcEmrConfig" parameterType="com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig" useGeneratedKeys="true" keyProperty="configId">
insert into mrqc_emr_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configKey != null and configKey != '' ">config_key,</if>
<if test="configValue != null and configValue != '' ">config_value,</if>
<if test="status != null and status != '' ">status,</if>
<if test="createBy != null and createBy != '' ">create_by,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateBy != null and updateBy != '' ">update_by,</if>
<if test="updateTime != null ">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configKey != null and configKey != '' ">#{configKey},</if>
<if test="configValue != null and configValue != '' ">#{configValue},</if>
<if test="status != null and status != '' ">#{status},</if>
<if test="createBy != null and createBy != '' ">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateBy != null and updateBy != '' ">#{updateBy},</if>
<if test="updateTime != null ">#{updateTime},</if>
</trim>
</insert>
<update id="updateMrqcEmrConfig" parameterType="com.hanyun.hip.mrqc.jms.entity.MrqcEmrConfig">
update mrqc_emr_config
<trim prefix="SET" suffixOverrides=",">
<if test="configKey != null and configKey != '' ">config_key = #{configKey},</if>
<if test="configValue != null and configValue != '' ">config_value = #{configValue},</if>
<if test="status != null and status != '' ">status = #{status},</if>
<if test="createBy != null and createBy != '' ">create_by = #{createBy},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
</trim>
where config_id = #{configId}
</update>
<delete id="deleteMrqcEmrConfigById" parameterType="Long">
delete from mrqc_emr_config where config_id = #{configId}
</delete>
<delete id="deleteMrqcEmrConfigByIds" parameterType="String">
delete from mrqc_emr_config where config_id in
<foreach item="configId" collection="array" open="(" separator="," close=")">
#{configId}
</foreach>
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hanyun.hip.mrqc.jms.mapper.TdfyDeptMapper">
<insert id="insertDeptBackId" parameterType="com.ruoyi.system.domain.SysDept" useGeneratedKeys="true" keyProperty="deptId">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
<if test="ancestors != null and ancestors != ''">ancestors,</if>
<if test="orderNum != null and orderNum != ''">order_num,</if>
<if test="leader != null and leader != ''">leader,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="email != null and email != ''">email,</if>
<if test="area != null and area != ''">area,</if>
<if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
<if test="parentId != null and parentId != 0">#{parentId},</if>
<if test="deptName != null and deptName != ''">#{deptName},</if>
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
<if test="leader != null and leader != ''">#{leader},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="area != null and area != ''">#{area},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<select id="findAllInpatientArea" resultType="map">
SELECT
IFNULL(inpatient_area,'未知') as inpatientArea,
IFNULL(inpatient_code,'') as inpatientCode,
IFNULL(department_code,'') as departmentCode,
IFNULL(department_name,'未知') as departmentName
from mrqc_record
where inpatient_area IS NOT NULL AND inpatient_area != ''
AND inpatient_code IS NOT NULL AND inpatient_code != ''
AND department_code IS NOT NULL AND department_code != ''
AND department_name IS NOT NULL AND department_name != ''
GROUP BY inpatient_area,department_name
ORDER BY inpatient_code
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hanyun.hip.mrqc.jms.mapper.UReportExportMapper">
<resultMap type="com.hanyun.hip.mrqc.service.entity.EmrRecord" id="EmrRecordResult">
<result property="recordId" column="record_id"/>
<result property="patientNum" column="patient_num"/>
<result property="hospitCode" column="hospit_code"/>
<result property="hospitNum" column="hospit_num"/>
<result property="patientName" column="patient_name"/>
<result property="patientSex" column="patient_sex"/>
<result property="birthday" column="birthday"/>
<result property="age" column="age"/>
<result property="auto" column="auto"/>
<result property="diagnosisCode" column="diagnosis_code"/>
<result property="diagnosisName" column="diagnosis_name"/>
<result property="doctorCode" column="doctor_code"/>
<result property="hospitDoctor" column="hospit_doctor"/>
<result property="hospitTime" column="hospit_time"/>
<result property="recordScore" column="record_score"/>
<result property="homepageScore" column="homepage_score"/>
<result property="inpatientArea" column="inpatient_area"/>
<result property="departmentCode" column="department_code"/>
<result property="departmentName" column="department_name"/>
<result property="creater" column="creater"/>
<result property="createTime" column="create_time"/>
<result property="modifyer" column="modifyer"/>
<result property="modifyTime" column="modify_time"/>
<result property="hospitName" column="hospit_name"/>
<result property="emrStatus" column="emr_status"/>
<result property="inTime" column="in_time"/>
<result property="outTime" column="out_time"/>
<result property="etlTime" column="etl_time"/>
<result property="approved" column="approved"/>
<result property="reportId" column="report_id"/>
<result property="bedNumber" column="bed_number"/>
</resultMap>
<select id="selectDeathList" resultType="com.hanyun.hip.mrqc.jms.entity.UReportDeathDTO">
select hospit_doctor as doctorName,inpatient_area as inpatientArea,out_time as outTime,record_id as recordId,(select label_id from mrqc_record_label where label_id = '27' and record_id = u.record_id) as labelId, ( select approved from mrqc_operator_record where record_id = u.record_id) as approved from mrqc_record u
where 1=1
and inpatient_area is not null and inpatient_area != ''
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area like concat('%', #{inpatientArea},'%')
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectEmrRecordList" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select u.* from mrqc_record u
<if test="dataType != null and dataType == '2'">
left join mrqc_record_label l on u.record_id = l.record_id
</if>
<!-- <if test="dataType != null and dataType == '3'">-->
<!-- left join mrqc_operator_record o on u.record_id = o.record_id-->
<!-- </if>-->
where 1=1
and u.inpatient_area is not null and u.inpatient_area != ''
<if test="dataType != null and dataType == '2'">
and l.label_id = '27'
</if>
<!-- <if test="dataType != null and dataType == '3'">-->
<!-- and o.approved = '1'-->
<!-- </if>-->
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area = #{inpatientArea}
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectEmrRecordListByLabelId" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select u.* from mrqc_record u
left join mrqc_record_label l on u.record_id = l.record_id
<!-- <if test="dataType != null and dataType == '3'">-->
<!-- left join mrqc_operator_record o on u.record_id = o.record_id-->
<!-- </if>-->
where 1=1
and u.inpatient_area is not null and u.inpatient_area != ''
and l.label_id = '27'
<!-- <if test="dataType != null and dataType == '3'">-->
<!-- and o.approved = '1'-->
<!-- </if>-->
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area = #{inpatientArea}
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectEmrRecordListByApproved" parameterType="com.hanyun.hip.mrqc.service.entity.EmrRecord" resultMap="EmrRecordResult">
select u.* from mrqc_record u
left join mrqc_operator_record o on u.record_id = o.record_id
where 1=1
and u.inpatient_area is not null and u.inpatient_area != ''
and o.approved = '1'
<if test="hospitDoctor != null and hospitDoctor != ''">
AND u.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND u.inpatient_area = #{inpatientArea}
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(u.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(u.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
<select id="selectRectificationList" resultType="com.hanyun.hip.mrqc.jms.entity.UReportRectificationDTO">
select r.record_id as recordId ,r.inpatient_area as inpatientArea,r.hospit_doctor as hospitDoctor,
(select count(*) from mrqc_result_history mh where mh.record_id = r.record_id) as historyCount,
(select count(*) from mrqc_rule_result mh where mh.record_id = r.record_id) as nowRCount,
(select count(*) from mrqc_manual_defect mh where mh.record_id = r.record_id and status =2) as nowPCount
from mrqc_record r
where 1=1
<if test="hospitDoctor != null and hospitDoctor != ''">
AND r.hospit_doctor like concat('%', #{hospitDoctor}, '%')
</if>
<if test="inpatientArea != null and inpatientArea != ''">
AND r.inpatient_area = #{inpatientArea}
</if>
<if test="beginTime != null"><!-- 开始时间检索 -->
AND date_format(r.out_time,'%y%m%d') &gt;=date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null"><!-- 结束时间检索 -->
AND date_format(r.out_time,'%y%m%d') &lt;=date_format(#{endTime},'%y%m%d')
</if>
</select>
</mapper>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">主诉:</span>
<widget type="textarea" width="650" wid="HDSD00_05_077" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">入院情况:</span>
<widget type="textarea" width="650" wid="HDSD00_13_056" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">入院诊断:</span>
<widget type="textarea" width="650" wid="HDSD00_13_060" placeholder="-"></widget>
</div>
<div class="present-history">
<span class="widget-label">诊疗经过:</span>
<widget type="textarea" width="650" wid="HDSD00_13_107" placeholder="-"></widget>
</div>
<div class="present-history">
<span class="widget-label">死亡原因:</span>
<widget type="textarea" width="650" wid="HDSD00_13_068" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">死亡诊断:</span>
<widget type="textarea" width="650" wid="HDSD00_13_070" placeholder="-"></widget>
</div>
<div class="autograph">
<div>
<span class="widget-label">医师签名: </span>
<widget wid="HDSD00_13_113" type="input" width="180"></widget>
</div>
<div>
<span class="widget-label">记录时间: </span>
<widget wid="HDSD00_13_JLSJ" type="input" width="180"></widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table {
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th, .doc-body .base-info > div.whole table td {
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint, .doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label, .doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph, .doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div {
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">讨论时间:</span>
<widget wid="HDSD00_YN_TLSJ" type="textarea" width="300" placeholder="讨论时间">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">讨论地点:</span>
<widget wid="HDSD00_YN_TLDD" type="textarea" width="600">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">主持人姓名及专业技术职务:</span>
<widget wid="HDSD00_YN_ZCR" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">参加讨论人员的姓名及专业技术职务:</span>
<widget wid="HDSD00_YN_TLR" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">讨论结论:</span>
<widget wid="HDSD00_YN_JL" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">主持人签名:</span>
<widget wid="HDSD00_YN_ZCRQM" type="input" width="200">
</widget>
</div>
<div >
<span class="widget-label">记录医师签名:</span>
<widget wid="HDSD00_YN_JLQM" type="input" width="200">
</widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table {
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th, .doc-body .base-info > div.whole table td {
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint, .doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label, .doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph, .doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div {
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">查房情况:</span>
<widget wid="HDSD00_BC_CFQK" type="textarea" width="600" >
</widget>
</div>
<div class="present-history" >
<span class="widget-label">病情分析:</span>
<widget wid="HDSD00_BC_BQFX" type="textarea" width="600">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">诊疗意见:</span>
<widget wid="HDSD00_BC_ZLYJ" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">主治医师签名:</span>
<widget wid="HDSD00_BC_ZZQM" type="input" width="200">
</widget>
</div>
<div >
<span class="widget-label">主任医师签名:</span>
<widget wid="HDSD00_BC_ZRQM" type="input" width="200">
</widget>
</div>
<div >
<span class="widget-label">住院医师:</span>
<widget wid="HDSD00_BC_ZYQM" type="input" width="200">
</widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table {
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th, .doc-body .base-info > div.whole table td {
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint, .doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label, .doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph, .doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div {
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">查房情况:</span>
<widget wid="HDSD00_BC_CFQK" type="textarea" width="300" placeholder="讨论时间">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">病情分析:</span>
<widget wid="HDSD00_BC_BQFX" type="textarea" width="600">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">诊疗意见:</span>
<widget wid="HDSD00_BC_ZLYJ" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">主治医师签名:</span>
<widget wid="HDSD00_BC_ZZQM" type="input" width="200">
</widget>
</div>
<div >
<span class="widget-label">住院医师:</span>
<widget wid="HDSD00_BC_ZYQM" type="input" width="200">
</widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: left;
margin-top: 10px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div>
<div>
<div>
<div style="width:30%;display:inline-block">
<span class="widget-label">年龄:</span>
<widget wid="HDSD00_10_030_01" type="input"></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">病室:</span>
<widget wid="HDSD00_10_004_01" type="input" ></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">床号:</span>
<widget wid="HDSD00_10_001_01" type="input" </widget>
</div>
</div>
<div>
<div>
<span class="widget-label">诊断:</span>
<widget wid="HDSD00_10_018_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">医患沟通时间:</span>
<widget wid="HDSD00_10_GTSJ_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">医患沟通地点:</span>
<widget wid="HDSD00_10_GTDD_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">参加人员:</span>
<widget wid="HDSD00_10_CYRY_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">沟通内容:</span>
<widget wid="HDSD00_10_GTNR_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">沟通记录:</span>
<widget wid="HDSD00_10_GTJL_01" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">沟通结果:</span>
<widget wid="HDSD00_10_GTJG_01" type="textarea" ></widget>
</div>
</div>
<div>
<div style="text-align: right;">
<span class="widget-label">记录及沟通医师签名:</span>
<widget wid="HDSD00_10_JLZQM_01" type="textarea" ></widget>
</div>
</div>
<div>
<div style="text-align: right;">
<span class="widget-label">沟通时间:</span>
<widget wid="HDSD00_10_GTSJ_02" type="textarea" ></widget>
</div>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: left;
margin-top: 10px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div>
<div>
<div>
<div style="width:30%;display:inline-block">
<span class="widget-label">年龄:</span>
<widget wid="HDSD00_10_030" type="input"></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">病室:</span>
<widget wid="HDSD00_10_004" type="input" ></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">床号:</span>
<widget wid="HDSD00_10_001" type="input" </widget>
</div>
</div>
<div>
<div>
<span class="widget-label">诊断:</span>
<widget wid="HDSD00_10_018" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">医患沟通时间:</span>
<widget wid="HDSD00_10_GTSJ_00" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">医患沟通地点:</span>
<widget wid="HDSD00_10_GTDD" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">参加人员:(医护人员、患者或家属姓名)</span>
<widget wid="HDSD00_10_CYRY" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">沟通内容:</span>
<widget wid="HDSD00_10_GTNR" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">沟通记录:</span>
<widget wid="HDSD00_10_GTJL" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">疾病变化:</span>
<widget wid="HDSD00_10_JBBH" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">治疗方案:</span>
<widget wid="HDSD00_10_ZLFA" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">药物不良反应:</span>
<widget wid="HDSD00_10_YWBLFY" type="textarea" ></widget>
</div>
</div>
<div>
<div style="text-align: right;">
<span class="widget-label">记录人签名:</span>
<widget wid="HDSD00_10_JLZQM" type="textarea" ></widget>
</div>
</div>
<div style="text-align: right;">
<div>
<span class="widget-label">沟通医师签名:</span>
<widget wid="HDSD00_10_GTYSQM" type="textarea" ></widget>
</div>
</div>
<div style="text-align: right;">
<div>
<span class="widget-label">沟通时间:</span>
<widget wid="HDSD00_10_GTSJ" type="textarea" ></widget>
</div>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: left;
margin-top: 10px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div>
<div>
<div>
<div style="width:30%;display:inline-block">
<span class="widget-label">年龄:</span>
<widget wid="HDSD00_10_ZR_NL" type="input"></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">病室:</span>
<widget wid="HDSD00_10_ZR_BS" type="input" ></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">床号:</span>
<widget wid="HDSD00_10_ZR_CH" type="input" </widget>
</div>
</div>
<div>
<div style="width:50%;display:inline-block">
<span class="widget-label">术前诊断:</span>
<widget wid="HDSD00_10_ZR_SQZD" type="textarea" ></widget>
</div>
<div style="width:50%;display:inline-block">
<span class="widget-label">拟行手术:</span>
<widget wid="HDSD00_10_ZR_SS" type="input" ></widget>
</div>
</div>
<div>
<div style="width:50%;display:inline-block">
<span class="widget-label">拟行麻醉:</span>
<widget wid="HDSD00_10_ZR_MZ" type="input" ></widget>
</div>
<div style="width:50%;display:inline-block">
<span class="widget-label">拟定手术时间:</span>
<widget wid="HDSD00_10_ZR_SSSJ" type="input" ></widget>
</div>
</div>
<div>
<div style="width:30%;display:inline-block">
<span class="widget-label">手术负责人:</span>
<widget wid="HDSD00_10_ZR_SSFZR" type="input" ></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">术者:</span>
<widget wid="HDSD00_10_ZR_SZ" type="input" ></widget>
</div>
<div style="width:30%;display:inline-block">
<span class="widget-label">助手:</span>
<widget wid="HDSD00_10_ZR_ZS" type="input" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">一 使用植入物名称:</span>
<widget wid="HDSD00_10_ZR_MC" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">二 使用植入物的目的:</span>
<widget wid="HDSD00_10_ZR_MD" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">三 术中和术后可能出现的主要并发症、意外情况:</span>
<widget wid="HDSD00_10_ZR_BFZ" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">四 其他:</span>
<widget wid="HDSD00_10_ZR_QT" type="textarea" ></widget>
</div>
</div>
<div>
<div>
<span class="widget-label">五 患者意见:</span>
<widget wid="HDSD00_10_ZR_HZYJ" type="textarea" ></widget>
</div>
</div>
<div style="width:50%;display:inline-block">
<div style="width:50%;display:inline-block">
<span class="widget-label">惠者或被委托人签字:</span>
<widget wid="HDSD00_10_ZR_HZQM" type="input" ></widget>
</div>
<div style="width:50%;display:inline-block">
<span class="widget-label">与患者关系:</span>
<widget wid="HDSD00_10_ZR_HZGX" type="input" ></widget>
</div>
</div>
<div style="width:50%;display:inline-block">
<div style="width:50%;display:inline-block">
<span class="widget-label">术者签字:</span>
<widget wid="HDSD00_10_ZR_SZQM" type="input" ></widget>
</div>
<div style="width:50%;display:inline-block">
<span class="widget-label">经治医师签字:</span>
<widget wid="HDSD00_10_ZR_YSQM" type="input" ></widget>
</div>
</div>
<div>
<div style="text-align: right;">
<span class="widget-label">手术前签字时间:</span>
<widget wid="HDSD00_10_ZR_SSQQMSJ" type="input" ></widget>
</div>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div class="doc-body">
<div class="base-info">
<!--div>
<span class="widget-label">委托人(患者本人):</span>
<widget wid="HDSD00_10_016" type="date" width="200" width="200"></widget>
</div>
<div>
<span class="widget-label">性别:</span>
<widget wid="HDSD00_10_051" type="date" width="200" width="200"></widget>
</div>
<div>
<span class="widget-label">年龄:</span>
<widget wid="HDSD00_10_030" type="date" width="200" width="200"></widget>
</div>
<div>
<span class="widget-label">有效证件号码: </span>
<widget wid="HDSD00_10_ZJHM" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">住址: </span>
<widget wid="HDSD00_10_ZZ" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">受委托人姓名: </span>
<widget wid="HDSD00_10_WTRXM" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">性别: </span>
<widget wid="HDSD00_10_WTRXB" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">年龄: </span>
<widget wid="HDSD00_10_WTRNL" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">联系电话: </span>
<widget wid="HDSD00_10_WTRLXDH" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">有效证件号码: </span>
<widget wid="HDSD00_10_WTRZJHM" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">住址: </span>
<widget wid="HDSD00_10_WTRZZ" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">与患者关系: </span>
<widget wid="HDSD00_10_010" type="input" width="200"></widget>
</div-->
<div>
<span class="widget-label"> </span>
<widget wid="HDSD00_10_NR" type="textarea" width="650"></widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl" />
<div>
<div>
<div style="width:40%;display:inline-block">
<span class="widget-label">
手术开始日期时间:
</span>
<widget wid="HDSD00_06_078" type="input" >
</widget>
</div>
<div style="width:40%;display:inline-block">
<span class="widget-label">
手术结束日期时间:
</span>
<widget wid="HDSD00_06_077" type="input" >
</widget>
</div>
</div>
<div>
<div style="width:40%;display:inline-block">
<span class="widget-label">
术前诊断:
</span>
<widget wid="HDSD00_07_118" type="input" >
</widget>
</div>
<div>
<span class="widget-label">
术后诊断:
</span>
<widget wid="HDSD00_07_145_1" type="input" >
</widget>
</div>
</div>
</div>
<div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_079')">
<span class="widget-label">
手术名称:
</span>
<widget wid="HDSD00_06_079" type="input">
</widget>
</div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_085')">
<span class="widget-label">
手术人员:
</span>
<widget wid="HDSD00_06_085" type="input">
</widget>
</div>
</div>
<div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_044')">
<span class="widget-label">
麻醉方式:
</span>
<widget wid="HDSD00_06_044" type="input">
</widget>
</div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_055')">
<span class="widget-label">
麻醉医师:
</span>
<widget wid="HDSD00_06_055" type="input">
</widget>
</div>
</div>
<div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_QCBB')">
<span class="widget-label">
手术切除标本:
</span>
<widget wid="HDSD00_06_QCBB" type="input">
</widget>
</div>
<div style="width:40%;display:inline-block" tpl-show="showStruct('HDSD00_06_QCBBJG')">
<span class="widget-label">
冰冻切片结果:
</span>
<widget wid="HDSD00_06_QCBBJG" type="input">
</widget>
</div>
</div>
<div tpl-show="showStruct('HDSD00_06_SHSJ')">
<span class="widget-label">
术后送检:
</span>
<widget wid="HDSD00_06_SHSJ" type="input">
</widget>
</div>
<div>
<div style="width:30%;display:inline-block" tpl-show="showStruct('HDSD00_06_SHBFZ')">
<span class="widget-label">
术中并发症:
</span>
<widget wid="HDSD00_06_SHBFZ" type="input">
</widget>
</div>
<div style="width:30%;display:inline-block" tpl-show="showStruct('HDSD00_06_022')">
<span class="widget-label">
术中失血量:
</span>
<widget wid="HDSD00_06_022" type="input">
ml
</widget>
</div>
<div style="width:30%;display:inline-block" tpl-show="showStruct('HDSD00_06_091')">
<span class="widget-label">
术中输血量:
</span>
<widget wid="HDSD00_06_091" type="input">
ml
</widget>
</div>
</div>
<div tpl-show="showStruct('HDSD00_06_073')">
<span class="widget-label">
手术过程描述:
</span>
<widget type="textarea" wid="HDSD00_06_073" placeholder="-">
</widget>
</div>
<div tpl-show="showStruct('HDSD00_06_SHQK')">
<span class="widget-label">
术后情况及诊疗计划:
</span>
<widget wid="HDSD00_06_SHQK" type="textarea">
</widget>
</div>
<div tpl-show="showStruct('HY_SQTL_ZYSX')">
<span class="widget-label">
术后注意事项:
</span>
<widget wid="HY_SQTL_ZYSX" type="textarea">
</widget>
</div>
<div>
<div style="text-align: right;">
<div>
<span class="widget-label">
医师签名:
</span>
<widget wid="HDSD00_06_084" type="input">
</widget>
</div>
<div tpl-show="showStruct('HDSD00_06_068')">
<span class="widget-label">
日期时间:
</span>
<widget wid="HDSD00_06_068" type="input">
</widget>
</div>
<div tpl-show="showStruct('HDSD00_06_HZQM')">
<span class="widget-label">
患者或代理人签名:
</span>
<widget wid="HDSD00_06_HZQM" type="input">
</widget>
</div>
<div tpl-show="showStruct('HDSD00_06_068')">
<span class="widget-label">
日期时间:
</span>
<widget wid="HDSD00_06_068" type="input">
</widget>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" tpl-show="showStruct('HY_SQTL_JYBQ')">
<span class="widget-label">简要病情:</span>
<widget type="textarea" width="650" wid="HY_SQTL_JYBQ" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HY_SQTL_HZQK')">
<span class="widget-label">术者术前查看患者的相关情况:</span>
<widget type="textarea" width="650" wid="HY_SQTL_HZQK" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_110')">
<span class="widget-label">术前讨论时间:</span>
<widget type="textarea" width="670" wid="HDSD00_14_110" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_134')">
<span class="widget-label">主持人姓名及职务(职称):</span>
<widget wid="HDSD00_14_134" type="textarea" width="670" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HY_SQTL_ZW')">
<span class="widget-label">参加讨论者的姓名及专业技术职务:</span>
<widget wid="HY_SQTL_ZW" type="textarea" width="670" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HY_SQTL_SQZD')">
<span class="widget-label">术前诊断:</span>
<widget type="textarea" width="650" wid="HY_SQTL_SQZD" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_099')">
<span class="widget-label">手术指征:</span>
<widget type="textarea" width="650" wid="HDSD00_14_099" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_071')">
<span class="widget-label">拟行术式:</span>
<widget wid="HDSD00_14_071" type="textarea" width="670" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_069')">
<span class="widget-label">拟施麻醉方式:</span>
<widget type="textarea" width="650" wid="HDSD00_14_069" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HY_SQTL_ZYSX')">
<span class="widget-label">术中及术后可能出现的风险及防范措施:</span>
<widget type="textarea" width="650" wid="HY_SQTL_ZYSX" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_103')">
<span class="widget-label">术前准备:</span>
<widget type="textarea" width="650" wid="HDSD00_14_103" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HY_SQTL_ZYSX')">
<span class="widget-label">术中和术后应当充分注意的事项:</span>
<widget type="textarea" width="650" wid="HY_SQTL_ZYSX" placeholder="-"></widget>
</div>
<div class="autograph">
<div tpl-show="showStruct('HY_SQTL_SZQM')">
<span class="widget-label">术者签名: </span>
<widget wid="HY_SQTL_SZQM" type="input" width="180"></widget>
</div>
<div tpl-show="showStruct('HY_SQTL_YSQM')">
<span class="widget-label">经治医师签名: </span>
<widget wid="HY_SQTL_YSQM" type="input" width="180"></widget>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 20px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
margin-left: 400px;
margin-top: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div class="doc-body">
<div class="present-history">
<span class="widget-label">讨论时间: </span>
<widget wid="HDSD00_SWTL_SJ" type="input" width="300"></widget>
</div>
<div class="present-history">
<span class="widget-label">讨论地点: </span>
<widget wid="HDSD00_SWTL_DD" type="input" width="300"></widget>
</div>
<div class="present-history">
<span class="widget-label">主持人及参加人员的姓名和专业技术职务: </span>
<widget wid="HDSD00_SWTL_XMZW" type="input" width="300"></widget>
</div>
<div class="present-history">
<span class="widget-label">死亡诊断:</span>
<widget wid="HDSD00_SWTL_SWZD" type="date" width="300"></widget>
</div>
<div class="present-history">
<span class="widget-label">死亡原因:</span>
<widget wid="HDSD00_SWTL_SWYY" type="input" width="300"></widget>
</div>
<div class="autograph">
<div class="present-history">
<span class="widget-label">主持人签名: </span>
<widget wid="HDSD00_SWTL_ZCRQM" type="input" width="200"></widget>
</div>
<div class="present-history">
<span class="widget-label">记录医师签名: </span>
<widget wid="HDSD00_SWTL_JLYSQM" type="date" width="200"></widget>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">评估内容:</span>
<widget wid="HDSD00_SX_PGNR" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">医师签名:</span>
<widget wid="HDSD00_SX_YSQM" type="input" width="200">
</widget>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">输血日期:</span>
<widget wid="HDSD00_SX_SXRQ" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">血型:</span>
<widget wid="HDSD00_SX_XX" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">输血成分和数量:</span>
<widget wid="HDSD00_SX_CFSL" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">输血方式:</span>
<widget wid="HDSD00_SX_SXFS" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">输注过程情况:</span>
<widget wid="HDSD00_SX_SZGC" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">医师签名:</span>
<widget wid="HDSD00_SX_QM" type="input" width="200">
</widget>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table {
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th, .doc-body .base-info > div.whole table td {
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint, .doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label, .doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph, .doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div {
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">主诉:</span>
<widget wid="HDSD00_14_137" type="textarea" width="600" placeholder="请输入主诉">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">当前情况:</span>
<widget wid="HDSD00_14_DQQK" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">补充病史:</span>
<widget wid="HDSD00_14_BCBS" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">已实施的治疗措施及疗效分析:</span>
<widget wid="HDSD00_14_ZLCS" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">检查检验结果:</span>
<widget wid="HDSD00_14_JCJY" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">诊断:</span>
<widget wid="HDSD00_14_ZD" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">诊断依据:</span>
<widget wid="HDSD00_14_ZDYJ" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">鉴别诊断的分析:</span>
<widget wid="HDSD00_14_ZDFX" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="present-history" >
<span class="widget-label">诊疗计划:</span>
<widget wid="HDSD00_14_ZLJH" type="textarea" width="600" placeholder="">
</widget>
</div>
<div class="autograph">
<div >
<span class="widget-label">医师签名:</span>
<widget wid="HDSD00_14_138" type="input" width="200">
</widget>
</div>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" tpl-show="showStruct('HDSD00_10_055')">
<span class="widget-label">内容:</span>
<widget wid="HDSD00_10_056" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="autograph">
<div tpl-show="showStruct('HY_QTJL_YSQM')">
<span class="widget-label">医师签名: </span>
<widget wid="HY_QTJL_YSQM" type="input" width="180"></widget>
</div>
</div>
</div>
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info > div.doc-inner-title{
width: 100%;
font-weight: bold;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}
.doc-widget[data-wid="HDSD00_11_139"],.doc-widget[data-wid="HDSD00_11_079"]
,.doc-widget[data-wid="HDSD00_11_080"],.doc-widget[data-wid="HDSD00_11_080_28"]
,.doc-widget[data-wid="HDSD00_11_107"],.doc-widget[data-wid="HDSD00_11_107_2"]
,.doc-widget[data-wid="HDSD00_11_087"]{
text-align: center;
}
#CaseBody {
position: relative!important;
width: 1200px!important;
margin: 0 auto!important;
z-index: 1!important;
padding: 30px 50px 100px!important;
}
</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"></include>
<div class="doc-body">
<div class="base-info">
<div tpl-show="showStruct('HDSD00_11_117')">
<span class="widget-label">医疗付费方式: </span>
<widget wid="HDSD00_11_117" width="200" type="select"></widget>
</div>
<div tpl-show="showStruct('HDSD00_11_053')">
<span class="widget-label">健康卡号: </span>
<widget wid="HDSD00_11_053" type="input"></widget>
</div>
<div>
<span class="widget-label"></span>
<widget wid="HDSD00_11_139" type="input"></widget>次住院
</div>
<div tpl-show="showStruct('HDSD00_11_110')">
<span class="widget-label">姓 名: </span>
<widget wid="HDSD00_11_110" type="input"></widget>
</div>
<div>
<span class="widget-label">性 别: </span>
<widget wid="HDSD00_11_109" type="radio"></widget>
</div>
<div>
<span class="widget-label">出生日期:</span>
<widget wid="HDSD00_11_014" type="date" width="200"></widget>
</div>
<div>
<span class="widget-label">年 龄: </span>
<widget wid="HDSD00_11_079" type="input"></widget>
</div>
<div>
<span class="widget-label">年龄(年龄不足1周岁): </span>
<widget wid="HDSD00_11_080" type="input"></widget>
</div>
<div>
<span class="widget-label">年龄(新生儿年龄≤28天): </span>
<widget wid="HDSD00_11_080_28" type="input"></widget>
</div>
<div>
<span class="widget-label">新生儿入院体重: </span>
<widget wid="HDSD00_11_108" type="input"></widget>
</div>
<div>
<span class="widget-label">新生儿出生体重: </span>
<widget wid="HDSD00_11_107" width="70" type="input"></widget>
(二孩<widget wid="HDSD00_11_107_2" width="70" type="input"></widget>克)
</div>
<div class="whole">
<span class="widget-label">身份证件类型: </span>
<widget wid="HDSD00_11_049" type="radio"></widget>
</div>
<div>
<span class="widget-label">证件号码: </span>
<widget wid="HDSD00_11_048" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">出 生 地:</span>
<widget wid="HDSD00_11_011" type="input" width="380"></widget>
</div>
<div class="whole">
<span class="widget-label">户 口 地:</span>
<widget wid="HDSD00_11_011" type="input" width="400"></widget>
<span class="widget-label" style=" margin-left:30px;">邮编:</span>
<widget wid="HDSD00_11_047" type="input"></widget>
</div>
<div class="whole">
<span class="widget-label">现 住 址:</span>
<widget wid="HDSD00_11_102" type="textarea" width="400"></widget>
<span class="widget-label" style=" margin-left:30px;">邮编:</span>
<widget wid="HDSD00_11_106" type="input"></widget>
</div>
<div>
<span class="widget-label">国 籍: </span>
<widget wid="HDSD00_11_036" type="input"></widget>
</div>
<div>
<span class="widget-label">籍 贯: </span>
<widget wid="HDSD00_11_051" type="input" width="220"></widget>
</div>
<div>
<span class="widget-label">民 族:</span>
<widget wid="HDSD00_11_077" type="input"></widget>
</div>
<div>
<span class="widget-label">职 业:</span>
<widget wid="HDSD00_11_125" type="input" width="220"></widget>
</div>
<div>
<span class="widget-label">婚 姻: </span>
<widget wid="HDSD00_11_050" type="radio"></widget>
</div>
<div class="whole">
<span class="widget-label">工作单位及地址:</span>
<widget wid="HDSD00_11_029" type="input" width="400"></widget>
<span class="widget-label" style=" margin-left:30px;">单位电话:</span>
<widget wid="HDSD00_11_034" type="input"></widget>
<span class="widget-label" style=" margin-left:30px;">邮编:</span>
<widget wid="HDSD00_11_033" type="input"></widget>
</div>
<div>
<span class="widget-label">联系人姓名: </span>
<widget wid="HDSD00_11_065" type="input"></widget>
</div>
<div>
<span class="widget-label">与患者关系: </span>
<widget wid="HDSD00_11_066" type="input"></widget>
</div>
<div class="whole">
<span class="widget-label">联系人地址:</span>
<widget wid="HDSD00_11_060" type="input" width="600"></widget>
</div>
<div>
<span class="widget-label">联系人电话: </span>
<widget wid="HDSD00_11_064" type="input"></widget>
</div>
<div class="whole">
<span class="widget-label">入院途径: </span>
<widget wid="HDSD00_11_086" type="radio"></widget>
</div>
<div>
<span class="widget-label">入院日期:</span>
<widget wid="HDSD00_11_085" type="date" width="280"></widget>
</div>
<div>
<span class="widget-label">入院科别:</span>
<widget wid="HDSD00_11_084" type="input" width="280"></widget>
</div>
<div>
<span class="widget-label">入院病房:</span>
<widget wid="HDSD00_11_083" type="input" width="280"></widget>
</div>
<div>
<span class="widget-label">转科科别:</span>
<widget wid="HDSD00_11_144" type="date" width="280"></widget>
</div>
<div>
<span class="widget-label">出院日期:</span>
<widget wid="HDSD00_11_019" type="date" width="280"></widget>
</div>
<div>
<span class="widget-label">出院科别:</span>
<widget wid="HDSD00_11_018" type="input" width="280"></widget>
</div>
<div>
<span class="widget-label">出院病房:</span>
<widget wid="HDSD00_11_017" type="input" width="280"></widget>
</div>
<div>
<span class="widget-label">实际住院</span>
<widget wid="HDSD00_11_087" type="date" ></widget>
</div>
<div class="whole">
<span class="widget-label">门(急)诊诊断: </span>
<widget wid="HDSD00_11_076" type="input" width="200"></widget>
<span class="widget-label" style=" margin-left:30px;">疾病编码:</span>
<widget wid="HDSD00_11_075" type="input"></widget>
</div>
<div class="whole">
<table width="100%" cellpadding="0" cellspace="0">
<thead>
<tr>
<th width="40%">出院诊断</th>
<th width="20%">疾病编码</th>
<th width="20%">入院病情</th>
<th width="20%">治疗转归</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="table-inner-title">主要诊断</div>
<widget wid="HDSD00_11_024" type="input" width="280"></widget>
</td>
<td><widget wid="HDSD00_11_023" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_025" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_024_ZLZG" type="select" width="130"></widget></td>
</tr>
<tr>
<td>
<div class="table-inner-title">其他诊断</div>
<widget wid="HDSD00_11_021" type="input" width="280"></widget>
</td>
<td><widget wid="HDSD00_11_020" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_022" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_021_ZLZG" type="select" width="130"></widget></td>
</tr>
<tr>
<td><widget wid="HDSD00_11_021_2" type="input" width="280"></widget></td>
<td><widget wid="HDSD00_11_020_2" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_022_2" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_021_2_ZLZG" type="select" width="130"></widget></td>
</tr>
<% _.each( _.range(3,25) , function (index){ %>
<tr tpl-if="$value('HDSD00_11_021_<%=index%>') && $value('HDSD00_11_020_<%=index%>')">
<td><widget wid="HDSD00_11_021_<%=index%>" type="input" width="280"></widget></td>
<td><widget wid="HDSD00_11_020_<%=index%>" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_022_<%=index%>" type="input" width="130"></widget></td>
<td><widget wid="HDSD00_11_021_<%=index%>_ZLZG" type="select" width="130"></widget></td>
</tr>
<% }) %>
<tr>
<td colspan="4">
入院病情:1.有 2.临床未确定 3.情况不明 4.无&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
治疗转归:1. 治愈 2.好转 3.未愈 4.死亡 9.其他
</td>
</tr>
</tbody>
</table>
</div>
<div>
<span class="widget-label">损伤、中毒的外部原因: </span>
<widget wid="HDSD00_11_096" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">疾病编码: </span>
<widget wid="HDSD00_11_097" type="input" width="200"></widget>
</div>
<div class="whole">
<span class="widget-label">病理诊断: </span>
<widget wid="HDSD00_11_010" type="textarea" width="800"></widget>
</div>
<div>
<span class="widget-label">疾病编码: </span>
<widget wid="HDSD00_11_009" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">病 理 号: </span>
<widget wid="HDSD00_11_008" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">有无药物过敏: </span>
<widget wid="HDSD00_11_116" type="radio"></widget>
</div>
<div>
<span class="widget-label">过敏药物: </span>
<widget wid="HDSD00_11_037" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">死亡患者尸检: </span>
<widget wid="HDSD00_11_095" type="radio"></widget>
</div>
<div>
<span class="widget-label">血 型: </span>
<widget wid="HDSD00_11_003" type="radio"></widget>
</div>
<div>
<span class="widget-label">Rh: </span>
<widget wid="HDSD00_11_004" type="radio"></widget>
</div>
<div>
<span class="widget-label">科 主 任: </span>
<widget wid="HDSD00_11_056" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">主任(副主任)医师: </span>
<widget wid="HDSD00_11_137" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">主治医师: </span>
<widget wid="HDSD00_11_138" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">住院医师: </span>
<widget wid="HDSD00_11_141" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">责任护士: </span>
<widget wid="HDSD00_11_120" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">进修医师: </span>
<widget wid="HDSD00_11_054" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">实习医师: </span>
<widget wid="HDSD00_11_088" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">编 码 员: </span>
<widget wid="HDSD00_11_005" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">病案质量: </span>
<widget wid="HDSD00_11_007" type="radio"></widget>
</div>
<div>
<span class="widget-label">质控医师: </span>
<widget wid="HDSD00_11_128" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">质控护士: </span>
<widget wid="HDSD00_11_126" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">质控日期: </span>
<widget wid="HDSD00_11_127" type="date" width="200"></widget>
</div>
<div class="whole">
<table width="100%" cellpadding="0" cellspace="0">
<thead>
<tr>
<th rowspan="2">操作编码</th>
<th rowspan="2">操作日期</th>
<th rowspan="2">手术级别</th>
<th rowspan="2">手术类别</th>
<th rowspan="2">手术及操作名称</th>
<th colspan="3">手术及操作医师</th>
<th rowspan="2">切口类别</th>
<th rowspan="2">切口愈合等级</th>
<th rowspan="2">麻醉方式</th>
<th rowspan="2">麻醉医师</th>
</tr>
<tr>
<th>术者</th>
<th>Ⅰ助</th>
<th>Ⅱ助</th>
</tr>
</thead>
<tbody>
<tr>
<td><widget wid="HDSD00_11_089" type="input" width="80"></widget></td>
<td><widget wid="HDSD00_11_091" type="date" width="80"></widget></td>
<td><widget wid="HDSD00_11_092" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_SSLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090" type="textarea" width="160"></widget></td>
<td><widget wid="HDSD00_11_094" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_001" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_002" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_090_QKLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_082" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_073" type="textarea" width="120"></widget></td>
<td><widget wid="HDSD00_11_074" type="input" width="60"></widget></td>
</tr>
<tr>
<td><widget wid="HDSD00_11_089_2" type="input" width="80"></widget></td>
<td><widget wid="HDSD00_11_091_2" type="date" width="80"></widget></td>
<td><widget wid="HDSD00_11_092_2" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_2_SSLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_2" type="textarea" width="160"></widget></td>
<td><widget wid="HDSD00_11_094_2" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_001_2" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_002_2" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_090_2_QKLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_082_2" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_073_2" type="textarea" width="120"></widget></td>
<td><widget wid="HDSD00_11_074_2" type="input" width="60"></widget></td>
</tr>
<tr>
<td><widget wid="HDSD00_11_089_3" type="input" width="80"></widget></td>
<td><widget wid="HDSD00_11_091_3" type="date" width="80"></widget></td>
<td><widget wid="HDSD00_11_092_3" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_3_SSLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_3" type="textarea" width="160"></widget></td>
<td><widget wid="HDSD00_11_094_3" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_001_3" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_002_3" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_090_3_QKLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_082_3" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_073_3" type="textarea" width="120"></widget></td>
<td><widget wid="HDSD00_11_074_3" type="input" width="60"></widget></td>
</tr>
<% _.each( _.range(4,25) , function (index){ %>
<tr tpl-if="$value('HDSD00_11_089_<%=index%>') && $value('HDSD00_11_090_<%=index%>')">
<td><widget wid="HDSD00_11_089_<%=index%>" type="input" width="80"></widget></td>
<td><widget wid="HDSD00_11_091_<%=index%>" type="date" width="80"></widget></td>
<td><widget wid="HDSD00_11_092_<%=index%>" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_<%=index%>_SSLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_090_<%=index%>" type="textarea" width="160"></widget></td>
<td><widget wid="HDSD00_11_094_<%=index%>" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_001_<%=index%>" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_002_<%=index%>" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_090_<%=index%>_QKLB" type="input" width="30"></widget></td>
<td><widget wid="HDSD00_11_082_<%=index%>" type="input" width="50"></widget></td>
<td><widget wid="HDSD00_11_073_<%=index%>" type="textarea" width="120"></widget></td>
<td><widget wid="HDSD00_11_074_<%=index%>" type="input" width="60"></widget></td>
</tr>
<% }) %>
<tr>
<td colspan="4" rowspan="2">手术类别:1.择期手术 2.急诊手术</td>
<td colspan="8">切口类别:0.0类切口 1.I类切口 2.II类切口 3.III类切口</td>
</tr>
<tr>
<td colspan="8">愈合等级:1.甲 2.乙 3.丙 9.其他</td>
</tr>
</tbody>
</table>
</div>
<div class="whole">
<span class="widget-label">离院方式: </span>
<widget wid="HDSD00_11_057" type="input"></widget>
</div>
<div>
<span class="widget-label">拟接收医疗机构名称: </span>
<widget wid="HDSD00_11_078_SQ" type="date" width="200"></widget>
</div>
<div class="whole">
<span class="widget-label">是否有出院31天内再住院计划: </span>
<widget wid="HDSD00_11_015" type="radio"></widget>
<span class="widget-label" style=" margin-left:30px;">目的: </span>
<widget wid="HDSD00_11_016" type="date"></widget>
</div>
<div>
</div>
<div class="whole">
<span class="widget-label">颅脑损伤患者昏迷时间: </span>
入院前&nbsp;&nbsp;&nbsp;
<widget wid="HDSD00_11_070" type="date" width="40"></widget>
<widget wid="HDSD00_11_071" type="date" width="40"></widget>小时
<widget wid="HDSD00_11_072" type="date" width="40"></widget>分钟
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
入院后&nbsp;&nbsp;&nbsp;
<widget wid="HDSD00_11_067" type="date" width="40"></widget>
<widget wid="HDSD00_11_068" type="date" width="40"></widget>小时
<widget wid="HDSD00_11_069" type="date" width="40"></widget>分钟
</div>
<div class="whole">
<span class="widget-label">住院费用:</span> 总 费 用:
<widget wid="HDSD00_11_142" type="input" width="200"></widget>(自付金额:
<widget wid="HDSD00_11_143" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">1.综合医疗服务类:</div>
<div>
<span class="widget-label">(1)一般医疗服务费:</span>
<widget wid="HDSD00_11_147" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(2)一般治疗操作费:</span>
<widget wid="HDSD00_11_148" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(3)护理费:</span>
<widget wid="HDSD00_11_145" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(4)其他费用:</span>
<widget wid="HDSD00_11_146" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">2.诊断类:</div>
<div>
<span class="widget-label">(5)病理诊断费:</span>
<widget wid="HDSD00_11_121" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(6)实验室诊断费:</span>
<widget wid="HDSD00_11_123" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(7)影像学诊断费:</span>
<widget wid="HDSD00_11_124" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(8)临床诊断项目费:</span>
<widget wid="HDSD00_11_122" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">3.治疗类:</div>
<div class="whole">
<span class="widget-label">(9)非手术治疗项目费:</span>
<widget wid="HDSD00_11_129" type="input"></widget>(临床物理治疗费:
<widget wid="HDSD00_11_130" type="input"></widget>
</div>
<div class="whole">
<span class="widget-label">(10)手术治疗费:</span>
<widget wid="HDSD00_11_131" type="input"></widget>(麻醉费:
<widget wid="HDSD00_11_132" type="input"></widget>手术费:
<widget wid="HDSD00_11_133" type="input"></widget>
</div>
<div class="doc-inner-title">4.康复类:</div>
<div>
<span class="widget-label">(11)康复费:</span>
<widget wid="HDSD00_11_055" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">5.中医类:</div>
<div>
<span class="widget-label">(12)中医治疗费:</span>
<widget wid="HDSD00_11_136" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">6.西药类:</div>
<div class="whole">
<span class="widget-label">(13)西药费:</span>
<widget wid="HDSD00_11_098" type="input"></widget>(抗菌药物费用:
<widget wid="HDSD00_11_099" type="input"></widget>
</div>
<div class="doc-inner-title">7.中药类:</div>
<div>
<span class="widget-label">(14)中成药费:</span>
<widget wid="HDSD00_11_135" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(15)中草药费:</span>
<widget wid="HDSD00_11_134" type="input" width="200"></widget>
</div>
<div class="doc-inner-title">8.血液和血液制品类:</div>
<div>
<span class="widget-label">(16)血费:</span>
<widget wid="HDSD00_11_115" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(17)白蛋白类制品费:</span>
<widget wid="HDSD00_11_111 " type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(18)球蛋白类制品费:</span>
<widget wid="HDSD00_11_113" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">(19)凝血因子类制品费:</span>
<widget wid="HDSD00_11_112" type="input" width="185"></widget>
</div>
<div>
<span class="widget-label">(20)细胞因子类制品费:</span>
<widget wid="HDSD00_11_114" type="input" width="185"></widget>
</div>
<div class="doc-inner-title">9.耗材类:</div>
<div>
<span class="widget-label">(21)检查用一次性医用材料费:</span>
<widget wid="HDSD00_11_038" type="input" width="145"></widget>
</div>
<div>
<span class="widget-label">(22)治疗用一次性医用材料费:</span>
<widget wid="HDSD00_11_040" type="input" width="145"></widget>
</div>
<div>
<span class="widget-label">(23)手术用一次性医用材料费:</span>
<widget wid="HDSD00_11_039" type="input" width="145"></widget>
</div>
<div class="doc-inner-title">10.其他类:</div>
<div>
<span class="widget-label">(24)其他费:</span>
<widget wid="HDSD00_11_081" type="input" width="200"></widget>
</div>
<div class="whole">
<table width="100%" cellpadding="0" cellspace="0">
<thead>
<tr>
<th>重症监护室名称</th>
<th>进入重症监护室时间(年 月 日 时 分)</th>
<th>转出重症监护室时间(年 月 日 时 分)</th>
</tr>
</thead>
<tbody>
<tr>
<td><widget wid="HDSD00_11_150" type="textarea" width="250"></widget></td>
<td><widget wid="HDSD00_11_151" type="date" width="250"></widget></td>
<td><widget wid="HDSD00_11_152" type="date" width="250"></widget></td>
</tr>
<tr>
<td><widget wid="HDSD00_11_150_2" type="textarea" width="250"></widget></td>
<td><widget wid="HDSD00_11_151_2" type="date" width="250"></widget></td>
<td><widget wid="HDSD00_11_152_2" type="date" width="250"></widget></td>
</tr>
<tr>
<td><widget wid="HDSD00_11_150_3" type="textarea" width="250"></widget></td>
<td><widget wid="HDSD00_11_151_3" type="date" width="250"></widget></td>
<td><widget wid="HDSD00_11_152_3" type="date" width="250"></widget></td>
</tr>
</tbody>
</table>
<div class="base-info">
<span class="widget-label">呼吸机使用:</span>
<widget wid="HY_BASY_HXJSY" type="input" width="200"></widget>小时
</div>
<div class="base-info">
<span class="widget-label">入院生活评分:</span>
<widget wid="HY_BASY_RXJSY" type="input" width="250"></widget>
<span class="widget-label">出院生活评分:</span>
<widget wid="HY_BASY_HXJSY" type="input" width="250"></widget>
</div>
</div>
<div>
<span class="widget-label">危重病例:</span>
<widget wid="HDSD00_11_153" type="radio"></widget>
</div>
<div>
<span class="widget-label">疑难病例:</span>
<widget wid="HDSD00_11_154" type="radio"></widget>
</div>
<div>
<span class="widget-label">MDT病例:</span>
<widget wid="HDSD00_11_155" type="radio"></widget>
</div>
<div>
<span class="widget-label">单病种病例:</span>
<widget wid="HDSD00_11_156" type="radio"></widget>
</div>
<div>
<span class="widget-label">日间手术病例:</span>
<widget wid="HDSD00_11_157" type="radio"></widget>
</div>
<div>
<span class="widget-label">教学查房病例:</span>
<widget wid="HDSD00_11_158" type="radio"></widget>
</div>
<div class="whole">
<span class="widget-label">诊断符合情况:</span>
</div>
<div>
<span class="widget-label">确诊日期:</span>
<widget wid="HY_BASY_QZRQ" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">门诊与出院:</span>
<widget wid="HDSD00_11_159" type="radio"></widget>
</div>
<div>
<span class="widget-label">入院与出院:</span>
<widget wid="HDSD00_11_160" type="radio"></widget>
</div>
<div>
<span class="widget-label">术前与术后:</span>
<widget wid="HDSD00_11_161" type="radio"></widget>
</div>
<div>
<span class="widget-label">临床与病理:</span>
<widget wid="HDSD00_11_162" type="radio"></widget>
</div>
<div>
<span class="widget-label">放射与病理:</span>
<widget wid="HDSD00_11_163" type="radio"></widget>
</div>
<div>
<span>抢救次数:</span>
<widget wid="HDSD00_11_164" type="input" width="70"></widget>
成功<widget wid="HDSD00_11_165" type="input" width="70"></widget>
</div>
</div>
<div class="whole">
<span class="widget-label">临床路径管理:</span>
<widget wid="HDSD00_11_166" type="radio"></widget>
</div>
<div class="whole">
<span class="widget-label">病历拓展信息:</span>
<div class="base-info">
<span>入院时情况:</span>
<widget wid="HY_BASY_RYSQK" type="input" width="200"></widget>
<span>输血反应:</span>
<widget wid="HY_BASY_SXFY" type="input" width="200"></widget>
</div>
<div class="base-info">
<span>红细胞</span>
<widget wid="HY_BASY_HXB" type="input" width="100"></widget>单位
<span>血小板:</span>
<widget wid="HY_BASY_XXB" type="input" width="100"></widget>
<span>血浆:</span>
<widget wid="HY_BASY_XJ" type="input" width="100"></widget>ml
<span>血:</span>
<widget wid="HY_BASY_XUE" type="input" width="100"></widget>ml
<span>其他:</span>
<widget wid="HY_BASY_QT" type="input" width="100"></widget>ml
</div>
<div class="base-info">
<span>医院感染:</span>
<widget wid="HY_BASY_YYGR" type="input" width="200"></widget>
<span>传染病是否上报:</span>
<widget wid="HY_BASY_CRBSB" type="input" width="200"></widget>
</div>
<div class="base-info">
<span>自体回输:</span>
<widget wid="HY_BASY_ZTHS" type="input" width="200"></widget>ml HBsAg HCV-Ab HIV-Ab
</div>
</div>
<div class="whole">
<span class="widget-label">肿瘤相关信息:</span>
<div class="base-info">
<span>肿瘤分期</span>
<span>T:</span>
<widget wid="HY_BASY_XXB" type="input" width="100"></widget>
<span>N:</span>
<widget wid="HY_BASY_XJ" type="input" width="100"></widget>
<span>M:</span>
<widget wid="HY_BASY_XUE" type="input" width="100"></widget>
<span>(0.0期 1.I期 2.II期 3.III期 4.IV期 5.不详)</span>
</div>
</div>
<div class="doc_explain">
说明:<br>
(一)医疗付费方式:1.城镇职工基本医疗保险 2.城镇居民基本医疗保险 3.新型农村合作医疗
4.贫困救助 5.商业医疗保险 6.全公费 7.全自费 8.其他社会保险 9.其他<br>
(二)凡可由医院信息系统提供住院费用清单的,住院病案首页中可不填写"住院费用"。
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<span class="widget-label">内容:</span>
<widget wid="HDSD00_10_QTJL" type="textarea" width="600" placeholder="-"></widget>
</div>
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" tpl-show="showStruct('HDSD00_05_077')">
<span class="widget-label">主诉:</span>
<widget type="textarea" width="650" wid="HDSD00_05_077" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_095')">
<span class="widget-label">现病史:</span>
<widget type="textarea" width="650" wid="HDSD00_13_095" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_042')">
<span class="widget-label">既往史:</span>
<widget type="textarea" width="670" wid="HDSD00_13_042" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_036')">
<span class="widget-label">个人史:</span>
<widget wid="HDSD00_13_036" type="textarea" width="670" placeholder="请输入个人史"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_037')">
<span class="widget-label">过敏史:</span>
<widget wid="HDSD00_13_037" type="textarea" width="670" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_035')">
<span class="widget-label">入院前检查检验结果:</span>
<widget type="textarea" width="650" wid="HDSD00_13_035" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_056')">
<span class="widget-label">入院情况:</span>
<widget type="textarea" width="650" wid="HDSD00_13_056" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_058')">
<span class="widget-label">入院诊断:</span>
<widget wid="HDSD00_13_058" type="textarea" width="670" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_ZLQPG')">
<span class="widget-label">治疗前评估</span>
<widget type="textarea" width="650" wid="HDSD00_13_ZLQPG" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_107')">
<span class="widget-label">诊疗过程:</span>
<widget type="textarea" width="650" wid="HDSD00_13_107" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_ZLHPG')">
<span class="widget-label">治疗后评估</span>
<widget type="textarea" width="650" wid="HDSD00_13_ZLHPG" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_010')">
<span class="widget-label">出院情况:</span>
<widget type="textarea" width="650" wid="HDSD00_13_010" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_016')">
<span class="widget-label">出院诊断:</span>
<widget type="textarea" width="650" wid="HDSD00_13_016" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_012')">
<span class="widget-label">出院医嘱:</span>
<widget type="textarea" width="650" wid="HDSD00_13_012" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_ZYSX')">
<span class="widget-label">注意事项:</span>
<widget type="textarea" width="650" wid="HDSD00_13_ZYSX" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_CYDY')">
<span class="widget-label">出院带药:</span>
<widget type="textarea" width="650" wid="HDSD00_13_CYDY" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_FCSJ')">
<span class="widget-label">复查时间:</span>
<widget type="textarea" width="650" wid="HDSD00_13_FCSJ" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_13_FFJH')">
<span class="widget-label">随访计划:</span>
<widget type="textarea" width="650" wid="HDSD00_13_FFJH" placeholder="-"></widget>
</div>
<div class="autograph">
<div tpl-show="showStruct('HDSD00_06_135')">
<span class="widget-label">医师签名:</span>
<widget wid="HDSD00_06_135" type="date" width="180"></widget>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" >
<span class="widget-label">诊断:</span>
<widget wid="HDSD00_10_YC_001" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">操作名称:</span>
<widget wid="HDSD00_10_YC_002" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" >
<span class="widget-label">内容:</span>
<widget wid="HDSD00_10_YC_005" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history">
<div class="autograph">
<div >
<span class="widget-label">医师签名: </span>
<widget wid="HDSD00_10_YC_003" type="input" width="200"></widget>
</div>
<div>
<span class="widget-label">签名日期时间: </span>
<widget wid="HDSD00_10_YC_004" type="date" width="200"></widget>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style id="CaseStyle">.doc-header {
<style id="CaseStyle">.doc-header {
position: relative;
padding-top: 10px;
padding-bottom: 20px;
}
.doc-header .hospital-name {
font-family: KaiTi;
font-weight: bold;
text-align: center;
font-size: 22px;
margin-bottom: 10px;
}
.doc-header .organization-id {
vertical-align: middle;
font-size: 14px;
position: absolute;
right: 10px;
top: 10px;
text-align: center;
margin-bottom: 10px;
}
.doc-header .doc-title {
font-weight: bold;
text-align: center;
font-size: 24px;
}
.doc-header .sub-title {
font-weight: bold;
text-align: center;
font-size: 16px;
}
.doc-header .patient-info {
margin-top: 15px;
margin-bottom: 10px;
display: flex;
}
.doc-header .patient-info > div {
flex-grow: 1;
}
.doc-body .base-info {
margin-top: 20px;
}
.doc-body .base-info > div {
margin-bottom: 20px;
float: left;
width: 50%;
}
.doc-body .base-info > div.whole {
width: 100%;
}
.doc-body .base-info > div.line {
background: #e0e0e0;
height: 1px;
}
.doc-body .base-info::after {
content: " ";
display: table;
clear: both;
}
.doc-body .base-info > div.whole table{
border-collapse: collapse;
border: 1px solid #e0e0e0;
}
.doc-body .base-info > div.whole table th,.doc-body .base-info > div.whole table td{
border: 1px solid #e0e0e0;
padding: 5px 10px;
}
.doc-body .base-info .widget-label {
display: inline-block;
}
.doc-body .chief-complaint,
.doc-body .present-history {
margin-top: 20px;
}
.doc-body .chief-complaint .widget-label,
.doc-body .present-history .widget-label {
font-weight: bold;
display: inline-block;
}
.doc-body .autograph,
.doc-body .diagnosis {
text-align: right;
margin-top: 40px;
margin-right: 20px;
}
.doc-body .autograph > div{
margin-bottom: 20px;
}</style>
<div class="doc-container">
<include src="mrqc/customCaseTpl/public/head.tpl"/>
<div class="doc-body">
<div class="present-history" tpl-show="showStruct('HDSD00_14_081')">
<span class="widget-label">入院日期时间:</span>
<widget wid="HDSD00_14_081" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_114')">
<span class="widget-label">小结日期时间:</span>
<widget wid="HDSD00_14_114" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_137')">
<span class="widget-label">主诉:</span>
<widget wid="HDSD00_14_137" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_004')">
<span class="widget-label">病历摘要:</span>
<widget wid="HDSD00_14_004" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_149')">
<span class="widget-label">转入科室:</span>
<widget wid="HDSD00_14_149" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_144')">
<span class="widget-label">转出科室:</span>
<widget wid="HDSD00_14_144" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_080')">
<span class="widget-label">入院情况:</span>
<widget wid="HDSD00_14_080" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_129')">
<span class="widget-label">中医“四诊”观察结果:</span>
<widget wid="HDSD00_14_129" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_113')">
<span class="widget-label">西医诊断名称:</span>
<widget wid="HDSD00_14_113" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history">
<span class="widget-label" tpl-show="showStruct('HDSD00_14_083')">入院诊断-西医诊断名称:</span>
<widget wid="HDSD00_14_083" type="textarea" width="600" placeholder="-"</widget>
<span class="widget-label" tpl-show="showStruct('HDSD00_14_084')">入院诊断-中医病名代码:</span>
<widget wid="HDSD00_14_084"></widget>
<span class="widget-label" tpl-show="showStruct('HDSD00_14_085')">入院诊断-中医证候代码:</span>
<widget wid="HDSD00_14_085"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_125')">
<span class="widget-label">治则治法:</span>
<widget wid="HDSD00_14_125" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history">
<span class="widget-label" tpl-show="showStruct('HDSD00_14_127')">中药煎煮方法:</span><widget wid="HDSD00_14_127"></widget>
<span class="widget-label" tpl-show="showStruct('HDSD00_14_128')">中药用药方法:</span><widget wid="HDSD00_14_128"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_118')">
<span class="widget-label">医嘱内容:</span>
<widget wid="HDSD00_14_118" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_120')">
<span class="widget-label">诊疗过程描述:</span>
<widget wid="HDSD00_14_120" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_16_045')">
<span class="widget-label">转入转出-诊疗过程描述:</span>
<widget wid="HDSD00_16_045" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_065')">
<span class="widget-label">目前情况:</span>
<widget wid="HDSD00_14_065" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history">
<span class="widget-label" tpl-show="showStruct('HDSD00_14_066')">目前诊断-西医诊断名称:</span><widget wid="HDSD00_14_066" type="textarea" width="600" placeholder="-"></widget>
<span class="widget-label" tpl-show="showStruct('HDSD00_14_067')">冃前诊断-中医病名代码:</span><widget wid="HDSD00_14_067"></widget>
<span class="widget-label" tpl-show="showStruct('HDSD00_14_068')">目前诊断-中医证候代码:</span><widget wid="HDSD00_14_068"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_122')">
<span class="widget-label">诊疗计划:</span>
<widget wid="HDSD00_14_122" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_152')">
<span class="widget-label">转入诊疗计划:</span>
<widget wid="HDSD00_14_152" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_061')">
<span class="widget-label">今后治疗方案:</span>
<widget wid="HDSD00_14_061" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history" tpl-show="showStruct('HDSD00_14_148')">
<span class="widget-label">转科目的:</span>
<widget wid="HDSD00_14_148" type="textarea" width="600" placeholder="-"></widget>
</div>
<div class="present-history">
<div class="autograph">
<div tpl-show="showStruct('HDSD00_14_117')">
<span class="widget-label">医师签名: </span>
<widget wid="HDSD00_14_117" type="input" width="200"></widget>
</div>
<div tpl-show="showStruct('HDSD00_14_076')">
<span class="widget-label">签名日期时间: </span>
<widget wid="HDSD00_14_076" type="date" width="200"></widget>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<th:block th:include="include :: header('南通大学附属医院病历质控分配规则')"/>
<link rel="stylesheet" th:href="@{/mrqc/css/public.css}">
<link rel="stylesheet" th:href="@{/mrqc/css/list.css}">
<link rel="stylesheet" th:href="@{/mrqc/css/manage_index.css}">
<link th:href="@{/ajax/libs/select2/select2.min.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"/>
<link th:href="@{/mrqc/js/bootstrap-table/extensions/editable/bootstrap-editable.css}" rel="stylesheet"/>
</head>
<script>
var ctx = '[[@{/}]]';
var prefix = ctx + "/jms/manageRecord";
</script>
<body>
<div class="popup_addStaff" id="configQcRuleDiv">
<div class="manageRule" id="detailQcRule">
<p>
质控病历份数:<input type="text" id="emrsPerDay" >
</p>
<div class="form-group">
<div class="col-sm-8">
<div id="toolbar">
<a id="addRow" data-action="add" >添加质控员</a>
<a id="removeRow" data-action="remove" >删除质控员</a>
</div>
<form id="user-form">
</form>
</div>
</div>
</div>
</div>
</body>
<div th:include="include :: footer"></div>
<th:block th:include="mrqc/include :: select2-js"/>
<script th:inline="javascript">
var allDepartment = JSON.parse('[[${allDepartment}]]');
var allInpatientArea = JSON.parse('[[${allInpatientArea}]]');
var allAreaAndDepatment = JSON.parse('[[${allAreaAndDepatment}]]');
var doctorMapByArea =JSON.parse('[[${doctorMapByArea}]]');
var allDoctor = [[${qcUsers}]];
var list =[[${list}]];
function initDepartmentSel(dom,departments) {
$("#"+dom).html("");
var html = "<option value=''>全部</option>";
for (var i = 0; i < departments.length; i++) {
var department = departments[i];
html += "<option value='" + department + "'>" + department + "</option>"
}
$("#"+dom).html(html);
}
/**
* 初始化医师
*/
function initDoctor(dom,doctors) {
$("#"+dom).html("");
var html = "<option value=''>请选择</option>";
for (var i = 0; i < doctors.length; i++) {
html += "<option value='" + doctors[i] + "'>" + doctors[i] + "</option>"
}
$("#"+dom).html(html);
}
$(function(){
for (var i = 0; i < list.length; i++) {
if(list[i].configKey=='emrsPerDay'){
$('#emrsPerDay').val(list[i].configValue);
}else if(list[i].configKey=='emrs'){
var dataEms = JSON.parse(list[i].configValue);
for (var j = 0; j < dataEms.length; j++) {
var ems = dataEms[j];
//获取行数
var tempId = j+1;
var html=[];
html.push('<div class="row" id="row'+tempId+'">');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label" data-action="add">科室:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="departmentSel'+tempId+'" class="form-control select2" >')
html.push('<option value="">请选择...</option>');
for (var k = 0; k < allInpatientArea.length; k++) {
var inpatientAreaElement = allInpatientArea[k];
html.push("<option value='" + inpatientAreaElement + "'>" + inpatientAreaElement + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label">病区:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="inpatientAreaSel'+tempId+'" class="form-control select2" >')
html.push('<option value="">全部</option>');
for (var k = 0; k < allDepartment.length; k++) {
var departmentElement = allDepartment[k];
html.push("<option value='" + departmentElement + "'>" + departmentElement + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label">质控员:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="zkySel'+tempId+'" class="form-control select2" >')
html.push('<option value="">请选择...</option>');
for (var k = 0; k < allDoctor.length; k++) {
html.push("<option value='" + allDoctor[k].userId + "'>" + allDoctor[k].userName + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('</div>');
$('#user-form').append(html.join(""));
$('#departmentSel'+tempId).select2({
placeholder: '请选择',
allowClear: true
});
$('#departmentSel'+tempId).val(ems.departmentSel).trigger("change");
$('#inpatientAreaSel'+tempId).select2({
allowClear: true
});
$('#inpatientAreaSel'+tempId).val(ems.inpatientAreaSel).trigger("change");
$('#zkySel'+tempId).select2({
placeholder: '请选择',
allowClear: true
});
$('#zkySel'+tempId).val(ems.zkySel).trigger("change");
/**
* 科室选择,联动医生
*/
$('#departmentSel'+tempId).on("change",function(){
var inpatientArea = $(this).val();
// if(doctorMapByArea[inpatientArea]){
// initDoctor('zkySel'+tempId,doctorMapByArea[inpatientArea]);
// }else{
// initDoctor('zkySel'+tempId,allDoctor);
// }
initDepartmentSel('inpatientAreaSel'+tempId,allAreaAndDepatment[inpatientArea]);
});
}
};
}
$('body').on('click','[data-action]',function() {
var actionName = $(this).data('action');
if(actionName =='add'){
//获取行数
var tempId = $('.row').size()+1;
var html=[];
html.push('<div class="row" id="row'+tempId+'">');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label" data-action="add">科室:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="departmentSel'+tempId+'" class="form-control select2" >')
html.push('<option value="">请选择...</option>');
for (var i = 0; i < allInpatientArea.length; i++) {
var inpatientAreaElement = allInpatientArea[i];
html.push("<option value='" + inpatientAreaElement + "'>" + inpatientAreaElement + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label">病区:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="inpatientAreaSel'+tempId+'" class="form-control select2" >')
html.push('<option value="">全部</option>');
for (var i = 0; i < allDepartment.length; i++) {
var departmentElement = allDepartment[i];
html.push("<option value='" + departmentElement + "'>" + departmentElement + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('<div class="form-group col-xs-4 " >');
html.push('<label class="col-xs-5 control-label">质控员:</label>');
html.push('<div class="col-xs-7 ">');
html.push('<select id="zkySel'+tempId+'" class="form-control select2" >')
html.push('<option value="">请选择...</option>');
for (var i = 0; i < allDoctor.length; i++) {
html.push("<option value='" + allDoctor[i].userId + "'>" + allDoctor[i].userName + "</option>");
}
html.push('</select>');
html.push('</div>');
html.push('</div>');
html.push('</div>');
$('#user-form').append(html.join(""));
$('#departmentSel'+tempId).select2({
placeholder: '请选择',
allowClear: true
});
$('#inpatientAreaSel'+tempId).select2({
allowClear: true
});
$('#zkySel'+tempId).select2({
placeholder: '请选择',
allowClear: true
});
/**
* 科室选择,联动医生
*/
$('#departmentSel'+tempId).on("change",function(){
var inpatientArea = $(this).val();
// if(doctorMapByArea[inpatientArea]){
// initDoctor('zkySel'+tempId,doctorMapByArea[inpatientArea]);
// }else{
// initDoctor('zkySel'+tempId,allDoctor);
// }
initDepartmentSel('inpatientAreaSel'+tempId,allAreaAndDepatment[inpatientArea]);
});
}else if(actionName == 'remove'){
//获取行数
var tempId = $('.row').size();
$('#row'+tempId).remove();
}
});
})
function submitHandler() {
var data = {};
var emrsPerDay = $('#emrsPerDay').val();
if(emrsPerDay==''){
layer.msg("请输入每日病历数");
return;
}
data.emrsPerDay = emrsPerDay;
data.emrs = [];
$(".row").each(function (idx, e) {
//获取对应得科室、病区、质控员
var departmentSel=$('#departmentSel'+(idx+1)).val();
var inpatientAreaSel=$('#inpatientAreaSel'+(idx+1)).val();
var zkySel=$('#zkySel'+(idx+1)).val();
data.emrs.push({
departmentSel:departmentSel,
inpatientAreaSel:inpatientAreaSel,
zkySel:zkySel
});
});
$.ajax({
url: prefix + "/saveDistributeRule",
contentType: "application/json",
data: JSON.stringify(data),
type: 'post',
beforeSend: function () {
$.modal.loading("正在处理中,请稍后...");
$.modal.disable();
},
success: function (result) {
$.modal.closeLoading();
$.modal.enable();
if (result.code === web_status.SUCCESS) {
$.modal.alertSuccess("保存成功")
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
} else {
$.modal.alertError("保存失败," + result.msg);
}
}
});
}
</script>
</html>
<?xml version="1.0" encoding="UTF-8"?><ureport><cell expand="None" name="A1" row="1" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[序号]]></simple-value></cell><cell expand="None" name="B1" row="1" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[记录编号]]></simple-value></cell><cell expand="None" name="C1" row="1" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[科室]]></simple-value></cell><cell expand="None" name="D1" row="1" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案号]]></simple-value></cell><cell expand="None" name="E1" row="1" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[患者]]></simple-value></cell><cell expand="None" name="F1" row="1" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[医生]]></simple-value></cell><cell expand="None" name="G1" row="1" col="7"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[诊断]]></simple-value></cell><cell expand="None" name="H1" row="1" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院时间]]></simple-value></cell><cell expand="None" name="I1" row="1" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[提交时间]]></simple-value></cell><cell expand="None" name="A2" row="2" col="1" left-cell="B2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><expression-value><![CDATA[&B2]]></expression-value></cell><cell expand="Down" name="B2" row="2" col="2" left-cell="root" link-url="/jms-mrqc/mrqc/jump/todetail" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="recordId"><value><![CDATA[#]]></value></link-parameter><dataset-value dataset-name="person" aggregate="select" property="recordId" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="C2" row="2" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="inpatientArea" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="D2" row="2" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="hospitNum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="E2" row="2" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="patientName" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F2" row="2" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="hospitDoctor" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G2" row="2" col="7"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="diagnosisName" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H2" row="2" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="outTime" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I2" row="2" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="etlTime" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A3" row="3" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B3" row="3" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C3" row="3" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D3" row="3" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E3" row="3" col="5"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F3" row="3" col="6"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G3" row="3" col="7"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H3" row="3" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I3" row="3" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="A4" row="4" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B4" row="4" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C4" row="4" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D4" row="4" col="4"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E4" row="4" col="5"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F4" row="4" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G4" row="4" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H4" row="4" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I4" row="4" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number="1" height="18"/><row row-number="2" height="18"/><row row-number="3" height="18"/><row row-number="4" height="19"/><column col-number="1" width="74"/><column col-number="2" width="74"/><column col-number="3" width="74"/><column col-number="4" width="80"/><column col-number="5" width="80"/><column col-number="6" width="80"/><column col-number="7" width="94"/><column col-number="8" width="115"/><column col-number="9" width="131"/><datasource name="uReport数据源" type="buildin"><dataset name="params" type="sql"><sql><![CDATA[select 1 from dual]]></sql><field name="1"/><parameter name="startDate" type="String" default-value=""/><parameter name="endDate" type="String" default-value=""/><parameter name="departmentName" type="String" default-value=""/><parameter name="doctorName" type="String" default-value=""/></dataset><dataset name="department_name" type="sql"><sql><![CDATA[select distinct inpatient_area as department_name from mrqc_record where inpatient_area !='']]></sql><field name="department_name"/></dataset></datasource><datasource name="Records" type="spring" bean="homePigeonholeService"><dataset name="person" type="bean" method="getRecordCommitList" clazz="com.hanyun.hip.mrqc.jms.entity.ReportRecordDTO"><field name="diagnosisName"/><field name="etlTime"/><field name="hospitDoctor"/><field name="hospitNum"/><field name="inTime"/><field name="inpatientArea"/><field name="outTime"/><field name="patientName"/><field name="recordId"/></dataset></datasource><paper type="A4" left-margin="90" right-margin="90"
top-margin="72" bottom-margin="72" paging-mode="fitpage" fixrows="0"
width="595" height="842" orientation="portrait" html-report-align="left" bg-image="" html-interval-refresh-value="0" column-enabled="false"></paper><search-form form-position="up"><grid show-border="false" type="Grid4x4x4x4" border-width="1" border-color="#cccccc"><col size="3"><input-datetime label="开始时间" type="Datetime" label-position="left" bind-parameter="startDate" format="yyyy-mm-dd"/></col><col size="3"><input-datetime label="结束时间" type="Datetime" label-position="left" bind-parameter="endDate" format="yyyy-mm-dd"/></col><col size="3"><input-text label="医师" type="Text" label-position="left" bind-parameter="doctorName"/></col><col size="3"><input-select label="科室" type="Select" label-position="left" bind-parameter="departmentName" use-dataset="true" dataset="department_name" label-field="department_name" value-field="department_name"><option label="选项1" value="选项1"/><option label="选项2" value="选项2"/><option label="选项3" value="选项3"/><option label="选项4" value="选项4"/></input-select></col></grid><grid show-border="false" type="Grid4x4x4x4" border-width="1" border-color="#cccccc"><col size="3"/><col size="3"/><col size="3"><button-submit label="提交" align="left" type="Submit-button" style="btn-default"/></col><col size="3"><button-reset label="重置" align="left" type="Reset-button" style="btn-default"/></col></grid></search-form></ureport>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><ureport><cell expand="None" name="A1" row="1" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[序号]]></simple-value></cell><cell expand="None" name="B1" row="1" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[记录编号]]></simple-value></cell><cell expand="None" name="C1" row="1" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案号]]></simple-value></cell><cell expand="None" name="D1" row="1" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[患者]]></simple-value></cell><cell expand="None" name="E1" row="1" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[医生]]></simple-value></cell><cell expand="None" name="F1" row="1" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[诊断]]></simple-value></cell><cell expand="None" name="G1" row="1" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[入院时间]]></simple-value></cell><cell expand="None" name="H1" row="1" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院时间]]></simple-value></cell><cell expand="None" name="I1" row="1" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[科室]]></simple-value></cell><cell expand="None" name="A2" row="2" col="1" left-cell="B2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><expression-value><![CDATA[&B2]]></expression-value></cell><cell expand="Down" name="B2" row="2" col="2" left-cell="root" link-url="/jms-mrqc/mrqc/jump/todetail" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="recordId"><value><![CDATA[#]]></value></link-parameter><dataset-value dataset-name="person" aggregate="select" property="recordId" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="C2" row="2" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="hospitNum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="D2" row="2" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="patientName" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="E2" row="2" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="hospitDoctor" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F2" row="2" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="diagnosisName" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G2" row="2" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="inTime" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H2" row="2" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="select" property="outTime" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I2" row="2" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="inpatientArea" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A3" row="3" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B3" row="3" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C3" row="3" col="3"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D3" row="3" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E3" row="3" col="5"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F3" row="3" col="6"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G3" row="3" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H3" row="3" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I3" row="3" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="A4" row="4" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B4" row="4" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C4" row="4" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D4" row="4" col="4"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E4" row="4" col="5"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F4" row="4" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G4" row="4" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H4" row="4" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I4" row="4" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number="1" height="18"/><row row-number="2" height="18"/><row row-number="3" height="18"/><row row-number="4" height="19"/><column col-number="1" width="74"/><column col-number="2" width="74"/><column col-number="3" width="80"/><column col-number="4" width="80"/><column col-number="5" width="80"/><column col-number="6" width="94"/><column col-number="7" width="115"/><column col-number="8" width="131"/><column col-number="9" width="129"/><datasource name="uReport数据源" type="buildin"></datasource><datasource name="Records" type="spring" bean="homePigeonholeService"><dataset name="person" type="bean" method="getreportRecordList" clazz="com.hanyun.hip.mrqc.jms.entity.ReportRecordDTO"><field name="diagnosisName"/><field name="hospitDoctor"/><field name="hospitNum"/><field name="inTime"/><field name="inpatientArea"/><field name="outTime"/><field name="patientName"/><field name="recordId"/></dataset></datasource><paper type="A4" left-margin="90" right-margin="90"
top-margin="72" bottom-margin="72" paging-mode="fitpage" fixrows="0"
width="595" height="842" orientation="portrait" html-report-align="left" bg-image="" html-interval-refresh-value="0" column-enabled="false"></paper></ureport>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><ureport><cell expand="None" name="A1" row="1" col="1" row-span="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[开始日期]]></simple-value></cell><cell expand="None" name="B1" row="1" col="2" row-span="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[结束日期]]></simple-value></cell><cell expand="None" name="C1" row="1" col="3" row-span="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[科室]]></simple-value></cell><cell expand="None" name="D1" row="1" col="4" col-span="4"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案首页两日归档率]]></simple-value></cell><cell expand="None" name="H1" row="1" col="8" col-span="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[三日归档率]]></simple-value></cell><cell expand="None" name="K1" row="1" col="11" col-span="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[四日归档率]]></simple-value></cell><cell expand="None" name="N1" row="1" col="14" col-span="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[五日归档率]]></simple-value></cell><cell expand="None" name="Q1" row="1" col="17" col-span="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[七日归档率]]></simple-value></cell><cell expand="None" name="T1" row="1" col="20" col-span="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[超过七日归档率]]></simple-value></cell><cell expand="None" name="D2" row="2" col="4"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案首页两日归档人数]]></simple-value></cell><cell expand="None" name="E2" row="2" col="5"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[两日归档未完成人数]]></simple-value></cell><cell expand="None" name="F2" row="2" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[出院患者总数]]></simple-value></cell><cell expand="None" name="G2" row="2" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[两日归档率(%)]]></simple-value></cell><cell expand="None" name="H2" row="2" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[三日归档完成人数]]></simple-value></cell><cell expand="None" name="I2" row="2" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院患者人数]]></simple-value></cell><cell expand="None" name="J2" row="2" col="10"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[归档率(%)]]></simple-value></cell><cell expand="None" name="K2" row="2" col="11"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[四日归档完成人数]]></simple-value></cell><cell expand="None" name="L2" row="2" col="12"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院患者总数]]></simple-value></cell><cell expand="None" name="M2" row="2" col="13"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[归档率(%)]]></simple-value></cell><cell expand="None" name="N2" row="2" col="14"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[五日归档完成人数]]></simple-value></cell><cell expand="None" name="O2" row="2" col="15"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院患者人数]]></simple-value></cell><cell expand="None" name="P2" row="2" col="16"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[归档率(%)]]></simple-value></cell><cell expand="None" name="Q2" row="2" col="17"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[七日归档完成人数]]></simple-value></cell><cell expand="None" name="R2" row="2" col="18"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院患者]]></simple-value></cell><cell expand="None" name="S2" row="2" col="19"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[归档率(%)]]></simple-value></cell><cell expand="None" name="T2" row="2" col="20"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[超过七日归档人数]]></simple-value></cell><cell expand="None" name="U2" row="2" col="21"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院患者]]></simple-value></cell><cell expand="None" name="V2" row="2" col="22"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[归档率(%)]]></simple-value></cell><cell expand="Down" name="A3" row="3" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="beginDate" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="B3" row="3" col="2" top-cell="root"><cell-style font-size="10" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="endDate" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="C3" row="3" col="3" top-cell="root"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="inpatientArea" order="asc" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="D3" row="3" col="4" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["2"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="twoDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="E3" row="3" col="5" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["3"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="twoDayNotCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F3" row="3" col="6" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G3" row="3" col="7"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="twoDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H3" row="3" col="8" left-cell="A3" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["4"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="threeDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I3" row="3" col="9" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="J3" row="3" col="10"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="threeDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="K3" row="3" col="11" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["5"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="fourDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="L3" row="3" col="12" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="M3" row="3" col="13"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="fourDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="N3" row="3" col="14" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["6"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="fiveDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="O3" row="3" col="15" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="P3" row="3" col="16"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="fiveDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="Q3" row="3" col="17" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["7"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="sevenDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="R3" row="3" col="18" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="S3" row="3" col="19"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="sevenDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="T3" row="3" col="20" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["8"]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="moreThanSevenDayCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="U3" row="3" col="21" link-url="/jms-mrqc/ureport/preview?_u=file:homeLabel.ureport.xml" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="startDate"><value><![CDATA[A3]]></value></link-parameter><link-parameter name="endDate"><value><![CDATA[B3]]></value></link-parameter><link-parameter name="type"><value><![CDATA["1"]]></value></link-parameter><link-parameter name="departmentName"><value><![CDATA[C3]]></value></link-parameter><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="hospitCount" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="V3" row="3" col="22"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="HomePigeonhole" aggregate="select" property="moreThanDayPigeonhole" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A4" row="4" col="1" col-span="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[合计:]]></simple-value></cell><cell expand="None" name="C4" row="4" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" wrap-compute="true" align="center" valign="middle"></cell-style><expression-value><![CDATA[count(C3)]]></expression-value></cell><cell expand="None" name="D4" row="4" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="twoDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="E4" row="4" col="5"><cell-style font-size="10" wrap-compute="true" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="twoDayNotCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F4" row="4" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G4" row="4" col="7"><cell-style font-size="10" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="twoDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H4" row="4" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="threeDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I4" row="4" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="J4" row="4" col="10"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="threeDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="K4" row="4" col="11"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="fourDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="L4" row="4" col="12"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="M4" row="4" col="13"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="fourDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="N4" row="4" col="14"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="fiveDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="O4" row="4" col="15"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="P4" row="4" col="16"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="fiveDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="Q4" row="4" col="17"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="sevenDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="R4" row="4" col="18"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="S4" row="4" col="19"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="threeDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="T4" row="4" col="20"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="moreThanSevenDayCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="U4" row="4" col="21"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="hospitCountSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="V4" row="4" col="22"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><dataset-value dataset-name="HomePigeonholeSum" aggregate="select" property="moreThanDayPigeonholeSum" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A5" row="5" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B5" row="5" col="2"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C5" row="5" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D5" row="5" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E5" row="5" col="5"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F5" row="5" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G5" row="5" col="7"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H5" row="5" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I5" row="5" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="J5" row="5" col="10"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="K5" row="5" col="11"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="L5" row="5" col="12"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="M5" row="5" col="13"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="N5" row="5" col="14"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="O5" row="5" col="15"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="P5" row="5" col="16"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="Q5" row="5" col="17"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="R5" row="5" col="18"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="S5" row="5" col="19"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="T5" row="5" col="20"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="U5" row="5" col="21"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="V5" row="5" col="22"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number="1" height="19" band="title"/><row row-number="2" height="19"/><row row-number="3" height="18"/><row row-number="4" height="18" band="footerrepeat"/><row row-number="5" height="18"/><column col-number="1" width="74"/><column col-number="2" width="80"/><column col-number="3" width="102"/><column col-number="4" width="80"/><column col-number="5" width="80"/><column col-number="6" width="74"/><column col-number="7" width="80"/><column col-number="8" width="74"/><column col-number="9" width="74"/><column col-number="10" width="74"/><column col-number="11" width="74"/><column col-number="12" width="74"/><column col-number="13" width="74"/><column col-number="14" width="74"/><column col-number="15" width="74"/><column col-number="16" width="74"/><column col-number="17" width="74"/><column col-number="18" width="74"/><column col-number="19" width="74"/><column col-number="20" width="74"/><column col-number="21" width="74"/><column col-number="22" width="74"/><datasource name="uReport数据源" type="buildin"><dataset name="department_name" type="sql"><sql><![CDATA[select distinct inpatient_area as department_name from mrqc_record where inpatient_area !='']]></sql><field name="department_name"/></dataset></datasource><datasource name="归档率统计" type="spring" bean="homePigeonholeService"><dataset name="HomePigeonhole" type="bean" method="getHomePigeonholeList" clazz="com.hanyun.hip.mrqc.jms.entity.HomePigeonhole"><field name="beginDate"/><field name="endDate"/><field name="fiveDayCount"/><field name="fiveDayPigeonhole"/><field name="fourDayCount"/><field name="fourDayPigeonhole"/><field name="hospitCount"/><field name="inpatientArea"/><field name="moreThanDayPigeonhole"/><field name="moreThanSevenDayCount"/><field name="sevenDayCount"/><field name="sevenDayPigeonhole"/><field name="threeDayCount"/><field name="threeDayPigeonhole"/><field name="twoDayCount"/><field name="twoDayNotCount"/><field name="twoDayPigeonhole"/></dataset><dataset name="HomePigeonholeSum" type="bean" method="getHomePigeonholeSum" clazz="com.hanyun.hip.mrqc.jms.entity.HomePigeonholeSum"><field name="fiveDayCountSum"/><field name="fiveDayPigeonholeSum"/><field name="fourDayCountSum"/><field name="fourDayPigeonholeSum"/><field name="hospitCountSum"/><field name="moreThanDayPigeonholeSum"/><field name="moreThanSevenDayCountSum"/><field name="sevenDayCountSum"/><field name="sevenDayPigeonholeSum"/><field name="threeDayCountSum"/><field name="threeDayPigeonholeSum"/><field name="twoDayCountSum"/><field name="twoDayNotCountSum"/><field name="twoDayPigeonholeSum"/></dataset></datasource><paper type="A4" left-margin="90" right-margin="90"
top-margin="72" bottom-margin="72" paging-mode="fitpage" fixrows="0"
width="595" height="842" orientation="portrait" html-report-align="left" bg-image="" html-interval-refresh-value="0" column-enabled="false"></paper><search-form form-position="up"><grid show-border="false" type="Grid3x3x3" border-width="1" border-color="#cccccc"><col size="4"><input-datetime label="开始日期" type="Datetime" label-position="left" bind-parameter="startDate" format="yyyy-mm-dd"/></col><col size="4"><input-datetime label="结束时间" type="Datetime" label-position="left" bind-parameter="endDate" format="yyyy-mm-dd"/></col><col size="4"><grid show-border="false" type="Grid2X2" border-width="1" border-color="#eee"><col size="6"><input-select label="" type="Select" label-position="top" bind-parameter="departmentName" use-dataset="true" dataset="department_name" label-field="department_name" value-field="department_name"><option label="选项1" value="选项1"/><option label="选项2" value="选项2"/><option label="选项3" value="选项3"/><option label="选项4" value="选项4"/></input-select></col><col size="6"><button-submit label="提交" align="left" type="Submit-button" style="btn-success"/></col></grid></col></grid></search-form></ureport>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?><ureport><cell expand="None" name="A1" row="1" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[序号]]></simple-value></cell><cell expand="None" name="B1" row="1" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[记录编号]]></simple-value></cell><cell expand="None" name="C1" row="1" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案号]]></simple-value></cell><cell expand="None" name="D1" row="1" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[患者]]></simple-value></cell><cell expand="None" name="E1" row="1" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[主治医生]]></simple-value></cell><cell expand="None" name="F1" row="1" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[诊断]]></simple-value></cell><cell expand="None" name="G1" row="1" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[入院时间]]></simple-value></cell><cell expand="None" name="H1" row="1" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院时间]]></simple-value></cell><cell expand="None" name="I1" row="1" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[科室]]></simple-value></cell><cell expand="None" name="A2" row="2" col="1" left-cell="B2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><expression-value><![CDATA[&B2]]></expression-value></cell><cell expand="Down" name="B2" row="2" col="2" left-cell="root" link-url="/jms-mrqc/mrqc/jump/todetail" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="recordId"><value><![CDATA[#]]></value></link-parameter><dataset-value dataset-name="person" aggregate="group" property="record_id" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="C2" row="2" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="hospit_num" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="D2" row="2" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="patient_name" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="E2" row="2" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="hospit_doctor" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F2" row="2" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="diagnosis_name" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G2" row="2" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="in_time" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H2" row="2" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="out_time" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I2" row="2" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="inpatient_area" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A3" row="3" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B3" row="3" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C3" row="3" col="3"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D3" row="3" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E3" row="3" col="5"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F3" row="3" col="6"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G3" row="3" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H3" row="3" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I3" row="3" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="A4" row="4" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B4" row="4" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C4" row="4" col="3"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D4" row="4" col="4"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E4" row="4" col="5"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F4" row="4" col="6"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G4" row="4" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H4" row="4" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I4" row="4" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number="1" height="18"/><row row-number="2" height="18"/><row row-number="3" height="18"/><row row-number="4" height="19"/><column col-number="1" width="74"/><column col-number="2" width="74"/><column col-number="3" width="80"/><column col-number="4" width="80"/><column col-number="5" width="80"/><column col-number="6" width="94"/><column col-number="7" width="115"/><column col-number="8" width="131"/><column col-number="9" width="129"/><datasource name="uReport数据源" type="buildin"><dataset name="person" type="sql"><sql><![CDATA[SELECT
distinct
mr.record_id,
mr.hospit_num,
mr.patient_name,
mr.hospit_doctor,
mr.diagnosis_name,
mr.in_time,
mr.out_time,
mr.inpatient_area
FROM
mrqc_record mr,
mrqc_record_label mrl,
mrqc_label ml
WHERE
mr.record_id = mrl.record_id
and mrl.label_id = ml.label_id
${(param("labelCode")!=null && param("labelCode")!="" ? " and ml.label_code = \'"+param("labelCode")+"\' ":" ")}
${(param("month")!=null && param("month")!="" ? " and DATE_FORMAT(mr.out_time,\'%Y%m\') = \'"+param("month")+"\' ":" ")}
${(param("departmentName")!=null && param("departmentName")!="" ? " and mr.inpatient_area = \'"+param("departmentName")+"\'":" ")}
]]></sql><field name="record_id"/><field name="hospit_num"/><field name="patient_name"/><field name="hospit_doctor"/><field name="diagnosis_name"/><field name="in_time"/><field name="out_time"/><field name="inpatient_area"/><parameter name="month" type="String" default-value=""/><parameter name="labelCode" type="String" default-value=""/><parameter name="departmentName" type="String" default-value=""/></dataset></datasource><paper type="A4" left-margin="90" right-margin="90"
top-margin="72" bottom-margin="72" paging-mode="fitpage" fixrows="0"
width="595" height="842" orientation="portrait" html-report-align="left" bg-image="" html-interval-refresh-value="0" column-enabled="false"></paper></ureport>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><ureport><cell expand="None" name="A1" row="1" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[序号]]></simple-value></cell><cell expand="None" name="B1" row="1" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[记录编号]]></simple-value></cell><cell expand="None" name="C1" row="1" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[病案号]]></simple-value></cell><cell expand="None" name="D1" row="1" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[患者]]></simple-value></cell><cell expand="None" name="E1" row="1" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[主治医生]]></simple-value></cell><cell expand="None" name="F1" row="1" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[诊断]]></simple-value></cell><cell expand="None" name="G1" row="1" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[入院时间]]></simple-value></cell><cell expand="None" name="H1" row="1" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[出院时间]]></simple-value></cell><cell expand="None" name="I1" row="1" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><simple-value><![CDATA[科室]]></simple-value></cell><cell expand="Down" name="A2" row="2" col="1" left-cell="B2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><expression-value><![CDATA[&B2]]></expression-value></cell><cell expand="Down" name="B2" row="2" col="2" left-cell="root" link-url="/jms-mrqc/mrqc/jump/todetail" link-target-window="_blank"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><link-parameter name="recordId"><value><![CDATA[#]]></value></link-parameter><dataset-value dataset-name="person" aggregate="group" property="record_id" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="C2" row="2" col="3"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="hospit_num" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="D2" row="2" col="4"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="patient_name" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="E2" row="2" col="5"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="hospit_doctor" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="F2" row="2" col="6"><cell-style font-size="10" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="diagnosis_name" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="G2" row="2" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="in_time" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="H2" row="2" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="out_time" order="none" mapping-type="simple"></dataset-value></cell><cell expand="Down" name="I2" row="2" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"><left-border width="1" style="solid" color="0,0,0"/><right-border width="1" style="solid" color="0,0,0"/><top-border width="1" style="solid" color="0,0,0"/><bottom-border width="1" style="solid" color="0,0,0"/></cell-style><dataset-value dataset-name="person" aggregate="group" property="inpatient_area" order="none" mapping-type="simple"></dataset-value></cell><cell expand="None" name="A3" row="3" col="1"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="B3" row="3" col="2"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="C3" row="3" col="3"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="D3" row="3" col="4"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="E3" row="3" col="5"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="F3" row="3" col="6"><cell-style font-size="10" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="G3" row="3" col="7"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="H3" row="3" col="8"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><cell expand="None" name="I3" row="3" col="9"><cell-style font-size="9" forecolor="0,0,0" font-family="宋体" align="center" valign="middle"></cell-style><simple-value><![CDATA[]]></simple-value></cell><row row-number="1" height="18"/><row row-number="2" height="18"/><row row-number="3" height="18"/><column col-number="1" width="74"/><column col-number="2" width="74"/><column col-number="3" width="80"/><column col-number="4" width="80"/><column col-number="5" width="80"/><column col-number="6" width="94"/><column col-number="7" width="115"/><column col-number="8" width="131"/><column col-number="9" width="142"/><datasource name="uReport数据源" type="buildin"><dataset name="person" type="sql"><sql><![CDATA[SELECT
distinct
mr.record_id,
mr.hospit_num,
mr.patient_name,
mr.hospit_doctor,
mr.diagnosis_name,
mr.in_time,
mr.out_time,
mr.inpatient_area
FROM
mrqc_record mr
WHERE
mr.emr_status >= '2'
and mr.emr_status < '5'
${(param("ruleName")!=null && param("ruleName")!="" ? " and not exists (select 1 from mrqc_rule_result mrr,mrqc_pub_rule mpr where mrr.rule_id = mpr.rule_id and mr.record_id = mrr.record_id and mpr.rule_name = \'"+param("ruleName")+"\') ":" ")}
${(param("month")!=null && param("month")!="" ? " and DATE_FORMAT(mr.out_time,\'%Y%m\') = \'"+param("month")+"\' ":" ")}
${(param("departmentName")!=null && param("departmentName")!="" ? " and mr.inpatient_area = \'"+param("departmentName")+"\'":" ")}]]></sql><field name="record_id"/><field name="hospit_num"/><field name="patient_name"/><field name="hospit_doctor"/><field name="diagnosis_name"/><field name="in_time"/><field name="out_time"/><field name="inpatient_area"/><parameter name="month" type="String" default-value=""/><parameter name="ruleName" type="String" default-value=""/><parameter name="departmentName" type="String" default-value=""/></dataset></datasource><paper type="A4" left-margin="90" right-margin="90"
top-margin="72" bottom-margin="72" paging-mode="fitpage" fixrows="0"
width="595" height="842" orientation="portrait" html-report-align="left" bg-image="" html-interval-refresh-value="0" column-enabled="false"></paper></ureport>
\ No newline at end of file
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.setting.Setting;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hanyun.hip.license.common.util.EncryptUtil;
import com.hanyun.hip.license.verify.listener.LicenseCheckListener;
import com.hanyun.hip.mrqc.rule.entity.ExcResult;
import com.hanyun.hip.mrqc.rule.entity.fact.MrqcStructData;
import com.hanyun.hip.mrqc.rule.util.EngrUtil;
import com.hanyun.hip.mrqc.service.engine.rule.QcUtil;
import com.hanyun.hip.mrqc.service.entity.EmrContent;
import com.hanyun.hip.mrqc.service.entity.MrqcStruct;
import com.hanyun.hip.mrqc.service.service.impl.extract.XpathStructExtracter;
import com.hanyun.hip.mrqc.service.util.DateConverterUtil;
import com.hanyun.hip.mrqc.service.util.JsonUtil;
import com.hanyun.hip.mrqc.service.util.XpathUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.drools.core.base.DefaultKnowledgeHelper;
import org.drools.core.spi.KnowledgeHelper;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.validation.constraints.NotNull;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TestScript {
static List<Map<String, Object>> mapList;
static JdbcTemplate zxJdbcTemplate = getJdbcTemplate();
public static void test(MrqcStructData $data, Map<String, Map<String, MrqcStructData>> $ctxDataMap, HashMap $map, ExcResult $result, String $recordId, Boolean $isProcessQc, KnowledgeHelper hEngr) throws Exception {
$map = getStructData($recordId);
DateConverterUtil dateConverterUtil = new DateConverterUtil();
String rjbl = ((MrqcStructData) $map.get("HDSD00_11_157")).getDataValue();
if(!EngrUtil.isNone(rjbl) && rjbl.equals("是")){
return;
}
String ssrq = $data.getDataValue();
String datetime = "2024年10月29日13时20分/n";
datetime.replace("/n", "");
System.out.println(datetime);
if (!StringUtils.isBlank(ssrq)) {
ssrq = ssrq.replace("]", "").replace("[", "").replace(", ", ",");
String yzcyTimeArray[] = ssrq.split(",");
if (yzcyTimeArray != null && yzcyTimeArray.length > 0) {
ssrq = yzcyTimeArray[0];
}
}
String now = DateUtil.now();
if (!StringUtils.isBlank(ssrq)) {
if(ssrq.contains("~")){
String ssrqArr[] = ssrq.split("~");
ssrq = ssrqArr[1].trim();
}
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分");
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
Date date = inputFormat.parse(ssrq);
String formattedDate = outputFormat.format(date);
Date dateTime = outputFormat.parse(formattedDate);
DateTime offsetDayBegin = DateUtil.offsetDay(dateTime, 1);
DateTime offsetDayEnd = DateUtil.offsetDay(dateTime, 2);
DateTime nowDate = DateUtil.parse(now, "yyyy-MM-dd HH:mm:ss");
//增加系统时间判断
// if (nowDate.after(offsetDayBegin)) {
// JSONArray array = JSON.parseArray(JSON.toJSONString($contentList));
// List<JSONObject> dieList = new ArrayList<>();
// String contentTime = "";
// for (Object content : array) {
// JSONObject jsonObj = (JSONObject) content;
//
// long ssrqTime = dateTime.getTime();
// String contentTimeStr = jsonObj.getString("contentTime");
//
// String title = jsonObj.getString("title");
// boolean b = (title.contains("术后第一天") || title.contains("查房记录") || title.contains("日常病程记录") ) && ssrqTime < Long.valueOf(contentTimeStr);
// if (b) {
// contentTime = jsonObj.getString("contentTime");
// dieList.add(jsonObj);
// break;
// }
// }
// if (CollectionUtils.isEmpty(dieList)) {
// $result.setRuleResult(hEngr, "术后24h内书写术后第一天病程记录");
// return;
// }
// if (StringUtils.isNotEmpty(contentTime)) {
// if (Long.parseLong(contentTime) > offsetDayEnd.getTime()) {
// $result.setRuleResult(hEngr, "术后24h内书写术后第一天病程记录");
// }
// }
// }
}
}
private static Map<String, Map<String, MrqcStructData>> getCtxDataMap(String $recordId) {
Map<String, Map<String, MrqcStructData>> ctxDataMap = new HashMap<>();
if (CollUtil.isEmpty(mapList)) {
String mrqcStrctSql = "select ms.struct_code structId, mst.data_value dataValue,mst.content_id contentId from mrqc_struct ms,mrqc_struct_data mst where ms.struct_id = mst.struct_id and mst.record_id = '" + $recordId + "'";
mapList = zxJdbcTemplate.queryForList(mrqcStrctSql);
}
for (Map<String, Object> stmap : mapList) {
MrqcStructData data = BeanUtil.mapToBean(stmap, MrqcStructData.class, true);
//处理不同文书有相同结构体的情况,设置全局文书结构体map
String contentId = data.getContentId();
if (StringUtils.isNotBlank(contentId)) {
Map<String, MrqcStructData> cdm = ctxDataMap.get(contentId);
cdm = MapUtils.isEmpty(cdm) ? new HashMap<>() : cdm;
cdm.put(data.getStructId(), data);
ctxDataMap.put(contentId, cdm);
}
}
return ctxDataMap;
}
public static double textSimilarityByMinStr(String strA, String strB) {
if (StringUtils.isBlank(strA) && StringUtils.isBlank(strB)) {
return 0.0d;
}
int temp = Math.min(strA.length(), strB.length());
int temp2 = getLongestCommonSubstring(strA, strB).length();
return NumberUtil.div((float) temp2, (float) temp);
}
public static String getLongestCommonSubstring(String strA, String strB) {
if (StringUtils.isBlank(strA) && StringUtils.isBlank(strB)) return "";
char[] chars_strA = strA.toCharArray();
char[] chars_strB = strB.toCharArray();
int m = chars_strA.length;
int n = chars_strB.length;
int[][] matrix = new int[m + 1][n + 1];
int currentIndex;
for (int i = 1; i <= m; ++ i) {
for (currentIndex = 1; currentIndex <= n; ++ currentIndex) {
if (chars_strA[i - 1] == chars_strB[currentIndex - 1]) {
matrix[i][currentIndex] = matrix[i - 1][currentIndex - 1] + 1;
} else {
matrix[i][currentIndex] = Math.max(matrix[i][currentIndex - 1], matrix[i - 1][currentIndex]);
}
}
}
char[] result = new char[matrix[m][n]];
currentIndex = result.length - 1;
while (matrix[m][n] != 0) {
if (matrix[m][n] == matrix[m][n - 1]) {
-- n;
} else if (matrix[m][n] == matrix[m - 1][n]) {
-- m;
} else {
result[currentIndex] = chars_strA[m - 1];
-- currentIndex;
-- n;
-- m;
}
}
return new String(result);
}
private static <T> T getObjectForClass(String sql, Class<T> tClass) {
Map<String, Object> map = zxJdbcTemplate.queryForMap(sql);
return BeanUtil.fillBeanWithMap(map, ReflectUtil.newInstance(tClass), true, true);
}
private static HashMap getStructData(String $recordId) {
HashMap map = new HashMap();
String mrqcStrctSql = "select ms.struct_code structId, mst.data_value dataValue,mst.content_id contentId from mrqc_struct ms,mrqc_struct_data mst where ms.struct_id = mst.struct_id and mst.record_id = '" + $recordId + "'";
mapList = zxJdbcTemplate.queryForList(mrqcStrctSql);
if (CollUtil.isNotEmpty(mapList)) {
for (Map<String, Object> stringObjectMap : mapList) {
MrqcStructData mrqcStructData = BeanUtil.mapToBean(stringObjectMap, MrqcStructData.class, true);
map.put(mrqcStructData.getStructId(), mrqcStructData);
}
}
System.out.println();
return map;
}
public static void main(String[] args) throws Exception {
String datetime = "2024年10月29日13时20分/n";
datetime = datetime.replace("/n", "");
System.out.println(datetime);
// MrqcStructData $data = new MrqcStructData();
// $data.setContentId("1001J6100000008A763L");
// HashMap $map = new HashMap();
// HashMap $ctxMap = new HashMap();
// ExcResult $result = new ExcResult();
// String $recordId = "1418256";
// Boolean $isProcessQc = false;
// KnowledgeHelper hEngr = new DefaultKnowledgeHelper<>();
// test($data, $ctxMap, $map, $result, $recordId, $isProcessQc, hEngr);
}
private void testA(boolean a) {
a = true;
}
private static List<Map<String, Object>> getResultForList(String sql) {
List<Map<String, Object>> mapList = zxJdbcTemplate.queryForList(sql);
return mapList;
}
private static void updateResultForList(List<Map<String, Object>> list) {
String sql = "UPDATE mrqc_pub_rule SET rule_script = ? WHERE rule_id = ?";
zxJdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
Map<String, Object> map = list.get(i);
ps.setString(1, (String) map.get("rule_script")); // 假设id是主键
ps.setString(2, (String) map.get("rule_id")); // 假设columnName是要更新的字段
}
@Override
public int getBatchSize() {
return list.size();
}
});
}
private static Map<String, Object> getResultForMap(String sql) {
Map<String, Object> map = zxJdbcTemplate.queryForMap(sql);
return map;
}
@NotNull
private static JdbcTemplate getJdbcTemplate() {
Setting poolSetting = new Setting();
poolSetting.put("initialSize", "20");
poolSetting.put("maxActive", "50");
poolSetting.put("maxWait", "60000");
poolSetting.put("validationQuery", "SELECT 1");
JdbcTemplate zxJdbcTemplate = new JdbcTemplate();
// zxJdbcTemplate.setDataSource(createDataSource("jdbc:mysql://192.168.1.14:3306/mrqc_glyy?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8", "com.mysql.cj.jdbc.Driver", "root", "HanYun#2021", poolSetting));
// zxJdbcTemplate.setDataSource(createDataSource("jdbc:mysql://192.168.1.18:3306/hip?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8", "com.mysql.cj.jdbc.Driver", "root", "HanYun#2021", poolSetting));
zxJdbcTemplate.setDataSource(createDataSource("jdbc:mysql://127.0.0.1:3306/mrqc_sy?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true&serverTimezone=GMT%2B8", "com.mysql.cj.jdbc.Driver", "root", "123456", poolSetting));
return zxJdbcTemplate;
}
protected static DruidDataSource createDataSource(String jdbcUrl, String driver, String user, String pass, Setting poolSetting) {
final DruidDataSource ds = new DruidDataSource();
ds.setUrl(jdbcUrl);
ds.setDriverClassName(driver);
ds.setUsername(user);
ds.setPassword(pass);
// 规范化属性名
Properties druidProps = new Properties();
String keyStr;
for (Map.Entry<String, String> entry : poolSetting.entrySet()) {
keyStr = StrUtil.addPrefixIfNot(entry.getKey(), "druid.");
druidProps.put(keyStr, entry.getValue());
}
// 连接池信息
ds.configFromPropety(druidProps);
// 检查关联配置,在用户未设置某项配置时,
if (null == ds.getValidationQuery()) {
// 在validationQuery未设置的情况下,以下三项设置都将无效
ds.setTestOnBorrow(false);
ds.setTestOnReturn(false);
ds.setTestWhileIdle(false);
}
return ds;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment