Przeglądaj źródła

查询患者参保地和险种类型

lighter 1 dzień temu
rodzic
commit
1e259b97e4

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/PatientDao.java

@@ -103,6 +103,10 @@ public interface PatientDao {
             "</script>")
     Patient getPatientInfo(@Param("inpatientNo") String inpatientNo, @Param("table") String table, @Param("times") Integer times);
 
+    @Select("select max(insuplc_admdvs) from t_si_pat_info where pat_no=#{patNo} " +
+            "and times=#{times} and ledger_sn=#{ledgerSn}")
+    Integer getPatAdmdvs(String patNo, int times, int ledgerSn);
+
     @Select("select parent_code from t_region where code=#{code}")
     Integer selectParentRegion(Integer code);
 

+ 5 - 0
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
 import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
+import thyyxxk.webserver.constants.sidicts.Insutype;
 import thyyxxk.webserver.constants.sidicts.MedType;
 import thyyxxk.webserver.constants.sidicts.PsnCertType;
 import thyyxxk.webserver.dao.his.inpatient.PatientDao;
@@ -73,6 +74,9 @@ public class PatientService {
         if (null == data) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有住院号【" + inpatientNo + "】的在院业务!");
         }
+        if (null == data.getAdmdvs()) {
+            data.setAdmdvs(dao.getPatAdmdvs(data.getInpatientNo(), data.getAdmissTimes(), data.getLedgerSn()));
+        }
         if (null != data.getAdmdvs()) {
             Integer parentRegion = dao.selectParentRegion(data.getAdmdvs());
             if (null != parentRegion) {
@@ -218,6 +222,7 @@ public class PatientService {
      */
     private void setExpenseInformation(@NotNull Patient data) {
         data.setMedTypeName(MedType.getName(data.getMedType()));
+        data.setInsutypeName(Insutype.getName(data.getInsutype()));
         data.setDutyNurseName(userCache.getEmployeeName(data.getDutyNurse()));
 
         HuanZheFeiYong feiYongZhanBi = yiZhuLuRuDao.feiYongXinXi(data.getInpatientNo(), data.getAdmissTimes(), data.getLedgerSn());