|
@@ -1,6 +1,7 @@
|
|
|
package cn.hnthyy.thmz.webservice.impl;
|
|
|
|
|
|
|
|
|
+import cn.hnthyy.thmz.Utils.HttpUtil;
|
|
|
import cn.hnthyy.thmz.entity.his.mz.Employee;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.ZdDeptAll;
|
|
|
import cn.hnthyy.thmz.entity.thmz.CriticalValue;
|
|
@@ -14,8 +15,10 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Slf4j
|
|
@@ -35,6 +38,9 @@ public class CriticalWebServiceImpl implements CriticalWebService {
|
|
|
@Autowired
|
|
|
private ZdDeptAllMapper zdDeptAllMapper;
|
|
|
|
|
|
+ @Value("${wxPayOrderServiceUrl}")
|
|
|
+ private String wxPayOrderServiceUrl;
|
|
|
+
|
|
|
@Override
|
|
|
public String criticalAccept(String accessToken, String msg) {
|
|
|
log.info("收到危急值信息:----->" + msg + "<-------");
|
|
@@ -102,6 +108,7 @@ public class CriticalWebServiceImpl implements CriticalWebService {
|
|
|
//主任医师
|
|
|
String deptDirector = null;
|
|
|
if (content.indexOf("住院号") > 0) {
|
|
|
+ senMessage(msg);
|
|
|
//住院病人
|
|
|
String inpatientNo = content.substring(content.indexOf("住院号") + 4, content.indexOf(",姓名"));
|
|
|
if (StringUtils.isNotBlank(inpatientNo)) {
|
|
@@ -179,4 +186,21 @@ public class CriticalWebServiceImpl implements CriticalWebService {
|
|
|
JSONObject jsonObj = new JSONObject(resultMap);
|
|
|
return jsonObj.toString();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 向住院系统推送危急值
|
|
|
+ * @param message
|
|
|
+ */
|
|
|
+ private void senMessage(String message){
|
|
|
+ if(StringUtils.isBlank(message)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ HttpUtil.sendHttpGet(wxPayOrderServiceUrl+"/criticalValue/pushMessage" + "?message=" + URLEncoder.encode(message, "UTF-8"), "utf-8", 3000);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("向住院系统推送危急值失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|