Compare commits
No commits in common. "a62773402c4951d8cb7743125783c5da038006e4" and "22e5a9cac1f3074cb6188ce845ab1eff51e4135b" have entirely different histories.
a62773402c
...
22e5a9cac1
@ -151,25 +151,12 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
<version>4.9.3</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- iText 7 核心库 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.itextpdf</groupId>
|
|
||||||
<artifactId>kernel</artifactId>
|
|
||||||
<version>7.2.5</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- iText 7 布局库 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.itextpdf</groupId>
|
|
||||||
<artifactId>layout</artifactId>
|
|
||||||
<version>7.2.5</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
package com.czlisinterface.system.utils;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
public class FileUtils {
|
|
||||||
/**
|
|
||||||
* 删除文件
|
|
||||||
*
|
|
||||||
* @param filePath 文件
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static boolean deleteFile(String filePath)
|
|
||||||
{
|
|
||||||
boolean flag = false;
|
|
||||||
File file = new File(filePath);
|
|
||||||
// 路径为文件且不为空则进行删除
|
|
||||||
if (file.isFile() && file.exists())
|
|
||||||
{
|
|
||||||
flag = file.delete();
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,15 +1,17 @@
|
|||||||
package com.czlisinterface.system.utils;
|
package com.czlisinterface.system.utils;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUnit;
|
import cn.hutool.core.date.DateUnit;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
|
||||||
public class LisUtil {
|
public class LisUtil {
|
||||||
|
|
||||||
|
|
||||||
@ -101,4 +103,8 @@ public class LisUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void test123(){
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>lisinterface8.0</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>lisinterface_ggyy</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<name>lisinterface_ggyy</name>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>liscommon</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
package com.czlisinterface.ggyy.mapper;
|
|
||||||
|
|
||||||
import com.czlisinterface.ggyy.pojo.LISResult;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface LisMapper_ggyy {
|
|
||||||
List<LISResult> getLISResult(String barcode);
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package com.czlisinterface.ggyy.pojo;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class LISResult {
|
|
||||||
private String CompanyId;
|
|
||||||
private String Sbh;
|
|
||||||
private String Pat_No;
|
|
||||||
private String BarCode;
|
|
||||||
private String SampleNO;
|
|
||||||
private String CheckDate;
|
|
||||||
private String Doctor;
|
|
||||||
private String SHDoctor;
|
|
||||||
private String BZ;
|
|
||||||
private String Report_Item_code;
|
|
||||||
private String Report_Item_Name;
|
|
||||||
private String ItemResult;
|
|
||||||
private String ItemUnit;
|
|
||||||
private String Flag;
|
|
||||||
private String DefValue;
|
|
||||||
private String OrderCode;
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package com.czlisinterface.ggyy.pojo;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ReqInfo {
|
|
||||||
private String Barcode;
|
|
||||||
private String Pat_id;
|
|
||||||
private String Pat_no;
|
|
||||||
private String pat_type;
|
|
||||||
private String pat_name;
|
|
||||||
private String pat_sex;
|
|
||||||
private String pat_birth;
|
|
||||||
private String Pat_lastm;
|
|
||||||
private String Age;
|
|
||||||
private String sfz;
|
|
||||||
private String mobile;
|
|
||||||
private String Address;
|
|
||||||
private String Nation;
|
|
||||||
private String pat_diag;
|
|
||||||
private String req_wardno;
|
|
||||||
private String req_bedno;
|
|
||||||
private String req_deptno;
|
|
||||||
private String req_docno;
|
|
||||||
private String specimen_name;
|
|
||||||
private String perform_dept;
|
|
||||||
private String req_dt;
|
|
||||||
private String emer_flag;
|
|
||||||
private String times;
|
|
||||||
private String Status;
|
|
||||||
private String Reqid;
|
|
||||||
private String charge_typeno;
|
|
||||||
private String item_price;
|
|
||||||
private String Qty;
|
|
||||||
private String Charge_Flag;
|
|
||||||
private String req_itemcode;
|
|
||||||
private String req_itemname;
|
|
||||||
private String original_reqno;
|
|
||||||
private String his_recordid;
|
|
||||||
}
|
|
||||||
@ -1,545 +0,0 @@
|
|||||||
package com.czlisinterface.ggyy.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.EscapeUtil;
|
|
||||||
import cn.hutool.core.util.XmlUtil;
|
|
||||||
import cn.hutool.http.HttpRequest;
|
|
||||||
import cn.hutool.http.HttpResponse;
|
|
||||||
import cn.hutool.json.JSONObject;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.czlisinterface.ggyy.mapper.LisMapper_ggyy;
|
|
||||||
import com.czlisinterface.ggyy.pojo.LISResult;
|
|
||||||
import com.czlisinterface.system.pojo.InterfaceName.DayMessage;
|
|
||||||
import com.czlisinterface.system.pojo.InterfaceName.GetReqInterface;
|
|
||||||
import com.czlisinterface.system.pojo.InterfaceName.SetReport;
|
|
||||||
import com.czlisinterface.system.pojo.InterfaceName.SetReqStatus;
|
|
||||||
import com.czlisinterface.system.pojo.LabReqdetail;
|
|
||||||
import com.czlisinterface.system.pojo.LabReqmain;
|
|
||||||
import com.czlisinterface.system.pojo.Result;
|
|
||||||
import com.czlisinterface.system.service.impl.CommonImpl;
|
|
||||||
import com.czlisinterface.system.utils.CommonUtil;
|
|
||||||
import com.czlisinterface.system.utils.LisUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.w3c.dom.Document;
|
|
||||||
import org.w3c.dom.NodeList;
|
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.xml.xpath.XPathConstants;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 光谷医院his
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Configuration
|
|
||||||
@ConditionalOnProperty(name="lisinterface.action.type",havingValue = "ggyy")
|
|
||||||
public class Lisinterface_ggyy extends CommonImpl {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
CommonUtil commonUtil;
|
|
||||||
@Resource
|
|
||||||
LisMapper_ggyy lisMapperGgyy;
|
|
||||||
|
|
||||||
@Value("${lisinterface.postURL:}")
|
|
||||||
String postURL;
|
|
||||||
|
|
||||||
public static final String CompanyId = "4C66BC02-3AED-D21D-A01D-3D13055D6F6D";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result invokeHttp(String param) {
|
|
||||||
Result result = super.invokeHttp(param);
|
|
||||||
if(!result.getResultCode().equals("1")) return result;
|
|
||||||
JSONObject jsonObject = JSONUtil.parseObj(param);
|
|
||||||
String method = jsonObject.getStr("method");
|
|
||||||
switch (method){
|
|
||||||
case "saveSQD":
|
|
||||||
String tmh = jsonObject.getStr("TMH");
|
|
||||||
String userId = jsonObject.getStr("userId");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
map.put("CompanyId",CompanyId);
|
|
||||||
map.put("TMH",tmh);
|
|
||||||
String xmlData = XmlUtil.mapToXmlStr(map, "Request");
|
|
||||||
Result result1 = invokeHttpWebService("getLISsqxx",xmlData);
|
|
||||||
String ret = result1.getMessage();
|
|
||||||
List<Map<String, Object>> reqInfo = getReqInfo(ret);
|
|
||||||
Result result2 = saveSQD(reqInfo, userId);
|
|
||||||
if(!result2.getResultCode().equals("0")) return result2;
|
|
||||||
return new Result("0","调用成功!");
|
|
||||||
case "setReqStatusM":
|
|
||||||
//{"ip":"","userid":"","sqh":"","status":""}
|
|
||||||
String sqh = jsonObject.getStr("sqh");
|
|
||||||
String status = jsonObject.getStr("status");
|
|
||||||
String userid = jsonObject.getStr("userid");
|
|
||||||
SetReqStatus setReqStatus = new SetReqStatus();
|
|
||||||
setReqStatus.setSqh(sqh);
|
|
||||||
setReqStatus.setStatus(status);
|
|
||||||
setReqStatus.setUserid(userid);
|
|
||||||
return setReqStatusM(setReqStatus);
|
|
||||||
case "sendHISReport":
|
|
||||||
String barcode = jsonObject.getStr("barcode");
|
|
||||||
return sendHISReport(barcode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Result("-1","没有找到接口方法!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 调用his的webservice接口
|
|
||||||
* @param xmlData
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Result invokeHttpWebService(String action,String xmlData){
|
|
||||||
String ret = null;
|
|
||||||
String xmlStr = "";
|
|
||||||
switch (action){
|
|
||||||
case "getLISsqxx":
|
|
||||||
xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ser=\"http://service\"><soapenv:Header/><soapenv:Body><ser:getLISsqxx><ser:requestxml><![CDATA["+xmlData+"]]></ser:requestxml></ser:getLISsqxx></soapenv:Body></soapenv:Envelope>";
|
|
||||||
break;
|
|
||||||
case "setLISStatus":
|
|
||||||
xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ser=\"http://service\"><soapenv:Header/><soapenv:Body><ser:setLISStatus><ser:requestxml><![CDATA["+xmlData+"]]></ser:requestxml></ser:setLISStatus></soapenv:Body></soapenv:Envelope>";
|
|
||||||
break;
|
|
||||||
case "setLISResult":
|
|
||||||
xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ser=\"http://service\"><soapenv:Header/><soapenv:Body><ser:setLISResult><ser:requestxml><![CDATA["+xmlData+"]]></ser:requestxml></ser:setLISResult></soapenv:Body></soapenv:Envelope>";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("调用地址:"+postURL);
|
|
||||||
//log.info("调用his接口,入参:"+json);
|
|
||||||
try (HttpResponse httpResponse = HttpRequest.post(postURL)
|
|
||||||
.header("Content-Type", "text/xml;charset=utf-8")
|
|
||||||
.header("SOAPAction","")
|
|
||||||
.body(xmlStr)
|
|
||||||
.execute()) {
|
|
||||||
int status = httpResponse.getStatus();
|
|
||||||
ret = httpResponse.body();
|
|
||||||
if(status != 200){
|
|
||||||
log.error("调用his接口,入参:{},出参:{}",xmlStr,ret);
|
|
||||||
return new Result("-1","调用his的webservice接口失败:"+ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e){
|
|
||||||
log.error("调用his接口,入参:{},\r\n",xmlStr,e);
|
|
||||||
return new Result("-1",e.getMessage());
|
|
||||||
}
|
|
||||||
//对返回的数据进行一次解码
|
|
||||||
ret = EscapeUtil.unescapeXml(ret);
|
|
||||||
log.info("调用his接口:\r\n入参:"+xmlStr+"\r\n出参:"+ret);
|
|
||||||
if(ret.contains("<Response>")){
|
|
||||||
ret = ret.substring(ret.indexOf("<Response>"),ret.indexOf("</Response>")+11);
|
|
||||||
}
|
|
||||||
//解析出参
|
|
||||||
Document doc = XmlUtil.parseXml(ret);
|
|
||||||
String resultCode = LisUtil.isBank(XmlUtil.getByXPath("//Response/resultCode", doc, XPathConstants.STRING));
|
|
||||||
String Message = LisUtil.isBank(XmlUtil.getByXPath("//Response/Message", doc, XPathConstants.STRING));
|
|
||||||
if(resultCode.equals("0")){
|
|
||||||
return new Result("0",ret);
|
|
||||||
}else{
|
|
||||||
return new Result("-1",Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<Map<String,Object>> getReqInfo(String xmlData){
|
|
||||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
|
||||||
Document doc = XmlUtil.parseXml(xmlData);
|
|
||||||
//获取xml list 的个数
|
|
||||||
NodeList nodeListByXPath = XmlUtil.getNodeListByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo", doc);
|
|
||||||
//xpath解析,下标从1开始
|
|
||||||
for (int j = 1; j <= nodeListByXPath.getLength() ; j++) {
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
map.put("Reqid",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/Reqid", doc, XPathConstants.STRING)));
|
|
||||||
map.put("charge_typeno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/charge_typeno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("item_price",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/item_price", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Qty",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/Qty", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Charge_Flag",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/Charge_Flag", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_itemcode",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/req_itemcode", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_itemname",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/req_itemname", doc, XPathConstants.STRING)));
|
|
||||||
map.put("original_reqno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/original_reqno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("his_recordid",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/RequestInfoList/RequestInfo[" + j + "]/his_recordid", doc, XPathConstants.STRING)));
|
|
||||||
|
|
||||||
map.put("Barcode",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Barcode", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Pat_id",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Pat_id", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Pat_no",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Pat_no", doc, XPathConstants.STRING)));
|
|
||||||
map.put("pat_type",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/pat_type", doc, XPathConstants.STRING)));
|
|
||||||
map.put("pat_name",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/pat_name", doc, XPathConstants.STRING)));
|
|
||||||
map.put("pat_sex",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/pat_sex", doc, XPathConstants.STRING)));
|
|
||||||
map.put("pat_birth",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/pat_birth", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Pat_lastm",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Pat_lastm", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Age",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Age", doc, XPathConstants.STRING)));
|
|
||||||
map.put("sfz",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/sfz", doc, XPathConstants.STRING)));
|
|
||||||
map.put("mobile",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/mobile", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Address",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Address", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Nation",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Nation", doc, XPathConstants.STRING)));
|
|
||||||
map.put("pat_diag",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/pat_diag", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_wardno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/req_wardno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_bedno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/req_bedno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_deptno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/req_deptno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_docno",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/req_docno", doc, XPathConstants.STRING)));
|
|
||||||
map.put("specimen_name",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/specimen_name", doc, XPathConstants.STRING)));
|
|
||||||
map.put("perform_dept",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/perform_dept", doc, XPathConstants.STRING)));
|
|
||||||
map.put("req_dt",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/req_dt", doc, XPathConstants.STRING)));
|
|
||||||
map.put("emer_flag",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/emer_flag", doc, XPathConstants.STRING)));
|
|
||||||
map.put("times",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/times", doc, XPathConstants.STRING)));
|
|
||||||
map.put("Status",LisUtil.isBank(XmlUtil.getByXPath("//Response/MedicalRecord/PatientInfo/Status", doc, XPathConstants.STRING)));
|
|
||||||
dataList.add(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dataList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Result saveSQD(List<Map<String,Object>> dataList,String userId){
|
|
||||||
String ls_nopriceitems = "";
|
|
||||||
long j=0;
|
|
||||||
String errText = "";
|
|
||||||
List<LabReqmain> labReqmainList = new ArrayList<>();
|
|
||||||
List<LabReqdetail> labReqdetailList = new ArrayList<>();
|
|
||||||
List<Map<String,Object>> HISSqdInfoList = new ArrayList<>();
|
|
||||||
//log.info("sqdinfo:"+sqdinfo.toString());
|
|
||||||
if(dataList.size() <= 0){
|
|
||||||
return new Result("0","没有获取到新的HIS申请单");
|
|
||||||
}
|
|
||||||
|
|
||||||
//该申请单明细记录
|
|
||||||
for (Map<String, Object> stringObjectMap : dataList) {
|
|
||||||
String reqid = LisUtil.isBank(stringObjectMap.get("Reqid")); //申请单ID
|
|
||||||
String pat_type = LisUtil.isBank(stringObjectMap.get("pat_type"));
|
|
||||||
String sqxmdh = LisUtil.isBank(stringObjectMap.get("req_itemcode"));
|
|
||||||
String sqxmmc = LisUtil.isBank(stringObjectMap.get("req_itemname")); //req_itemname
|
|
||||||
BigDecimal item_price = new BigDecimal(LisUtil.isBank(stringObjectMap.get("item_price")));
|
|
||||||
String brxb = LisUtil.isBank(stringObjectMap.get("pat_sex"));
|
|
||||||
String bar_code = LisUtil.isBank(stringObjectMap.get("Barcode"));
|
|
||||||
//判断是否获取过申请单
|
|
||||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(bar_code);
|
|
||||||
if(labReqmainOne != null) continue;
|
|
||||||
|
|
||||||
// Map<String, Object> feeClass = commonUtil.getFeeClass(sqxmdh);
|
|
||||||
// if(feeClass.size() <= 0) {
|
|
||||||
// ls_nopriceitems += "~r~n"+sqxmdh + "|" + sqxmmc;
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
j++ ;
|
|
||||||
//his申请单信息结构
|
|
||||||
Map<String,Object> hisSqdInfoMap = new HashMap<>();
|
|
||||||
hisSqdInfoMap.put("cp_row",j);
|
|
||||||
hisSqdInfoMap.put("cp_select","1");
|
|
||||||
String specimen_name = LisUtil.isBank(stringObjectMap.get("specimen_name"));
|
|
||||||
// if(specimen_name == null || specimen_name.equals("")){
|
|
||||||
// specimen_name = String.valueOf(feeClass.get("yblx"));
|
|
||||||
// }
|
|
||||||
if(specimen_name == null) specimen_name = "";
|
|
||||||
if(specimen_name.length() >= 10) {
|
|
||||||
specimen_name = specimen_name.substring(0,9);
|
|
||||||
}
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_yblx",specimen_name); //sqdinfo.get(i).getSpecimen_name()
|
|
||||||
hisSqdInfoMap.put("cp_tip","1");
|
|
||||||
hisSqdInfoMap.put("sqxmmc",sqxmmc);
|
|
||||||
hisSqdInfoMap.put("sqxmdh",sqxmdh);
|
|
||||||
hisSqdInfoMap.put("sl","1");
|
|
||||||
hisSqdInfoMap.put("dj",item_price);
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_brxm",LisUtil.isBank(stringObjectMap.get("pat_name")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_brdh",LisUtil.isBank(stringObjectMap.get("Pat_no")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_bz1",LisUtil.isBank(stringObjectMap.get("Pat_id")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_bz2",LisUtil.isBank(stringObjectMap.get("req_wardno")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_brxb",brxb);
|
|
||||||
String samplestate = LisUtil.isBank(stringObjectMap.get("emer_flag")); //急诊标志
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_jzbz",samplestate); //emer_flag
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_brsr",LisUtil.isBank(stringObjectMap.get("pat_birth"))); //
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_ksdh",LisUtil.isBank(stringObjectMap.get("req_deptno"))); //
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_sqys",LisUtil.isBank(stringObjectMap.get("req_docno")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_sqsj",DateUtil.parse(LisUtil.isBank(stringObjectMap.get("req_dt")),"yyyy-MM-dd HH:mm:ss")); //APPLY_DATE_TIME
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_ch",LisUtil.isBank(stringObjectMap.get("req_bedno"))); //BED_NO
|
|
||||||
hisSqdInfoMap.put("bz2",reqid); //申请单ID
|
|
||||||
hisSqdInfoMap.put("bz1",LisUtil.isBank(stringObjectMap.get("his_recordid"))); //ORDER_NO
|
|
||||||
hisSqdInfoMap.put("bz3",LisUtil.isBank(stringObjectMap.get("original_reqno")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_zd",LisUtil.isBank(stringObjectMap.get("pat_diag")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_sfzh", LisUtil.isBank(stringObjectMap.get("sfz")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_phone",LisUtil.isBank(stringObjectMap.get("mobile"))); //TELEPHONE
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_addr",LisUtil.isBank(stringObjectMap.get("Address"))); //patientAdress
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_txm","");
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_brly",LisUtil.isBank(stringObjectMap.get("pat_type"))); //PAT_SOUCE
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_sqh",LisUtil.isBank(stringObjectMap.get("Barcode")));
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_klx","");
|
|
||||||
hisSqdInfoMap.put("lab_reqmain_kh","");
|
|
||||||
HISSqdInfoList.add(hisSqdInfoMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
//对数据集进行排序
|
|
||||||
//返回值有1,0,-1 返回值1:升序排列,-1:降序排列,0:不排列
|
|
||||||
HISSqdInfoList.sort(new Comparator<Map<String, Object>>() {
|
|
||||||
@Override
|
|
||||||
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
|
||||||
Long sflbdh1 = Long.valueOf(o1.get("lab_reqmain_sqh").toString().trim());
|
|
||||||
Long sflbdh2 = Long.valueOf(o2.get("lab_reqmain_sqh").toString().trim());
|
|
||||||
int i = sflbdh1.compareTo(sflbdh2);
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
String jymd = "",seq="",sqh1 = "";
|
|
||||||
boolean exist = false;
|
|
||||||
int k = -1;
|
|
||||||
LabReqmain labReqmain = null;
|
|
||||||
int xh = 0;
|
|
||||||
String brly = "";
|
|
||||||
|
|
||||||
for (int i = 0; i < HISSqdInfoList.size(); i++) {
|
|
||||||
String sflbdh = String.valueOf(HISSqdInfoList.get(i).get("cp_xmlb"));
|
|
||||||
String yblx = String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_yblx"));
|
|
||||||
String jzbz = String.valueOf( HISSqdInfoList.get(i).get("lab_reqmain_jzbz"));
|
|
||||||
DateTime dt_sqsj = DateUtil.parse(HISSqdInfoList.get(i).get("lab_reqmain_sqsj").toString(), "yyyy-MM-dd");
|
|
||||||
String brly_his = String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_brly"));
|
|
||||||
|
|
||||||
String sqxmdh = String.valueOf(HISSqdInfoList.get(i).get("sqxmdh"));
|
|
||||||
String sqxmmc = String.valueOf(HISSqdInfoList.get(i).get("sqxmmc"));
|
|
||||||
if(sqxmmc.length() >= 20){
|
|
||||||
sqxmmc = sqxmmc.substring(0,20);
|
|
||||||
}
|
|
||||||
String sqh = String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_sqh"));
|
|
||||||
|
|
||||||
LabReqdetail labReqdetail = new LabReqdetail();
|
|
||||||
if(sqh1.equals(sqh)){
|
|
||||||
xh++;
|
|
||||||
HISSqdInfoList.get(i).put("sqh",sqh);
|
|
||||||
HISSqdInfoList.get(i).put("xh",xh);
|
|
||||||
jymd = jymd + "," + HISSqdInfoList.get(i).get("sqxmmc").toString();
|
|
||||||
if(jymd.length() >= 120){
|
|
||||||
jymd = jymd.substring(0,120);
|
|
||||||
}
|
|
||||||
labReqmain.setJymd(jymd);
|
|
||||||
labReqmainList.set(k,labReqmain);
|
|
||||||
|
|
||||||
//写lab_reqdetail表
|
|
||||||
labReqdetail.setSqh(sqh);
|
|
||||||
labReqdetail.setXh(xh);
|
|
||||||
labReqdetail.setSqxmdh(String.valueOf(HISSqdInfoList.get(i).get("sqxmdh")));
|
|
||||||
labReqdetail.setSqxmmc(sqxmmc);
|
|
||||||
labReqdetail.setSl(new BigDecimal(HISSqdInfoList.get(i).get("sl").toString()).intValue());
|
|
||||||
labReqdetail.setDj(new BigDecimal(HISSqdInfoList.get(i).get("dj").toString()));
|
|
||||||
labReqdetail.setZt("1");
|
|
||||||
if(brly_his.equals("1")){
|
|
||||||
labReqdetail.setJjzt("1");
|
|
||||||
}else{
|
|
||||||
labReqdetail.setJjzt("0");
|
|
||||||
}
|
|
||||||
labReqdetail.setBz1(String.valueOf(HISSqdInfoList.get(i).get("bz1")));
|
|
||||||
labReqdetail.setBz2(String.valueOf(HISSqdInfoList.get(i).get("bz2")));
|
|
||||||
labReqdetail.setBz3(LisUtil.isBank(HISSqdInfoList.get(i).get("bz3")));
|
|
||||||
labReqdetailList.add(labReqdetail);
|
|
||||||
}else{
|
|
||||||
sqh1 = sqh;
|
|
||||||
xh = 1;
|
|
||||||
HISSqdInfoList.get(i).put("sqh",sqh);
|
|
||||||
HISSqdInfoList.get(i).put("xh",xh);
|
|
||||||
//写lab_reqdetail表
|
|
||||||
labReqdetail.setSqh(sqh);
|
|
||||||
labReqdetail.setXh(xh);
|
|
||||||
labReqdetail.setSqxmdh(String.valueOf(HISSqdInfoList.get(i).get("sqxmdh")));
|
|
||||||
labReqdetail.setSqxmmc(sqxmmc);
|
|
||||||
labReqdetail.setSl(new BigDecimal(HISSqdInfoList.get(i).get("sl").toString()).intValue());
|
|
||||||
labReqdetail.setDj(new BigDecimal(HISSqdInfoList.get(i).get("dj").toString()));
|
|
||||||
labReqdetail.setZt("1");
|
|
||||||
if(brly_his.equals("1")){
|
|
||||||
labReqdetail.setJjzt("1");
|
|
||||||
}else{
|
|
||||||
labReqdetail.setJjzt("0");
|
|
||||||
}
|
|
||||||
labReqdetail.setBz1(String.valueOf(HISSqdInfoList.get(i).get("bz1")));
|
|
||||||
labReqdetail.setBz2(String.valueOf(HISSqdInfoList.get(i).get("bz2")));
|
|
||||||
labReqdetail.setBz3(LisUtil.isBank(HISSqdInfoList.get(i).get("bz3")));
|
|
||||||
labReqdetailList.add(labReqdetail);
|
|
||||||
|
|
||||||
jymd = HISSqdInfoList.get(i).get("sqxmmc").toString();
|
|
||||||
|
|
||||||
//写lab_reqmain 表
|
|
||||||
labReqmain = new LabReqmain();
|
|
||||||
k++;
|
|
||||||
labReqmain.setJzbz(jzbz);
|
|
||||||
labReqmain.setYblx(yblx);
|
|
||||||
|
|
||||||
labReqmain.setKsdh( HISSqdInfoList.get(i).get("lab_reqmain_ksdh").toString());
|
|
||||||
labReqmain.setSqys( HISSqdInfoList.get(i).get("lab_reqmain_sqys").toString());
|
|
||||||
labReqmain.setBrdh( String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_brdh")));
|
|
||||||
labReqmain.setBrxm( String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_brxm")));
|
|
||||||
labReqmain.setBrxb( String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_brxb")));
|
|
||||||
String brsr = HISSqdInfoList.get(i).get("lab_reqmain_brsr").toString();
|
|
||||||
labReqmain.setBrsr(DateUtil.parse(brsr,"yyyy-MM-dd"));
|
|
||||||
labReqmain.setSqsj(DateUtil.parse(HISSqdInfoList.get(i).get("lab_reqmain_sqsj").toString(),"yyyy-MM-dd HH:mm:ss"));
|
|
||||||
//labReqmain.setBgddh(String.valueOf(HISSqdInfoList.get(i).get("cp_xmlb")));
|
|
||||||
labReqmain.setYljg("1");
|
|
||||||
labReqmain.setZxys(userId);
|
|
||||||
labReqmain.setZxsj(commonUtil.currentDateTime());
|
|
||||||
labReqmain.setBz1(String.valueOf( HISSqdInfoList.get(i).get("lab_reqmain_bz1")));
|
|
||||||
labReqmain.setBz2(HISSqdInfoList.get(i).get("lab_reqmain_bz2").toString());
|
|
||||||
labReqmain.setCh(LisUtil.isBank(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_ch"))));
|
|
||||||
labReqmain.setSqh(sqh);
|
|
||||||
String brzd = String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_zd"));
|
|
||||||
if(brzd == null) brzd = "";
|
|
||||||
if(brzd.length() >= 50){
|
|
||||||
brzd = brzd.substring(0,48);
|
|
||||||
}
|
|
||||||
labReqmain.setZd(brzd);
|
|
||||||
if(jymd.length() >= 120){
|
|
||||||
jymd = jymd.substring(0,120);
|
|
||||||
}
|
|
||||||
labReqmain.setJymd(jymd);
|
|
||||||
labReqmain.setBrly(brly_his);
|
|
||||||
labReqmain.setZt("1");
|
|
||||||
if(brly_his.equals("1")){
|
|
||||||
labReqmain.setJjzt("1");
|
|
||||||
}else{
|
|
||||||
labReqmain.setJjzt("0");
|
|
||||||
}
|
|
||||||
labReqmain.setSfzh(LisUtil.isBank(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_sfzh"))));
|
|
||||||
labReqmain.setPhone(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_phone")));
|
|
||||||
//labReqmain.setPhone1(String.valueOf(hisSqdInfoList.get(i).get("lab_reqmain_phone1")));
|
|
||||||
labReqmain.setTxm(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_txm")));
|
|
||||||
labReqmain.setAddr(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_addr")));
|
|
||||||
labReqmain.setKlx(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_klx")));
|
|
||||||
labReqmain.setKh(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_kh")));
|
|
||||||
labReqmain.setJcptbz("1"); //代表新接口
|
|
||||||
//labReqmain.setLstd(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_lstd")));
|
|
||||||
// labReqmain.setJzjlid(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_jzjlid")));
|
|
||||||
// labReqmain.setHzdh(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_hzdh")));
|
|
||||||
// labReqmain.setCzid(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_czid")));
|
|
||||||
// labReqmain.setCzmc(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_czmc")));
|
|
||||||
// labReqmain.setJcptbz(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_jcptbz")));
|
|
||||||
// labReqmain.setZxks(String.valueOf(HISSqdInfoList.get(i).get("lab_reqmain_zxks")));
|
|
||||||
labReqmainList.add(k,labReqmain);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//保存数据
|
|
||||||
Result result = commonUtil.saveSqd(labReqmainList, labReqdetailList);
|
|
||||||
|
|
||||||
|
|
||||||
// if(!ls_nopriceitems.equals("")){
|
|
||||||
// return new Result("1","有如下项目未分类无法生成条码,请先分类:"+ls_nopriceitems);
|
|
||||||
// }
|
|
||||||
|
|
||||||
//执行申请单
|
|
||||||
for (LabReqdetail labReqdetail : labReqdetailList) {
|
|
||||||
if(labReqmainList.size() <= 0) continue;
|
|
||||||
Result result1 = execSQD(labReqmainList.get(0).getBz1(), labReqmainList.get(0).getBrdh(), labReqdetail.getSqxmdh(), labReqdetail.getBz1(),"1");
|
|
||||||
if(!result1.getResultCode().equals("0")) return result1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Result execSQD(String pat_id,String pat_no,String req_itemcode,String his_recordid,String status){
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
map.put("CompanyId",CompanyId);
|
|
||||||
map.put("Pat_id",pat_id);
|
|
||||||
map.put("Pat_no",pat_no);
|
|
||||||
map.put("req_itemcode",req_itemcode);
|
|
||||||
map.put("his_recordid",his_recordid);
|
|
||||||
map.put("Status",status); //1确认,0 退费
|
|
||||||
String xmlData = XmlUtil.mapToXmlStr(map, "Request");
|
|
||||||
return invokeHttpWebService("setLISStatus",xmlData);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result setReqStatusM(SetReqStatus setReqStatus) {
|
|
||||||
String status = setReqStatus.getStatus();
|
|
||||||
String userid = setReqStatus.getUserid();
|
|
||||||
String sqh = setReqStatus.getSqh();
|
|
||||||
if(status.equals("9")){
|
|
||||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
|
||||||
if(labReqmainOne == null) return new Result("0","手工单不走接口!");
|
|
||||||
List<LabReqdetail> labReqdetailList = commonUtil.getLabReqdetailList(sqh);
|
|
||||||
for (LabReqdetail labReqdetail : labReqdetailList) {
|
|
||||||
Result result = execSQD(labReqmainOne.getBz1(), labReqmainOne.getBrdh(), labReqdetail.getSqxmdh(), labReqdetail.getBz1(), "0");
|
|
||||||
if(!result.getResultCode().equals("0")) return result;
|
|
||||||
}
|
|
||||||
LabReqmain labReqmain = new LabReqmain();
|
|
||||||
labReqmain.setZt("9");
|
|
||||||
commonUtil.updateLabReqmain(labReqmain,sqh);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Result("0","执行成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result setReportM(SetReport setReport) {
|
|
||||||
return super.setReportM(setReport);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result dayMessageM(DayMessage dayMessage) {
|
|
||||||
return super.dayMessageM(dayMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getReqInfo_brdh(GetReqInterface getReqInterface) {
|
|
||||||
return super.getReqInfo_brdh(getReqInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getReqInfo_ksdh(GetReqInterface getReqInterface) {
|
|
||||||
return super.getReqInfo_ksdh(getReqInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getReqInfo_sqh(GetReqInterface getReqInterface) {
|
|
||||||
return super.getReqInfo_sqh(getReqInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getDictDPM(String yljg, String... param) {
|
|
||||||
return super.getDictDPM(yljg, param);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getDictFEEM(String yljg, String... param) {
|
|
||||||
return super.getDictFEEM(yljg, param);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getDictSRDM(String yljg, String... param) {
|
|
||||||
return super.getDictSRDM(yljg, param);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getDictWRM(String yljg, String... param) {
|
|
||||||
return super.getDictWRM(yljg, param);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Result sendHISReport(String barcode){
|
|
||||||
List<LISResult> lisResultList = lisMapperGgyy.getLISResult(barcode);
|
|
||||||
if(lisResultList.size() <= 0) return new Result("-1","没有找到对应的报告信息!");
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
List<Map<String,Object>> mxjgList = new ArrayList<>();
|
|
||||||
for (LISResult lisResult : lisResultList) {
|
|
||||||
Map<String,Object> mxjgMap = new HashMap<>();
|
|
||||||
mxjgMap.put("Report_Item_code",lisResult.getReport_Item_code());
|
|
||||||
mxjgMap.put("Report_Item_Name",lisResult.getReport_Item_Name());
|
|
||||||
mxjgMap.put("ItemResult",lisResult.getItemResult());
|
|
||||||
mxjgMap.put("ItemUnit",lisResult.getItemUnit());
|
|
||||||
mxjgMap.put("Flag",lisResult.getFlag());
|
|
||||||
mxjgMap.put("DefValue",lisResult.getDefValue());
|
|
||||||
mxjgMap.put("OrderCode",lisResult.getOrderCode());
|
|
||||||
mxjgList.add(mxjgMap);
|
|
||||||
}
|
|
||||||
map.put("JgList", mxjgList);
|
|
||||||
map.put("CompanyId",lisResultList.get(0).getCompanyId());
|
|
||||||
map.put("Sbh",lisResultList.get(0).getSbh());
|
|
||||||
map.put("Pat_No",lisResultList.get(0).getPat_No());
|
|
||||||
map.put("BarCode",lisResultList.get(0).getBarCode());
|
|
||||||
map.put("SampleNO",lisResultList.get(0).getSampleNO());
|
|
||||||
map.put("CheckDate",lisResultList.get(0).getCheckDate());
|
|
||||||
map.put("Doctor",lisResultList.get(0).getDoctor());
|
|
||||||
map.put("SHDoctor",lisResultList.get(0).getSHDoctor());
|
|
||||||
map.put("BZ",lisResultList.get(0).getBZ());
|
|
||||||
String string = XmlUtil.mapToXmlStr(map,"Request","",false);
|
|
||||||
return invokeHttpWebService("setLISResult",string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
package com.czlisinterface.ggyy.task;
|
|
||||||
|
|
||||||
import com.czlisinterface.ggyy.service.impl.Lisinterface_ggyy;
|
|
||||||
import com.czlisinterface.system.pojo.LabPat;
|
|
||||||
import com.czlisinterface.system.pojo.Result;
|
|
||||||
import com.czlisinterface.system.task.BaskCommonTask;
|
|
||||||
import com.czlisinterface.system.utils.CommonUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@Configuration
|
|
||||||
@ConditionalOnProperty(name="lisinterface.task.job",havingValue = "ggyy")
|
|
||||||
public class ggyyTask extends BaskCommonTask {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
Lisinterface_ggyy lisinterfaceGgyy;
|
|
||||||
@Resource
|
|
||||||
CommonUtil commonUtil;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
sendReportTask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result sendReport(Date jyrq, String yq, String ybh, String status, String... param) {
|
|
||||||
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
|
||||||
String sqh = labPatOne.getSqh();
|
|
||||||
if(sqh == null || sqh.equals("")) return new Result("0","手工单不进行his接口传输!");
|
|
||||||
return lisinterfaceGgyy.sendHISReport(sqh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?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.czlisinterface.ggyy.mapper.LisMapper_ggyy">
|
|
||||||
|
|
||||||
<select id="getLISResult" resultType="com.czlisinterface.ggyy.pojo.LISResult">
|
|
||||||
select * from lis_result where barcode = #{barcode}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -1,6 +1,9 @@
|
|||||||
package com.czlisinterface.gzszyy.mapper;
|
package com.czlisinterface.gzszyy.mapper;
|
||||||
|
|
||||||
import com.czlisinterface.gzszyy.pojo.*;
|
import com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO;
|
||||||
|
import com.czlisinterface.gzszyy.pojo.V_TESTDETAILS;
|
||||||
|
import com.czlisinterface.gzszyy.pojo.V_lab_microbe;
|
||||||
|
import com.czlisinterface.gzszyy.pojo.V_lab_susceptibility;
|
||||||
import com.czlisinterface.system.pojo.LabReqmain;
|
import com.czlisinterface.system.pojo.LabReqmain;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -11,7 +14,6 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface LisMapper_gzszyy {
|
public interface LisMapper_gzszyy {
|
||||||
List<V_TestRecord> getV_TestRecord(@Param("jyrq") Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
|
||||||
List<V_LAR_EXAM_INFO> getV_LAR_EXAM_INFO(@Param("jyrq") Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
List<V_LAR_EXAM_INFO> getV_LAR_EXAM_INFO(@Param("jyrq") Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||||
List<V_TESTDETAILS> getV_TESTDETAILS(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
List<V_TESTDETAILS> getV_TESTDETAILS(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||||
List<V_lab_susceptibility> getV_lab_susceptibility(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
List<V_lab_susceptibility> getV_lab_susceptibility(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
package com.czlisinterface.gzszyy.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.czlisinterface.gzszyy.pojo.V_TestRecord;
|
|
||||||
|
|
||||||
@DS("sqlpt")
|
|
||||||
public interface V_TestRecordMapper extends BaseMapper<V_TestRecord> {
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
package com.czlisinterface.gzszyy.pojo;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@TableName("TestRecord")
|
|
||||||
public class V_TestRecord {
|
|
||||||
private String APP_CODE;
|
|
||||||
private String APPLY_DT;
|
|
||||||
private String PERSONAL_ID;
|
|
||||||
private String OP_EM_HP_EX_MARK;
|
|
||||||
private String OP_EM_HP_EX_NO;
|
|
||||||
private String CARDTYPE;
|
|
||||||
private String CARDNO;
|
|
||||||
private String NAME;
|
|
||||||
private String SEX;
|
|
||||||
private String SEX_NAME;
|
|
||||||
private String BIRTHDAY;
|
|
||||||
private String HOS_PACK_CODE;
|
|
||||||
private String HOS_PACK_NAME;
|
|
||||||
private String RPT_CAT_CODE;
|
|
||||||
private String RPT_CAT_NAME;
|
|
||||||
private String IF_URGENT;
|
|
||||||
private String APP_ORGAN_CODE;
|
|
||||||
private String APP_ORGAN_NAME;
|
|
||||||
private String APP_DPT_CODE;
|
|
||||||
private String APP_DPT_NAME;
|
|
||||||
private String APP_DOC_IDCARD;
|
|
||||||
private String APP_DOC_NAME;
|
|
||||||
private String CARDTYPE_ORI;
|
|
||||||
private String CARDTYPE_NAME_ORI;
|
|
||||||
private String APP_DPT_CODE_ORI;
|
|
||||||
private String APP_DPT_NAME_ORI;
|
|
||||||
private String APP_ORGAN_CODE_ORI;
|
|
||||||
private String APP_ORGAN_NAME_ORI;
|
|
||||||
}
|
|
||||||
@ -36,8 +36,6 @@ public class Lisinterface_gzszyy extends CommonImpl {
|
|||||||
V_TESTDETAILSMapper vTESTDETAILSMapper;
|
V_TESTDETAILSMapper vTESTDETAILSMapper;
|
||||||
@Resource
|
@Resource
|
||||||
LabUploadreportPtMapper labUploadreportPtMapper;
|
LabUploadreportPtMapper labUploadreportPtMapper;
|
||||||
@Resource
|
|
||||||
V_TestRecordMapper vTestRecordMapper;;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,17 +49,13 @@ public class Lisinterface_gzszyy extends CommonImpl {
|
|||||||
String yq = stringObjectMap.get("yq").toString();
|
String yq = stringObjectMap.get("yq").toString();
|
||||||
String ybh = stringObjectMap.get("ybh").toString();
|
String ybh = stringObjectMap.get("ybh").toString();
|
||||||
Date confirmdt = (Date)stringObjectMap.get("confirmdt");
|
Date confirmdt = (Date)stringObjectMap.get("confirmdt");
|
||||||
|
List<V_LAR_EXAM_INFO> vLarExamInfoList = lisMapperGzszyy.getV_LAR_EXAM_INFO(jyrq, yq, ybh);
|
||||||
LabUploadreportPt labUploadreportPt = new LabUploadreportPt();
|
LabUploadreportPt labUploadreportPt = new LabUploadreportPt();
|
||||||
labUploadreportPt.setJyrq(jyrq);
|
labUploadreportPt.setJyrq(jyrq);
|
||||||
labUploadreportPt.setYq(yq);
|
labUploadreportPt.setYq(yq);
|
||||||
labUploadreportPt.setYbh(ybh);
|
labUploadreportPt.setYbh(ybh);
|
||||||
labUploadreportPt.setShsj(confirmdt);
|
labUploadreportPt.setShsj(confirmdt);
|
||||||
try{
|
try{
|
||||||
List<V_TestRecord> vTestRecordList = lisMapperGzszyy.getV_TestRecord(jyrq,yq,ybh);
|
|
||||||
for (V_TestRecord vTestRecord : vTestRecordList) {
|
|
||||||
vTestRecordMapper.insert(vTestRecord);
|
|
||||||
}
|
|
||||||
List<V_LAR_EXAM_INFO> vLarExamInfoList = lisMapperGzszyy.getV_LAR_EXAM_INFO(jyrq, yq, ybh);
|
|
||||||
for (V_LAR_EXAM_INFO vLarExamInfo : vLarExamInfoList) {
|
for (V_LAR_EXAM_INFO vLarExamInfo : vLarExamInfoList) {
|
||||||
vLAR_EXAM_INFOMapper.insert(vLarExamInfo);
|
vLAR_EXAM_INFOMapper.insert(vLarExamInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,6 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.czlisinterface.gzszyy.mapper.LisMapper_gzszyy">
|
<mapper namespace="com.czlisinterface.gzszyy.mapper.LisMapper_gzszyy">
|
||||||
|
|
||||||
<select id="getV_TestRecord" resultType="com.czlisinterface.gzszyy.pojo.V_TestRecord">
|
|
||||||
select * from V_TestRecord where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getV_LAR_EXAM_INFO" resultType="com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO">
|
<select id="getV_LAR_EXAM_INFO" resultType="com.czlisinterface.gzszyy.pojo.V_LAR_EXAM_INFO">
|
||||||
select * from V_LAR_EXAM_INFO where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
select * from V_LAR_EXAM_INFO where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||||
</select>
|
</select>
|
||||||
@ -31,7 +26,7 @@
|
|||||||
and a.yq in (select yq from lab_instr)
|
and a.yq in (select yq from lab_instr)
|
||||||
and (select count(1) from v_LAR_EXAM_INFO c where a.ybh=c.ybh and a.yq=c.yq and a.jyrq=c.jyrq)>0
|
and (select count(1) from v_LAR_EXAM_INFO c where a.ybh=c.ybh and a.yq=c.yq and a.jyrq=c.jyrq)>0
|
||||||
and (select count(1) from lab_uploadreport_pt d where a.ybh=d.ybh and a.yq=d.yq and a.jyrq=d.jyrq)<=0
|
and (select count(1) from lab_uploadreport_pt d where a.ybh=d.ybh and a.yq=d.yq and a.jyrq=d.jyrq)<=0
|
||||||
and a.jyrq>= '2024-01-01' and a.jyrq <= '2024-12-31'
|
and a.jyrq>= '2024-01-01'
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>lisinterface8.0</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>lisinterface_ssrmyy</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<name>lisinterface_ssrmyy</name>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>liscommon</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.czlisinterface.ssrmyy;
|
|
||||||
|
|
||||||
import com.czlisinterface.system.pojo.Result;
|
|
||||||
import com.czlisinterface.system.service.impl.CommonImpl;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 石首人民医院接口
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Configuration
|
|
||||||
@ConditionalOnProperty(name="lisinterface.action.type",havingValue = "ssrmyy")
|
|
||||||
public class Lisinterface_ssrmyy extends CommonImpl {
|
|
||||||
@Override
|
|
||||||
public Result invokeHttp(String param) {
|
|
||||||
return super.invokeHttp(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Result saveHISSQD(String brdh, Date st,Date et,String userId) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -37,16 +37,6 @@
|
|||||||
<artifactId>lisinterface_gzszyy</artifactId>
|
<artifactId>lisinterface_gzszyy</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>lisinterface_ggyy</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>lisinterface_ssrmyy</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -96,8 +86,6 @@
|
|||||||
lisinterface_jldermyy-1.0.jar
|
lisinterface_jldermyy-1.0.jar
|
||||||
lisinterface_yzsfybjy-1.0.jar
|
lisinterface_yzsfybjy-1.0.jar
|
||||||
lisinterface_gzszyy-1.0.jar
|
lisinterface_gzszyy-1.0.jar
|
||||||
lisinterface_ggyy-1.0.jar
|
|
||||||
lisinterface_ssrmyy-1.0.jar
|
|
||||||
</Class-Path>
|
</Class-Path>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
<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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>lisinterface8.0</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>lisinterface_xtrmyy</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<name>lisinterface_xtrmyy</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.example</groupId>
|
|
||||||
<artifactId>liscommon</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
||||||
3
pom.xml
3
pom.xml
@ -21,9 +21,6 @@
|
|||||||
<module>lisinterface_start</module>
|
<module>lisinterface_start</module>
|
||||||
<module>lisinterface_yzsfybjy</module>
|
<module>lisinterface_yzsfybjy</module>
|
||||||
<module>lisinterface_gzszyy</module>
|
<module>lisinterface_gzszyy</module>
|
||||||
<module>lisinterface_ggyy</module>
|
|
||||||
<module>lisinterface_xtrmyy</module>
|
|
||||||
<module>lisinterface_ssrmyy</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user