# HG changeset patch # User Schmit # Date 1725786479 -28800 # Node ID be9328b4ea2d33159493999de1a6188aa8b6820a # Parent 82daac2d2ee35ee9924c00b0b3ff58f78abb979b Up:运营情况汇总; Fix:Clear initial commit diff -r 82daac2d2ee3 -r be9328b4ea2d README.md --- a/README.md Sun Sep 08 08:57:17 2024 +0000 +++ b/README.md Sun Sep 08 17:07:59 2024 +0800 @@ -1,93 +1,1 @@ -# BLT-XML - - - -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://foss.nnsui.com/hiss/blt-xml -git branch -M branch/default -git push -uf origin branch/default -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](http://foss.nnsui.com/hiss/blt-xml/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README - -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +病历通HIS报表模板文件 \ No newline at end of file diff -r 82daac2d2ee3 -r be9328b4ea2d ehis.ͳ.Ӫҵ.Ӫ.XML --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ehis.ͳ.Ӫҵ.Ӫ.XML Sun Sep 08 17:07:59 2024 +0800 @@ -0,0 +1,359 @@ + + +运营情况汇总 + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 then 'false' else 'true' end aaa from #t + ]]> + + + + + + + + + + + + + + + + + + + + + + + + 0 then cast(mzjs.总金额/mzcf.处方总数 as decimal(10,2)) else null end 列4值 + from #jg jg + left join #mzcf mzcf on jg.机构ID=mzcf.机构ID + left join #mzjs mzjs on jg.机构ID=mzjs.机构ID + union all + select + '门诊情况' 分类,'自费人次' 列1,mzjs.自费人次 列1值,'医保人次' 列2,cast(mzjs.医保人次 as nvarchar(10)) 列2值, + '普通门诊数' 列3,mzjs.普通门诊人次 列3值,'特病人次' 列4,mzjs.特病人次 列4值 + from #jg jg + left join #mzjs mzjs on jg.机构ID=mzjs.机构ID + union all + select + '住院情况' 分类,'入院总人数' 列1,ry.入院总人数 列1值,'当前在院总人数' 列2,cast(zy.在院总人数 as nvarchar(10)) 列2值, + '出院总人数' 列3,cy.出院总人数 列3值,'结算总人数' 列4,zyjs.结算总人数 列4值 + from #jg jg + left join #ry ry on jg.机构ID=ry.机构ID + left join #cy cy on jg.机构ID=cy.机构ID + left join #zyjs zyjs on jg.机构ID=zyjs.机构ID + left join #zy zy on jg.机构ID=zy.机构ID + union all + select + '住院情况' 分类,'结算金额' 列1,zyjs.结算金额 列1值,'职工金额' 列2,cast(zyjs.职工金额 as nvarchar(10)) 列2值, + '居民金额' 列3,zyjs.居民金额 列3值,'自费金额' 列4,zyjs.自费金额 列4值 + from #jg jg + left join #zyjs zyjs on jg.机构ID=zyjs.机构ID + union all + select + '住院情况' 分类,'预交收入' 列1,zyyj.预交收入 列1值,'药品收入' 列2,cast(zycf.药品收入 as nvarchar(10)) 列2值, + '诊疗收入' 列3,zycf.诊疗收入 列3值,'医院承担' 列4,zyjs.医院承担 列4值 + from #jg jg + left join #zyjs zyjs on jg.机构ID=zyjs.机构ID + left join #zyyj zyyj on jg.机构ID=zyyj.机构ID + left join #zycf zycf on jg.机构ID=zycf.机构ID + union all + select null,'',null,'工作量情况(医院实际工','作量情况,与结算','数据无关)',null,null,null + union all + select + null,'总费用',t.总金额,'药品金额',cast(t.药品金额 as nvarchar(10)) ,'诊疗金额',t.诊疗金额,null,null + from #gzl t + union all + select null,'',null,'各项收入项目费用情况','(结算数据)','',null,null,null + union all + select + null,a.收入项目,a.金额,b.收入项目,cast(b.金额 as nvarchar(10)) ,c.收入项目,c.金额,d.收入项目,d.金额 + from #a a + left join #b b on a.px+1=b.px + left join #c c on a.px+2=c.px + left join #d d on a.px+3=d.px + union all + select null, '合计' ,sum(t.金额),null,null,null,null,null,null + from #srxm t + ) t + ]]> + + + + '门诊挂号' + group by js.结算机构ID + + + select + js.结算机构ID 机构ID, + sum(case when zffs.名称='现金' then zf.支付金额 else null end) 现金支付, + sum(case when zffs.名称!='现金' then zf.支付金额 else null end) 其他支付 + into #mzzf + from opc_记录_结算 js + inner join opc_记录 jl on js.记录ID=jl.记录ID + inner join opc_记录_结算_支付 zf on js.结算ID=zf.结算ID + inner join bas_支付方式 zffs on zf.支付方式ID=zffs.支付方式ID + where js.结算时间 between ${时间_START} and ${时间_END} and js.结算机构ID=${统计机构} + and jl.处方来源<>'门诊挂号' + group by js.结算机构ID + + + --cf + select + js.结算机构ID 机构ID, + count(distinct fymx.处方ID) 处方总数, + sum(case when xm.类别ID in ('5','6','7','8') then mx.金额 else null end) 药品金额, + sum(case when xm.类别ID not in ('5','6','7','8') then mx.金额 else null end) 诊疗金额 + into #mzcf + from opc_记录_明细 mx + inner join opc_记录_结算 js on mx.结算ID=js.结算ID + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + left join opd_处方_医嘱_费用 fymx on mx.医嘱明细ID=fymx.明细ID + where js.结算时间 between ${时间_START} and ${时间_END} AND js.结算机构ID=${统计机构} + group by js.结算机构ID + + --住院 + select jl.登记机构ID 机构ID, count(1) 入院总人数 into #ry + from ihm_记录 jl + where jl.入院时间 between ${时间_START} and ${时间_END} AND 登记机构ID=${统计机构} + group by jl.登记机构ID + + select + jl.登记机构ID 机构ID, + count(1) 在院总人数 + into #zy + from ihm_记录 jl + where jl.状态 in ('在床','待分') + group by jl.登记机构ID + + + + select + jl.登记机构ID 机构ID, count(1) 出院总人数 into #cy + from ihm_记录 jl + where jl.出院时间 between ${时间_START} and ${时间_END} + group by jl.登记机构ID + + select js.结算机构ID 机构ID,count(distinct 记录ID) 结算总人数, + sum(js.金额) 结算金额, + sum(case when ybjs.险种类型='310' then js.金额 else null end) 职工金额, + sum(case when ybjs.险种类型='390' then js.金额 else null end) 居民金额, + sum(case when ybjs.结算ID is null then js.金额 else null end) 自费金额, + sum(js.医院承担) 医院承担 + into #zyjs + from ihm_记录_结算 js + left join yb_就诊结算记录 ybjs on js.结算ID=ybjs.结算ID AND js.结算机构ID=${统计机构} + where js.结算时间 between ${时间_START} and ${时间_END} + group by js.结算机构ID + + select + yj.登记机构ID 机构ID, + sum(yj.金额) 预交收入 + into #zyyj + from ihm_记录_预交 yj + where yj.收费时间 between ${时间_START} and ${时间_END} and yj.登记机构ID=${统计机构} + group by yj.登记机构ID + + select js.结算机构ID 机构ID, + sum(case when xm.类别ID in ('5','6','7','8') then case when js.状态='作废' then -mx.金额 else mx.金额 end else null end) 药品收入, + sum(case when xm.类别ID not in ('5','6','7','8') then case when js.状态='作废' then -mx.金额 else mx.金额 end else null end) 诊疗收入 + into #zycf + from ihm_记录_结算 js + inner join ihm_记录_结算_明细 jsmx on js.结算ID=jsmx.结算ID + inner join ihm_记录_明细 mx on jsmx.明细ID=mx.明细ID + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + where js.结算时间 between ${时间_START} and ${时间_END} and js.结算机构ID=${统计机构} + group by js.结算机构ID + + + select + sum(case when xm.类别ID in ('5','6','7','8') then mx.金额 else null end) 药品金额, + sum(case when xm.类别ID not in ('5','6','7','8') then mx.金额 else null end) 诊疗金额, + sum(mx.金额) 总金额 into #mx + from opc_记录_明细 mx + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + where mx.登记时间 between ${时间_START} and ${时间_END} and mx.登记机构ID=${统计机构} + union all + select + sum(case when xm.类别ID in ('5','6','7','8') then mx.金额 else null end) 药品金额, + sum(case when xm.类别ID not in ('5','6','7','8') then mx.金额 else null end) 诊疗金额, + sum(mx.金额) 总金额 + from ihm_记录_明细 mx + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + where mx.登记时间 between ${时间_START} and ${时间_END} and mx.登记机构ID=${统计机构} + + select + sum(t.总金额) 总金额, + sum(t.药品金额) 药品金额, + sum(t.诊疗金额) 诊疗金额 + into #gzl + from #mx t + + + select + js.结算机构ID, + xm.收入项目, + sum(mx.金额) 金额 into #srxmmx + from opc_记录_结算 js + inner join opc_记录_明细 mx on js.结算ID=mx.结算ID + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + where js.结算时间 between ${时间_START} and ${时间_END} and js.结算机构ID=${统计机构} + group by js.结算机构ID,xm.收入项目 + union all + select + js.结算机构ID, + xm.收入项目, + sum(case when js.状态='作废' then -mx.金额 else mx.金额 end) 金额 + from ihm_记录_结算 js + inner join ihm_记录_结算_明细 jsmx on js.结算ID=jsmx.结算ID + inner join ihm_记录_明细 mx on jsmx.明细ID=mx.明细ID + inner join bas_收费项目 xm on mx.项目ID=xm.项目ID + where js.结算时间 between ${时间_START} and ${时间_END} and js.结算机构ID=${统计机构} + group by js.结算机构ID,xm.收入项目 + + + + select + t.结算机构ID,t.收入项目,sum(t.金额) 金额, + ROW_NUMBER()over(order by t.收入项目) px into #srxm + from #srxmmx t + group by t.结算机构ID,t.收入项目 + + select 收入项目,金额,px into #a from #srxm t where t.px%4=1 + select 收入项目,金额,px into #b from #srxm t where t.px%4=2 + select 收入项目,金额,px into #c from #srxm t where t.px%4=3 + select 收入项目,金额,px into #d from #srxm t where t.px%4=0 + + + select jg.机构ID into #jg + from bas_机构 jg + where jg.机构ID=${统计机构} + + ]]> + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file