|
@@ -54,27 +54,6 @@ public class ViewFacade {
|
|
|
|
|
|
private TZDBConn tzDBConn = new TZDBConn();
|
|
|
|
|
|
- /**
|
|
|
- * 定时任务每天晚上11点拉取历史病例
|
|
|
- */
|
|
|
- public void executeOldData() {
|
|
|
- String deptSql = "select * from dept where deptType='临床' and station='住院' ";
|
|
|
- String doctorAdviceSql = "select * from doctor_order where daStartDate >= to_date('" + DateUtil.yesterdayFormate() + "','yyyy-MM-dd')";
|
|
|
-
|
|
|
-
|
|
|
- Long startTime = System.currentTimeMillis();
|
|
|
- //得到全部的科室信息并添加修改
|
|
|
- this.getDeptInfo(deptSql);
|
|
|
- Long startTime1 = System.currentTimeMillis();
|
|
|
- System.out.println("获取科室所用时间:----" + (startTime1 - startTime) + "----");
|
|
|
-
|
|
|
-
|
|
|
- //得到前一天的医嘱信息并添加修改
|
|
|
- this.getDoctorAdvice(doctorAdviceSql);
|
|
|
- Long startTime2 = System.currentTimeMillis();
|
|
|
- System.out.println("获取医嘱所用时间:----" + (startTime2 - startTime1) + "----");
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 根据时间来拉取历史数据
|
|
|
*
|
|
@@ -96,11 +75,7 @@ public class ViewFacade {
|
|
|
this.getRecord(recordSql);
|
|
|
|
|
|
//获取病案首页(先注释视图补全再开)
|
|
|
- YhHomePageVo yhHomePageVo = new YhHomePageVo();
|
|
|
- yhHomePageVo.setBehospitalCode(behospitalCode);
|
|
|
- yhHomePageVo.setHospitalId("36");
|
|
|
- yhHomePageVo.setDockModeType("0");
|
|
|
- this.getHomePageByView(yhHomePageVo);
|
|
|
+ this.getHomePageByView(behospitalCode);
|
|
|
|
|
|
//获取相关医嘱信息
|
|
|
String doctorAdviceSql = "select * from his_doctor_advice where behospital_code = '" + behospitalCode + "'";
|
|
@@ -128,11 +103,7 @@ public class ViewFacade {
|
|
|
this.getRecord(recordSql);
|
|
|
|
|
|
//获取病案首页
|
|
|
- YhHomePageVo yhHomePageVo = new YhHomePageVo();
|
|
|
- yhHomePageVo.setBehospitalCode(behospitalCode);
|
|
|
- yhHomePageVo.setHospitalId("36");
|
|
|
- yhHomePageVo.setDockModeType("0");
|
|
|
- this.getHomePageByView(yhHomePageVo);
|
|
|
+ this.getHomePageByView(behospitalCode);
|
|
|
|
|
|
//获取相关医嘱信息
|
|
|
String doctorAdviceSql = "select * from his_doctor_advice where behospital_code = '" + behospitalCode + "'";
|
|
@@ -145,13 +116,9 @@ public class ViewFacade {
|
|
|
/**
|
|
|
* 从试图获取病案首页(诊断和手术)
|
|
|
*/
|
|
|
- public RespDTO<Map<String, Object>> getHomePageByView(YhHomePageVo yhHomePageVo) {
|
|
|
- //保存入参
|
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页入参", "", yhHomePageVo.getBehospitalCode(), JSON.toJSONString(yhHomePageVo), "");
|
|
|
- Long modeId = Long.valueOf("6");//病案首页默认为6
|
|
|
- String behospitalCode = yhHomePageVo.getBehospitalCode();
|
|
|
- //从视图拉取数据
|
|
|
+ public void getHomePageByView(String behospitalCode) {
|
|
|
|
|
|
+ //从视图拉取数据
|
|
|
String homepageSql = "select * from his_home_page where behospital_code= '" + behospitalCode + "'";
|
|
|
String diagSql = "select * from his_home_diagnose_info where behospital_code= '" + behospitalCode+ "'";
|
|
|
String opsSql = "select * from his_home_operation_info where behospital_code= '" + behospitalCode + "'";
|
|
@@ -163,15 +130,6 @@ public class ViewFacade {
|
|
|
//从视图获取病案首页手术信息
|
|
|
this.getHomeOperation(opsSql);
|
|
|
|
|
|
-
|
|
|
- //根据传过来的方案编码来判断是否返回评分(1:返回评分,其他只保存数据)
|
|
|
- if (yhHomePageVo.getDockModeType().equals("1")) {
|
|
|
- String url = readProperties.getProcessQcUrl() + "?behospitalCode=" + behospitalCode + "&hospitalId=" + yhHomePageVo.getHospitalId() + "&modeId=" + modeId;
|
|
|
- Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- map.put("url", url);
|
|
|
- return RespDTO.onSuc(map);
|
|
|
- }
|
|
|
- return RespDTO.onSuc(true);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -379,75 +337,4 @@ public class ViewFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 从webService获取文书详情信息
|
|
|
-// *
|
|
|
-// * @param recId
|
|
|
-// */
|
|
|
-// public void getRecordContent(String recId) {
|
|
|
-// List<MedicalRecordContent> medicalRecordContentList = new ArrayList<>();
|
|
|
-// try {
|
|
|
-// String html=this.getHtml(recId);
|
|
|
-// MedicalRecordContent medicalRecordContent = new MedicalRecordContent();
|
|
|
-// medicalRecordContent.setRecId(recId);
|
|
|
-// medicalRecordContent.setHospitalId(Long.valueOf("35"));
|
|
|
-//
|
|
|
-// System.out.println("返回数据:" + html);
|
|
|
-// medicalRecordContent.setXmlText(html);
|
|
|
-// //截取rec_id後面的_次數跟接口相對潁上
|
|
|
-// int inedx = medicalRecordContent.getRecId().lastIndexOf("_");
|
|
|
-// medicalRecordContent.setRecId(medicalRecordContent.getRecId().substring(0,inedx));
|
|
|
-// medicalRecordContentList.add(medicalRecordContent);
|
|
|
-//
|
|
|
-// aMedicalRecordContentFacade.execute(medicalRecordContentList);
|
|
|
-//
|
|
|
-// aMedAbnormalInfoFacade.saveAbnormalInfo("从webService获取文书详情信息正常", "", recId, JSON.toJSONString(medicalRecordContentList), "");
|
|
|
-// } catch (Exception e) {
|
|
|
-// aMedAbnormalInfoFacade.saveAbnormalInfo("从webService获取文书详情信息错误", "", recId, JSON.toJSONString(medicalRecordContentList), e.getMessage());
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// public String getHtml(String recId){
|
|
|
-// String url ="http://132.147.254.142:8093/DocService.asmx/GetDocsHTML";
|
|
|
-// try {
|
|
|
-// PostMethod postMethod = null;
|
|
|
-// postMethod = new PostMethod(url);
|
|
|
-// postMethod.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
|
|
|
-// NameValuePair[] data ={
|
|
|
-//// new NameValuePair("startTime",""),
|
|
|
-// new NameValuePair("szDocIDs",recId)
|
|
|
-// };
|
|
|
-// postMethod.setRequestBody(data);
|
|
|
-// org.apache.commons.httpclient.HttpClient httpClient=new org.apache.commons.httpclient.HttpClient();
|
|
|
-// int response =httpClient.executeMethod(postMethod);
|
|
|
-// String result =postMethod.getResponseBodyAsString();
|
|
|
-// String html=this.decode(result);
|
|
|
-// return html;
|
|
|
-// }catch (Exception e){
|
|
|
-//// System.out.println("请求异常"+e.getMessage());
|
|
|
-// throw new RuntimeException(e.getMessage());
|
|
|
-// }finally {
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 数值行代码转换成中文
|
|
|
-// * @param result
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// public String decode(String result){
|
|
|
-// String html=StringEscapeUtils.unescapeXml(result);
|
|
|
-// String[] tmp =html.split("&#|&#|;");
|
|
|
-// StringBuilder sb = new StringBuilder();
|
|
|
-// for (int i = 0; i < tmp.length ; i++) {
|
|
|
-// if (tmp[i].matches("\\d{5}")){
|
|
|
-// sb.append((char) Integer.parseInt(tmp[i]));
|
|
|
-// }else {
|
|
|
-// sb.append(tmp[i]);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return sb.toString();
|
|
|
-// }
|
|
|
-
|
|
|
}
|