healthrex / cdss Goto Github PK
View Code? Open in Web Editor NEWClinical decision support system by HealthRex laboratory at Stanford University.
License: GNU General Public License v3.0
Clinical decision support system by HealthRex laboratory at Stanford University.
License: GNU General Public License v3.0
When I run TestFeatureMatrixFactory, it still leaves behind a few temp files:
fmf.patient_episodes.tsv
fmf.patient_list.tsv
patient_list.tsv
Some are from the application code, while I think the last is from the test code.
I recommend doing the temp file "cleanup" in the tearDown function of the unit test (will always be run, even if the test doesn't pass) for the latter.
For temp files generated by the application FeatureMatrixFactory class, you may consider putting the temp file cleanup in a destructor (del) function, to make sure it gets done by the time of program completion.
I'm somehow using the logging functionality incorrectly by assigning subpackage app names for each Util.log, which seems to result in lots of redundant logging. Try to get rid of this, probably easiest way is just change all apps and tests to use one reference name?
Start with just conversion of current webpage
http://web.stanford.edu/~jonc101
Will see if can get admin assistant support to maintain a site through an online templating tool
12/14/2017 - Spoke with assistant service to look for someone who can help
12/2017 - Amit interfacing with Lee? on ~22M text pages, but narrowing this down to a reasonable (and approvable) subset.
Previous steps enable learning of some standard regression model for a predicted outcome (e.g., logistic regression or LASSO for binary outcomes, Cox proportional hazards for survival time).
[ ] Pull out the coefficients from an above model, round them so they are all multiples of the smallest -> Translate into a simple integer scoring system for the target outcome based on the component features.
[ ] For numerical features, may require binning of values into smaller buckets to really make a simple score with only binary/nominal distinctions (e.g., heart rate binned into 3 categories: <60 or 60-100 or >100, rather than using raw number).
[ ] Translate numerical scores into respective probabilities or mean survival times for the outcomes either analytically from model, or better yet empirically from cross-validation data (in likely case of poor calibration).
[ ] Use above to either generate a numerical model to calculate the score, or could just be lookup tables of the components to hard code at this point.
For individual applications, will then want to empirically evaluate the efficacy of the risk score (vs. full model vs. general ML models vs. baseline prevalence) at predicting outcomes in a held out test set of future data (eval discrimination by ROC AUC, precision-recall curve, and 10 split calibration).
At the moment, it includes calls to a bunch of medinfo/ libraries (e.g. TestDBUtil), which make it hard for us to just pass off to other researchers who want access to the data.
[ ] Update InsertData.py for Order Data
[ ] Use more recent data - Update normalization script
[...] User Table
Include fill in blanks for those without SID, etc. info
Lookup SIDs for atendings??? Maybe later
[...] Rotation / Assignment Table
[ ] Define schema
[ ] Relation melt resident schedules
[ ] Transform Attending, Resident + Student into importable form (maybe do raw import/copy first, then make it easier to manipulate from there)
[ ] Desktop repopulate
[ ] Repopulate normalized ADT and TTeam tables
[ ] Populate stride_pager_cover data
[ ] Create Indexes
[ ] Itemize types of activity / interactions
[ ] Bracket out by access / workstation type (remote logins)
Something in SVN revision 1652 must have broken something.
Double check the source (PDF) data to confirm interactive web page is producing same results:
Other issues
Largely done already in shared Box folder for MedicineResidentAccessLog2017, including text paging contents, hospital summary information, ADT (admit-discharge-transfer), Treatment Team involvement, etc.
In 12/2017, got data for individual clinical order resolution, but still needs to be loaded / added to insertData.py script, and possibly go through a "clinical item" conversion process as per the medinfo/dataconversion/STRIDE*Conversion.py scripts.
Older data uses ICD9, but post-2014 data uses ICD10 codes, so will need to figure out a way to transform and work with both. This will likely be lossy because the mapping is many:many
@jonc101 – looks like there's a limit on the # of people we can add to a private repository, and we hit that limit when trying to add Ron. We can pay for additional slots, but that's $10/person/month.
Creating this task to (a) decide whether we actually want to make the repo public, (b) figure out what we'd need to take care of before doing that, and (c) actually handling those prerequisites.
It's very unlikely anyone would discover the repo on their own, but here's a few things we should probably still take care of:
– Scrub for PHI.
– Scrub for credentials and other security vulnerabilities.
– Add a license indicating terms for using the code (probably just MIT license).
– Update README with instructions on how to build, test, and contribute.
Resubmit the IRB forms / waivers to access the Population Health Sciences claims data sources (E.g., Truven + Optum). Previously held up because my official appointment as faculty was pending, but that should be resolved now.
Shared "lab" email address and AWS account to facilitate centralized admin + billing.
[ ] Setup authoring worksheet and example (GI Bleed) so clinical collaborators can follow suit
E.g., Some highly protocolized (e.g., neutropenic fever) vs. some vague diagnostic cases (e.g., altered mental status)
See Isabel evaluation for example setup, though looks largely idiosyncratic custom authoring.
https://bmcmedinformdecismak.biomedcentral.com/articles/10.1186/1472-6947-6-22
Otherwise do more web searching for differing simulation cases (e.g., Medscape education simulation cases or NEJM clinical case reviews, etc.)
• Example of join without subqueries
• Example of medication orders
This isn't urgent, but we know we'll need to do it eventually and it'll be painful =)
Given a feature matrix with a designated target column and candidate input / feature / independent variable columns (inclusion and/or exclusion list), sort or select the candidate variables by those with the most explanatory power for the target column.
sklearn has a feature_selection API that can facilitate much of this already. Make API usage general enough that can test multiple approaches, but some simple/common ones:
Maybe easisest to try first: Just train a random forest against the target outcome, which naturally selects/sorts the features that are most effective at discriminating for the target outcome.
For simulated cases developed, work through with "clinical expert panel" to assign scores (positive or negative) for the most common and likely medical decisions / clinical orders.
Too laborious to score 2,000 possible choices, but do the most common up front and then go back and re-review after initial test runs to score any extra steps people took that were not expected.
Probably need scoring per phase/state of each simulation.
TBD: Define a scoring rubric so different experts can aim for some kind of consensus?
Design such that can be stored in a spreadsheet, or better yet, a new "sim_" table in SQL database, so can then just run some simple application code to auto-grade all cases.
Test creating issue
Right now generates recommended/associated list based on accumulated clinical data as query.
Try instead break down by different individual query items (e.g., admission diagnosis, uncommon lab results or orders) and allow showing of what is triggering each set of recommendations
The editor/reviewer here seems to dislike the idea more than the study, with order lists that are too broad and not specific enough. This is about some framing about how to use decision support. If it’s a fixed automatic protocol / cookbook, then that should be used a different way. This fits with a different kind of existing order set design, which is more like an information retrieval / search results perspective providing an enriched menu of options to consider, with the expectation that the user will only pick out the ones they want for their individual patient. Maybe we drop the Altered Mental Status example that he’s hung up on, since that specifically was one with less clear guidelines, but we tried to include to show the sensitivity of the approach to different levels of specificity.
Anyway, I think we try to come up with some reframing edits and responses to these criticisms back to JAMIA, including a reference to our prior JAMIA publications (e.g., OrderRex) and others (e.g., COWPath) that use the same idea to point out that these are valid areas of investigation, and further back that up with the IMIA Yearbook naming the OrderRex study as a Best Paper in Secondary Use of Clinical Data.
If the editors still won’t send out to review, then we’ll try somewhere else (JBI or IJMI?)
Asked Jason Hom if he is up for any writing parts, while team puts together technical results
Add JavaScript or similar layer of tracking so can record user
• Norms for writing and utilizing unit/regression tests
• Norms for communicating in email vs. slack
• Norms for a code review-ish process (developing on own branch vs. pushing to master)
Goal is to get it so that a new developer is ready to work in <1 hour.
For the code, this should be an easy matter of cloning github and installing libraries.
For the data, there is one step (currently).
• Convert raw CSV files to proprietary postgres DB format (takes multiple days)
• Create snapshot of postgres DB (this is what's set up on RDS)
• Load snapshot on local machine
In the future, we could potentially:
• Convert raw CVS files to raw postgres DB format (should be quick)
• Convert raw postgres DB format to proprietary postgres DB format (may still take a while)
• Create snapshot of proprietary postgres DB (this is what's set up on RDS)
• Load snapshot on local machine
It's fine if it's a long one-time script, but just try to avoid lots of individual commands.
Try dumping the database that we already have and then loading that back into PostgreSQL. How long would it take to dump and restore the full database?
Given we're likely to load the database in more environments, we should probably figure out some simple tests for validating both the schema and the actual data.
Jonathan and I thought we both had the same data, but then it turned out I was missing a bunch of clinical_item_category rows, and it's still not entirely clear why.
In the simplest case, we should at least validate the # of records.
Figure out from Clinical Experience course, what paperwork is necessary to get students/staff eligible for shadowing through clinical environment (i.e., hospital or clinic)
Probably need AWS setup to do multiple
After getting flowsheet extraction
Look for the 1-line python command in setupNotes.txt
Should include the following:
• Ways to connect to the database
• List of 5-10 queries of increasing complexity answering clinical questions
Comments received 12/14/2017
Resubmission due 1/9/2018
Go see other issue with list of patches to make
Module:
Transfer / copy over web medicine "tools" from SVN repo to GitHub under CDSS/medinfo/web
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.