|
@@ -1023,4 +1023,36 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
|
|
|
Integer existCaseFrontsheetMain(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
@Select("select si_code from zd_country_code where code = #{code} ")
|
|
|
String getCountrySiCode(String code);
|
|
|
+ @Select("select top 1 1 from t_case_frontsheet_disdiag where bah=#{patNo} and times =#{times}")
|
|
|
+ Integer exisCaseSheetDis(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
+ @Select("select" +
|
|
|
+ " rtrim(bah) inpatient_no," +
|
|
|
+ " times admiss_times," +
|
|
|
+ " dis_diag_no=no," +
|
|
|
+ " case when yb_code is null then rtrim(t1.code) else rtrim(yb_code) end dis_diag," +
|
|
|
+ " case when yb_name is null then rtrim(t1.name) else rtrim(yb_name) end dis_diag_comment," +
|
|
|
+ " rtrim(op_id_code) op_id_code," +
|
|
|
+ " '1' si_diag_type," +
|
|
|
+ " case when admiss_status is not null then admiss_status else 1 end admiss_cond" +
|
|
|
+ " from t_case_frontsheet_disdiag t1 left join zd_icd_code_new t2 on (t1.code = t2.code)" +
|
|
|
+ " where bah=#{patNo} and times =#{times}" +
|
|
|
+ " order by dis_diag_no")
|
|
|
+ List<YbZyDisDiag> getCaseSheetDis(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
+ @Select("select rtrim(inpatient_no) inpatient_no,\n" +
|
|
|
+ " admiss_times,\n" +
|
|
|
+ " dis_diag_no,\n" +
|
|
|
+ " case when yb_code is null then rtrim(dis_diag) else rtrim(yb_code) end dis_diag,\n" +
|
|
|
+ " case when yb_name is null then rtrim(dis_diag_comment) else rtrim(yb_name) end dis_diag_comment,\n" +
|
|
|
+ " rtrim(op_id_code) op_id_code,\n" +
|
|
|
+ " dis_diag_date op_diag_date,\n" +
|
|
|
+ " dis_diag_status,\n" +
|
|
|
+ " dis_diag_type,\n" +
|
|
|
+ " '1' si_diag_type ,\n" +
|
|
|
+ " case when admiss_status is not null and admiss_status <>'' then cast(admiss_status as int) else 1 end admiss_cond\n" +
|
|
|
+ " from ba_first_page1 with (nolock)\n" +
|
|
|
+ " left join zd_icd_code_new on (dis_diag = code)\n" +
|
|
|
+ " where inpatient_no = #{patNo}" +
|
|
|
+ " and admiss_times = #{times}" +
|
|
|
+ " order by dis_diag_no ")
|
|
|
+ List<YbZyDisDiag> getBafirstPage1(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
}
|