码迷,mamicode.com
首页 > 其他好文 > 详细

中医病案首页

时间:2017-08-04 16:12:49      阅读:429      评论:0      收藏:0      [点我收藏+]

标签:诊断   中医   where   and   信息   nbsp   lis   语句   单元   

每个单元对应的sql的语句信息

select a.jbdm,a.mszd,b.icd9 from ys_zy_jbzd a
left outer join gy_jbbm b on a.jbdm=b.jbxh where a.zxlb = 1 and a.tjbz=1 and a.zfbz<>1 and a.jbzh = 1 and a.znxh = 1 and a.zdlb=‘门(急)诊诊断‘ and a.jzhm = 17663
union
select a.jbdm,a.mszd,c.jbdm from ys_zy_jbzd a
left outer join EMR_ZYJB c on a.jbdm=c.jbbs where a.zxlb = 2 and a.tjbz=1 and a.zfbz<>1 and a.jbzh = 1 and a.znxh = 1 and a.zdlb=‘门(急)诊诊断‘ and a.jzhm = 17663

--select ys_zy_jbzd_list(17663) from dual

 

、------------------------------------------------------------

select * from zy_brry where zyhm = 201716231;
select * from ys_zy_jbzd where jzhm = 17663 and zdlb = ‘门(急)诊诊断‘ and zfbz = 0 and tjbz = 1 ;
SELECT * FROM GY_JBBM WHERE JBXH = --108091

SELECT * FROM EMR_ZYJB WHERE JBBS = ‘40268‘

SELECT * FROM YS_ZY_JZJL
LEFT OUTER JOIN (SELECT JZHM, MSZD MJZZD FROM YS_ZY_JBZD WHERE TJBZ = 1 AND ZFBZ <> 1
AND ZDLB = ‘门(急)诊诊断‘ AND ZXLB = 1 AND JBZH = ‘1‘ AND ZNXH = 1) MJZ ON YS_ZY_JZJL.JZHM = MJZ.JZHM
LEFT OUTER JOIN (SELECT JZHM, MSZD MJZZDZY FROM YS_ZY_JBZD WHERE TJBZ = 1 AND ZFBZ <> 1
AND ZDLB = ‘门(急)诊诊断‘ AND ZXLB = 2 AND JBZH = ‘1‘ AND ZNXH = 1) MJZ ON YS_ZY_JZJL.JZHM = MJZ.JZHM
LEFT OUTER JOIN (SELECT JZHM, MSZD RYZD, QZSJ RYQZRQ FROM YS_ZY_JBZD WHERE TJBZ = 1 AND ZFBZ <> 1 AND ZDLB = ‘入院诊断‘

AND ZXLB = 1 AND JBZH = ‘1‘ AND ZNXH = 1) RY ON YS_ZY_JZJL.JZHM = RY.JZHM WHERE (YS_ZY_JZJL.JZHM = 17663)

 

 


--{PatientID}

中医病案首页

标签:诊断   中医   where   and   信息   nbsp   lis   语句   单元   

原文地址:http://www.cnblogs.com/thomasbc/p/7285445.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!