|
@@ -3,9 +3,11 @@ package com.diagbot.facade.data;
|
|
import com.alibaba.fastjson.JSON;
|
|
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.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;
|
|
|
|
+import com.diagbot.entity.BasDoctorInfo;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
import com.diagbot.entity.HomePage;
|
|
import com.diagbot.entity.HomePage;
|
|
import com.diagbot.entity.MedPacsResult;
|
|
import com.diagbot.entity.MedPacsResult;
|
|
@@ -51,6 +53,9 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
@Autowired
|
|
@Autowired
|
|
private SendDataDealFacade sendDataDealFacade;
|
|
private SendDataDealFacade sendDataDealFacade;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ABasDoctorInfoFacade aBasDoctorInfoFacade;
|
|
|
|
+
|
|
@Value("${log_switch.enable}")
|
|
@Value("${log_switch.enable}")
|
|
private boolean logSwitch;
|
|
private boolean logSwitch;
|
|
|
|
|
|
@@ -159,17 +164,24 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
|
|
|
|
sendDataDealFacade.sendInfo(s.getBehospitalCode());
|
|
sendDataDealFacade.sendInfo(s.getBehospitalCode());
|
|
|
|
|
|
- //从病案首页同步入院登记表中的住院医生behospitalDoctor,主治医生attendingDoctor和主任医生directorDoctor
|
|
|
|
- String behospitalDoctor= StringUtils.isEmpty(homePage.getBehospitalDoctor()) ? "" : homePage.getBehospitalDoctor();
|
|
|
|
- String attendingDoctor= StringUtils.isEmpty(homePage.getAttendingDoctor()) ? "" : homePage.getAttendingDoctor();
|
|
|
|
- String directorDoctor= StringUtils.isEmpty(homePage.getDirectorDoctor()) ? "" : homePage.getDirectorDoctor();
|
|
|
|
|
|
+ //从病案首页同步入院登记表中的住院医生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<BehospitalInfo> updateWrapper=new UpdateWrapper<>();
|
|
updateWrapper.eq("behospital_code",homePage.getBehospitalCode())
|
|
updateWrapper.eq("behospital_code",homePage.getBehospitalCode())
|
|
.eq("hospital_id", homePage.getHospitalId())
|
|
.eq("hospital_id", homePage.getHospitalId())
|
|
.eq("is_deleted",IsDeleteEnum.N)
|
|
.eq("is_deleted",IsDeleteEnum.N)
|
|
.set("beh_doctor_name",behospitalDoctor)
|
|
.set("beh_doctor_name",behospitalDoctor)
|
|
.set("doctor_name",attendingDoctor)
|
|
.set("doctor_name",attendingDoctor)
|
|
- .set("director_doctor_name",directorDoctor);
|
|
|
|
|
|
+ .set("director_doctor_name",directorDoctor)
|
|
|
|
+ .set("beh_doctor_id",behospitalDoctorID)
|
|
|
|
+ .set("doctor_id",attendingDoctorID)
|
|
|
|
+ .set("director_doctor_id",directorDoctorID);
|
|
behospitalInfoFacade.update(updateWrapper);
|
|
behospitalInfoFacade.update(updateWrapper);
|
|
|
|
|
|
homePageList.add(homePage);
|
|
homePageList.add(homePage);
|
|
@@ -189,6 +201,22 @@ public class AHomePageFacade extends HomePageServiceImpl{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据docktorName获取docktorID
|
|
|
|
+ * @param doctorName
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public String getDoctorId(String doctorName){
|
|
|
|
+ QueryWrapper<BasDoctorInfo> queryWrapper = Wrappers.query();
|
|
|
|
+ queryWrapper.eq("",doctorName);
|
|
|
|
+ BasDoctorInfo doctorInfo =aBasDoctorInfoFacade.getOne(queryWrapper);
|
|
|
|
+ if (doctorInfo !=null && StringUtils.isNotEmpty(doctorInfo.getDoctorId())){
|
|
|
|
+ return doctorInfo.getDoctorId();
|
|
|
|
+ }else {
|
|
|
|
+ return "-";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 评分后返回结构体
|
|
* 评分后返回结构体
|
|
* @param aHomePageIngVO
|
|
* @param aHomePageIngVO
|