|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
+import com.diagbot.dto.AnalyzeApiDTO;
|
|
import com.diagbot.dto.AnalyzeRunDTO;
|
|
import com.diagbot.dto.AnalyzeRunDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.data.AHomePageDTO;
|
|
import com.diagbot.dto.data.AHomePageDTO;
|
|
@@ -180,16 +181,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
|
|
|
|
// 拆分新生儿年龄
|
|
// 拆分新生儿年龄
|
|
if (StringUtil.isNotBlank(s.getNewbornAgeUnit())) {
|
|
if (StringUtil.isNotBlank(s.getNewbornAgeUnit())) {
|
|
- List<String> newbornAgeUnitList = SplitUtil.splitAge(s.getNewbornAgeUnit());
|
|
|
|
- for (String newbornAgeUnit : newbornAgeUnitList) {
|
|
|
|
- String[] newbornAgeUnitArr = newbornAgeUnit.split(",");
|
|
|
|
- if (newbornAgeUnitArr.length != 2) continue;
|
|
|
|
- if (newbornAgeUnitArr[1].equals("月")) {
|
|
|
|
- homePage.setNewbornMonth(newbornAgeUnitArr[0]);
|
|
|
|
- } else if (newbornAgeUnitArr[1].equals("天")) {
|
|
|
|
- homePage.setNewbornDay(newbornAgeUnitArr[0]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ homePage.setNewbornMonth(s.getNewbornAgeUnit().replace("月", ""));
|
|
}
|
|
}
|
|
|
|
|
|
// 拆分新生儿出生体重
|
|
// 拆分新生儿出生体重
|
|
@@ -412,7 +404,6 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// sendDataDealFacade.sendInfo(s.getBehospitalCode());
|
|
|
|
|
|
|
|
homePageList.add(homePage);
|
|
homePageList.add(homePage);
|
|
|
|
|
|
@@ -420,29 +411,29 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
aHomeDiagnoseInfoFacade.executeHomeDiagnose(s.getLeaveDiags());//首页诊断
|
|
aHomeDiagnoseInfoFacade.executeHomeDiagnose(s.getLeaveDiags());//首页诊断
|
|
aHomeOperationInfoFacade.executeHomeOperation(s.getOperations());//首页手术
|
|
aHomeOperationInfoFacade.executeHomeOperation(s.getOperations());//首页手术
|
|
|
|
|
|
- try {
|
|
|
|
- //从病案首页同步入院登记表中的住院医生behospitalDoctor,主治医生attendingDoctor和主任医生directorDoctor和ID
|
|
|
|
- String behospitalDoctor = StringUtils.isEmpty(homePage.getBehospitalDoctor()) ? "" : homePage.getBehospitalDoctor();//获取住院医师姓名
|
|
|
|
- String attendingDoctor = StringUtils.isEmpty(homePage.getAttendingDoctor()) ? "" : homePage.getAttendingDoctor();//获取主治医师姓名
|
|
|
|
- String directorDoctor = StringUtils.isEmpty(homePage.getDirectorDoctor()) ? "" : homePage.getDirectorDoctor();//获取主任医师姓名
|
|
|
|
- String behospitalDoctorID = this.getDoctorId(behospitalDoctor);//获取住院医师id
|
|
|
|
- String attendingDoctorID = this.getDoctorId(attendingDoctor);//获取主治医师id
|
|
|
|
- String directorDoctorID = this.getDoctorId(directorDoctor);//获取主任医师id
|
|
|
|
-
|
|
|
|
- UpdateWrapper<BehospitalInfo> updateWrapper = new UpdateWrapper<>();
|
|
|
|
- updateWrapper.eq("behospital_code", homePage.getBehospitalCode())
|
|
|
|
- .eq("hospital_id", homePage.getHospitalId())
|
|
|
|
- .eq("is_deleted", IsDeleteEnum.N)
|
|
|
|
- .set("beh_doctor_name", behospitalDoctor)
|
|
|
|
- .set("doctor_name", attendingDoctor)
|
|
|
|
- .set("director_doctor_name", directorDoctor)
|
|
|
|
- .set("beh_doctor_id", behospitalDoctorID)
|
|
|
|
- .set("doctor_id", attendingDoctorID)
|
|
|
|
- .set("director_doctor_id", directorDoctorID);
|
|
|
|
- behospitalInfoFacade.update(updateWrapper);
|
|
|
|
- }catch (Exception e){
|
|
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("反查主治id异常","", JSON.toJSONString(homePage),"",e.getMessage());
|
|
|
|
- }
|
|
|
|
|
|
+ //从病案首页同步入院登记表中的住院医生behospitalDoctor,主治医生attendingDoctor和主任医生directorDoctor和ID (按需开放)
|
|
|
|
+// try {
|
|
|
|
+// String behospitalDoctor = StringUtils.isEmpty(homePage.getBehospitalDoctor()) ? "" : homePage.getBehospitalDoctor();//获取住院医师姓名
|
|
|
|
+// String attendingDoctor = StringUtils.isEmpty(homePage.getAttendingDoctor()) ? "" : homePage.getAttendingDoctor();//获取主治医师姓名
|
|
|
|
+// String directorDoctor = StringUtils.isEmpty(homePage.getDirectorDoctor()) ? "" : homePage.getDirectorDoctor();//获取主任医师姓名
|
|
|
|
+// String behospitalDoctorID = this.getDoctorId(behospitalDoctor);//获取住院医师id
|
|
|
|
+// String attendingDoctorID = this.getDoctorId(attendingDoctor);//获取主治医师id
|
|
|
|
+// String directorDoctorID = this.getDoctorId(directorDoctor);//获取主任医师id
|
|
|
|
+//
|
|
|
|
+// UpdateWrapper<BehospitalInfo> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+// updateWrapper.eq("behospital_code", homePage.getBehospitalCode())
|
|
|
|
+// .eq("hospital_id", homePage.getHospitalId())
|
|
|
|
+// .eq("is_deleted", IsDeleteEnum.N)
|
|
|
|
+// .set("beh_doctor_name", behospitalDoctor)
|
|
|
|
+// .set("doctor_name", attendingDoctor)
|
|
|
|
+// .set("director_doctor_name", directorDoctor)
|
|
|
|
+// .set("beh_doctor_id", behospitalDoctorID)
|
|
|
|
+// .set("doctor_id", attendingDoctorID)
|
|
|
|
+// .set("director_doctor_id", directorDoctorID);
|
|
|
|
+// behospitalInfoFacade.update(updateWrapper);
|
|
|
|
+// }catch (Exception e){
|
|
|
|
+// aMedAbnormalInfoFacade.saveAbnormalInfo("反查主治id异常","", JSON.toJSONString(homePage),"",e.getMessage());
|
|
|
|
+// }
|
|
});
|
|
});
|
|
execute(homePageList);
|
|
execute(homePageList);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
@@ -482,7 +473,10 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
return RespDTO.onSuc(map);
|
|
return RespDTO.onSuc(map);
|
|
}else if(aHomePageIngVO.getDockModeType().equals("1")){
|
|
}else if(aHomePageIngVO.getDockModeType().equals("1")){
|
|
//页面模式
|
|
//页面模式
|
|
- String url=readProperties.getProcessQcUrl()+"?behospitalCode="+behospitalCode+"&hospitalId="+hospitalId;
|
|
|
|
|
|
+ String url=readProperties.getProcessQcUrl()+"?bcode="+behospitalCode+"&hid="+hospitalId+"&type=0";
|
|
|
|
+ if(aHomePageIngVO.getIsPlacefile().equals("1")){
|
|
|
|
+ url=readProperties.getProcessQcUrl()+"?bcode="+behospitalCode+"&hid="+hospitalId+"&type=1";
|
|
|
|
+ }
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
map.put("url",url);
|
|
map.put("url",url);
|
|
aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面推送模式验证1","", JSON.toJSONString(aHomePageIngVO),url,"");
|
|
aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面推送模式验证1","", JSON.toJSONString(aHomePageIngVO),url,"");
|
|
@@ -491,25 +485,40 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
AnalyzeRunVO analyzeRunVO=new AnalyzeRunVO();
|
|
AnalyzeRunVO analyzeRunVO=new AnalyzeRunVO();
|
|
analyzeRunVO.setBehospitalCode(behospitalCode);
|
|
analyzeRunVO.setBehospitalCode(behospitalCode);
|
|
analyzeRunVO.setHospitalId(hospitalId);
|
|
analyzeRunVO.setHospitalId(hospitalId);
|
|
- AnalyzeRunDTO analyzeRunDTO=behospitalInfoFacade.analyzeRun(analyzeRunVO);
|
|
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
-// if(analyzeRunDTO.getMsgDTOList().size()>0){
|
|
|
|
-// map.put("analyze",analyzeRunDTO.getMsgDTOList());
|
|
|
|
-// }
|
|
|
|
|
|
+ if(aHomePageIngVO.getIsPlacefile().equals("1")){
|
|
|
|
+ AnalyzeApiDTO analyzeApiDTO=behospitalInfoFacade.analyzeApi(analyzeRunVO);
|
|
|
|
+ if(analyzeApiDTO != null){
|
|
|
|
+ map.put("analyzeApi",analyzeApiDTO);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ AnalyzeRunDTO analyzeRunDTO=behospitalInfoFacade.analyzeRun(analyzeRunVO);
|
|
|
|
+ if(analyzeRunDTO != null){
|
|
|
|
+ map.put("analyzeRun",analyzeRunDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return RespDTO.onSuc(map);
|
|
return RespDTO.onSuc(map);
|
|
}else{
|
|
}else{
|
|
|
|
+// String url=readProperties.getProcessQcUrl()+"?behospitalCode="+behospitalCode+"&hospitalId="+hospitalId;
|
|
//页面模式+接口引擎模式
|
|
//页面模式+接口引擎模式
|
|
- String url=readProperties.getProcessQcUrl()+"?behospitalCode="+behospitalCode+"&hospitalId="+hospitalId;
|
|
|
|
-
|
|
|
|
|
|
+ String url = "";
|
|
AnalyzeRunVO analyzeRunVO=new AnalyzeRunVO();
|
|
AnalyzeRunVO analyzeRunVO=new AnalyzeRunVO();
|
|
analyzeRunVO.setBehospitalCode(behospitalCode);
|
|
analyzeRunVO.setBehospitalCode(behospitalCode);
|
|
analyzeRunVO.setHospitalId(hospitalId);
|
|
analyzeRunVO.setHospitalId(hospitalId);
|
|
- AnalyzeRunDTO analyzeRunDTO=behospitalInfoFacade.analyzeRun(analyzeRunVO);
|
|
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
Map<String,Object> map=new HashMap<String,Object>();
|
|
-// if(analyzeRunDTO.getMsgDTOList().size()>0){
|
|
|
|
-// map.put("url",url);
|
|
|
|
-// map.put("analyze",analyzeRunDTO.getMsgDTOList());
|
|
|
|
-// }
|
|
|
|
|
|
+ if(aHomePageIngVO.getIsPlacefile().equals("1")){
|
|
|
|
+ url=readProperties.getProcessQcUrl()+"?bcode="+behospitalCode+"&hid="+hospitalId+"&type=1";
|
|
|
|
+ AnalyzeApiDTO analyzeApiDTO=behospitalInfoFacade.analyzeApi(analyzeRunVO);
|
|
|
|
+ if(analyzeApiDTO != null){
|
|
|
|
+ map.put("analyzeApi",analyzeApiDTO);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ url=readProperties.getProcessQcUrl()+"?bcode="+behospitalCode+"&hid="+hospitalId+"&type=0";
|
|
|
|
+ AnalyzeRunDTO analyzeRunDTO=behospitalInfoFacade.analyzeRun(analyzeRunVO);
|
|
|
|
+ if(analyzeRunDTO != null){
|
|
|
|
+ map.put("analyzeRun",analyzeRunDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面模式+接口引擎模式","", JSON.toJSONString(aHomePageIngVO),url,"");
|
|
aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面模式+接口引擎模式","", JSON.toJSONString(aHomePageIngVO),url,"");
|
|
return RespDTO.onSuc(map);
|
|
return RespDTO.onSuc(map);
|
|
}
|
|
}
|
|
@@ -565,7 +574,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
homePageList.stream().forEach(s -> {
|
|
homePageList.stream().forEach(s -> {
|
|
|
|
|
|
HomePage homePage = this.getOne(new QueryWrapper<HomePage>()
|
|
HomePage homePage = this.getOne(new QueryWrapper<HomePage>()
|
|
- /*.eq("home_page_id", s.getHomePageId())*/
|
|
|
|
|
|
+ .eq("home_page_id", s.getHomePageId())
|
|
.eq("hospital_id", s.getHospitalId())
|
|
.eq("hospital_id", s.getHospitalId())
|
|
.eq("behospital_code", s.getBehospitalCode()), false);
|
|
.eq("behospital_code", s.getBehospitalCode()), false);
|
|
if (homePage != null) {
|
|
if (homePage != null) {
|