I believe that this was corrected in a subsequent version. Take a look
at version 5 of the code:
(https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/March_2015_Quality_Query_3_27_2015v5.sql)
-TM
On 4/1/2015 1:50 PM, Munns, Michael B wrote:
I was working on it. I do have a question on inserts. So far the
changes are minimal.
They select from a gpc_active_patients table which is not in this
script, just the q1_2015_gpc_active_patients. Is gpc_active_patients
the correct table for the inserts and if so where is the creation
script for it?
Michael Munns
Database Analyst
402-559-3821
*From:*[email protected]
[mailto:[email protected]] *On Behalf Of *Phillip Reeder
*Sent:* Tuesday, March 31, 2015 4:10 PM
*To:* Tom Mish; [email protected]
*Subject:* Re: Q1 2015 Quality Query
Has anyone re-written the queries for Oracle?
Phillip
*From: *Tom Mish <[email protected] <mailto:[email protected]>>
*Date: *Wednesday, March 25, 2015 at 8:53 AM
*To: *"[email protected] <mailto:[email protected]>"
<[email protected] <mailto:[email protected]>>
*Subject: *Q1 2015 Quality Query
Everyone,
We releasing the Q1 2015 quality query to the public
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql>
for everyone to try their hand at it. The results of the run should be
a file suitable for eventual import into the InCommons REDCap database.
Line
1
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L1>
2
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L2>
3
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L3>
//* NOTES:/
4
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L4>
/*All together there are over 300 variables. When it was possible to
use a concept path, the GPC standard was use. Those paths/
5
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L5>
/were identified by finding the relevant terms in the "GPC" folders of
Babel, running queries with them, and extracting the/
6
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L6>
/concept path from the Item Key noted in the XML Message History. When
a term was not found in babel, the concept code was/
7
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L7>
/used instead./
8
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L8>
9
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L9>
/*If your organization does not use the paths listed there is a risk
of getting "Divide by Zero" errors when running the/
10
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L10>
/script, as some of the denominator calculations may result in a zero.
Most importantly, this may happen when creating the/
11
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L11>
/table of patient identifiers in the GPC_OBESITY_ACTIVE_PATIENTS
table. Otherwise the list below includes the variables/
12
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L12>
/where this can occur:/
13
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L13>
14
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L14>
/obesity_enc_type_per_AV/
15
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L15>
/obesity_enc_type_per_ED/
16
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L16>
/obesity_enc_type_per_IP/
17
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L17>
/obesity_enc_type_per_NI/
18
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L18>
/obesity_enc_type_per_IS/
19
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L19>
/obesity_enc_type_per_OT/
20
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L20>
/obesity_enc_type_per_OA/
21
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L21>
/obesity_enc_type_per_UN/
22
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L22>
/obesity_enc_type_num_UM/
23
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L23>
/obesity_per_wv_ICD9CM_V20.1_2/
24
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L24>
/obesity_per_wv_ICD9CM_V20.3X/
25
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L25>
/obesity_per_wv_ICD9CM_V22.X/
26
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L26>
/obesity_per_wv_ICD9CM_V24.X/
27
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L27>
/obesity_per_wv_ICD9CM_V70.X/
28
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L28>
29
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L29>
/*This script was written for a Netezza database, and may need to be
configured for Oracle or MS SQL/
30
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L30>
31
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L31>
/*Each measure is it's own insert statement. The insert statement
inserts a variable name followed by/
32
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L32>
/the variable's query result. It was constructed this way to allow for
ease of import into a REDCap database./
33
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L33>
*34
<https://informatics.gpcnetwork.org/trac/Project/attachment/ticket/238/Q1_2015_Quality_Query_3_24_2015.sql#L34>*
*/*The "record_id" variable requires the manual entry of your
organization's abbreviation/*
Instructions for it's use are included inline in the comments of the
code. Pay attention to line 34. Please use the Dan Conolly standard
abbreviation^TM for your site as found in the GPC-DEV weekly notes. ;-)
------------------------------------------------------------------------
*UT**Southwestern*
Medical Center
The future of medicine, today.
The information in this e-mail may be privileged and confidential,
intended only for the use of the addressee(s) above. Any unauthorized
use or disclosure of this information is prohibited. If you have
received this e-mail by mistake, please delete it and immediately
contact the sender.
_______________________________________________
Gpc-dev mailing list
[email protected]
http://listserv.kumc.edu/mailman/listinfo/gpc-dev