|
@@ -210,9 +210,16 @@ public interface UpIdCollectionDao {
|
|
|
|
|
|
// 这里是 住院诊断消息
|
|
|
@Select("select si_diag_type as diag_type, " +
|
|
|
- " rtrim(dis_diag) as diag_code, " +
|
|
|
- " rtrim(dis_diag_comment) as diag_name " +
|
|
|
- "from ${tableName} " +
|
|
|
+ "case\n" +
|
|
|
+ " when yb_code is null then rtrim(dis_diag)\n" +
|
|
|
+ " else rtrim(yb_code)\n" +
|
|
|
+ " end diag_code," +
|
|
|
+ "case\n" +
|
|
|
+ " when yb_name is null then rtrim(dis_diag_comment)\n" +
|
|
|
+ " else rtrim(yb_name)\n" +
|
|
|
+ " end diag_name " +
|
|
|
+ " from ${tableName} left join " +
|
|
|
+ " zd_icd_code_new on (dis_diag = code) " +
|
|
|
"where inpatient_no = #{patNo} and admiss_times = #{times} " +
|
|
|
"order by dis_diag_no ")
|
|
|
List<DiseinfoUpld> diseinfo(@Param("patNo") String patNo, @Param("times") Integer times, @Param("tableName") String tableName);
|