Ver código fonte

修复病案首页相关问题。

lighter 3 anos atrás
pai
commit
e1eebb64a4

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/yibao/DictionaryDao.java

@@ -42,4 +42,8 @@ public interface DictionaryDao {
 
     @Select("select code, name from t_zd_injury_disease where ${method} like #{content} collate Chinese_PRC_CI_AS")
     List<PureCodeName> selectInjuryDssDiagForFrontSheet(@Param("method") String method, @Param("content") String content);
+
+    @Select("select med_type from t_si_pat_info with(nolock ) where pat_no=#{patNo} and times=#{times} " +
+            "and mdtrt_id is not null order by ledger_sn desc")
+    String selectAccurateMedType(@Param("patNo") String patNo, @Param("times") int times);
 }

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/dictionary/SearchDataParam.java

@@ -6,6 +6,8 @@ import javax.validation.constraints.NotBlank;
 
 @Data
 public class SearchDataParam {
+    private String patNo;
+    private Integer times;
     @NotBlank(message = "查询方式不能为空")
     private String method;
     @NotBlank(message = "查询目标不能为空")

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

@@ -123,7 +123,7 @@ public class VerifyCaseFrontSheet {
         if (StringUtil.invalidValue(info.getHkPlaceName())) {
             array.add(new PureCodeName("hkPlaceName","患者户口地址不能为空!"));
         }
-        if (info.getInsutype().equals(Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES.getCode())) {
+        if (Objects.equals(info.getInsutype(), Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES.getCode())) {
             if (StringUtil.isBlank(info.getUnitName()) || StringUtil.isBlank(info.getUnitPlace())) {
                 array.add(new PureCodeName("unitName","患者工作单位及地址不能为空!"));
             }

+ 8 - 3
src/main/java/thyyxxk/webserver/service/yibao/DictionaryService.java

@@ -11,9 +11,10 @@ import thyyxxk.webserver.entity.dictionary.PureCodeName;
 import thyyxxk.webserver.entity.dictionary.SearchDataParam;
 import thyyxxk.webserver.entity.medicalinsurance.inpatient.SpecialDiag;
 import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
 
-import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 
 /**
  * @author dj
@@ -128,8 +129,12 @@ public class DictionaryService {
 
     public ResultVo<List<PureCodeName>> searchYbDiag(SearchDataParam param) {
         ResultVo<List<PureCodeName>> res;
-//        if (param.getMedType().equals(MedType.SELF_PAY.getCode())) {
-//        }
+        if (Objects.equals(MedType.SELF_PAY.getCode(), param.getMedType())) {
+            String medType = dao.selectAccurateMedType(param.getPatNo(), param.getTimes());
+            if (StringUtil.notBlank(medType)) {
+                param.setMedType(medType);
+            }
+        }
         if (param.getMedType().equals(MedType.MATERNITY_HOSPITALIZATION.getCode())) {
             res = getMaternDiagsForFrontSheet(param);
         } else if (param.getMedType().equals(MedType.SINGLE_DISEASE_HOSPITALIZATION.getCode())) {