Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2050 commits
Select commit Hold shift + click to select a range
7f725f1
Update example prevalence query with relative time ranges
jonc101 Apr 25, 2020
ebb172b
Issue #29: Python 3 migration - WIP.
ynodir Apr 27, 2020
0de9c4a
Merge remote-tracking branch 'remotes/origin/master' into issue-29/py…
ynodir Apr 27, 2020
3127cae
Merge remote-tracking branch 'remotes/origin/master' into issue-29/py…
ynodir Apr 27, 2020
36fd117
Modified `CPOETrackerAnalysis` to not output extra newlines after eac…
ynodir Apr 27, 2020
facfdf5
Merge pull request #334 from HealthRex/issue-29/python3-migration
jonc101 Apr 27, 2020
17059a1
upload updates to lpch/shc
JonathanChiang Apr 28, 2020
a20e4a7
Merge branch 'master' of https://github.com/HealthRex/CDSS
JonathanChiang Apr 28, 2020
ad422bd
Issue #330: Fixed incorrectly counting other orders as discontinuatio…
ynodir May 4, 2020
7a10a8b
Merge pull request #335 from HealthRex/issue-330/order-discontinuatio…
jonc101 May 6, 2020
5432ed1
Create bootstrap.py
jonxwang May 7, 2020
99fa48a
Update README.md
jonxwang May 7, 2020
125c659
Update README.md
jonxwang May 7, 2020
7d802c2
Update README.md
jonxwang May 7, 2020
07e65d9
new_jupyter
May 8, 2020
9251d7b
Merge branch 'master' of https://github.com/HealthRex/CDSS
May 8, 2020
a7a0361
Update README.md
Yenaled May 18, 2020
c456e6b
moving folders to archive
May 18, 2020
df1bc2e
Additional web app setup notes for Windows compatibility of precompil…
jonc101 May 19, 2020
3be653c
Issue #29: Added sample httpd config for Apache 2.4 and Python 3.6.
ynodir May 19, 2020
824fcfc
update to allow export
lujonathanh May 20, 2020
f1e36e0
Consolidate unit test workshop sample code into a subdirectory and up…
jonc101 May 25, 2020
50390a1
Reorganize test module sample code to more clearly combine high level…
jonc101 May 25, 2020
b8e754f
Rework GoogleCloud dev environment workshop notes to streamline examples
jonc101 May 27, 2020
771aec7
Add bigquery DBUtil connection option
jonc101 May 27, 2020
41598ed
Comment out Google Cloud Project environment variables that may not b…
jonc101 May 27, 2020
596c21b
Update ExampleQueryApp for GoogleCloud database example instead of AW…
jonc101 May 27, 2020
4d2a03e
Add placeholder files to ensure empty log and results example folders…
jonc101 May 27, 2020
8a48880
Explain gzip file content streaming with examples, but simplify batch…
jonc101 May 27, 2020
5bb7dea
Notes on mass parallel process likely crashing the memory on tiny tes…
jonc101 May 27, 2020
c8b3e0a
Update notes on using SnapShots vs. Machine Images for storage space …
jonc101 May 27, 2020
705814d
Remove reference to std pipes, as not really addressed in this version
jonc101 May 27, 2020
99f4909
Merge pull request #336 from HealthRex/issue-29/add-python3-apache24-…
jonc101 May 27, 2020
f88f4d2
Hint on string punctuation stripping
jonc101 May 27, 2020
269d84e
Merge branch 'master' of https://github.com/HealthRex/CDSS
jonc101 May 27, 2020
b7e2b78
Copy in Priya Desai's intro notes for using STARR-OMOP databases
jonc101 May 28, 2020
3f6e98c
Updated notebook
lujonathanh Jun 6, 2020
157329f
Merge branch 'master' of https://github.com/HealthRex/CDSS
lujonathanh Jun 6, 2020
9a7bba9
Add git export script
lujonathanh Jun 6, 2020
d8203dc
Final fix
lujonathanh Jun 6, 2020
ec17c55
Move more (completed) project scripts to Archive that are no longer a…
jonc101 Jun 16, 2020
8a0a4bd
Draft power calculation example simulation workshop
jonc101 Jun 16, 2020
61796d0
Further testing with plotting functions over a range of simulation pa…
jonc101 Jun 17, 2020
af17b10
Add legend and sample plot figures of results over simulated parameters
jonc101 Jun 17, 2020
33c67fc
Update power calculation simulation workshop with iteration over many…
jonc101 Jun 18, 2020
04e150a
Examples of common table expressions and USING for joins
jonc101 Jun 18, 2020
fc4be4b
More plots of Power calculation ranges and effect of different sample…
jonc101 Jun 18, 2020
7d8ea81
Merge branch 'master' of http://github.com/HealthRex/CDSS
jonc101 Jun 18, 2020
dc202c4
Break out and example power calculation workshop with embedded concep…
jonc101 Jun 19, 2020
36349ca
Tweak guidance to not require RStudio and tips towards connecting thi…
jonc101 Jun 19, 2020
bafe12a
jupyternotebooks
Jun 23, 2020
fbc42b7
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jun 23, 2020
0cc3a75
`CDSS/stride` folder was moved to `CDSS/setup/stride` - so, updated `…
ynodir Jun 29, 2020
64f70a6
Fixed `test_build_report` test failure: `dict` type was being convert…
ynodir Jul 1, 2020
730e5c6
Merge pull request #346 from HealthRex/fmf/fix-stride-path-and-failin…
jonc101 Jul 1, 2020
12273fb
Update ReadMe.PHSDataAccess.txt
jonc101 Jul 3, 2020
a64aee0
Created SHC/LPCH conversion tutorial in `CDSS/setup` folder.
ynodir Jul 6, 2020
1c64b6b
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jul 6, 2020
0bb4b31
Merge pull request #348 from HealthRex/fix/conversion-and-phi-removal…
jonc101 Jul 16, 2020
2a25220
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jul 16, 2020
3d9b8c9
Add AHRQ CCSR data
jonc101 Jul 27, 2020
195ec84
Sample notes and queries for working with Optum on PHS servers
jonc101 Jul 28, 2020
d3dbc4e
Sample Truven MarketScan queries to pull out medication prescription …
jonc101 Jul 28, 2020
8a800fb
Add workspace for KFRE test project
jonc101 Jul 28, 2020
ac0ba94
testing out modifying github file# AUROC_initial code_AC.R
Jul 28, 2020
6b75e09
teting adding a file
Jul 28, 2020
6ac1ad7
Example of web scraper download and parser
jonc101 Jul 30, 2020
ca7560e
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jul 31, 2020
1764fc4
first commit AUROC
Jul 31, 2020
8945222
More example queries to pull out preliminary "Table 1" information fr…
jonc101 Aug 5, 2020
30eb9e5
outpatient automated ml
gracek012 Aug 6, 2020
1afae6a
piece of code somehow got deleted in previous version so readded that
gracek012 Aug 6, 2020
d98e8f3
Add ICD9-ICD10 GEMS code mapping tables
jonc101 Aug 8, 2020
429a28c
'Table 1' query samples for diabetic medicine patients and MACE outco…
jonc101 Aug 11, 2020
38cf084
Merge branch 'master' of https://github.com/HealthRex/CDSS
Aug 13, 2020
69a3f88
Example queries off STARR database for diabetes medication usage rates
jonc101 Aug 20, 2020
798a2b8
Add query by age range example
jonc101 Aug 21, 2020
a7b3a05
More Table 1 sample queries for second line diabetes meds in differen…
jonc101 Aug 23, 2020
45af34a
Merge branch 'master' of https://github.com/HealthRex/CDSS
Aug 31, 2020
0078b11
Adapt MarketScan sample queries to Medicare Supplemental file
jonc101 Aug 31, 2020
5d8b319
Merge pull request #356 from gracek012/master
jonc101 Sep 3, 2020
40767cc
Merge branch 'master' of https://github.com/HealthRex/CDSS
Sep 3, 2020
582b450
Add demographic subquery examples
jonc101 Sep 8, 2020
a893b62
Update notes on how to use PHS Redivis and Nero infrastructure for ge…
jonc101 Sep 8, 2020
680a3e3
Merge branch 'master' of https://github.com/HealthRex/CDSS
Sep 11, 2020
3302bc2
Update ReadMe.PHSDataAccess.txt
samson920 Sep 14, 2020
9241c42
Add some more illustrative examples to application code snub
jonc101 Sep 29, 2020
9ea3543
Update ReadMe.PHSDataAccess.txt
samson920 Oct 5, 2020
78b90d9
Merge branch 'master' of https://github.com/HealthRex/CDSS
Oct 9, 2020
60cf0fb
new folder
Oct 16, 2020
066cdac
reorganized
Oct 16, 2020
33e3a0d
indented
Oct 16, 2020
83cf4cd
Update ReadMe.PHSDataAccess.txt
samson920 Jan 10, 2021
0635c37
Update sample queries of outpatient referral counts based on Optum da…
jonc101 Jan 11, 2021
6c76f40
Add Hematology specific examples on new patient encounters, specialty…
jonc101 Jan 18, 2021
b2393a6
Add more notes / sample results on distribution of referral wait times
jonc101 Jan 19, 2021
3e84ba8
Create readme
ipwui Jan 21, 2021
2de8dbb
adding Recommender codes and notebooks
ipwui Jan 21, 2021
ab80190
Add an empty sandbox folder space to test Git and other functions
jonc101 Jan 29, 2021
a24cb24
Sample code to bootstrap estimate confidence intervals from a sample.
jonc101 Jan 29, 2021
b5d490b
Test commit message
jonc101 Jan 29, 2021
dbe2575
Test update file
jonc101 Jan 29, 2021
ae71a85
Update workshop notes on Google cloud and git testing
jonc101 Jan 29, 2021
7c49bf4
Merge branch 'master' of http://github.com/HealthRex/CDSS
jonc101 Jan 29, 2021
ee1ec2c
Test version conflict
jonc101 Jan 29, 2021
1ae8cbe
Merge branch 'master' of https://github.com/HealthRex/CDSS
jonc101 Jan 29, 2021
376f9fe
Layout skeleton for Git version control basic function testing
jonc101 Jan 29, 2021
738ef1b
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
7cee0cf
Update ReadMe.Git.BasicVersionControl.txt
jonc101 Jan 29, 2021
550650b
github workshop
conorkcorbin Jan 29, 2021
4c1b968
Merge branch 'master' of https://github.com/HealthRex/CDSS
conorkcorbin Jan 29, 2021
42e99ec
Reduce parallel batchDriver example so won't overload tiny test serve…
jonc101 Jan 29, 2021
0e5aede
Just remove conflicting file example for now. Merge branch 'master' o…
jonc101 Jan 29, 2021
7206b74
updated group sig files
conorkcorbin Jan 29, 2021
e897b0f
Merge branch 'master' of https://github.com/HealthRex/CDSS
conorkcorbin Jan 29, 2021
aee020b
updated group sig text files
conorkcorbin Jan 29, 2021
be02f6c
imposter
conorkcorbin Jan 29, 2021
25f5c1b
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
1253aa0
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
24d2bba
Wui signed
ipwui Jan 29, 2021
bb85041
edit while doing workshop
Jan 29, 2021
1a4602b
birju editing during workshop
Jan 29, 2021
083bb92
Rocky signature
raikens1 Jan 29, 2021
74726e6
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
3fc9161
birju edit Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
4c5eb44
Merge branch 'master' of https://github.com/HealthRex/CDSS
Jan 29, 2021
732e22e
mischeif
raikens1 Jan 29, 2021
e39e926
Merge branch 'master' of https://github.com/HealthRex/CDSS
raikens1 Jan 29, 2021
e7fea56
add a line in group 4
ipwui Jan 29, 2021
527d00d
merged conflicts for group 4
ipwui Jan 29, 2021
2c5b337
Update group_signature_1.txt
birjuspatel Jan 29, 2021
161de36
merge over imposter
Jan 29, 2021
03fbc84
Link to more GitHub workshops and clarify access controls for compute…
jonc101 Jan 30, 2021
cc96908
Remove debug print statement
jonc101 Feb 18, 2021
46ecad1
Sample queries for length of stay distribution for elective surgical …
jonc101 Mar 3, 2021
7d8764e
Merge branch 'master' of http://github.com/HealthRex/CDSS
jonc101 Mar 3, 2021
eba1ea2
Update proc_code to proc_id in sample queries so robust against missi…
jonc101 Mar 18, 2021
d2bd3fb
er infection project
conorkcorbin Apr 23, 2021
b117493
deleted old files
ipwui Apr 26, 2021
31d1736
removed old files
ipwui Apr 26, 2021
19f15f2
added new files
ipwui Apr 26, 2021
94786da
Bump rsa from 4.0 to 4.7 in /scripts/GoogleCloud/BQ
dependabot[bot] Apr 30, 2021
a730449
Bump rsa in /scripts/DevWorkshop/GoogleCloudPlatform/moreExamples
dependabot[bot] Apr 30, 2021
bb6fe5a
Compress large data file to minimize repository space need
jonc101 May 15, 2021
f95bf69
Bump urllib3 from 1.24.2 to 1.26.5 in /scripts/GoogleCloud/BQ
dependabot[bot] Jun 1, 2021
1d17619
Bump urllib3 in /scripts/DevWorkshop/GoogleCloudPlatform/moreExamples
dependabot[bot] Jun 2, 2021
fec0900
Update ReadMe.GoogleCloudDevEnvironment.txt
jonc101 Jun 2, 2021
c408534
update to not infected rules and UTI cohorts
conorkcorbin Jun 11, 2021
c4085ce
gitignore csv's for infection projection
conorkcorbin Jun 11, 2021
f903c08
infection mit dataset
conorkcorbin Jun 12, 2021
5e6ef01
add model classes
conorkcorbin Jun 12, 2021
f9e4cd3
ensembled models + linear programming for mit
conorkcorbin Jun 14, 2021
639ab88
sweep fig generation
conorkcorbin Jun 15, 2021
e74bda0
update sweep plot figs with shading
conorkcorbin Jun 17, 2021
faf740c
update sweep plots and add perm test code
conorkcorbin Jun 18, 2021
723b780
sweep plots about ready, prescription distr
conorkcorbin Jun 19, 2021
702780b
update sweep plots
conorkcorbin Jun 24, 2021
a166612
most of demo
conorkcorbin Aug 8, 2021
5df8b04
Finalize demo and include a readme
conorkcorbin Aug 9, 2021
f7e7397
Finalize demo
conorkcorbin Aug 9, 2021
0ac4f9d
Finalize demo
conorkcorbin Aug 9, 2021
66d354c
Sample EConsult SmartText content for Endocrinology
jonc101 Aug 12, 2021
bba28bb
Delete EConsult.SmartText.Endrocrinology.txt
jonc101 Aug 12, 2021
4bcc74d
Sample EConsult SmartText for Endocrinology
jonc101 Aug 12, 2021
45581b1
Add note about bigquery storage dependency
jonc101 Sep 28, 2021
ec6b8eb
update key info
laubravo Sep 28, 2021
058bc95
Add pyarrow dependency
jonc101 Sep 28, 2021
fe38746
Merge pull request #375 from laubravo/patch-1
jonc101 Sep 28, 2021
0e742e4
Merge pull request #373 from HealthRex/dependabot/pip/scripts/DevWork…
jonc101 Sep 29, 2021
9ea488c
Merge pull request #372 from HealthRex/dependabot/pip/scripts/GoogleC…
jonc101 Sep 29, 2021
9aad1f6
Merge pull request #370 from HealthRex/dependabot/pip/scripts/DevWork…
jonc101 Sep 29, 2021
d070cd6
Merge pull request #369 from HealthRex/dependabot/pip/scripts/GoogleC…
jonc101 Sep 29, 2021
a2964fb
More notes on GOOGLE_APPLICATION_CREDENTIALS method and pyarrow depen…
jonc101 Sep 29, 2021
713b887
Point to Application Default Credentials page as more relevant than e…
jonc101 Sep 29, 2021
e90d41f
colorblind friendly sweep plots
conorkcorbin Sep 29, 2021
b00d974
Merge branch 'master' of https://github.com/HealthRex/CDSS
conorkcorbin Sep 29, 2021
11c3f2d
adding a little extra doc to feature binning procedure
conorkcorbin Sep 29, 2021
3676b56
queries used to deterine KFRE referral gaps on STARR data
wangmagg Oct 4, 2021
e03d27a
Merge branch 'master' of https://github.com/HealthRex/CDSS
wangmagg Oct 4, 2021
e0543bd
Patch histogram query for length of stay variability
jonc101 Oct 12, 2021
cfc2ebc
Generalize labeling to be any admission cohort, not necessarily surgery
jonc101 Oct 12, 2021
a9e6626
Break out length of stay summary stats by provider and allow for hist…
jonc101 Oct 13, 2021
6f285d3
Add files via upload
naveedrabbanimd Nov 11, 2021
075f99b
Delete scripts/LabUtil directory
naveedrabbanimd Nov 11, 2021
cd7affb
Add files via upload
naveedrabbanimd Nov 11, 2021
874008e
Add files via upload
naveedrabbanimd Nov 11, 2021
43bdd7d
uti labelling
conorkcorbin Jan 6, 2022
ad7b2dd
hematology rotation project
laubravo Jan 10, 2022
46c2376
Note on access error messages
jonc101 Jan 14, 2022
a02ab34
Extra reminder note about IPv4 vs IPv6 connection quirk.
jonc101 Jan 14, 2022
74eeb7a
Create ReadMe.Common.Common.Troubleshooting
sajjadfouladvand Jan 19, 2022
b7d073b
Rename ReadMe.Common.Common.Troubleshooting to ReadMe.Common.Troubles…
sajjadfouladvand Jan 19, 2022
9ab646a
Update ReadMe.Common.Troubleshooting
sajjadfouladvand Jan 19, 2022
9f73329
Update ReadMe.GoogleCloud-BigQuery-VPC.txt
sajjadfouladvand Jan 20, 2022
1721925
Update ReadMe.GoogleCloud-BigQuery-VPC.txt
sajjadfouladvand Jan 20, 2022
c5e10c0
Delete ReadMe.Common.Troubleshooting
sajjadfouladvand Jan 20, 2022
bc8698b
Update ReadMe.PHSDataAccess.txt
sajjadfouladvand Jan 20, 2022
d359fa9
Update ReadMe.GoogleCloud-BigQuery-VPC.txt
sajjadfouladvand Jan 20, 2022
1ebd887
Update ReadMe.GoogleCloud-BigQuery-VPC.txt
sajjadfouladvand Jan 20, 2022
0a73b56
Update ReadMe.PHSDataAccess.txt
sajjadfouladvand Jan 20, 2022
f406631
Advise consolidating against common repo instead of everyone creating…
jonc101 Jan 25, 2022
3f28e3f
uti labelling cohort update + clean up
conorkcorbin Feb 3, 2022
de4a61e
Create she_core_2021_guide
sajjadfouladvand Feb 7, 2022
a1d793e
Update and rename she_core_2021_guide to lpch_core_2021_guide
sajjadfouladvand Feb 7, 2022
0eccdae
Updated LPCH_core_2021 manual
sajjadfouladvand Feb 7, 2022
2241dfb
Update lpch_core_2021_guide
sajjadfouladvand Feb 7, 2022
3934e2e
Rename lpch_core_2021_guide to lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
5b6debe
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
1024ca1
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
0bfd5a9
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
0babeeb
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
bf39e56
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
0caebc5
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
d717bff
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
d4dd2db
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 7, 2022
33de9c8
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 8, 2022
62db662
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 8, 2022
76b626a
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 8, 2022
cc725ac
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 8, 2022
ec0c276
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 8, 2022
69aaf04
Update ReadMe.GoogleCloud-BigQuery-VPC.txt
sajjadfouladvand Feb 10, 2022
d11c024
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 15, 2022
db88868
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 22, 2022
97e7d58
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 22, 2022
308e4b4
Update lpch_core_2021_guide.MD
sajjadfouladvand Feb 22, 2022
f49d6de
prediction workshop
conorkcorbin Feb 25, 2022
b0c6700
prediction workshop
conorkcorbin Feb 25, 2022
48e2a0c
predictive modelling workshop
conorkcorbin Feb 25, 2022
41e40c0
predictive modelling workshop solution
conorkcorbin Mar 1, 2022
372059b
fix type conversion issue
conorkcorbin Mar 2, 2022
6be3669
Add hint on string replace functions
jonc101 Mar 4, 2022
1fb8cca
Add a little more hint scaffold for addinga unit test
jonc101 Mar 4, 2022
9fdb724
More notes on testing Fibonacci function from command-line to reveal
jonc101 Mar 4, 2022
545ac77
Quick sample queries for substance use / psychiatry clinic notes with…
jonc101 Mar 7, 2022
08148a3
Skeleton for outpatient specialty order lists
jonc101 Mar 7, 2022
7ebcdd3
Expand out queries to pull out common orders for different new patien…
jonc101 Mar 7, 2022
49bec63
Add rate calculations into order counts
jonc101 Mar 7, 2022
3a651ad
Screen out rare (<10) items per specialty diagnosis correction. (Prev…
jonc101 Mar 7, 2022
524f60c
Create orderser_stats.sql
sajjadfouladvand Mar 8, 2022
f230b88
simple antibiogram query
conorkcorbin Mar 16, 2022
6057548
Extracting frequent meds
sajjadfouladvand Mar 21, 2022
2800031
Merge branch 'master' of https://github.com/HealthRex/CDSS
sajjadfouladvand Mar 21, 2022
6223541
Update lpch_core_2021_guide.MD
sajjadfouladvand Mar 25, 2022
975ef4c
Update StarterNotes.txt
sajjadfouladvand Apr 8, 2022
41a746c
Add files via upload
naveedrabbanimd Apr 27, 2022
b98dd44
Update lpch_core_2021_guide.MD
sajjadfouladvand Apr 27, 2022
a3f7fa2
dx only on problem list, extract from 2021 version of shc_core
conorkcorbin May 12, 2022
b4d80ce
refactoring with extractors and sequence featurizers
conorkcorbin Jun 7, 2022
5541f64
pytorch driver and trainer infrastructure
conorkcorbin Jun 10, 2022
27320eb
Bump numpy from 1.16.1 to 1.22.0 in /scripts/GoogleCloud/BQ
dependabot[bot] Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
*.pyc
LocalEnv.py
LocalEnv.py
.DS_Store
scripts/LabTestAnalysis/output*
scripts/LabTestAnalysis/machine_learning/data*
starr/data*
stride/data*
scripts/LabCulturePrediction/data*
scripts/LabCulturePrediction/*.tab
scripts/LabCulturePrediction/DecisionMakingClass/*.csv
scripts/ER_Infection/data*
scripts/ER_Infection/notebooks/mit_data_analysis/data*
.idea*
venv*
*token.pickle
.Rproj.user
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

41 changes: 35 additions & 6 deletions LocalEnv.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This file serves as documentation to help users understand LocalEnv.py.
#
# LocalEnv.py is created dynamically by setup.sh, but if you don't need
# LocalEnv.py can be created dynamically by setup.sh, but if you don't need
# to do any of the other steps in setup.sh (e.g. installing libraries,
# initializing DB) it may be easier to just make a copy of this file
# and name it LocalEnv.py before editing the actual values.
Expand All @@ -12,15 +12,44 @@
#
# Other variables which are likely to vary between dev environments should
# be added to this template file, then be given default values via setup.sh.
import os

BOX_CLIENT_ID = "BOX_API_CLIENT_ID"
BOX_CLIENT_SECRET = "BOX_API_CLIENT_SECRET"
BOX_ACCESS_TOKEN = "BOX_API_ACCESS_TOKEN"
BOX_STRIDE_FOLDER_ID = "BOX_STRIDE_FOLDER_ID"

# Database connection type
DATASET_SOURCE_NAME = 'STRIDE'
DATABASE_CONNECTOR_NAME = "psycopg2"
SQL_PLACEHOLDER = "%s"

# Connection parameters to primary working database of interest
LOCAL_PROD_DB_PARAM = {}
LOCAL_PROD_DB_PARAM["HOST"] = 'localhost'
LOCAL_PROD_DB_PARAM["DSN"] = 'prod'
LOCAL_PROD_DB_PARAM["UID"] = 'produid'
LOCAL_PROD_DB_PARAM["PWD"] = 'prodpwd'
LOCAL_PROD_DB_PARAM["HOST"] = 'localhost' # Database host. Localhost if running on your local computer. For GCP, name of the project. For AWS RDS instances, look for the "Endpoint" hostname, e.g. YourDatabaseIdentifier.cwyfvxgvic6c.us-east-1.rds.amazonaws.com
LOCAL_PROD_DB_PARAM["DSN"] = 'databaseName' # Specific database/dataset name hosted by the database server (e.g., stride_inpatient_2008_2017)
LOCAL_PROD_DB_PARAM["UID"] = 'databaseUserId'
LOCAL_PROD_DB_PARAM["PWD"] = 'databaseUserPassword'

# Connection parameters for a test database to create and manipulate during unit tests
# The DSN (database name) MUST NOT BE the same as any real working database.
# Many of the Python application unit tests' first and last steps
# will be to delete any database identified by these test identifiers.
# The database user (UID) and password (PWD) will need to be a valid
# database user with permissions to create and delete such databases.
LOCAL_TEST_DB_PARAM = {}
LOCAL_TEST_DB_PARAM["HOST"] = 'localhost'
LOCAL_TEST_DB_PARAM["DSN"] = 'test'
LOCAL_TEST_DB_PARAM["DSN"] = 'unittest_db'
LOCAL_TEST_DB_PARAM["UID"] = 'testuid'
LOCAL_TEST_DB_PARAM["PWD"] = 'testpwd'

PATH_TO_CDSS = "/foo/bar/CDSS"; # Directory where this file is contained in
# Look for environment variable on authenticating to Google cloud server
# If env var not already there, then manually set here.
# See https://github.com/HealthRex/CDSS/wiki/Google-BigQuery-Access for more info
#if "GOOGLE_APPLICATION_CREDENTIALS" not in os.environ:
# os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "/foo/bar/google-cloud-platform-token.json";
if "GOOGLE_CLOUD_PROJECT" not in os.environ:
os.environ["GOOGLE_CLOUD_PROJECT"] = LOCAL_PROD_DB_PARAM["HOST"];

TEST_RUNNER_VERBOSITY = 2
112 changes: 20 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,28 @@
# HealthRex Laboratory at Stanford University
## PI: Jonathan Chen (http://web.stanford.edu/~jonc101)

Shared workspace in development
Review the Wiki (https://github.com/HealthRex/CDSS/wiki) for Starter Notes on using some of the common data sources and codebase as well as general lab/group infrastructure.

General Guidelines for Code Repo:
* Avoid any large data files, so the repo stays lightweight for new devs to quickly download/clone.
* For one-off or very project specific files and scripts, basically do whatever you want in the workspace areas under the scripts directory (but again, avoid big data files).
* Try to promote reusable components to the medinfo core application modules.



====================================================

Starter Notes:
?This needs to be organized more, but a sketch of notes I usually email people initially.
?Perhaps move this to Wiki
?Similarly integrate CDSS/scripts/CDSS/setupNotes.txt into a high-level Readme starter
Code is made freely available for academic use. For commercial use or other questions, email stanford [dot] healthrex [at] gmail [dot] com.

See our group's publication list for relevant citations to reference. For example: Chen, J. H., Podchiyska, T. & Altman, R. B. Journal of the American Medical Informatics Association ocv091 (2016). doi:10.1093/jamia/ocv091

General Data / Code Access
• Training / Agreements
○ Register on CITIProgram.org
§ Complete the module on "Biomedical Responsible Conduct of Research"
§ Send me a copy of the Completion Certificate

(2B) HIPAA Training
1. 2B) HIPAA Training (required for almost all datasets. Because current CITI training does not offer an excellent data security module, we are requiring HIPAA training for datasets with or derived from health information or containing PII)
a. Go to your personal Axess page.
b. Log in with your SUNet and password.
c. Click on the STARS link (top).
d. Click on “Training Needs Assessment”
e. Only email your supervisor if you want to.
f. Indicate that you work on research projects.
g. Click on All Learning.
h. If needed, use the search tool and search for  HIPAA. Enroll in HIPAA/Protecting Patient Privacy (PRIV-0010).
i. Take the course.
j. Once the course(s) is complete, you should receive an email confirming your completion. It should also show up as completed if you click on the “Training History” bar.
k. Please save the screen shot as a PDF and name the file: firstinitiallastname_HIPAA_DDMMMYY.  So if Isabella Chu completed her classes July 3, 2016, ichu_HIPAA_03Jul16.


○ Complete the HCUP Data Use Agreement
• View Accessible HCUP DUA Training Course (Text Only) 
· At the bottom of this page, fill in your name to print out a completion certificate and send me a copy
• https://www.hcup-us.ahrq.gov/DUA/dua_508/DUA508version.jsp
· Fill out and complete the HCUP Data Use Agreement, then send a copy to me and the HCUPDistributor@AHRQ.gov
○ Health Data Protection / Hard Drive Encryption
• Any computers you use to work on health data should be encrypted. This is usually a transparent option that is easy to turn on in the background and is generally a good idea anyway in case your computer gets lost or stolen.
• Web link below should help you figure out if you’ve setup encryption properly. If you install Stanford’s BigFix program, it walks through most of the steps.
• https://med.stanford.edu/datasecurity/amie/
• I'd recommend working on a (laptop) computer with at least 16gb RAM and 512gb hard drive. I can help you get this if you do not already have it.

• Code:
○ Use Git or an SVN client to download the codebase
§ > git clone https://github.com/HealthRex/CDSS.git
or
§ > svn checkout https://github.com/HealthRex/CDSS.git
§ If that works, it should download a bunch of Python 2.7 code to your computer

• Dev Environment:
○ Install Python PIP to facilitate other installations
§ If you installed Python 2.7.8, it might already be installed, otherwise there’s a get_pip.py bootstrapper installer on the internet)
§ Install some Python modules (e.g., scipy, psycopg2)
· > python -m pip install psycopg2
○ Install a local PostgreSQL database server instance
○ Create a blank test database with the schema definition in cpoeStats.sql.
§ > psql -f medinfo/db/definition/cpoeStats.sql -U <YourDBUsername> testdb
○ Create another blank application database, but restore it with sample data:
§ Box Data Directory: STRIDE-Inpatient-2008-2014/dump2009-2014-5year-time
§ Restore Script Driver: restoreCPOETables.sh
· This can take hours (overnight) to all finish patient_item and clinical_item_association tables. Make sure you start with a blank database and that the Indexes and Constraints don't yet exist, otherwise it will drag down the insert/population process
○ Point the application code to the databases:
§ Edit medinfo/db/Env.py file’s DB_PARAM to match the application database
§ Edit TEST_DB_PARAM settings to point to that blank database copy.
○ Run a basic application database unit test
§ > python medinfo/db/test/TestDBUtil.py
§  If that runs, you’re in good shape to have the Python application code interact with the SQL database

• Data Access
○ Box - Share data directories (Stanford Email)
○ Google - Work files share
○ OneNote - Notebook section share
○ XP-Dev - SVN Code


General Guidelines for Code Repo:
* Avoid any large data files, so the repo stays lightweight for new devs to quickly download/clone.
* For one-off or very project specific files and scripts, basically do whatever you want in the workspace areas under the /scripts directory (but again, avoid big data files and also avoid any private / patient information, including analysis results that include individual patient items, as this repo will publicly accessible).
* Avoid creating new / separate repos for your work, unless meant to be a completely independent package. Instead create sub-folders within this common repository.
* Promote reusable components and packages to the medinfo core application modules.


Broad description of core application directories
* medinfo/scripts/DevWorkshop - Assorted tutorials and screening programs to learn and practice core technical skills.
* medinfo/analysis - General purpose analysis and data manipulation modules, not specific to any type of project. For example, serially calculating t-tests, list rank similarity measures, ROC plots, precision-recall curves, SQL-like manipulation functions for CSV / TSV files.
* medinfo/common - General purpose computing utilities, such as calculating different 2x2 contingency stats, adding progress trackers to long processes.
* medinfo/cpoe - More project specific applications related to Computerized Physician Order Entry projects, implementing different approaches to clinical order recommendations and evaluating/analyzing them with different experiments on historical data. Application code for clinical case simulations for users to interact with.
* medinfo/dataconversion - General and project specific utilities to pre-process data sources. Given a dump of hospital data, conversion scripts to unify into a simplified / pre-processed clinical_item transaction series. FeatureMatrixFactory to extract out clinical data into simple "feature matrix" / dataframe form to feed into assorted learning algorithms. Subdirecties with additional supporting mapping data (e.g., ICD9 codes to Charlson comorbidity categories).
* medinfo/db - Utilities to connect between Python code and SQL databases, with a relatively plain JSON-like model of tables represented by lists of dictionaries (name-value pairs of each row of data). ResultsFormatter has several convenience functions to interconvert between SQL data tables, CSV/TSV plain text files, Pandas dataframes, and JSON-like lists of Python dictionaries. Several project specific application database schemas in the definition subdirectory. Support subdirectory with "dump" and "restore" convenience scripts to move database content between systems.
* medinfo/geography - Not much here yet. One example of how to generate data labeled geographic maps of the US.
* medinfo/textanalysis - Not much here yet. One example of a project specific parsing script that translates a stream of text documents into an interactive HTML file that attempts to auto-annotate features of the documents based on Python coded annotator classes.
* medinfo/web - View and Controller layer for web interface to application functions.

• Population Health Sciences Access

Here are detailed instructions for accessing PHS data. If your staff have completed their trainings and IRB, it should take about 10 minutes to complete these forms: https://tinyurl.com/PHS-Data-Access

In addition, all PHS Data Users are required to take the PHS Data Core Training and Quiz. This should take you 15 - 20 minutes (including quiz). Completion with 100% on the quiz will waive CITI and HIPAA training for most datasets. CITI and HIPAA take about 4 - 6 hours so we hope you view this as a good deal.

PHS Data Security Training: http://tinyurl.com/PHS-Data-Security-Training

For Macs open with Quicktime. For PCs, just click on the image and click the play arrow. It should start.

If you are already a PHS member and you do not have your personalized link, please request it from Isabella Chu at itaylor@stanford.edu.

If you need help, my office hours are Thursdays at SIEPR 334 and Fridays online (by appointment) from 10 AM to 11 AM or by appointment. You can sign up for office hours clicking on the PHS Office Hours Sign Up near the top of this page: https://med.stanford.edu/phs/phs-data-center.html or emailing me at itaylor@stanford.edu.

26 changes: 13 additions & 13 deletions TestCDSS.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""Look through directory tree for unit test cases to run.
"""
Look through directory tree for unit test cases to run.
Comparable to command-line functionality:

python -m unittest discover -v -s <directoryName> -p "Test*.py"

"""

import unittest
import logging

# Set logging level.
log = logging.getLogger("CDSS")
import os

# TODO(sbala): Fix TestDataManager.test_compositeRelated
# TODO(sbala): Fix TestSTRIDEOrderMedConversion.test_dataConversion_denormalized
if __name__ == "__main__":
# Set logging level.
log = logging.getLogger("CDSS")
log.setLevel(logging.CRITICAL)

# Load test suite.
loader = unittest.TestLoader()
suite = loader.discover('.', pattern="Test*.py")
log.setLevel(logging.ERROR)
# Load test suite.
loader = unittest.TestLoader()
suite = loader.discover('.', pattern="Test*.py")

# Run test suite.
testRunner = unittest.runner.TextTestRunner(verbosity=1)
testRunner.run(suite)
# Run test suite.
testRunner = unittest.runner.TextTestRunner(verbosity=1)
testRunner.run(suite)
18 changes: 9 additions & 9 deletions medinfo/analysis/AccuracyPerTopItems.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
import time;
import json;
from optparse import OptionParser
from cStringIO import StringIO;
from io import StringIO;
import pylab;
from medinfo.db.Model import columnFromModelList;
from medinfo.common.Const import COMMENT_TAG, VALUE_DELIM;
from medinfo.common.StatsUtil import ContingencyStats;
from medinfo.common.Util import stdOpen, ProgressDots;
from medinfo.db.ResultsFormatter import TextResultsFormatter, TabDictReader;
from medinfo.db.Model import RowItemModel;
from Util import log;
from Const import OUTCOME_PRESENT, OUTCOME_ABSENT;
from .Util import log;
from .Const import OUTCOME_PRESENT, OUTCOME_ABSENT;

from BaseAnalysis import BaseAnalysis;
from .BaseAnalysis import BaseAnalysis;

AXIS_DELIM = ":";

Expand All @@ -30,22 +30,22 @@ def __init__(self):
BaseAnalysis.__init__(self);

def __call__(self, inputFile, colOutcome, metricsByScoreCol, maxItems):
scoreCols = metricsByScoreCol.keys();
scoreCols = list(metricsByScoreCol.keys());
scoreModels = self.parseScoreModelsFromFile(inputFile, colOutcome, scoreCols);

# Count up total number of items and positive outcomes
nPositive = sum([scoreModel[colOutcome] for scoreModel in scoreModels]); # Assumes outcome labels are 0 and 1 for negative and positive, respectively
nItems = len(scoreModels);

# Prepare result dictionaries to populate
resultDicts = [{"ItemsConsidered": i+1} for i in xrange(maxItems)];
resultDicts = [{"ItemsConsidered": i+1} for i in range(maxItems)];

for colScore in scoreCols:
# Sort by each score column in descending order
scoreModels.sort(key=lambda model: model[colScore], reverse=True);

nPositiveFound = 0;
for i in xrange(maxItems):
for i in range(maxItems):
nConsidered = i+1;
scoreModel = scoreModels[i];
if scoreModel[colOutcome] == OUTCOME_PRESENT:
Expand Down Expand Up @@ -192,9 +192,9 @@ def main(self, argv):
outputFile = stdOpen(outputFilename,"w");

# Print comment line with arguments to allow for deconstruction later as well as extra results
print >> outputFile, COMMENT_TAG, json.dumps(summaryData);
print(COMMENT_TAG, json.dumps(summaryData), file=outputFile);
# Insert a header row
resultDicts.insert(0, RowItemModel(resultDicts[0].keys(),resultDicts[0].keys()) );
resultDicts.insert(0, RowItemModel(list(resultDicts[0].keys()),list(resultDicts[0].keys())) );

formatter = TextResultsFormatter( outputFile );
formatter.formatResultDicts( resultDicts );
Expand Down
8 changes: 4 additions & 4 deletions medinfo/analysis/BaseAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys, os
import time;
from optparse import OptionParser
from cStringIO import StringIO;
from io import StringIO;
from math import sqrt;
from datetime import timedelta;

Expand All @@ -16,10 +16,10 @@
from medinfo.db import DBUtil;
from medinfo.db.Model import SQLQuery, RowItemModel;
from medinfo.db.Model import modelListFromTable, modelDictFromList;
from Util import log;
from .Util import log;

from Const import OUTCOME_ABSENT, OUTCOME_PRESENT, OUTCOME_IN_QUERY;
from Const import NEGATIVE_OUTCOME_STRS;
from .Const import OUTCOME_ABSENT, OUTCOME_PRESENT, OUTCOME_IN_QUERY;
from .Const import NEGATIVE_OUTCOME_STRS;


class BaseAnalysis:
Expand Down
Loading