select A.YYID00, A.PBHBID, A.MZZYBZ, A.ZYGHID, A.YJDJH0, A.YYH000, A.BRID00, A.BRXM00, A.BRDH00, A.KMH000, A.ICKH00, A.YJKSBH, A.YJKSMC, A.YYLB00, A.YYRQ00, A.YYSJ00, A.YYZT00, A.YYYGBH, A.YYYGXM, A.SQKSBH, A.SQKSMC, A.DJRQ00, A.DJSJ00, A.QXRQ00, A.QXSJ00, A.BZ0000, A.JZBZ00, A.ZTBZ00, A.ZLXMID, A.BWMC00, A.KFBZ00, A.JCZYSX, A.LBMC00, A.JKYYH0, A.SFZH00, A.BRXB00, A.XMWHID, A.JTXMID, A.JTXMMC, A.YYSD00, A.JCSQDH, A.DYCS00, A.WXFSBZ, B.ZLXMJC, decode(A.YYZT00, '0', '已预约', '1', '已预约', '2', '取消预约') YYZTMC, decode(B.XMZT00, '0', '申请', '1', '计价', '2', '已收费', '3', '已执行', '4', '已报告', '5', '疑退', '6', '作废') XMZTMC, B.KDRQ00, B.KDSJ00, B.KDKSBH, (select BMMC00 from BM_BMBM00 where BMBH00 = B.KDKSBH and rownum = 1) KDKSMC, B.KDYSXM, decode(b.xmzt00, '4', '已报告', decode((select 1 from spacs.exam_item e where exam_no in (select f.exam_no from spacs.exams f where e.exam_no = f.exam_no and exam_status >= '10') and e.apply_no = to_char(b.yjdjh0) and rownum = 1), 1, '已检查', '未检查')) JCZTMC, decode((select 1 from yj_yw0000 where cxdjh0 = b.yjdjh0 and sfdjh0 > 0 and zyghid = b.zyghid and rownum = 1), 1, '已退费', '') TFZTMC, (select BMMC00 from BM_BMBM00 where BMBH00 = C.DQBQ00) BQMC00, (select BMMC00 from BM_BMBM00 where BMBH00 = C.DQKS00) KSMC00, B.YJKSBH, (select BMMC00 from BM_BMBM00 where BMBH00 = B.YJKSBH and rownum = 1) YJKSMC, C.ZYH000 ZYHGHH, sf_xt_csrqtonl(C.CSRQ00) BRNL00, C.RYCWH0 CH0000, B.SFDJH0, (select jcqzysx from BM_ZLZD00 where zlxmbh like 'Z005%' and jcqzysx is not null and zlxmid = b.zlxmid) jcqzysx, (select YYJCDZ from vw_yj_jcyydy where JCSQDH = A.JCSQDH and rownum = 1) yyjcdz, (select YYDBT0 from vw_yj_jcyydy where JCSQDH = A.JCSQDH and rownum = 1) yydbt0 from YJ_YYBRB0 A, YJ_YW0000 B, ZY_BRXXB0 C where A.YJDJH0 = B.YJDJH0 and A.ZYGHID = C.ZYID00 and A.MZZYBZ = '1' and B.KDRQ00 >= '20211101' and B.KDRQ00 <= '20211124' and B.XMZT00 = '4' and A.ZYGHID in (6146083)