住院报告查询增加字段
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
|
SET ANSI_NULLS ON
|
||||||
GO
|
GO
|
||||||
|
|
||||||
@ -9,17 +9,17 @@ GO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE VIEW [dbo].[web_getReportsList]
|
ALTER VIEW [dbo].[web_getReportsList]
|
||||||
AS
|
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,
|
----a.brdh,
|
||||||
--(case when a.brly = '1' then a.brdh else isnull(e.bz1,a.brdh) end ) 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,
|
--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,
|
--(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='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,
|
--(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='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,
|
--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
|
--z.yqmc,z.yqdl from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_instr z
|
||||||
@ -28,50 +28,33 @@ AS
|
|||||||
|
|
||||||
|
|
||||||
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,
|
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.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,
|
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,
|
(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='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,
|
(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='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,
|
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
|
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<>''
|
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||||
jgbz ='2'
|
jgbz ='2'
|
||||||
and a.brly='1' and c.sqh = a.sqh
|
and a.brly='1' and c.sqh = a.sqh
|
||||||
union all
|
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,
|
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,
|
--a.brdh,
|
||||||
isnull(e.bz1,e.brdh) brdh,e.cysj,e.zxsj,e.bbsjsj,e.jssj,a.confirmdt as confirmtime,
|
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,
|
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,
|
(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='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,
|
(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='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,
|
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
|
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<>''
|
where a.brxm<>'' and a.yq=z.yq and --a.jymd<>''
|
||||||
jgbz ='2'
|
jgbz ='2'
|
||||||
and a.brly<>'1'
|
and a.brly<>'1'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GO
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,5 +43,6 @@ public class Web_getReportsList {
|
|||||||
private Date bbsjsj;
|
private Date bbsjsj;
|
||||||
private Date jssj;
|
private Date jssj;
|
||||||
private Date confirmtime;
|
private Date confirmtime;
|
||||||
|
private String lisgroup;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user