|
@@ -39,12 +39,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.text.ParsePosition;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* 视图拉取(科室,医嘱,病案首页,检查检验信息结果)
|
|
@@ -90,7 +89,7 @@ public class ViewFacade {
|
|
|
String deptSql = "select * from dept where deptType='临床' and station='住院' ";
|
|
|
String doctorAdviceSql = "select * from doctor_order where daStartDate >= to_date('" + DateUtil.yesterdayFormate() + "','yyyy-MM-dd')";
|
|
|
String lisSql = "select * from ASSAY_LIST where repDate >= '" + DateUtil.yesterdayFormate() + "' and behospitalNum is not null";
|
|
|
- String pacsSql = "select * from CHECK_LIST where repDate >= '" + DateUtil.yesterdayFormate()+ "' and behospitalNum is not null";
|
|
|
+ String pacsSql = "select * from CHECK_LIST where repDate >= '" + DateUtil.yesterdayFormate() + "' and behospitalNum is not null";
|
|
|
String infoSql = "select * from admission_pat_regist where leaveHospitalDate >= '" + DateUtil.yesterdayFormate() + "'";
|
|
|
|
|
|
try {
|
|
@@ -120,6 +119,7 @@ public class ViewFacade {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 根据出院时间来拉取历史数据
|
|
|
*
|
|
@@ -165,7 +165,7 @@ public class ViewFacade {
|
|
|
/**
|
|
|
* 单独更新病案首页
|
|
|
*/
|
|
|
- public void executeHome(){
|
|
|
+ public void executeHome() {
|
|
|
List<BehospitalInfo> behospitalInfoList = aBehospitalInfoFacade.list();
|
|
|
if (behospitalInfoList.size() > 0) {
|
|
|
behospitalInfoList.forEach(s -> {
|
|
@@ -215,13 +215,15 @@ public class ViewFacade {
|
|
|
this.getDoctorAdvice(doctorAdviceSql);
|
|
|
|
|
|
//获取化验信息和相应的化验结果并添加修改
|
|
|
- String lisSql="select * from ASSAY_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
|
|
|
+ String lisSql = "select * from ASSAY_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
|
|
|
this.getLisInfo(lisSql);
|
|
|
|
|
|
//获取检查信息和相应的检查结果并添加修改
|
|
|
- String pacsSql ="select * from CHECK_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
|
|
|
+ String pacsSql = "select * from CHECK_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
|
|
|
this.getPacsInfo(pacsSql);
|
|
|
+
|
|
|
});
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("历史数据拉取完成", "", "", JSON.toJSONString(behospitalInfoList), "");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -247,12 +249,12 @@ public class ViewFacade {
|
|
|
|
|
|
//根据传过来的方案编码来判断是否返回评分(1:返回评分,其他只保存数据)
|
|
|
if (xyHomePageVo.getDockModeType().equals("1")) {
|
|
|
- QueryWrapper<BehospitalInfo> wrapper=new QueryWrapper<>();
|
|
|
- wrapper.eq("behospital_code",behospitalCode)
|
|
|
- .eq("is_deleted",IsDeleteEnum.N);
|
|
|
- BehospitalInfo behospitalInfo= aBehospitalInfoFacade.getOne(wrapper);
|
|
|
- String url="";
|
|
|
- if (behospitalInfo != null &&behospitalInfo.getIsPlacefile().equals("1")){
|
|
|
+ QueryWrapper<BehospitalInfo> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.eq("behospital_code", behospitalCode)
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N);
|
|
|
+ BehospitalInfo behospitalInfo = aBehospitalInfoFacade.getOne(wrapper);
|
|
|
+ String url = "";
|
|
|
+ if (behospitalInfo != null && behospitalInfo.getIsPlacefile().equals("1")) {
|
|
|
url = readProperties.getProcessQcUrl() + "?behospitalCode=" + behospitalCode + "&hospitalId=" + xyHomePageVo.getHospitalId() + "&modeId=" + modeId;
|
|
|
}
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
@@ -352,8 +354,8 @@ public class ViewFacade {
|
|
|
try {
|
|
|
lisInfos = tzDBConn.getLisInfo(sql);
|
|
|
aMedLisInfoFacade.execute(lisInfos);
|
|
|
- if (lisInfos.size()>0){
|
|
|
- lisInfos.forEach(lis->{
|
|
|
+ if (lisInfos.size() > 0) {
|
|
|
+ lisInfos.forEach(lis -> {
|
|
|
this.getLisResult(lis.getRepNo());
|
|
|
});
|
|
|
}
|
|
@@ -371,7 +373,7 @@ public class ViewFacade {
|
|
|
*/
|
|
|
public void getLisResult(String repNo) {
|
|
|
List<MedLisResult> lisResults = new ArrayList<>();
|
|
|
- String sql="select * from ASSAY_DETAILS where repNo='"+repNo+"'";
|
|
|
+ String sql = "select * from ASSAY_DETAILS where repNo='" + repNo + "'";
|
|
|
try {
|
|
|
lisResults = tzDBConn.getLisResult(sql);
|
|
|
aMedLisResultFacade.execute(lisResults);
|
|
@@ -391,8 +393,8 @@ public class ViewFacade {
|
|
|
try {
|
|
|
pacsInfos = tzDBConn.getPacsInfo(sql);
|
|
|
aMedPacsInfoFacade.execute(pacsInfos);
|
|
|
- if (pacsInfos.size()>0){
|
|
|
- pacsInfos.forEach(pacs->{
|
|
|
+ if (pacsInfos.size() > 0) {
|
|
|
+ pacsInfos.forEach(pacs -> {
|
|
|
this.getPacsResult(pacs.getRepNo());
|
|
|
});
|
|
|
}
|
|
@@ -409,7 +411,7 @@ public class ViewFacade {
|
|
|
*/
|
|
|
public void getPacsResult(String repNo) {
|
|
|
List<MedPacsResult> pacsResults = new ArrayList<>();
|
|
|
- String sql="select * from CHECK_DETAILS where repNo='"+repNo+"'";
|
|
|
+ String sql = "select * from CHECK_DETAILS where repNo='" + repNo + "'";
|
|
|
try {
|
|
|
pacsResults = tzDBConn.getPacsResult(sql);
|
|
|
aMedPacsResultFacade.execute(pacsResults);
|