Преглед на файлове

查询门特时,从mz_patient_mi获取就诊次数。

lighter преди 4 години
родител
ревизия
f022f93d9e

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/markmtfees/MarkMtFeesDao.java

@@ -13,7 +13,7 @@ public interface MarkMtFeesDao {
     @Select("select rtrim(social_no) from mz_patient_mi where patient_id=#{patientId}")
     String selectSocialNoByPatientId(@Param("patientId") String patientId);
 
-    @Select("select max(times) from mz_visit_table where patient_id=#{patientId}")
+    @Select("select times from mz_patient_mi where patient_id=#{patientId}")
     Integer selectMaxTimes(@Param("patientId") String patientId);
 
     @Select("select phone_no from mz_patient_mi where patient_id=#{patientId}")

+ 6 - 6
src/main/java/thyyxxk/webserver/service/markmtfees/MarkMtFeesService.java

@@ -91,12 +91,12 @@ public class MarkMtFeesService {
         }
         if (ResponceType.HUNAN_PROVINCIAL_MEDICAL_INSURANCE.equals(param.getResponceType())) {
             Map<String, Object> hnsybRet = FilterUtil.cast(map.get("data"));
-            List<Map<String, String>> spinfos = FilterUtil.cast(hnsybRet.get("spinfo"));
-            Map<String, String> spinfo = spinfos.get(0);
-            String icd = spinfo.get("icd");
-            String serialApply = spinfo.get("serial_apply");
-            spinfos = FilterUtil.cast(hnsybRet.get("personinfo"));
-            String balance = spinfos.get(0).get("last_balance");
+            List<Map<String, String>> spInfos = FilterUtil.cast(hnsybRet.get("spinfo"));
+            Map<String, String> spInfo = spInfos.get(0);
+            String icd = spInfo.get("icd");
+            String serialApply = spInfo.get("serial_apply");
+            spInfos = FilterUtil.cast(hnsybRet.get("personinfo"));
+            String balance = spInfos.get(0).get("last_balance");
             dao.insertHnsybMtPartInfo(patientId, times, icd, balance, serialApply);
             return ResultVoUtil.success(data);
         }