|
@@ -23,6 +23,8 @@ import java.sql.PreparedStatement;
|
|
|
import java.sql.ResultSet;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -52,6 +54,9 @@ public class InquiryInfoController {
|
|
|
private TranLisConfigFacade tranLisConfigFacade;
|
|
|
@Autowired
|
|
|
private PacsConfigFacade pacsConfigFacade;
|
|
|
+ @Autowired
|
|
|
+ private MrFacade mrFacade;
|
|
|
+
|
|
|
/**
|
|
|
* 问诊记录保存
|
|
|
*
|
|
@@ -66,7 +71,7 @@ public class InquiryInfoController {
|
|
|
|
|
|
Boolean a = inquiryInfoFacade.saveInquiryToHis(saveInquiryToHisVO);
|
|
|
//增加统计功能
|
|
|
- InputInfo inputInfo=new InputInfo();
|
|
|
+ InputInfo inputInfo = new InputInfo();
|
|
|
inputInfo.setHospitalCode(saveInquiryToHisVO.getHospitalId().toString());
|
|
|
inputInfo.setHosptialDeptCode(saveInquiryToHisVO.getHospitalDeptId().toString());
|
|
|
inputInfo.setDoctorCode(saveInquiryToHisVO.getDoctorId().toString());
|
|
@@ -185,44 +190,85 @@ public class InquiryInfoController {
|
|
|
*/
|
|
|
@PostMapping(value = "/get_syf_inquiry")
|
|
|
@ResponseBody
|
|
|
- public String getSyfDisease(@RequestBody NLPInputRemote nlpRemote) {
|
|
|
+ public String getSyfDisease(@RequestBody NLPInputRemote nlpRemote) {
|
|
|
try {
|
|
|
-
|
|
|
- if(nlpRemote.getSymptomJson()==null){
|
|
|
- nlpRemote.setSymptomJson("");
|
|
|
- }
|
|
|
- if(nlpRemote.getPastJson()==null){
|
|
|
- nlpRemote.setPastJson("");
|
|
|
- }
|
|
|
- if(nlpRemote.getVitalsJson()==null){
|
|
|
- nlpRemote.setVitalsJson("");
|
|
|
- }
|
|
|
- if(nlpRemote.getDisJson()==null){
|
|
|
- nlpRemote.setDisJson("");
|
|
|
- }
|
|
|
- if(nlpRemote.getPacsJson()==null){
|
|
|
- nlpRemote.setPacsJson("");
|
|
|
- }
|
|
|
- if(nlpRemote.getOtherJson()==null){
|
|
|
- nlpRemote.setOtherJson("");
|
|
|
- }
|
|
|
GetDiseaseNameVO getDiseaseNameVO = new GetDiseaseNameVO();
|
|
|
StringBuffer dn = new StringBuffer();
|
|
|
- String dn1= "";
|
|
|
- if(nlpRemote.getDisJson()!=null&&!"".equals(nlpRemote.getDisJson())) {
|
|
|
+ String mrId ;
|
|
|
+ String url ;
|
|
|
+ String dn1 = "";
|
|
|
+ if (nlpRemote.getDisJson() != null && !"".equals(nlpRemote.getDisJson())) {
|
|
|
getDiseaseNameVO.setHisDiseaseName(nlpRemote.getDisJson());
|
|
|
getDiseaseNameVO.setHospitalCode(nlpRemote.getHospitalCode());
|
|
|
List<GetDiseaseNameDTO> a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
|
|
|
- if(a.size()!=0){
|
|
|
- for(GetDiseaseNameDTO di : a){
|
|
|
- dn.append(di.getConceptDisName()+ ",") ;
|
|
|
+ if (a.size() != 0) {
|
|
|
+ for (GetDiseaseNameDTO di : a) {
|
|
|
+ dn.append(di.getConceptDisName() + ",");
|
|
|
}
|
|
|
dn1 = dn.substring(0, dn.length() - 1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- String url1 = "http://192.1.3.116:5446/index.html?lisJson="
|
|
|
- /*String url1 = "http://192.168.1.104:5446/landscape.html?lisJson="*/
|
|
|
+ PushJoinVO pushJoinVO = new PushJoinVO();
|
|
|
+ pushJoinVO.setAge(nlpRemote.getAge().intValue());
|
|
|
+ pushJoinVO.setSex(Integer.parseInt(nlpRemote.getSexType()));
|
|
|
+ pushJoinVO.setSymptom(nlpRemote.getSymptomJson());
|
|
|
+ pushJoinVO.setVital(nlpRemote.getVitalsJson());
|
|
|
+ pushJoinVO.setOther(nlpRemote.getOtherJson());
|
|
|
+ pushJoinVO.setDiag(dn1);
|
|
|
+ pushJoinVO.setHosCode(nlpRemote.getHospitalCode());
|
|
|
+
|
|
|
+ InputInfo inputInfo = new InputInfo();
|
|
|
+ inputInfo.setHospitalCode(nlpRemote.getHospitalCode());
|
|
|
+ inputInfo.setHosptialDeptCode(nlpRemote.getDeptId());
|
|
|
+ inputInfo.setDoctorCode(nlpRemote.getDoctorNo());
|
|
|
+ inputInfo.setInquiryCode(nlpRemote.getClinicId());
|
|
|
+ inputInfo.setDiseaseName(nlpRemote.getDisJson());
|
|
|
+ inputInfo.setAge(nlpRemote.getAge().intValue());
|
|
|
+ inputInfo.setSexType(nlpRemote.getSexType());
|
|
|
+ inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
|
|
|
+ inputInfo.setRemark("邵逸夫界面提示窗接口");
|
|
|
+ inputInfo.setParamIn(JSONObject.toJSONString(nlpRemote));
|
|
|
+
|
|
|
+ switch (nlpRemote.getCode()) {
|
|
|
+
|
|
|
+ case "0":
|
|
|
+
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=0";
|
|
|
+
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
+
|
|
|
+ case "1":
|
|
|
+
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/indexHorizontal.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=1";
|
|
|
+
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /*String url1 = "http://192.1.3.116:5446/index.html?lisJson="
|
|
|
+ *//*String url1 = "http://192.168.1.104:5446/landscape.html?lisJson="*//*
|
|
|
+ JSONObject.toJSONString(nlpRemote.getLabsJson())
|
|
|
+ "&diagJson=" + dn1
|
|
|
+ "&age=" + nlpRemote.getAge()
|
|
@@ -235,7 +281,7 @@ public class InquiryInfoController {
|
|
|
+ "&hospitalCode=" + nlpRemote.getHospitalCode();
|
|
|
|
|
|
String url2 = "http://192.1.3.116:5446/indexHorizontal.html?lisJson="
|
|
|
- /*String url2 = "http://192.168.1.104:5446/landscapeMedical.html?lisJson="*/
|
|
|
+ *//*String url2 = "http://192.168.1.104:5446/landscapeMedical.html?lisJson="*//*
|
|
|
+ JSONObject.toJSONString(nlpRemote.getLabsJson())
|
|
|
+ "&diagJson=" + dn1
|
|
|
+ "&age=" + nlpRemote.getAge()
|
|
@@ -250,23 +296,10 @@ public class InquiryInfoController {
|
|
|
UrlOut uo = new UrlOut();
|
|
|
uo.setUrl1(url1.trim());
|
|
|
uo.setUrl2(url2.trim());
|
|
|
- String data = JSONObject.toJSONString(uo);
|
|
|
+ String data = JSONObject.toJSONString(uo);*/
|
|
|
|
|
|
- InputInfo inputInfo=new InputInfo();
|
|
|
- inputInfo.setHospitalCode(nlpRemote.getHospitalCode());
|
|
|
- inputInfo.setHosptialDeptCode(nlpRemote.getDeptId());
|
|
|
- inputInfo.setDoctorCode(nlpRemote.getDoctorNo());
|
|
|
- inputInfo.setInquiryCode(nlpRemote.getClinicId());
|
|
|
- inputInfo.setDiseaseName(nlpRemote.getDisJson());
|
|
|
- inputInfo.setAge(nlpRemote.getAge().intValue());
|
|
|
- inputInfo.setSexType(nlpRemote.getSexType());
|
|
|
- inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
|
|
|
- inputInfo.setRemark("邵逸夫界面提示窗接口");
|
|
|
- inputInfo.setParamIn(JSONObject.toJSONString(nlpRemote));
|
|
|
- inputInfo.setParamOut(data);
|
|
|
+ return "暂无推送";
|
|
|
|
|
|
- System.out.println("邵逸夫界面提示窗接口++++++++++++++++++++++++++++++++++++++" + data);
|
|
|
- return data;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return e.getMessage();
|
|
@@ -274,6 +307,7 @@ public class InquiryInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 急诊-历史病历列表
|
|
|
*
|
|
@@ -314,143 +348,267 @@ public class InquiryInfoController {
|
|
|
return RespDTO.onSuc(inquiryInfoFacade.getExportInquirys(inquiryIds));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 邵逸夫化验静态知识
|
|
|
- * type 5:化验 6:辅检
|
|
|
- * @param lisPacsInfoForDJVO
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping(value = "/getLisPacsInfo")
|
|
|
- @ResponseBody
|
|
|
- public String getLisInfoForDJ(@RequestBody LisPacsInfoForDJVO lisPacsInfoForDJVO) {
|
|
|
- String url= "";
|
|
|
- if(lisPacsInfoForDJVO.getType() == 5) {
|
|
|
- LisConfigDTO a = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
|
|
|
- url = "http://127.0.0.1:5446/information.html?type=" + lisPacsInfoForDJVO.getType() +
|
|
|
- "&position=2" + "&name=" + a.getUniqueName();
|
|
|
- }else if (lisPacsInfoForDJVO.getType() == 6){
|
|
|
- List<PacsConfigDTO> b = pacsConfigFacade.getPacsConfigByNameAndHosCode(lisPacsInfoForDJVO);
|
|
|
- url = "http://127.0.0.1:5446/information.html?type=" + lisPacsInfoForDJVO.getType() +
|
|
|
- "&position=2" + "&name=" + b.get(0).getUniqueName();
|
|
|
- }else if (lisPacsInfoForDJVO.getType() == 7){
|
|
|
- GetDiseaseNameVO getDiseaseNameVO =new GetDiseaseNameVO();
|
|
|
- getDiseaseNameVO.setHospitalCode(lisPacsInfoForDJVO.getHosCode());
|
|
|
- getDiseaseNameVO.setHisDiseaseName(lisPacsInfoForDJVO.getDiseaseName());
|
|
|
- List<GetDiseaseNameDTO> c = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
|
|
|
- url = "http://127.0.0.1:5446/information.html?type=" + lisPacsInfoForDJVO.getType() +
|
|
|
- "&position=2" + "&name=" + c.get(0).getConceptDisName();
|
|
|
- }
|
|
|
- return url;
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 数据服务模式
|
|
|
+ *
|
|
|
* @param pushJoinVO
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/getDataService")
|
|
|
@SysLogger("getDataService")
|
|
|
- public String getDataService(PushJoinVO pushJoinVO){
|
|
|
- GetDiseaseNameVO getDiseaseNameVO =new GetDiseaseNameVO();
|
|
|
- switch (pushJoinVO.getCode()){
|
|
|
+ public String getDataService(@RequestBody PushJoinVO pushJoinVO) throws Exception {
|
|
|
+ GetDiseaseNameVO getDiseaseNameVO = new GetDiseaseNameVO();
|
|
|
+ LisPacsInfoForDJVO lisPacsInfoForDJVO = new LisPacsInfoForDJVO();
|
|
|
+ List<LisConfigDTO> lisConfigDTO;
|
|
|
+ List<PacsConfigDTO> pacsConfigDTO;
|
|
|
+ String mrId;
|
|
|
+ String url;
|
|
|
+
|
|
|
+ InputInfo inputInfo = new InputInfo();
|
|
|
+ inputInfo.setHospitalCode(pushJoinVO.getHosCode());
|
|
|
+ inputInfo.setHosptialDeptCode(pushJoinVO.getHosptialDeptCode());
|
|
|
+ inputInfo.setDoctorCode(pushJoinVO.getDoctorCode());
|
|
|
+ inputInfo.setInquiryCode(pushJoinVO.getInquiryCode());
|
|
|
+ inputInfo.setDiseaseName(pushJoinVO.getDiag());
|
|
|
+ inputInfo.setAge(pushJoinVO.getAge().intValue());
|
|
|
+ inputInfo.setSexType(pushJoinVO.getSex() == 1 ? "男" : "女");
|
|
|
+ inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
|
|
|
+ inputInfo.setParamIn(JSONObject.toJSONString(pushJoinVO));
|
|
|
+
|
|
|
+ switch (pushJoinVO.getCode()) {
|
|
|
//首程推送
|
|
|
- case "0":
|
|
|
+ case "2":
|
|
|
getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
|
|
|
- getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiseaseName());
|
|
|
+ getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
|
|
|
List<GetDiseaseNameDTO> a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
|
|
|
- pushJoinVO.setDiseaseName(a.get(0).getConceptDisName());
|
|
|
+ pushJoinVO.setDiag(a.get(0).getConceptDisName());
|
|
|
+
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "&showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=2";
|
|
|
|
|
|
+ inputInfo.setRemark("邵逸夫首程推送接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
|
|
|
- String url0 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=0";
|
|
|
- return url0;
|
|
|
//大病历推送
|
|
|
- case "1":
|
|
|
+ case "3":
|
|
|
getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
|
|
|
- getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiseaseName());
|
|
|
+ getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
|
|
|
List<GetDiseaseNameDTO> b = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
|
|
|
- pushJoinVO.setDiseaseName(b.get(0).getConceptDisName());
|
|
|
- String url1 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=1";
|
|
|
- return url1;
|
|
|
- //查阅报告危急值提醒
|
|
|
- case "2":
|
|
|
- LisPacsInfoForDJVO lisPacsInfoForDJVO = new LisPacsInfoForDJVO();
|
|
|
- LisConfigDTO lisConfigDTO;
|
|
|
- List<LisResult> lis = pushJoinVO.getLis();
|
|
|
- for (int i = 0; i <= lis.size(); i++) {
|
|
|
- lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
- lisPacsInfoForDJVO.setMealName(lis.get(i).getName());
|
|
|
- lisPacsInfoForDJVO.setItemName(lis.get(i).getDetailName());
|
|
|
- lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
|
|
|
- lis.get(i).setUniqueName(lisConfigDTO.getUniqueName());
|
|
|
- }
|
|
|
- pushJoinVO.setLis(lis);
|
|
|
-
|
|
|
- PacsConfigDTO pacsConfigDTO;
|
|
|
- List<PacsResult> pacs = pushJoinVO.getPacsList();
|
|
|
- StringBuffer sb = new StringBuffer();
|
|
|
- for (int j = 0; j <= pacs.size(); j++) {
|
|
|
- lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
- lisPacsInfoForDJVO.setMealName(pacs.get(j).getName());
|
|
|
- pacsConfigDTO = pacsConfigFacade.getPacsConfigByNameAndHosCode(lisPacsInfoForDJVO);
|
|
|
- pacs.get(j).setName(pacsConfigDTO.getUniqueName());
|
|
|
- sb.append(pacsConfigDTO.getUniqueName() + ":" + pacs.get(j).getResult() + ";");
|
|
|
- }
|
|
|
- pushJoinVO.setPacs(sb.toString());
|
|
|
- String url2 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=2";
|
|
|
- return url2;
|
|
|
- //开单合理性
|
|
|
- case "3":
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- String url3 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=3";
|
|
|
- return url3;
|
|
|
+ pushJoinVO.setDiag(b.get(0).getConceptDisName());
|
|
|
+
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "&showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=3";
|
|
|
+ inputInfo.setRemark("邵逸夫大病历推送接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
+
|
|
|
+ //查阅报告危急值提醒(视图)
|
|
|
case "4":
|
|
|
+ if (pushJoinVO.getLisMrn() != null & !"".equals(pushJoinVO.getLisMrn().trim())) {
|
|
|
+ String username = "u2019_LT";// 数据库用户名
|
|
|
+ String password = "lt@2019";// 数据库密码
|
|
|
+ String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";//驱动
|
|
|
+ String dbUrl = "jdbc:sqlserver://192.1.2.92:1433;DatabaseName=lis";//数据库地址
|
|
|
+ Connection conn;
|
|
|
+ Class.forName(driver);
|
|
|
+ conn = DriverManager.getConnection(dbUrl, username, password);
|
|
|
+ String sql = "select * from V_LIS_PANICVALUE where MRN = " + pushJoinVO.getLisMrn();
|
|
|
+ PreparedStatement pst;
|
|
|
+ pst = conn.prepareStatement(sql);
|
|
|
+ ResultSet rs = pst.executeQuery();
|
|
|
+
|
|
|
+ List<LisResult> lrs = new ArrayList<>();
|
|
|
+ LisResult lisResult = new LisResult();
|
|
|
+ while (rs.next()) {
|
|
|
+ lisResult.setName(rs.getString("SPECIMENNAME"));//套餐名
|
|
|
+ lisResult.setDetailName(rs.getString("CHINNAME"));//化验项名
|
|
|
+ //判断是否为数字,是则传入value,不是则传入otherValue
|
|
|
+ if (isNum(rs.getString("NOTES"))) {
|
|
|
+ lisResult.setValue(Double.valueOf(rs.getString("NOTES")));//值
|
|
|
+ } else {
|
|
|
+ lisResult.setOtherValue(rs.getString("NOTES"));//其他结果,包括阴性阳性,文字描述等
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (rs.getString("refhigh") != null) {
|
|
|
+ if (isNum(rs.getString("refhigh"))) {
|
|
|
+ lisResult.setMaxValue(Double.valueOf(rs.getString("refhigh")));//值
|
|
|
+ } else {
|
|
|
+ lisResult.setMaxValue(0.0);//其他结果,包括阴性阳性,文字描述等
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ lisResult.setMaxValue(0.0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rs.getString("reflow") != null) {
|
|
|
+ if (isNum(rs.getString("reflow"))) {
|
|
|
+ lisResult.setMinValue(Double.valueOf(rs.getString("reflow")));//值
|
|
|
+ } else {
|
|
|
+ lisResult.setMinValue(0.0);//其他结果,包括阴性阳性,文字描述等
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ lisResult.setMinValue(0.0);
|
|
|
+ }
|
|
|
+
|
|
|
+ lisResult.setUnits(rs.getString("jydw"));//单位
|
|
|
+ lisResult.setSource(1);//数据来源
|
|
|
+ lrs.add(lisResult);
|
|
|
+ }
|
|
|
+ rs.close();
|
|
|
+ pst.close();
|
|
|
+ conn.close();
|
|
|
+
|
|
|
+ for (int i = 0; i < lrs.size(); i++) {
|
|
|
+ lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
+ lisPacsInfoForDJVO.setMealName(lrs.get(i).getName());
|
|
|
+ lisPacsInfoForDJVO.setItemName(lrs.get(i).getDetailName());
|
|
|
+ lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
|
|
|
+ if(lisConfigDTO.size()!=0){
|
|
|
+ lrs.get(i).setUniqueName(lisConfigDTO.get(0).getUniqueName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pushJoinVO.setLis(lrs);
|
|
|
+
|
|
|
+ } else if (pushJoinVO.getPacsMrn() != null && !"".equals(pushJoinVO.getPacsMrn().trim())) {
|
|
|
+ String username = "u2019_LT";// 数据库用户名
|
|
|
+ String password = "lt@2019";// 数据库密码
|
|
|
+ String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";//驱动
|
|
|
+ String dbUrl1 = "jdbc:oracle:thin:@192.1.2.92:1521:lis";//数据库地址
|
|
|
+ Connection conn;
|
|
|
+ Class.forName(driver);
|
|
|
+ conn = DriverManager.getConnection(dbUrl1, username, password);
|
|
|
+ String sql = "select * from V_PACS_PANICVALUE where MRN = " + pushJoinVO.getPacsMrn();
|
|
|
+ PreparedStatement pst;
|
|
|
+ pst = conn.prepareStatement(sql);
|
|
|
+ ResultSet rs = pst.executeQuery();
|
|
|
+
|
|
|
+ PacsResult pacsResult = new PacsResult();
|
|
|
+ List<PacsResult> lpr = new ArrayList<>();
|
|
|
+ while (rs.next()) {
|
|
|
+ pacsResult.setName(rs.getString("SPECIMENNAME"));
|
|
|
+ pacsResult.setResult(rs.getString("SPECIMENNAME"));
|
|
|
+ lpr.add(pacsResult);
|
|
|
+ }
|
|
|
|
|
|
+ rs.close();
|
|
|
+ pst.close();
|
|
|
+ conn.close();
|
|
|
+
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ for (int j = 0; j <= lpr.size(); j++) {
|
|
|
+ lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
+ lisPacsInfoForDJVO.setMealName(lpr.get(j).getName());
|
|
|
+ pacsConfigDTO = pacsConfigFacade.getPacsConfigByNameAndHosCode(lisPacsInfoForDJVO);
|
|
|
+ if (pacsConfigDTO.size() != 0) {
|
|
|
+ lpr.get(j).setName(pacsConfigDTO.get(0).getUniqueName());
|
|
|
+ }
|
|
|
+ sb.append(pacsConfigDTO.get(0).getUniqueName() + ":" + lpr.get(j).getResult() + ";");
|
|
|
+ }
|
|
|
+ pushJoinVO.setPacs(sb.toString());
|
|
|
|
|
|
- String url4 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=4";
|
|
|
- return url4;
|
|
|
- case "5":
|
|
|
-
|
|
|
- String url5 = "http://127.0.0.1:5446/index.html?mrId=xxx&hospitalCode=A001&plan=5";
|
|
|
- return url5;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "&showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=4";
|
|
|
+ inputInfo.setRemark("邵逸夫查阅报告危急值提醒接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
|
|
|
- //化验辅检静态知识
|
|
|
+ //开单合理性
|
|
|
+ case "5":
|
|
|
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" +
|
|
|
+ "&tipsType=" +
|
|
|
+ "&showTab=0" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=5";
|
|
|
+ inputInfo.setRemark("邵逸夫开单合理性接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
+
|
|
|
+ //辅检静态知识
|
|
|
+ case "6":
|
|
|
+ if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
|
|
|
+ lisPacsInfoForDJVO.setMealName(pushJoinVO.getLisOrder());
|
|
|
+ lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
+ lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
|
|
|
+ pushJoinVO.setLisOrder(lisConfigDTO.get(0).getUniqueName());
|
|
|
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
|
|
|
- //查看检验检查报告静态知识
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" + pushJoinVO.getLisOrder() +
|
|
|
+ "&tipsType=5" +
|
|
|
+ "&showTab=1" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=6";
|
|
|
|
|
|
+ inputInfo.setRemark("邵逸夫化验静态知识接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
|
|
|
- String username = "root";// 数据库用户名
|
|
|
- String password = "langtong";// 数据库密码
|
|
|
- String driver = "oracle.jdbc.driver.OracleDriver";//驱动
|
|
|
- String url="jdbc:oracle:thin:@192.168.3.177:1521:orcl";//数据库地址
|
|
|
- Connection conn = null;
|
|
|
- try {
|
|
|
- Class.forName(driver);
|
|
|
- conn = (Connection) DriverManager.getConnection(url, username, password);
|
|
|
- String sql = "";
|
|
|
-
|
|
|
- PreparedStatement pst = null;
|
|
|
- pst = (PreparedStatement) conn.prepareStatement(sql);
|
|
|
- ResultSet rs = pst.executeQuery();
|
|
|
- while(rs.next()){
|
|
|
- System.out.println(rs.getString("count"));
|
|
|
- }
|
|
|
- rs.close();
|
|
|
- pst.close();
|
|
|
- conn.close();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ } else if (pushJoinVO.getPacOrder() != null && !"".equals(pushJoinVO.getPacOrder().trim())) {
|
|
|
+ lisPacsInfoForDJVO.setMealName(pushJoinVO.getPacOrder());
|
|
|
+ lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
|
|
|
+ pacsConfigDTO = pacsConfigFacade.getPacsConfigByNamesAndHosCode(lisPacsInfoForDJVO);
|
|
|
+ pushJoinVO.setPacOrder(pacsConfigDTO.get(0).getUniqueName());
|
|
|
+
|
|
|
+ mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+
|
|
|
+ url = "http://127.0.0.1:5446/index.html?" +
|
|
|
+ "mrId=" + mrId +
|
|
|
+ "&tipsName=" + pushJoinVO.getPacOrder() +
|
|
|
+ "&tipsType=6" +
|
|
|
+ "&showTab=1" +
|
|
|
+ "&hospitalCode=" + pushJoinVO.getHosCode() +
|
|
|
+ "&plan=7";
|
|
|
+
|
|
|
+ inputInfo.setRemark("邵逸夫辅检静态知识接口");
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ return url;
|
|
|
+ }
|
|
|
}
|
|
|
+ return "暂无推送";
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- /*String code = mrFacade.createMr(pushJoinVO);
|
|
|
- String url =*/
|
|
|
- return null;
|
|
|
+ public static boolean isNum(String str) {
|
|
|
+ Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
|
|
|
+ return pattern.matcher(str).matches();
|
|
|
}
|
|
|
|
|
|
}
|