5 Replies Latest reply on Apr 9, 2013 9:30 AM by Stephen Brown

# COUNT the number of patients who were discharged before 11am by nursing unit

I am making a graph that displays the ranking of hospital nursing units for those that can discharge 50% of their patients before 11am.   I wrote a calculated field Count(DATEPART('hour', [TIME OF DAY]) <11 but I am not getting the right results.  It gives the wrong percentages.  Not sure where to begin?

• ###### 1. Re: COUNT the number of patients who were discharged before 11am by nursing unit

Hi Stephen

You just need a little change of your perspective

Depending on your data you could be counting the before 11 discharges as:

IF DATEPART('hour', [TIME OF DAY]) <11 THEN 1 ELSE 0 END

That should give you the number of discharges (If you only have one row per patient :-) )

Hope it helps

//Peter

1 of 1 people found this helpful
• ###### 2. Re: COUNT the number of patients who were discharged before 11am by nursing unit

Peter;

Thanks - that got me back on the right track.

The data displays as two panes (horizontal bars) - one on the left is the number of discharges before 11 and the other is the total of all discharges.  The next step is to display the percentage of number of discharges before 11 compared to all discharges.  I tried analysis...percentage of...row and row in pane - but its giving me either 100% of both panes or the percentage is incorrect.  I stumbled onto the correct answer briefly but have been unable to duplicate since.   Any ideas?

• ###### 3. Re: COUNT the number of patients who were discharged before 11am by nursing unit

See the attached - similar

Again, there is an assumption that there is only one row per event

There's a quick table calculation on sum(number of records)

1 of 1 people found this helpful
• ###### 4. Re: COUNT the number of patients who were discharged before 11am by nursing unit

Hi Stephen

I'm writing from my mobile so I can't see the wiz that Alex did.

Create a New calc with [before 11]/[number of rows] and format it as pct it should give the calc you are looking for.

Just don't filter on the time of day (because that is aleeady done in the before 11-calc but it should work fine when used with day or day of week etc.

• ###### 5. Re: COUNT the number of patients who were discharged before 11am by nursing unit

Thanks Alex - my apology for not responding sooner.  This was helpful.