Przeglądaj źródła

评分接口更改,病案首页异常处理

shiyue 3 lat temu
rodzic
commit
aab6a4d31c

+ 23 - 23
src/main/java/com/diagbot/facade/data/AHomePageFacade.java

@@ -164,35 +164,35 @@ public class AHomePageFacade extends HomePageServiceImpl{
 
                 sendDataDealFacade.sendInfo(s.getBehospitalCode());
 
-                //从病案首页同步入院登记表中的住院医生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);
-
                 homePageList.add(homePage);
 
                 //初始化诊断和手术,并同步到数据库
                 aHomeDiagnoseInfoFacade.executeHomeDiagnose(s.getLeaveDiags());//首页诊断
                 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());
+                }
             });
             execute(homePageList);
         }catch (Exception e){

+ 5 - 5
src/main/java/com/diagbot/facade/data/SendDataDealFacade.java

@@ -6,6 +6,7 @@ import com.diagbot.entity.*;
 import com.diagbot.facade.BehospitalInfoFacade;
 import com.diagbot.util.TZDBConn;
 import com.diagbot.vo.AnalyzeRunVO;
+import com.diagbot.vo.AnalyzeVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -65,11 +66,10 @@ public class SendDataDealFacade {
         sendInfo(code);
         sendDataDealADoctorAdvice(code);
         sendDataDealAMedicalRecord(code);
-        AnalyzeRunVO analyzeRunVO = new AnalyzeRunVO();
-        analyzeRunVO.setHospitalId(Long.valueOf("14"));
-        analyzeRunVO.setBehospitalCode(code);
-        analyzeRunVO.setIsPlacefile("1");
-        behospitalInfoFacade.analyzeApi(analyzeRunVO);
+        AnalyzeVO analyzeVO = new AnalyzeVO();
+        analyzeVO.setHospitalId(Long.valueOf("14"));
+        analyzeVO.setBehospitalCode(code);
+        behospitalInfoFacade.analyze(analyzeVO);
     }
 
     /**