Bundles and CDM
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Example / Default Value

Description

@site

DEMO (no default)

A short (e.g., 3-character) identifier for your site.

@LOOKBACK_YEARS

1

A number of years for lookback. The original algorithm used 1 year, but we have found 3- or 5-years are more accurate, because some preventative care like PSA and Pap Smears do not occur every year.

@DEMOGRAPHIC_FACTS

0

Set to 1 if demographic facts (e.g., age, sex) are stored in the fact table (rather than patient_dimension).

@GENDERED

0

Set to 1 to create a summary table (and cutoffs) that do not include male-only facts for female patients in the denominator and vice-versa.

@COHORT_FILTER

@cfilter (no default)

Specify a table variable of (PATIENT_NUM, COHORT_NAME) in the second parameter.

@OUTPUT

1

If 1, pretty-print the loyalty_dev_summary percentages after the run.


Simple Example

The following examples create a cohort filter of the first 1000 rows in patient_dimension, and computes the loyalty cohort with an index date of  and a one-year lookback.

...

  1. Execute the following statement on your database to print the output that can be shared: select * from loyalty_dev_summary where Summary_Description='PercentOfSubjects'

  2. This will create two tables on your db, DT_LOYALTY_RESULT (line level data with variables and score presented for each patient) and DT_LOYALTY_RESULT_SUMMARY (summary table).

Advanced Example

A cohort filter can be created from a patient set query in i2b2. Below is an example that looks up the cohort from a patient set query named "patient set test1" run by user "demouser".

...