|
@@ -7,6 +7,8 @@ import com.diagbot.facade.data.*;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ReadProperties;
|
|
|
import com.diagbot.util.TZDBConn;
|
|
|
+import com.diagbot.vo.AnalyzeRunVO;
|
|
|
+import com.diagbot.vo.AnalyzeVO;
|
|
|
import com.diagbot.vo.data.YhHomePageVo;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -51,6 +53,8 @@ public class ViewFacade {
|
|
|
private AMedicalRecordContentFacade aMedicalRecordContentFacade;
|
|
|
@Autowired
|
|
|
private ABehospitalInfoFacade aBehospitalInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ private BehospitalInfoFacade behospitalInfoFacade;
|
|
|
|
|
|
private TZDBConn tzDBConn = new TZDBConn();
|
|
|
|
|
@@ -70,11 +74,10 @@ public class ViewFacade {
|
|
|
executeOldDataOne(s.getBehospitalCode());
|
|
|
});
|
|
|
}
|
|
|
- System.out.println("没有数据--------------------------开始时间--+" + startDate + "--结束时间--" + stopDate);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据住院号来拉取历史数据
|
|
|
+ * 根据住院号来拉取历史数据(并评分)
|
|
|
*
|
|
|
* @param behospitalCode
|
|
|
*/
|
|
@@ -90,25 +93,35 @@ public class ViewFacade {
|
|
|
String recordSql = "select * from his_medical_record where behospital_code= '" + behospitalCode + "'";
|
|
|
this.getRecord(recordSql);
|
|
|
|
|
|
- //获取病案首页
|
|
|
+ //获取病案首页(诊断和手术)
|
|
|
this.getHomePageByView(behospitalCode);
|
|
|
|
|
|
//获取相关医嘱信息
|
|
|
String doctorAdviceSql = "select * from his_doctor_advice where behospital_code = '" + behospitalCode + "'";
|
|
|
this.getDoctorAdvice(doctorAdviceSql);
|
|
|
+
|
|
|
+ try {
|
|
|
+ //拉取数据完后评分
|
|
|
+ AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
+ analyzeVO.setIsTask(true);
|
|
|
+ analyzeVO.setHospitalId(s.getHospitalId());
|
|
|
+ analyzeVO.setBehospitalCode(s.getBehospitalCode());
|
|
|
+ behospitalInfoFacade.analyze(analyzeVO);
|
|
|
+ } catch (Exception e) {
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("历史数据拉取完评分异常", "", "", JSON.toJSONString(s), e.getMessage());
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
- System.out.println("没有数据--------------------------住院号--+" + behospitalCode);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 从试图获取病案首页(诊断和手术)
|
|
|
+ * 从视图获取病案首页(诊断和手术)
|
|
|
*/
|
|
|
- public void getHomePageByView(String behospitalCode) {
|
|
|
+ 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 diagSql = "select * from his_home_diagnose_info where behospital_code= '" + behospitalCode + "'";
|
|
|
String opsSql = "select * from his_home_operation_info where behospital_code= '" + behospitalCode + "'";
|
|
|
|
|
|
//从视图获取病案首页信息
|
|
@@ -325,4 +338,15 @@ public class ViewFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void executeLeaveHospitalDataOld(String startDate, String stopDate) {
|
|
|
+ //获取入院登记表中的信息
|
|
|
+ String infoSql = "select * from his_behospital_info where leave_hospital_date >= '" + startDate + "' and leave_hospital_date <= '" + stopDate + "'";
|
|
|
+ List<BehospitalInfo> behospitalInfoList = this.getInfo(infoSql);
|
|
|
+ //根据入院登记表的信息来查所需文书
|
|
|
+ if (behospitalInfoList.size() > 0) {
|
|
|
+ behospitalInfoList.forEach(s -> {
|
|
|
+ executeOldDataOne(s.getBehospitalCode());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|