|
@@ -4,6 +4,7 @@ package com.diagbot.facade.data;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.diagbot.entity.*;
|
|
|
import com.diagbot.util.TZDBConn;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -36,8 +37,14 @@ public class SendDataDealFacade {
|
|
|
|
|
|
|
|
|
public void sendDataDeal(String startDate,String stopDate){
|
|
|
- //根据时间得到历史病人登记数据
|
|
|
- List<BehospitalInfo> behospitalInfoList= sendDataDealABehospitalInfo(startDate,stopDate);
|
|
|
+
|
|
|
+// list.forEach(s->{
|
|
|
+// sendDataDealABehospitalInfo(s);
|
|
|
+// sendDataDealADoctorAdvice(s);
|
|
|
+// sendDataDealAMedicalRecord(s);
|
|
|
+// });
|
|
|
+
|
|
|
+ List<BehospitalInfo> behospitalInfoList=sendDataDealABehospitalInfo(startDate,stopDate);
|
|
|
// 根据的到的病人登记数据来获取病人的其他信息
|
|
|
if (behospitalInfoList.size()>0){
|
|
|
behospitalInfoList.forEach(s->{
|
|
@@ -68,6 +75,21 @@ public class SendDataDealFacade {
|
|
|
}
|
|
|
return behospitalInfos;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 获取病人住院登记历史数据
|
|
|
+ */
|
|
|
+ public List<BehospitalInfo> sendDataDealABehospitalInfo(String behospitalCode) {
|
|
|
+ List<BehospitalInfo> behospitalInfos =new ArrayList<>();
|
|
|
+ try {
|
|
|
+ String sql = "select * from v_jkcdss_zy_bingrenjbxx t where behospitalCode = '"+behospitalCode+" '";
|
|
|
+
|
|
|
+ behospitalInfos = tzDBConn.getBehospitalInfo(sql);
|
|
|
+ aBehospitalInfoFacade.execute(behospitalInfos);
|
|
|
+ } catch (Exception e) {
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("获取病人住院登记历史数据", behospitalCode, JSON.toJSONString(behospitalInfos), "", e.getMessage());
|
|
|
+ }
|
|
|
+ return behospitalInfos;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 获取医嘱历史数据
|