Selaa lähdekoodia

修复多次入院申请

DESKTOP-0GD05B0\Administrator 2 vuotta sitten
vanhempi
commit
d2f84560aa

+ 3 - 2
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/EmrPatientDao.java

@@ -126,7 +126,7 @@ public interface EmrPatientDao {
     List<String> getDocumentIdByPatietn(String patNo, int times, String categoryCode);
 
 
-    @Select("select rtrim(a.name)                                                                                          as xm, " +
+    @Select("select top 1 rtrim(a.name)                                                                                          as xm, " +
             "       dis_date                                                                                               as cysj, " +
             "       a.sex                                                                                                  as xb, " +
             "       (select DATEDIFF(yy, birth_date, GETDATE()) from a_patient_mi b where b.inpatient_no = a.inpatient_no) as nl, " +
@@ -152,7 +152,8 @@ public interface EmrPatientDao {
             "where a.inpatient_no = #{patNo} " +
             "  and admiss_times = #{times} " +
             "  and a.inpatient_no = b.inpatient_no " +
-            "  and b.mz_no = c.patient_id")
+            "  and b.mz_no = c.patient_id " +
+            "order by confirm_date desc")
     Map<String, String> drgPatientInfo(String patNo, int times, int ledgerSn);