select * from HIS_GH_KSZS where JGID=? order by pkey //PKEY,KSPKEY,MC,ZJM,BM,QYBZ,ZSDZ,CJR,CJRQ,XGR,XGRQ,JGID,

12

select * from HIS_GH_KSZS where JGID=? order by pkey //PKEY,KSPKEY,MC,ZJM,BM,QYBZ,ZSDZ,CJR,CJRQ,XGR,XGRQ,JGID,

12

select * from HIS_GH_KSZS where JGID=? order by pkey //PKEY,KSPKEY,MC,ZJM,BM,QYBZ,ZSDZ,CJR,CJRQ,XGR,XGRQ,JGID,

12

select PKEY,TJFLNAME,XH,ZJM,CJR,CJRQ,JGID from HIS_TJ_TJFL where JGID=? order by xh RKEYJGID

12

select PKEY,TJFLBM,XMBM,XMMC,SFTC,CJR,CJRQ,JGID from HIS_TJ_TJFLMX where JGID=? and TJFLBM=? order by PKEY PKEYTJFLBMJGID
//PKEY,TJFLBM,XMBM,XMMC,SFTC,CJR,CJRQ,JGID

12

12

select RKEY,名称,描述,使用频率,是否有效,SMRCODE,SMRNAME,智业编码,PYM from 用药用法 RKEY
select 姓名,拼音简码,性别,国际,民族,生日,婚姻状况,职业,工作单位,出生地址,身份证号码,户口地址,联系电话,卡片编码,病历号,卡流水,CHOSCODE from 住院病案登记表 姓名卡片编码病历号
//姓名,拼音简码,性别,国际,民族,生日,婚姻状况,职业,工作单位,出生地址,身份证号码,户口地址,联系电话,卡片编码,病历号,卡流水,CHOSCODE
= ? and 处方时间 <= ?) a left join 门诊处方表 b on a.choscode =b.choscode and a.处方号=b.处方号 union all select '住院' lx,a.规格,a.单位,a.数量,a.价格,a.费用类别,a.住院号 就诊号,a.处方号,a.编码,a.名称,a.处方时间,a.金额,a.choscode,c.病人姓名,b.处方医生,to_char(b.处方科室) 处方科室 from (select 住院号,规格,单位,数量,价格,费用类别,处方号,编码,名称,处方时间,金额,choscode from 住院处方明细表 where 标志='0' and choscode=? and 处方时间 >= ? and 处方时间 <= ?) a left join 住院处方表 b on a.choscode =b.choscode and a.住院号=b.住院号 left join 住院登记表 c on a.choscode =c.choscode and a.住院号=c.住院号) order by 就诊号,处方号,处方时间]]> //LX,规格,单位,数量,价格,费用类别,就诊号,处方号,编码,名称,处方时间,金额,CHOSCODE,病人姓名,处方医生,处方科室

12

93

93

12

93

93

= ? and a.处方时间 <= ? and 1=? and (1=? or a.标志=?) and a.处方医生=? and (1=? or a.处方科室=?) and (1=? or a.费用类别=?) order by a.处方医生) union all select * from (select '住院' type,a.住院号 就诊号,a.处方时间,a.编码,a.名称,a.标志,a.金额,a.费用类别, a.处方医生 from 住院处方明细表 a left join 住院处方表 b on b.处方号 = a.处方号 and b.住院号 = a.住院号 and b.choscode = a.choscode left join 费用类别表 d on d.choscode = a.choscode and d.id = a.费用类别 where a.choscode = ? and a.处方时间 >= ? and a.处方时间 <= ? and 1=? and (1=? or a.标志=?) and a.处方医生=? and (1=? or a.处方科室=?) and (1=? or a.费用类别=?) order by a.处方医生) ) where 金额 > 0 ]]>

12

93

93

8

8

12

12

8

12

8

12

12

93

93

8

8

12

12

8

12

8

12