Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: heron_load/epic_view_constants.sql @ 0:42ad7288920a

heron-michigan tip
Last change on this file since 0:42ad7288920a was 0:42ad7288920a, checked in by Matt Hoag <mhoag@…>, 6 years ago

Merge with demo_concepts_3800

File size: 1.3 KB
Line 
1/* i2b2 constants need for epic view transform
2
3Copyright (c) 2013 University of Kansas Medical Center
4part of the HERON* open source codebase; see NOTICE file for license details.
5* http://informatics.kumc.edu/work/wiki/HERON
6
7Create constants for epic view transform.
8*/
9
10
11create or replace view discrete_fact_constants as
12select
13  '@' provider_id,
14  '@' valtype_cd, '@' tval_char, to_number(null) nval_num, null valueflag_cd, null units_cd,
15  null location_cd,
16  to_number(null) confidence_num
17from dual;
18
19
20/* To protect the privacy of patients over the HIPAA age group limit (90 years
21or older at the time of writing) the age reported in deidentified data should be
22capped. 
23
24Note that dates are again shifted up to a year during fact de-identification.
25
26See also:
27 - http://www.hhs.gov/ocr/privacy/hipaa/understanding/coveredentities/De-identification/guidance.htm
28 - https://bmi-work.kumc.edu/work/wiki/DeIdentificationStrategy
29*/
30
31create or replace view hipaa_constants as
32select
33  /* 90 years or older are in a protected category */
34  90 max_age_years,
35  /* Cap the de-identified age to 88 to make sure that even after shifting dates
36  by a random amount (as per de-identification strategy) patients will appear
37  <90 years old.
38  */
39  88 deid_age_cap_years,
40  -364 deid_date_shift_days
41from dual;
Note: See TracBrowser for help on using the repository browser.