Sfoglia il codice sorgente

入院登记时添加更多的必填项

lighter 3 anni fa
parent
commit
9879305820

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>2</version>
+    <version>1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 38 - 0
src/main/java/thyyxxk/webserver/controller/dictionary/FetchDictionariesController.java

@@ -0,0 +1,38 @@
+package thyyxxk.webserver.controller.dictionary;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import thyyxxk.webserver.dao.his.dictionary.FetchDictionariesDao;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.dictionary.CodeName;
+import thyyxxk.webserver.utils.ResultVoUtil;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/fetchDictionaries")
+public class FetchDictionariesController {
+    private final FetchDictionariesDao dao;
+
+    @Autowired
+    public FetchDictionariesController(FetchDictionariesDao dao) {
+        this.dao = dao;
+    }
+
+    @GetMapping("/country")
+    public ResultVo<List<CodeName>> selectCountries() {
+        return ResultVoUtil.success(dao.selectCountries());
+    }
+
+    @GetMapping("/nation")
+    public ResultVo<List<CodeName>> selectNations() {
+        return ResultVoUtil.success(dao.selectNations());
+    }
+
+    @GetMapping("/relation")
+    public ResultVo<List<CodeName>> selectRelations() {
+        return ResultVoUtil.success(dao.selectRelations());
+    }
+}

+ 8 - 11
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -7,10 +7,12 @@ import thyyxxk.webserver.config.auth.PassToken;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.markmtfees.UploadMtFeeParam;
+import thyyxxk.webserver.entity.medicalinsurance.onlinepayment.EcToken;
 import thyyxxk.webserver.entity.medicalinsurance.outpatient.MzPatientInfo;
 import thyyxxk.webserver.entity.medicalinsurance.outpatient.SpcChrDiseAcct;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.FundDetail;
 import thyyxxk.webserver.service.medicalinsurance.SiMzService;
+import thyyxxk.webserver.utils.ResultVoUtil;
 
 import java.util.*;
 
@@ -74,17 +76,6 @@ public class MarkMtFeesController {
         mz.setStaffId(param.getStaffId());
         ResultVo<FundDetail> result = mzService.revokeOutpatientSettlement(mz);
         return getStringObjectMap(param, result, "收费窗口撤销门特结算", true);
-//        Map<String, Object> map = new HashMap<>();
-//        if (result.getCode() == ExceptionEnum.SUCCESS.getCode()) {
-//            map.put("code", 0);
-//            map.put("msg", result.getData());
-//            mzService.updateMzSaved(param.getPatientId(), param.getTimes(), 0);
-//        } else {
-//            map.put("code", -1);
-//            map.put("msg", result.getMessage());
-//        }
-//        log.info("窗口取消门特结算:参数:{},结果:{}", param, map);
-//        return map;
     }
 
     private Map<String, Object> getStringObjectMap(@RequestBody UploadMtFeeParam param,
@@ -122,4 +113,10 @@ public class MarkMtFeesController {
         return map;
     }
 
+    @PassToken
+    @PostMapping("/payOnline")
+    public ResultVo<String> payOnline(@RequestBody EcToken token) {
+        return ResultVoUtil.success(token.getEcToken());
+    }
+
 }

+ 8 - 8
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -300,14 +300,14 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "where bah=#{bah} and zycs=#{times}")
     List<CaseFrontsheetSurgery> getSurgeries(@Param("bah") String bah, @Param("times") int times);
 
