-
Notifications
You must be signed in to change notification settings - Fork 1
EHR queries #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jeremyestein
wants to merge
65
commits into
dev
Choose a base branch
from
ehr_queries_clean
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
EHR queries #103
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
820840d
first query for flow sheets
skeating fb3d6da
building up scripts
skeating 8476351
adding more files
skeating 47240ff
Merge branch 'dev' into sk/queries
skeating 56ceb52
Add and refine SQL scripts for EHR data extraction
skeating de65f8d
Refactor lab results query for wide format output
skeating 4426711
Started on functions to wrap snakemake around sql calls
thompson318 1b8545a
Started to implement caboodle look up code
thompson318 a854492
Setting up config and docker bits
thompson318 7784854
Add a ehr location to snakefile
thompson318 bdf0eb2
Tidied up implementation and rewrote Snakefile logic, with help from …
thompson318 f4382d2
We don't need a separate container for ehr lookup
thompson318 de12629
Added ehr variables to settings and added a testing flag.
thompson318 314a613
added some caboodle faking logic to enable local running
thompson318 f33621d
Caboodle setup goes into exporter.env
thompson318 de875db
Format fix
thompson318 43e9f54
Beginning of test for ehr integration
thompson318 21e0e5b
SQL formatting
thompson318 2b28e42
Test with ehr lookup
thompson318 d4f2121
use caboodle testing
thompson318 a704072
Trying to test ehr and hash lookup with ftps
thompson318 8bd10d2
Moved sql
thompson318 76c8d9f
refactored db to make adding ehr lookup implementation clearer
thompson318 b7e5ce3
Started on logic to get flowsheets, first need hospital visit number
thompson318 87a8ea1
The exporter needs to access uds, do duplicated some of the config fr…
thompson318 8219da8
Use enviroment to manage sql locations as it varies between containers
thompson318 76144af
path into test
thompson318 093563f
Use format rather than parameters for schema name
thompson318 ece4174
Default for sql path to simplify testing
thompson318 6d3f470
Updated mocked function name in test controller
thompson318 d6b51e8
Enable a fake star db shortcut so that snakemake integration test can…
thompson318 f4a629b
Don't connect for fake star
thompson318 df0db43
Tidied up getting for hospital visit number
thompson318 e84f031
return integer hospital visit id
thompson318 1363c98
(with rewritten history) Merge branch 'sk/queries' into st/queries-to…
jeremyestein ca4789a
Added flowsheet query to ehr
thompson318 cba9b54
moved sql and implemented lab results
thompson318 c0850e5
Fixed column names in pseudon
thompson318 f497fc4
Flowsheets and labresults are star, not caboodle
thompson318 8a08337
Auto stash before merge of "sk/queries" and "st/queries-to-snakemake"
skeating b93c17d
star flow sheet query
skeating 2fc2240
finished star lab queries
skeating f946149
removed un new scripts and moved read me to current script location
skeating e249346
added note about getting scripts from the waveform-private-queries re…
skeating 65c74fd
Merge branch 'dev' into sk/queries
jeremyestein 1218cb5
Post-merge linting fix
jeremyestein 6de2a63
SCHEMA_NAME is accessed regardless of testing mode, so it has to exist
jeremyestein 8c4bf82
Create a space for scripts that can't be in this repo to be installed to
jeremyestein 7968f17
Bring in private SQL scripts
jeremyestein 85ea6ad
Linting fix
jeremyestein 1e44668
Add private repo to setup instructions
jeremyestein 5b3222a
fixup docs for private sql scripts
jeremyestein d990007
Match changed signature in PIXL ftp method
jeremyestein 1dac661
Use importlib.resources to locate SQL files and thus remove need for
jeremyestein 44b1cf3
Document how to do an ad hoc run
jeremyestein 0163626
First go at split of db.py into PG and SQL Server versions
jeremyestein edc39a7
Cursor's first go at PG->MSSQL conversion
jeremyestein 3d22cba
Delete pointless test that doesn't test anything
jeremyestein 39d5be6
Define all Caboodle timeouts in seconds to match API
jeremyestein 523407f
timeout needs to be an int
jeremyestein 4312789
Was getting runtime type error in pd.concat. Now always convert
jeremyestein d2a6775
Fix typo in SQL query
jeremyestein 3a85bc9
Also return DataFrame for MSSQL queries
jeremyestein 1d5f07d
MSSQL column info is a bit different
jeremyestein 76989a9
Update the list of safe EHR columns to match the queries
jeremyestein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ | |
| .git | ||
| **/.mypy_cache | ||
| **/.pytest_tmp | ||
| **/build | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be output as parquet for consistency with the other parquet outputs, and disk space, typing, etc reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have an intermediate step (i.e. to_csv, then a second process converts csv to parquet, or go straight to parquet?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we should go straight to parquet. The only purpose for the CSV intermediate for waveform data is that it's easy to append to. (Hence the desire to switch to a better appendable format #15)
But this is a batch operation so it can all be dumped in one go to parquet.