Browse Source

患者基本信息添加insutype

lighter 3 years ago
parent
commit
de49d2bf63

+ 1 - 1
src/main/java/thyyxxk/webserver/controller/yibao/DismissController.java

@@ -97,7 +97,7 @@ public class DismissController {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未找到住院号【" + param.getInpatientNo() + "】的在院业务。");
         }
         p.setTable(table);
-        if (p.getResponceType().equals("01")) {
+        if (p.getMedType().equals("01")) {
             YbSettleFee feePojo = new YbSettleFee();
             feePojo.setInpatientNo(p.getInpatientNo());
             feePojo.setAdmissTimes(p.getAdmissTimes());

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

@@ -33,6 +33,8 @@ public interface PatientDao {
             "name=rtrim(a.name),sex=isnull(a.sex, b.sex),act_ipt_days=(datediff(day, admiss_date, getdate())), " +
             "birthDate=(convert(varchar(10), birth_date, 21)),home_tel=rtrim(b.home_tel), " +
             "admissPhysician=rtrim(a.admiss_physician), " +
+            "insutype=(select top 1 insutype from t_si_pat_info with(nolock) where pat_no=#{inpatientNo} and " +
+            "times=a.admiss_times order by ledger_sn desc), " +
             "admissPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.admiss_physician)), " +
             "referPhysician=rtrim(a.refer_physician), " +
             "referPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.refer_physician)), " +
@@ -43,8 +45,7 @@ public interface PatientDao {
             "admissDept=rtrim(a.admiss_dept), a.matn_type,smallDept=rtrim(a.small_dept), " +
             "smallDeptName=rtrim((select name from zd_unit_code where code=small_dept)), " +
             "admiss_date,ybRegisterDate=isnull(yb_register_date, admiss_date), " +
-            "responceType=rtrim(isnull(a.responce_type, '01')), " +
-            "responceTypeName=(select rtrim(name) from zy_zd_responce_type where code = isnull(a.responce_type, '01')), " +
+            "responceType=a.med_type, " +
             "zkWard=rtrim(a.zk_ward),ward=(a.ward),a.latechb_flag,a.pret_flag,ledgerSn=a.times_billed, " +
             "admissStatus=rtrim(a.admiss_status), " +
             "dismissOrder=(select count(1) from yz_act_order y where y.inpatient_no=b.inpatient_no  " +
@@ -166,7 +167,7 @@ public interface PatientDao {
             "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes}")
     Integer getLedgerSn(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
 
-    @Update("update zy_actpatient set yb_register_date=#{ybRegisterDate},med_type=#{medType}," +
+    @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);

+ 3 - 1
src/main/java/thyyxxk/webserver/entity/yibao/patient/Patient.java

@@ -54,6 +54,9 @@ public class Patient {
     private Date zjdzDatetime; // 中间断账时间
     private Date dismissOrderDate; // 口腔科生成出院医嘱的出院时间
     private String medType;
+    private String medTypeName;
+    private String insutype;
+    private String insutypeName;
     private String admdvs;
     private String matnType; // 生育类别
     private String latechbFlag; // 是否晚育
@@ -61,7 +64,6 @@ public class Patient {
     private String mdtrtId;
     private Integer injuryArea; // 工伤归属地:1-长沙,2-望城,3-省直
     private String injurySerialNo;
-    private String responceTypeName;
     private String actIptDays; // 入院时间
     private String revokeRemark;
     /**

+ 4 - 1
src/main/java/thyyxxk/webserver/service/yibao/PatientService.java

@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 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.dao.his.yibao.PatientDao;
 import thyyxxk.webserver.dao.his.yibao.Routines;
@@ -56,6 +57,8 @@ public class PatientService {
         if (null == data) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有住院号【" + inpatientNo + "】的在院业务!");
         }
+        data.setMedTypeName(MedType.getName(data.getMedType()));
+        data.setInsutypeName(Insutype.getName(data.getInsutype()));
         if (null != data.getSocialNo() && data.getSocialNo().trim().length() == 18 && !data.getSocialNo().startsWith("K")) {
             try {
                 HuanZheFeiYong feiYongZhanBi = yiZhuLuRuDao.feiYongXinXi(data.getInpatientNo(), data.getAdmissTimes(), data.getLedgerSn());
@@ -172,13 +175,13 @@ public class PatientService {
         if (null == medType) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请选择患者的医疗类别!");
         }
-        param.getPatient().setResponceType(medType.getResponceType());
         String zyh = param.getPatient().getInpatientNo();
         int times = param.getPatient().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());