@ActivePatCount

For users or potential users.

@ActivePatCount

Postby ddddd » Sat Sep 01, 2018 8:07 am

Am running a Query

The following is in the Query:
@ActivePatCount

Its parameters are what?

I assume it is patients seen during a time range. Does the time range vary?

D
ddddd
 
Posts: 1
Joined: Sat Sep 01, 2018 8:04 am

Re: @ActivePatCount

Postby Tom Zaccaria » Mon Sep 03, 2018 2:58 am

This will give you the number of patients that visited at least one time over the last 18 months.
For a longer or shorter time in the past change the '....interval 18 month;' to what ever you want.

/*22 Count patients seen in last 18 months*/
Set @FromDate = curdate()-interval 18 month;
set @ToDate = Curdate();
SELECT COUNT(DISTINCT PatNum) FROM procedurelog
WHERE ProcStatus=2
AND ProcDate Between @FromDate and @ToDate

drtmz
Tom Zaccaria
 
Posts: 249
Joined: Mon Feb 25, 2008 4:09 am


Return to Main Forum

Who is online

Users browsing this forum: No registered users and 11 guests

cron