-    @Select("select (select count(*) from yz_act_order with(nolock) where order_code in ('06026','06053','06027') " +
+    @Select("select (select count(1) from yz_act_order with(nolock) where order_code in ('06026','06053','06027') " +
             "and inpatient_no=#{bah} and admiss_times=#{times}) + " +
-            "(select count(*) from yz_inact_order with(nolock) where order_code in ('06026','06053','06027') and " +
+            "(select count(1) from yz_inact_order with(nolock) where order_code in ('06026','06053','06027') and " +
             "inpatient_no=#{bah} and admiss_times=#{times})")
     int getDismissOrder(@Param("bah") String bah, @Param("times") int times);
 
-    @Select("select (select count(*) from yz_act_order with(nolock) where order_code='05973' and inpatient_no=#{bah} " +
-            "and admiss_times=#{times}) + (select count(*) from yz_inact_order with(nolock) where order_code='05973' " +
+    @Select("select (select count(1) from yz_act_order with(nolock) where order_code='05973' and inpatient_no=#{bah} " +
+            "and admiss_times=#{times}) + (select count(1) from yz_inact_order with(nolock) where order_code='05973' " +
             "and inpatient_no=#{bah} and admiss_times=#{times})")
     int getDeathOrder(@Param("bah") String bah, @Param("times") int times);
 
@@ -367,10 +367,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
                               @Param("clinicDiagCode") String clinicDiagCode,
                               @Param("clinicDiagStr") String clinicDiagStr);
 
-    @Select("select count(*) from batj_ba1 with(nolock) where bah=#{bah} and zycs=#{times}")
+    @Select("select count(1) from batj_ba1 with(nolock) where bah=#{bah} and zycs=#{times}")
     int isBatjBa1Exist(@Param("bah") String bah, @Param("times") int times);
 
-    @Select("select count(*) from batj_ba2 with(nolock) where bah=#{bah} and zycs=#{times}")
+    @Select("select count(1) from batj_ba2 with(nolock) where bah=#{bah} and zycs=#{times}")
     int isBatjBa2Exist(@Param("bah") String bah, @Param("times") int times);
 
     @Insert("insert into batj_ba1 (bah, zyh, zycs, xm, ryrq, ryks, rybf) values " +
@@ -559,14 +559,14 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "order by borrow_date desc")
     BorrowBase getBorrowInfo(@Param("bah") String bah, @Param("times") int times);
 
-    @Select("select count(*) from zy_inactpatient a with(nolock), batj_ba2 b with(nolock) " +
+    @Select("select count(1) from zy_inactpatient a with(nolock), batj_ba2 b with(nolock) " +
             "where (dis_dept=#{ward} or dis_ward=#{ward}) and " +
             "b.bah=a.inpatient_no and " +
             "b.zycs=a.admiss_times and " +
             "b.blfx>2")
     Integer getCDBlfxCount(@Param("ward") String ward);
 
-    @Select("select count(*) from zy_inactpatient with(nolock) where dis_dept=#{ward} or dis_ward=#{ward}")
+    @Select("select count(1) from zy_inactpatient with(nolock) where dis_dept=#{ward} or dis_ward=#{ward}")
     Integer getAllDisPatientCount(@Param("ward") String ward);
 
     @Select("<script>" +

+ 20 - 0
src/main/java/thyyxxk/webserver/dao/his/dictionary/FetchDictionariesDao.java

@@ -0,0 +1,20 @@
+package thyyxxk.webserver.dao.his.dictionary;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import thyyxxk.webserver.entity.dictionary.CodeName;
+
+import java.util.List;
+
+@Mapper
+public interface FetchDictionariesDao {
+
+    @Select("select rtrim(code) as code, rtrim(name) as name from zd_country_code order by sort_no,code")
+    List<CodeName> selectCountries();
+
+    @Select("select rtrim(code) as code,rtrim(name) as name from zd_nation_code where wjw_code is not null order by wjw_code")
+    List<CodeName> selectNations();
+
+    @Select("select rtrim(code) as code, rtrim(name) as name from zy_zd_relative_code order by code")
+    List<CodeName> selectRelations();
+}

+ 22 - 3
src/main/java/thyyxxk/webserver/dao/his/yibao/PatientDao.java

@@ -55,6 +55,10 @@ public interface PatientDao {
             "and admiss_times=a.admiss_times and dis_diag_no=1), " +
             "operation=rtrim(a.operation),a.zy_serial_no, " +
             "bedNo=rtrim(a.bed_no),a.admdvs, " +
+            "dutyNurse=(select rtrim(job_nurse) from batj_ba2 t where t.zyh=a.inpatient_no and t.zycs=a.admiss_times), " +
+            "rtrim(b.country) as country, rtrim(b.nation_code) as nation," +
+            "rtrim(b.relation_name) as contactName, rtrim(relation_code) as contactRelation, " +
+            "rtrim(b.relation_street) as contactAddrName, rtrim(relation_tel) as contactPhone, " +
             "mdtrtId=(select mdtrt_id from t_si_pat_info where pat_no=a.inpatient_no and times=a.admiss_times and ledger_sn=a.times_billed), " +
             "injurySerialNo=(select serial_no from t_injury_si_pat_info where pat_no=a.inpatient_no " +
             "and times=a.admiss_times and ledger_sn=a.times_billed), " +
@@ -170,10 +174,25 @@ public interface PatientDao {
     @Update("update zy_actpatient set yb_register_date=#{ybRegisterDate},med_type=#{medType},responce_type=#{responceType}, " +
             "admdvs=#{admdvs},refer_physician=#{referPhysician},matn_type=#{matnType},latechb_flag=#{latechbFlag}," +
             "pret_flag=#{pretFlag} where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes}")
-    void updateYbRegisterDate(Patient param);
+    void updateZyActpatient(Patient param);
 
-    @Update("update a_patient_mi set social_no=#{sfz} where inpatient_no=#{zyh}")
-    void updateSocialNo(@Param("sfz") String sfz, @Param("zyh") String zyh);
+
+    @Select("select count(1) from batj_ba2 with(nolock) where bah=#{bah} and zycs=#{times}")
+    int isBatjBa2Exist(@Param("bah") String bah, @Param("times") int times);
+
+    @Insert("insert into batj_ba2 (bah, zyh, zycs, job_nurse) values (#{bah}, #{bah}, #{times}, #{dutyNurse})")
+    void createBatjBa2(@Param("bah") String bah, @Param("times") int times, @Param("dutyNurse") String dutyNurse);
+
+    @Update("update batj_ba2 set job_nurse=#{dutyNurse} where zyh=#{bah} and zycs=#{times}")
+    void updateBatjBa2(@Param("bah") String bah, @Param("times") int times, @Param("dutyNurse") String dutyNurse);
+
+    @Update("update a_patient_mi set social_no=#{sfz},country=#{country},nation_code=#{nation}, " +
+            "relation_name=#{contactName},relation_code=#{contactRelation},relation_street=#{contactAddrName}, " +
+            "relation_tel=#{contactPhone} where inpatient_no=#{zyh}")
+    void updateAPatientMi(@Param("sfz") String sfz, @Param("zyh") String zyh,
+                          @Param("country") String country, @Param("nation") String nation,
+                          @Param("contactName") String contactName, @Param("contactRelation") String contactRelation,
+                          @Param("contactAddrName") String contactAddrName, @Param("contactPhone") String contactPhone);
 
     @Select("select * from zy_in_diag_yb where inpatient_no=#{inpatientNo} and admiss_times=#{times} order by diag_no")
     List<ZyInYbDiag> getZyInYbDiag(@Param("inpatientNo") String inpatientNo, @Param("times") Integer times);

+ 20 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/onlinepayment/EcToken.java

@@ -0,0 +1,20 @@
+package thyyxxk.webserver.entity.medicalinsurance.onlinepayment;
+
+import lombok.Data;
+
+@Data
+public class EcToken {
+    private String patientId;
+    private Integer times;
+    private String userName;
+    private String idNo;
+    private String idType;
+    private String ecToken;
+    private String insuOrg;
+    private String authNo;
+    private String ecIndexNo;
+    private String gender;
+    private String birthday;
+    private String nationality;
+    private String email;
+}

+ 10 - 0
src/main/java/thyyxxk/webserver/entity/yibao/patient/Patient.java

@@ -26,6 +26,16 @@ public class Patient {
     private String admissPhysicianName;
     private String referPhysician;
     private String referPhysicianName;
+
+    private String dutyNurse;
+    private String dutyNurseName;
+    private String country;
+    private String nation;
+    private String contactName;
+    private String contactRelation;
+    private String contactAddrName;
+    private String contactPhone;
+
     private String admissDiagStr;
     private String clinicDiagStr;
     private String admissWard;

+ 19 - 19
src/main/java/thyyxxk/webserver/service/casefrontsheet/VerifyCaseFrontSheet.java

@@ -110,24 +110,24 @@ public class VerifyCaseFrontSheet {
         if (StringUtil.invalidValue(info.getPhone())) {
             array.add(new PureCodeName("phone","患者电话不能为空!"));
         }
-        if (StringUtil.isBlank(info.getAddrZipCode())) {
-            array.add(new PureCodeName("addrZipCode","现住址邮编不能为空!"));
-        }
-        if (StringUtil.isBlank(info.getHkZipCode())) {
-            array.add(new PureCodeName("hkZipCode","户口地址邮编不能为空!"));
-        }
-        if (StringUtil.isBlank(info.getUnitZipCode())) {
-            array.add(new PureCodeName("unitZipCode","工作住址邮编不能为空!"));
-        }
+//        if (StringUtil.isBlank(info.getAddrZipCode())) {
+//            array.add(new PureCodeName("addrZipCode","现住址邮编不能为空!"));
+//        }
+//        if (StringUtil.isBlank(info.getHkZipCode())) {
+//            array.add(new PureCodeName("hkZipCode","户口地址邮编不能为空!"));
+//        }
+//        if (StringUtil.isBlank(info.getUnitZipCode())) {
+//            array.add(new PureCodeName("unitZipCode","工作住址邮编不能为空!"));
+//        }
         if (StringUtil.invalidValue(info.getHkPlaceName())) {
             array.add(new PureCodeName("hkPlaceName","患者户口地址不能为空!"));
         }
-        if (StringUtil.isBlank(info.getUnitName()) || StringUtil.isBlank(info.getUnitPlace())) {
-            array.add(new PureCodeName("unitName","患者工作单位及地址不能为空!"));
-        }
-        if (StringUtil.isBlank(info.getUnitPhone())) {
-            array.add(new PureCodeName("unitPhone","患者单位电话不能为空!"));
-        }
+//        if (StringUtil.isBlank(info.getUnitName()) || StringUtil.isBlank(info.getUnitPlace())) {
+//            array.add(new PureCodeName("unitName","患者工作单位及地址不能为空!"));
+//        }
+//        if (StringUtil.isBlank(info.getUnitPhone())) {
+//            array.add(new PureCodeName("unitPhone","患者单位电话不能为空!"));
+//        }
         if (StringUtil.invalidValue(info.getContactName())) {
             array.add(new PureCodeName("contactName","患者联系人姓名不能为空!"));
         }
@@ -212,9 +212,9 @@ public class VerifyCaseFrontSheet {
         if (StringUtil.isBlank(info.getClinicalPathwayManagement())) {
             array.add(new PureCodeName("clinicalPathwayManagement","实施临床路径管理不能为空!"));
         }
-        if (StringUtil.isBlank(info.getDrgsManagement())) {
-            array.add(new PureCodeName("drgsManagement","DRGs管理不能为空!"));
-        }
+//        if (StringUtil.isBlank(info.getDrgsManagement())) {
+//            array.add(new PureCodeName("drgsManagement","DRGs管理不能为空!"));
+//        }
         if (StringUtil.isBlank(info.getUseAntibiotic())) {
             array.add(new PureCodeName("useAntibiotic","抗生素使用不能为空!"));
         }
@@ -251,7 +251,7 @@ public class VerifyCaseFrontSheet {
         if (info.getHkPlaceName().length() > 10) {
             array.add(new PureCodeName("hkPlaceName", "患者户口地址不能超过10个汉字!"));
         }
-        if (info.getUnitPlace().length() > 16) {
+        if (StringUtil.notBlank(info.getUnitPlace()) && info.getUnitPlace().length() > 16) {
             array.add(new PureCodeName("unitPlace", "患者单位地址不能超过16个汉字!"));
         }
         if (info.getContactAddrName().length() > 16) {

+ 10 - 10
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiManageService.java

@@ -624,19 +624,19 @@ public class SiManageService {
         String dise = JSONArray.toJSONString(diseinfos);
 
         List<Icuinfo> icuinfos = new ArrayList<>();
-//        Icuinfo icuinfo = new Icuinfo();
-//        icuinfo.setValiFlag("0");
-//        icuinfo.setIptMedcasHmpgSn(diseinfos.get(0).getIptMedcasHmpgSn());
-//        icuinfo.setMdtrtSn(diseinfos.get(0).getMdtrtSn());
-//        icuinfos.add(icuinfo);
+        Icuinfo icuinfo = new Icuinfo();
+        icuinfo.setValiFlag("0");
+        icuinfo.setIptMedcasHmpgSn(diseinfos.get(0).getIptMedcasHmpgSn());
+        icuinfo.setMdtrtSn(diseinfos.get(0).getMdtrtSn());
+        icuinfos.add(icuinfo);
         String icu = JSONArray.toJSONString(icuinfos);
 
         List<Oprninfo> oprninfos = new ArrayList<>();
-//        Oprninfo oprninfo = new Oprninfo();
-//        oprninfo.setValiFlag("0");
-//        oprninfo.setIptMedcasHmpgSn(diseinfos.get(0).getIptMedcasHmpgSn());
-//        oprninfo.setMdtrtSn(diseinfos.get(0).getMdtrtSn());
-//        oprninfos.add(oprninfo);
+        Oprninfo oprninfo = new Oprninfo();
+        oprninfo.setValiFlag("0");
+        oprninfo.setIptMedcasHmpgSn(diseinfos.get(0).getIptMedcasHmpgSn());
+        oprninfo.setMdtrtSn(diseinfos.get(0).getMdtrtSn());
+        oprninfos.add(oprninfo);
         String oprn = JSONArray.toJSONString(oprninfos);
 
         input.getJSONObject("input").put("baseinfo", JSONObject.parseObject(base));

+ 47 - 14
src/main/java/thyyxxk/webserver/service/yibao/PatientService.java

@@ -18,10 +18,8 @@ import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.yibao.dismiss.ZyDisYbDiag;
 import thyyxxk.webserver.entity.yibao.patient.*;
 import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.HuanZheFeiYong;
-import thyyxxk.webserver.utils.DateUtil;
-import thyyxxk.webserver.utils.DecimalUtil;
-import thyyxxk.webserver.utils.ResultVoUtil;
-import thyyxxk.webserver.utils.TokenUtil;
+import thyyxxk.webserver.service.redislike.RedisLikeService;
+import thyyxxk.webserver.utils.*;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -39,12 +37,14 @@ public class PatientService {
     private final PatientDao dao;
     private final Routines routines;
     private final YiZhuLuRuDao yiZhuLuRuDao;
+    private final RedisLikeService redis;
 
     @Autowired
-    public PatientService(PatientDao dao, Routines routines, YiZhuLuRuDao yiZhuLuRuDao) {
+    public PatientService(PatientDao dao, Routines routines, YiZhuLuRuDao yiZhuLuRuDao, RedisLikeService redis) {
         this.dao = dao;
         this.routines = routines;
         this.yiZhuLuRuDao = yiZhuLuRuDao;
+        this.redis = redis;
     }
 
     public ResultVo<List<Overview>> getOverView(String ward) {
@@ -59,6 +59,7 @@ public class PatientService {
         }
         data.setMedTypeName(MedType.getName(data.getMedType()));
         data.setInsutypeName(Insutype.getName(data.getInsutype()));
+        data.setDutyNurseName(redis.getEmployeeName(data.getDutyNurse()));
         if (null != data.getSocialNo() && data.getSocialNo().trim().length() == 18 && !data.getSocialNo().startsWith("K")) {
             try {
                 HuanZheFeiYong feiYongZhanBi = yiZhuLuRuDao.feiYongXinXi(data.getInpatientNo(), data.getAdmissTimes(), data.getLedgerSn());
@@ -170,23 +171,55 @@ public class PatientService {
 
     @Transactional(rollbackFor = Exception.class)
     public ResultVo<String> submitSiPatientYbInfo(SubmitSiPtnt param) {
-        param.getPatient().setStaffId(TokenUtil.getTokenUserId());
-        MedType medType = MedType.get(param.getPatient().getMedType());
+        Patient patient = param.getPatient();
+        patient.setStaffId(TokenUtil.getTokenUserId());
+        MedType medType = MedType.get(patient.getMedType());
         if (null == medType) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请选择患者的医疗类别!");
         }
-        String zyh = param.getPatient().getInpatientNo();
-        int times = param.getPatient().getAdmissTimes();
+
+        if (StringUtil.isBlank(patient.getDutyNurse())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "责任护士不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getCountry())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "国籍不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getNation())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "民族不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getContactName())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "联系人不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getContactRelation())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "联系人关系不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getContactAddrName())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "联系人地址不能为空!");
+        }
+        if (StringUtil.isBlank(patient.getContactPhone())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "联系人电话不能为空!");
+        }
+
+        String zyh = patient.getInpatientNo();
+        int times = patient.getAdmissTimes();
         param.getDiags().forEach(itm -> {
             itm.setInpatientNo(zyh);
             itm.setAdmissTimes(times);
         });
-        param.getPatient().setResponceType(medType.getResponceType());
-        log.info("【操作员:{}】保存患者信息:{} ", param.getPatient().getStaffId(), param);
-        dao.updateYbRegisterDate(param.getPatient());
-        dao.updateSocialNo(param.getPatient().getSocialNo(), param.getPatient().getInpatientNo());
+        patient.setResponceType(medType.getResponceType());
+        log.info("【操作员:{}】保存患者信息:{} ", patient.getStaffId(), param);
+        if (dao.isBatjBa2Exist(patient.getInpatientNo(), patient.getAdmissTimes()) == 0) {
+            dao.createBatjBa2(patient.getInpatientNo(), patient.getAdmissTimes(), patient.getDutyNurse());
+        } else {
+            dao.updateBatjBa2(patient.getInpatientNo(), patient.getAdmissTimes(), patient.getDutyNurse());
+        }
+        dao.updateZyActpatient(patient);
+        dao.updateAPatientMi(patient.getSocialNo(), patient.getInpatientNo(), patient.getCountry(), patient.getNation(),
+                patient.getContactName(), patient.getContactRelation(), patient.getContactAddrName(), patient.getContactPhone());
         dao.deleteOldZyInYbDiag(zyh, times);
-        dao.insertNewZyInYbDiag(param.getPatient().getStaffId(), param.getDiags());
+        if (ListUtil.notBlank(param.getDiags())) {
+            dao.insertNewZyInYbDiag(patient.getStaffId(), param.getDiags());
+        }
         return ResultVoUtil.success();
     }