功能需求 #3626
已关闭重大阳性报表制作
描述
使用通用报表功能,SQL 书写条件不支持,下面为SQl的具体参数
问题为,我们表里存储结果为string类型,转换成浮点类型判断结果不准确,需要程序单独处理,建议制作一个单独界面
SELECT top 1234
do.OrderCode,
do.CardNum 体检卡号,
do.unitname 单位名称,
fjl.*,
--'检验' 类别,
--fjl.RptSubItemName + ':' + fjl.ExamValue '阳性结果',
--'' 描述,
fjl.RptTime 结果时间
FROM
DD_Order do WITH ( nolock )
LEFT JOIN FJ_RptSubItemRstLis fjl WITH ( nolock ) ON do.ordercode = fjl.OrderCode
WHERE
fjl.ResultType = 'H'
and ( RptSubItemCode='90073' and (ExamValue>'200' or ExamValue<'100'))
OR ( RptSubItemCode='90072' and (ExamValue>'20' or ExamValue<'2' ))
OR ( RptSubItemCode='90083' and (ExamValue>'500' or ExamValue<'80' ))
OR ( RptSubItemCode='90115' and ExamValue>'120')
OR ( RptSubItemCode='90116' and ExamValue>'120' )
OR ( RptSubItemCode='90129' and ExamValue>'5' )
OR ( RptSubItemCode='90131' and ExamValue>'4.9')
OR ( RptSubItemCode='90128' and ExamValue>'7.2')
OR ( RptSubItemCode='90133' and ExamValue>'10' )
OR ( RptSubItemCode='90126' and ExamValue>'200' )
OR ( RptSubItemCode='G0184' and (ExamValue >'10' and ExamValue not like '%>' or ExamValue not like '<%'))
OR ( RptSubItemCode='90232' and ResultType='H' )
OR ( RptSubItemCode='90234' and ResultType='H' )
OR ( RptSubItemCode='90233' and ResultType='H' )
OR ( RptSubItemCode='90873' and ResultType='H' )
OR ( RptSubItemCode='98258' and ResultType='H' )
OR ( RptSubItemCode='98260' and ResultType='H' )
OR ( RptSubItemCode='98259' and ResultType='H' )
OR ( RptSubItemCode='90239' and ResultType='H' )
OR ( RptSubItemCode='90663' and ResultType='H' )
OR ( RptSubItemCode='90241' and ResultType='H' )
OR ( RptSubItemCode='90243' and ResultType='H' )
OR ( RptSubItemCode='90236' and ResultType='H' )
OR ( RptSubItemCode='90201' and ExamValue>'600' )
OR ( RptSubItemCode='97168' and ExamValue>'0.5' )
OR ( RptSubItemCode='90138' and ResultType='H' )
OR ( RptSubItemCode='91428' and (CHARINDEX>0 or CHARINDEX>0 ))
OR ( RptSubItemCode='90169' and ExamValue>'6.5' )
OR ( RptSubItemCode='98630' and ExamValue>'3' )
OR ( RptSubItemCode='90170' and ExamValue>'150' )
OR ( RptSubItemCode='90155' and ExamValue>'25' )
OR ( RptSubItemCode='90157' and ExamValue>'10' )
OR ( RptSubItemCode='90158' and ExamValue>'32' )
OR ( RptSubItemCode='90159' and ExamValue>'1000')
OR ( RptSubItemCode='90872' and ExamValue>'2.5' )
文件