住院报告查询增加字段
This commit is contained in:
parent
c6013d774e
commit
5bba275bae
@ -1,5 +1,5 @@
|
||||
|
||||
/****** Object: View [dbo].[web_getReportsList] Script Date: 11/14/2025 17:09:18 ******/
|
||||
/****** Object: View [dbo].[web_getReportsList] Script Date: 01/16/2026 09:44:41 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
@ -9,69 +9,52 @@ GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[web_getReportsList]
|
||||
AS
|
||||
ALTER VIEW [dbo].[web_getReportsList]
|
||||
AS
|
||||
|
||||
--select isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
--select isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
----a.brdh,
|
||||
--(case when a.brly = '1' then a.brdh else isnull(e.bz1,a.brdh) end ) brdh,
|
||||
--a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz,
|
||||
--(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl,
|
||||
--(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname,
|
||||
--(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname,
|
||||
--(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname,
|
||||
--(CASE WHEN a.brxb = '1' THEN '男' WHEN a.brxb = '2' THEN '女' ELSE '其他' END) as brxbname,
|
||||
--isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname,
|
||||
--isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname,
|
||||
--z.yqmc,z.yqdl from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_instr z
|
||||
--where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
--z.yqmc,z.yqdl from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_instr z
|
||||
--where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
-- jgbz ='2'
|
||||
|
||||
|
||||
select c.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
a.brdh,c.cysj,c.zxsj,c.bbsjsj,c.jssj,a.confirmdt as confirmtime,
|
||||
select c.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
a.brdh,c.cysj,c.zxsj,c.bbsjsj,c.jssj,a.confirmdt as confirmtime,
|
||||
|
||||
a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz,
|
||||
(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl,
|
||||
(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname,
|
||||
(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname,
|
||||
(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname,
|
||||
z.yqmc,z.yqdl,dysj from lab_pat a ,lab_instr z ,lab_reqmain c
|
||||
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
jgbz ='2'
|
||||
and a.brly='1' and c.sqh = a.sqh
|
||||
union all
|
||||
select e.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz,
|
||||
(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl,
|
||||
(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname,
|
||||
(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname,
|
||||
(CASE WHEN a.brxb = '1' THEN '男' WHEN a.brxb = '2' THEN '女' ELSE '其他' END) as brxbname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname,
|
||||
z.yqmc,z.yqdl,dysj,z.lisgroup from lab_pat a ,lab_instr z ,lab_reqmain c
|
||||
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
jgbz ='2'
|
||||
and a.brly='1' and c.sqh = a.sqh
|
||||
union all
|
||||
select e.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm,
|
||||
--a.brdh,
|
||||
isnull(e.bz1,e.brdh) brdh,e.cysj,e.zxsj,e.bbsjsj,e.jssj,a.confirmdt as confirmtime,
|
||||
a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz,
|
||||
(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl,
|
||||
(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname,
|
||||
(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname,
|
||||
(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname,
|
||||
z.yqmc,z.yqdl,a.dysj dysj from lab_pat a join lab_reqmain e on a.sqh=e.sqh,lab_instr z
|
||||
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
jgbz ='2'
|
||||
and a.brly<>'1'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
isnull(e.bz1,e.brdh) brdh,e.cysj,e.zxsj,e.bbsjsj,e.jssj,a.confirmdt as confirmtime,
|
||||
a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz,
|
||||
(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl,
|
||||
(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname,
|
||||
(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname,
|
||||
(CASE WHEN a.brxb = '1' THEN '男' WHEN a.brxb = '2' THEN '女' ELSE '其他' END) as brxbname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname,
|
||||
isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname,
|
||||
z.yqmc,z.yqdl,a.dysj dysj,z.lisgroup from lab_pat a join lab_reqmain e on a.sqh=e.sqh,lab_instr z
|
||||
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||
jgbz ='2'
|
||||
and a.brly<>'1'
|
||||
|
||||
|
||||
|
||||
@ -43,5 +43,6 @@ public class Web_getReportsList {
|
||||
private Date bbsjsj;
|
||||
private Date jssj;
|
||||
private Date confirmtime;
|
||||
private String lisgroup;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user