瀏覽代碼

出院后也能看到检验报告

lighter 1 年之前
父節點
當前提交
785a92fce1
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/main/java/thyyxxk/wxservice_server/dao/InspectionsDao.java

+ 5 - 4
src/main/java/thyyxxk/wxservice_server/dao/InspectionsDao.java

@@ -19,10 +19,11 @@ public interface InspectionsDao {
     /**
      * 通过门诊号获取住院号
      * */
-    @Select("select rtrim(inpatient_no) from zy_actpatient with(nolock) where inpatient_no=(select max(inpatient_no) " +
-            "from a_patient_mi with(nolock) where a_patient_mi.mz_no=#{patientId}) and  inpatient_no not like 'S%' and " +
-            "inpatient_no not like 'JT%' and inpatient_no not like '%$%' ")
-    String selectInpatientNo(@Param("patientId") String patientId);
+    @Select("select rtrim(a.inpatient_no) from a_patient_mi a,mz_patient_mi b " +
+            "where upper(a.social_no)=upper(b.social_no) and b.patient_id=#{patientId} " +
+            "and a.inpatient_no not like 'S%' and a.inpatient_no not like 'JT%' " +
+            "and a.inpatient_no not like '%$%'")
+    List<String> selectInpatientNo(@Param("patientId") String patientId);
 
     @Select("select distinct rtrim(tj_no) from mz_patient_mi with(nolock) where social_no=#{socialNo}")
     List<String> selectTjNos(@Param("socialNo") String socialNo);