Dashboard Report with diagram help please?

85 views
Skip to first unread message

Docjay

unread,
May 8, 2014, 12:13:22 PM5/8/14
to dcm...@googlegroups.com
DCM4CHEE v2.17.2
MS SQL 2008

Hi,

   I'm looking to do a report in the dashboard to display the 'Total # of Exams Yesterday By Modality' as a 'Pie Chart' or any other chart with the following SQL code:

select COUNT(*) from dbo.study
where mods_in_study like '%CT%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%MR%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%CR%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
Union
select COUNT(*) from dbo.study
where mods_in_study like '%DX%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%US%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%PT%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%NM%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)
union
select COUNT(*) from dbo.study
where mods_in_study like '%MG%'
and study_datetime >= DATEADD(day, datediff(day,1,getdate()),0)
and study_datetime < DATEADD(day,datediff(day,0,getdate()),0)


I can get this to work only has a 'Line (1 numeric value), but I don't know what I need to give it so that there are more numeric values to display as 'Pie Chart' or any other chart listed as options.

Has anyone done any reports like this in DCM4CHEE's Dashboard? 

Any help would be appreciated!
Reply all
Reply to author
Forward
0 new messages