Synapse Queries via: Reports > Query

Discussion in 'Documentation & Training Resources' started by Jason, Feb 7, 2012.

  1. Jason

    Jason Developer / Handyman Staff Member

    Synapse's Internal Queries

    Goal: obtain a list of women aged 35-75.

    This was the first query I performed.
    It was a list of female patients under age 120 (which was meant to generate a list of all women).
    Because Synapse requires you to but "something" in either the [Consults, Labs and Investigations, Metadata, or Vaccinations] - I used the Vaccinations Tab and said to include all women whom have not had Immune Globulin past today. (That is of course everyone, as I've never given Immune Globulin (90281).

    Synapse can query it's database via the Reports > Query Tab
    I used this to get a list of all the female patients in my practice.

    When I click [Preview]
    This was the SQL query displayed.

    select  first 2000  uid, dob, fnames, surname, conmethod from users where dob > '7-Mar-1892' and  gender = 'F' and  uid not in ( select patient from vaccinations where vdate >  '7-Feb-2012' and lotno in (select lotno from vaxlot where CVX = '90281') )
    From there I clicked [Search] - nothing appeared to be happening. A few minutes later (seemed like forever) ... the Query List populated .... (much to my surprise) ....


    The on the Action Tab ... I selected Export to Excel.

    An Excel File was generated.
    My goal was to generate a list of patients ages 35-75.
    So I used the age calculation above .... and got my list.

  2. Graham

    Graham Developer Staff Member

    Careful ... only do queries after hours as sometimes you can lock up firebird for a while... your "forever"

Share This Page