select chosname,choscode,PHISUNITCODE from sysdicthospital where PHISUNITCODE is not null
select a.药品编码 XMDM,'0' PTZXDM,a.药品名称 XMMC,a.药品规格 XMGG,b.类别名称 XMFL,c.名称 XMDW,a.最近成本 XMDJ,'' ZGXJ,'1' JLZT,'' XMWSDM,b.JKPTLB SFXMLB,'0' YNZJBZ,'0' ZRCLBZ,'0' GHCBZ,'0' lb from 药品字典表 a
left join 费用类别表 b on a.choscode=b.choscode and a.费用归类=b.id
left join 项目单位表 c on a.choscode=c.choscode and a.计价单位=c.编号
where a.CHOSCODE=? and a.禁用标志='0' and a.JKPTSC='0'
union all
select a.项目编码 XMDM,'0' PTZXDM,a.项目名称 XMMC,'' XMGG,b.类别名称 XMFL,c.名称 XMDW,a.项目价格 XMDJ,'' ZGXJ,'1' JLZT,'' XMWSDM,b.JKPTLB SFXMLB,'0' YNZJBZ,'0' ZRCLBZ,'0' GHCBZ,'1' lb from 项目表 a
left join 费用类别表 b on a.choscode=b.choscode and a.费用类别=b.id
left join 项目单位表 c on a.choscode=c.choscode and a.项目单位=c.编号
where a.CHOSCODE=? and a.有效标志='1' and a.JKPTSC='0'
12
12
select a.项目编码,'0' PTZXDM,a.项目名称 XMMC,'' XMGG,c.名称 XMDW,a.项目价格 XMDJ,'' ZGXJ,'1' JLZT,a.CHOSCODE,a.JKPTSC2
from 项目表 a
left join 费用类别表 b on a.choscode=b.choscode and a.费用类别=b.id
left join 项目单位表 c on a.choscode=c.choscode and a.项目单位=c.编号
where a.CHOSCODE=? and a.有效标志='1' and a.JKPTSC2='0' and b.JKPTLB in ('02','03','04','06','07','08','09','10','11','18','19','21','22','23','24')
12
select a.CHOSCODE,a.JKPTSC2,a.药品编码,'0' PTZXDM,a.药品名称 CLMC,a.CLFL CLFLDM,c.名称 CLDW,'0' GZHCBZ,'0' YZBXBZ,'0' ZRWBZ,a.最近成本 JZJG,'' ZGXJ,'' GYSMC,'' GYSDM,'' SCPH,d.名称 SCCJMC,'' CD,'' SCRQ,''YXQ ,'1' JLZT from 药品字典表 a
left join 费用类别表 b on a.choscode=b.choscode and a.费用归类=b.id
left join 项目单位表 c on a.choscode=c.choscode and a.计价单位=c.编号
left join 供货单位 d on a.choscode=d.choscode and a.生产厂家=d.编号
where a.CHOSCODE=? and a.禁用标志='0' and a.JKPTSC2='0'and a.CLFL is not null
12
select distinct a.CHOSCODE,a.JKPTSC,a.RKEY,b.项目编码 SFXMDM,'0' LCXMPTZXDM,'0' SFXMPTZXDM,1 DYXMSL,'0' JLZT
from 大诊疗项目表 a
left join 大诊疗项目明细表 b on a.choscode=b.XMMX_CHOSCODE and a.RKEY=b.大诊疗项目ID
where a.choscode=? and a.JKPTSC='0' and b.项目编码 is not null
12
select a.type ZDLXDM,a.农合编码 YNZDDM,a.农合名称 YNZDMC,a.农合编码 PTZXDM,a.农合名称 PTZXMC,'1' JLZT
from 农合疾病表 a where a.type='0' or a.type='4'
select a.农合编码 YNSSDM,a.农合名称 YNSSMC,a.农合编码 PTZXDM,a.农合名称 PTZXMC,'1' JLZT
from 农合疾病表 a where a.type='6'
select NATY,INSUTYPE,EMP_NAME from HIS_YB_DJ_GD where JGID=? and KLS=? and rownum=1 order by CZSJ desc
12
12
12
93
select a.choscode,a.USERACCOUNT,a.JKPTSC,a.NAME XM,a.性别 Xb,'0000-00-00' CSRQ,'01' MZDM,'01' SFBSLBDM,a.证件号码 SFBSHM,a.所属科室 SSKS,b.名称 SSKSMC,b.PTKSDM SSZXKSDM,b.PTKSLB KSLB, '90' RYLB,'0' Ghzt,'2' BZQK,'0' SJTRYBZ,'1' GZZT,'2' PXLB,'0' SFNRQKYSPX
from 用户表 a
left join 科室表 b on a.choscode=b.choscode and a.所属科室=b.ID
where a.choscode=? and a.状态='1' and a.JKPTSC='0'
12
select a.choscode,a.PKEY,a.JKPTSC,a.设备号 YQBH,a.仪器名称 YQMC from 仪器设备登记 a where a.choscode=? and a.JKPTSC='0'
12
select a.choscode,a.ID,a.JKPTSC,a.名称 KSMC,a.PTKSDM WSJDM,a.PTKSDM SBJDM,'1' mzlx,'0' Ghzt,'0' ZYKSBZ from 科室表 a where a.choscode=? and a.JKPTSC='0'
12
select a.choscode,a.DOCTORBH,a.useraccount,a.name from 用户表 a where a.choscode=?
12
select a.choscode,a.ID,a.名称,a.PTKSDM from 科室表 a where a.choscode=?
12
12
93
12
12
12
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.CZSJ<=?]]>
12
93
select 编号,名称,cHosCode,PYM from 项目单位表 where cHosCode like ? order by 编号
12
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.CZSJ<=?]]>
12
93
select 'XY'||a.RKEY YZLSH,a.处方号 CFH,nvl(处方类型,'0') CFFLDM,'01' YZXMLXDM,'药品类医嘱' YZXMLXMC,a.药品编码 YZXMDM,a.药品名称 YZXMMC,'' FUXMYYDM,'' FUXMWUDM,'' FWXMDM,'' FWXMMC,'1' SFYP,yp.药品分类 YPLB,nvl(jx.V1,'99') YWJXDM,jx.dicdesc YWJXMC ,yp.剂型 YNYWJXDM,jx.dicdesc YNYWJXMC,yp.药品规格 YPGG, '99' YWLX,ml.HILIST_CODE YPDMYBBM,nvl(ml.YYBBM,ml.HILIST_CODE) YWDM,kcyp.生产批号 SCPH,kcyp.有效期至 YXQ,a.剂量 JL,a.单位 JLDW,a.数量 YWSYZSL,yf.SMRCODE YWSYTJDM,yf.SMRNAME YWSYTJMC,yf.RKEY YNYWSYTJDM,yf.名称 YNYWSYTJMC,pc.YBCODE YWSYPL,pc.值含义 YWSYPD,pc.值含义 YWSYPLMC,a.频次 YNYWSYPLDM,pc.频次名称 YNYWSYPLMC, a.单价 XMDJ,a.核算金额 XMJE,d.中草药煎法 ZCJZFDM,d.贴数 CYTS,a.皮试 PSPB from 门诊医嘱西中成处方明细表 a left join 门诊医嘱西中成处方表 d on a.choscode=d.choscode and a.卡流水=d.卡流水 and a.处方号=d.处方号 LEFT JOIN MAIN_YWDZ dz ON a.CHOSCODE = dz.JGID AND dz.LB='2' AND dz.BM='013' and a.药品编码 = dz.YSZ LEFT JOIN HIS_YB_ML_GD ml ON dz.DZZ = ml.HILIST_CODE left join 药品字典表 yp on a.choscode=yp.choscode and a.药品编码 = yp.药品编码 left join 字典表 jx on jx.DICGRPID = '1' and yp.剂型=jx.dicid left join 库存药品 kcyp on a.choscode=kcyp.choscode and a.药品编码 = kcyp.药品编号 and a.库存流水=kcyp.库存流水 left join 用药用法 yf on a.用法=yf.RKEY left join 用药频次 pc on a.频次=pc.RKEY where a.choscode=? and a.卡流水=? and a.门诊号=? and a.rkey in (select FEEDETL_SN from HIS_YB_SCMX_GD where JGID=? and MDTRT_ID=? and setl_id=?)
12
12
12
12
12
12
select 'JC'||a.RKEY YZLSH,a.处方号 CFH,'01' CFFLDM,'03' YZXMLXDM,'检验类医嘱' YZXMLXMC,a.检查项目编码 YZXMDM,a.检查项目名称 YZXMMC,a.检查项目编码 FUXMYYDM,nvl(ml.YYBBM,ml.HILIST_CODE) FUXMWUDM,ml.HILIST_CODE FWXMDM,ml.HILIST_NAME FWXMMC,'0' SFYP,'' YPLB,'99' YWJXDM,'' YWJXMC,'' YNYWJXDM,'' YNYWJXMC, '-' YWLX,a.单价 XMDJ,a.核算金额 XMJE,'0' PSPB,a.单位 YWSYZSLDW,a.数量 YWSYZSL from 门诊医嘱辅助检查明细表 a left join 门诊医嘱辅助检查表 d on a.choscode=d.choscode and a.卡流水=d.卡流水 and a.处方号=d.处方号 LEFT JOIN MAIN_YWDZ dz ON a.CHOSCODE = dz.JGID AND dz.LB='2' AND dz.BM='013' and a.检查项目编码 = dz.YSZ LEFT JOIN HIS_YB_ML_GD ml ON dz.DZZ = ml.HILIST_CODE where nvl(a.是否作废,'0')='0' and a.choscode=? and a.卡流水=? and a.门诊号=? and a.rkey in (select FEEDETL_SN from HIS_YB_SCMX_GD where JGID=? and MDTRT_ID=? and setl_id=?)
12
12
12
12
12
12
select 'JZ'||a.RKEY YZLSH,a.处方号 CFH,'01' CFFLDM,'07' YZXMLXDM,'嘱托医嘱' YZXMLXMC,a.项目代码 YZXMDM,a.项目名称 YZXMMC,a.项目代码 FUXMYYDM,nvl(ml.YYBBM,ml.HILIST_CODE) FUXMWUDM,ml.HILIST_CODE FWXMDM,ml.HILIST_NAME FWXMMC,'0' SFYP,'' YPLB,'99' YWJXDM,'' YWJXMC,'' YNYWJXDM,'' YNYWJXMC, '-' YWLX,a.单价 XMDJ,a.金额 XMJE,'0' PSPB,a.单位 YWSYZSLDW,a.数量 YWSYZSL from 门诊医嘱科室记账表 a left join 项目表 b on a.choscode=b.choscode and a.项目代码=b.项目编码 LEFT JOIN MAIN_YWDZ dz ON a.CHOSCODE = dz.JGID AND dz.LB='2' AND dz.BM='013' and a.项目代码 = dz.YSZ LEFT JOIN HIS_YB_ML_GD ml ON dz.DZZ = ml.HILIST_CODE where a.choscode=? and a.卡流水=? and a.门诊号=? and a.rkey in (select FEEDETL_SN from HIS_YB_SCMX_GD where JGID=? and MDTRT_ID=? and setl_id=?)
12
12
12
12
12
12
select PKEY,JGID,PTBM,COL1,COL2,COL3,PTSCZT from JKPTSC where 1=2
select nvl(b.JKPTLB,'15') FYLB,sum(A.DET_ITEM_FEE_SUMAMT) fyzje from HIS_YB_SCMX_GD A left join ( select '0' lb,ypzdb.choscode,ypzdb.药品编码 bm,ypzdb.费用归类 fylb from 药品字典表 ypzdb union all select '1' lb,xmb.choscode,xmb.项目编码 bm,xmb.费用类别 fylb from 项目表 xmb) ypxm on a.JGID=ypxm.choscode and ypxm.lb=a.XMYP and a.MEDINS_LIST_CODG=ypxm.bm left join 费用类别表 b on ypxm.choscode=b.choscode and ypxm.fylb=b.ID where a.ZT='0' and a.JGID=? and a.MDTRT_ID=? and a.setl_id=? group by nvl(b.JKPTLB,'15')
12
12
12
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.CZSJ<=? ]]>
12
93
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.CZSJ<=? ]]>
12
93
select e.PKEY||b.自动编码 pkey,b.处方号 CFH,fy.JKPTLB MXFYLB,b.标志 MXXMLB,e.MEDINS_LIST_CODG MXXMBM,e.MED_LIST_CODG MXXMYBBM,e.MEDINS_LIST_NAME MXXMMC,b.规格 MXXMGG,b.单位 MXXMDW, b.价格 MXXMDJ,b.数量 MXXMSL,b.金额 MXXMJE,kc.生产批号 SCPH,kc.有效期至 YXQ
from HIS_YB_SCMX_GD e
left join 门诊处方明细表 b on e.JGID=b.choscode and b.关联ID=e.feedetl_sn and e.MEDINS_LIST_CODG=b.编码
left join 库存药品 kc on b.药品辅助编码 = to_char(kc.库存流水) and b.choscode = kc.choscode and b.标志='0'
left join 费用类别表 fy on b.choscode=fy.choscode and b.费用类别=fy.ID
where e.JGID=? and e.MDTRT_ID=? and e.SETL_ID=? and e.ZT='0' and b.kls=? and b.自动编码 is not null
12
12
12
12
select DICGRPID,DICID,DICDESC,医保对应 from 字典表 where DICGRPID = '5' order by DICID asc
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.检验时间<=?]]>
12
93
select mdtrt_id from his_yb_dj_gd where JGID=? and IPT_NO=? and KLS=? and DJCXZT='0' order by CZSJ desc
12
12
12
select 组合项目,组合项目名称 from 检验项目申请表 where choscode=? and 条码号=?
12
12
=to_date('2022-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.检验时间<=?]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.登记时间<=?]]>
12
93
select rkey,农合编码,农合名称,农合简写,疾病类型,YIBAODUIZHAO,SFDBZ,TYPE from 农合疾病表
select NATY,INSUTYPE,EMP_NAME from HIS_YB_DJ_GD where JGID=? and JZLX=? and IPT_NO=?
12
12
12
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.出院时间<=?]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.登记时间<=?]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.出院时间<=? and to_char(a.出院时间,'yyyymmdd')!=to_char(a.登记时间,'yyyymmdd')]]>
12
93
select dz.YSZ,dz.DZZ,ml.HILIST_NAME from MAIN_YWDZ dz
LEFT JOIN HIS_YB_ML_GD ml ON dz.DZZ = ml.HILIST_CODE
where dz.JGID=? and dz.LB='2' AND dz.BM='013'
12
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.出院时间<=? and yz.医嘱状态 in ('1','2','3','7')
]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?]]>
12
93
select a.自动编码 SFMXID,a.退费ID,a.核算科室 ZXKSBM,fy.JKPTLB MXFYLB,a.标志 MXXMLB,a.处方时间 STFSJ,a.编码 MXXMBM,a.名称 MXXMMC,kc.生产批号 SCPH,kc.有效期至 YXQ,
a.规格 MXXMGG,a.单位 MXXMDW,a.价格 MXXMDJ,a.数量 MXXMSL,a.金额 MXXMJE
from 住院处方明细表 a
left join 费用类别表 fy on a.choscode=fy.choscode and a.费用类别=fy.ID
left join 库存药品 kc on a.药品辅助编码 = to_char(kc.库存流水) and a.choscode = kc.choscode and a.标志='0'
where a.choscode=? and a.ZYLSH=? and a.JSDJLSH=? and mxsb='1'
12
12
12
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.处方时间<=?]]>
12
93
=to_date('2022-05-25 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.出院时间<=?]]>
12
93
select a.项目编码,b.JKPTLB
from 项目表 a
left join 费用类别表 b on a.choscode=b.choscode and a.费用类别=b.ID
where a.choscode=?
12
=to_date('2022-06-11 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?
and zd.ICD10 is not null]]>
12
93
=to_date('2022-06-11 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.出院时间<=? ]]>
12
93
=to_date('2022-06-11 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=? ]]>
12
93
select YLJGDM,PTBM,YWKSSJ,YWJSSJ,YCZSL,MXSJSCBZ,MJ,TBRQ,XGBZ,SCZT,SJBZ,TJBZ,SCZSL,JYZT,PCH from TJ_SJL_JLHZ where YLJGDM like ? and PTBM=? and PCH like ?
12
12
12
=to_date('2022-06-22 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?
]]>
12
93
=to_date('2022-06-22 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?
]]>
12
93
=to_date('2022-06-22 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?
]]>
12
93
=to_date('2022-06-22 00:00:00','yyyy-mm-dd hh24:mi:ss') and c.CZSJ<=?
]]>
12
93