gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Statistics


From: Busser, Jim
Subject: Re: [Gnumed-devel] Statistics
Date: Fri, 8 Feb 2013 23:51:25 +0000

On 2013-02-08, at 3:00 PM, Karsten Hilbert <address@hidden> wrote:

> On Fri, Feb 08, 2013 at 02:28:31PM +0000, Vaibhav Banait wrote:
> 
>> How do I know how many patients I have seen in a day, month,
> 
> Which one ?   Or maybe you need to be a bit more specific
> which time ranges you want to aggregate and which you want
> to compare.
> 
>> or last year
> 
> select count(1)
> from dem.identity d_i
> where
>       d_i.pk in (
>               select fk_patient from clin.encounter
>               where
>                       fk_type in (select pk from clin.encounter_type where 
> description in ('list', 'of', 'interesting', 'types')
>                               and
>                       started between 'year-01-01' and 'year-12-31'
>       )
> ;

Will the above count an individual patient more than once, in the case where 
they had more than one encounter in the interval of interest (and thereby 
generating the 'volume' of patients seen, not distinct patients)?

-- Jim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]