项目

一般

简介

实施 #1588

(收费管理科)审计局统计药品这块数据,门诊和住院绩效数据和东软彭建军整理的报表相差几百万,收费管理科要求查明原因

彭银生 13979856157大约一年 之前添加. 更新于 将近 1 年 之前.

状态:
已解决
优先级:
普通
开始日期:
2023-05-18
计划完成日期:
% 完成:

0%

预期时间:

描述

--彭银生统计
select * from
(select 门诊或住院,项目,费用类别, 单价,sum(数量) 数量,sum(总价) 总价 from (
select '门诊' 门诊或住院,kk.item_name 项目,(select aa.name from com_dictionary aa where aa.type ='MINFEE' and aa.code =kk.fee_code) 费用类别,kk.unit_price 单价,ROUND(kk.qty/kk.pack_qty,4) 数量,kk.own_cost 总价 from fin_opb_feedetail kk where kk.PAY_FLAG ='1'
and kk.fee_date between TO_DATE('2022/01/1 0:00:00','yyyy-mm-dd hh24:mi:ss') and TO_DATE('2022/12/31 23:59:59','yyyy-mm-dd hh24:mi:ss')
union all
select '住院' 门诊或住院,a.drug_name 项目,(select aa.name from com_dictionary aa where aa.type ='MINFEE' and aa.code =a.fee_code) 费用类别,a.unit_price 单价,a.qty 数量,a.tot_cost 总价 from fin_ipb_medicinelist a --药品明细
where a.fee_date between TO_DATE('2022/01/1 0:00:00','yyyy-mm-dd hh24:mi:ss') and TO_DATE('2022/12/31 23:59:59','yyyy-mm-dd hh24:mi:ss')
union all
select '住院' 门诊或住院,t.item_name 项目,(select aa.name from com_dictionary aa where aa.type ='MINFEE' and aa.code =t.fee_code) 费用类别,t.unit_price 单价,t.qty 数量,t.tot_cost 总价 from fin_ipb_itemlist t
where t.fee_date between TO_DATE('2022/01/1 0:00:00','yyyy-mm-dd hh24:mi:ss') and TO_DATE('2022/12/31 23:59:59','yyyy-mm-dd hh24:mi:ss')
)mm group by 门诊或住院,项目,费用类别, 单价,数量,总价
) hh where hh.费用类别 in ('西药费')
--in ('中草药费','西药费','中成药费')

--东软彭建军整理的报表
select m.科室,m.费用1,m.金额1 from v_2022审计数据 m where m.费用1='西药费'
union all
select m.科室,m.费用2,m.金额2 from v_2022审计数据 m where m.费用2='西药费'
union all
select m.科室,m.费用3,m.金额3 from v_2022审计数据 m where m.费用3='西药费'


文件

彭银生统计.png (56.2 KB) 彭银生统计.png 彭银生 13979856157, 2023-05-18 14:38
彭建军统计报表.png (38.6 KB) 彭建军统计报表.png 彭银生 13979856157, 2023-05-18 14:38
住院绩效--改革办.png (544 KB) 住院绩效--改革办.png 彭银生 13979856157, 2023-05-19 09:28
门诊绩效--改革办.png (496 KB) 门诊绩效--改革办.png 彭银生 13979856157, 2023-05-19 09:28

历史记录

#2

彭银生 13979856157 更新于 大约一年 之前

  • 主题(收费管理科)审计局统计药品这块数据,彭银生写的语句中数据和东软彭建军整理的报表相差几百万,收费管理科要求查明原因 变更为 (收费管理科)审计局统计药品这块数据,门诊和住院绩效数据和东软彭建军整理的报表相差几百万,收费管理科要求查明原因

--门诊
select 门诊或住院,项目,费用类别, 单价,sum(数量) 数量,sum(总价) 总价 from (
select '门诊' 门诊或住院,t.item_name 项目,'西药费' 费用类别,t.unit_price 单价,ROUND(t.qty/t.pack_qty,4) 数量,t.own_cost 总价
from fin_opb_feedetail t,FIN_COM_FEECODESTAT X,com_dictionary xx,dawn_org_dept xxx,dawn_org_empl y,dawn_org_dept a
where t.fee_code=x.fee_code()
and t.doct_dept=xxx.dept_id(
)
and x.report_code='MZ02'
and t.fee_code=xx.code()
and t.doct_code=y.empl_id(
)
and xx.type='MINFEE'
and t.EXEC_DPCD=a.dept_id
--and t.cancel_flag not in ('0','3')
and t.fee_cpcd not in ( '500999')
-- and t.doct_code not in ('100999','300999')
and x.fee_stat_name ='西药费' and t.fee_date between TO_DATE('2022/1/1 0:00:00','yyyy-mm-dd hh24:mi:ss') and TO_DATE('2022/12/31 23:59:59','yyyy-mm-dd hh24:mi:ss')
) mm group by 门诊或住院,项目,费用类别, 单价,数量,总价
--住院
select 门诊或住院,项目,费用类别, 单价,sum(数量) 数量,sum(总价) 总价 from (
select '住院' 门诊或住院,a1.drug_name 项目,'西药费' 费用类别,a1.unit_price 单价,a1.qty 数量,
a1.tot_cost 总价 from fin_ipb_medicinelist a1 inner join pha_com_baseinfo b on a1.drug_code=b.drug_code
where
a1.fee_date>= to_date('2022-01-01','yyyy-MM-dd') and a1.fee_date<to_date('2023-01-01','yyyy-MM-dd')
and b.fee_code='032'
and inhos_deptcode not in ('2031','3050')) mm group by 门诊或住院,项目,费用类别, 单价,数量,总价

#3

彭银生 13979856157 更新于 将近 1 年 之前

  • 状态新建 变更为 已解决

导出 Atom PDF