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: Sat, 9 Feb 2013 15:55:14 +0000

> select count(1)
> from dem.identity d_i
> where
>       d_i.pk in (
>               select distinct 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'
>       )
> ;
> 
> Untested.

Tested using 'seen in clinic' in place of

        'list', 'of', 'interesting', 'types'

and by inputting date range '2012-01-01' and '2012-12-31'

… works

-- Jim


reply via email to

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