-
Notifications
You must be signed in to change notification settings - Fork 3
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
Initial Restructure of code #59
Conversation
@yevgenybulochnik I don't know if this is just for me, but when I try running files with "from . import xxx" in VSCode, I get the error message "ImportError: attempted relative import with no known parent package".. oops nvm -- I realized this is more of a VScode vs. command line thing, so when I run in command line it's fine. |
Taking Eugene's restructure branch (from PR #59), this updates the following: 1. Added cleaned version of Rob's code to database.by --> creates an ingredient_rxcui_year table & a product_rxcui_year table, for their respective distributions in generate_module 2. added 'year' column to the generate_module dataframes/CSV files. 3. fixed default_probability typo in utils.py (if idx == 1 --> changed to if idx == 0)
I tested this branch and everything appears to have worked. I also ran a Synthea population of 1000 patients and got the following meds:
|
Fixes coderxio/medication-diversification#ISSUE NUMBER
Explanation
This is a very large PR to get going with a different code structure. I would still consider this setup a monkey patch to get things working as a python package. We will need to further refactor code.
Rationale
This setup allows our codebase to be installed as a python package using setup.py and provides more structure in general. The FDA, RxNorm, Meps packages are all designed to be free standing so we can pull them out and reuse them. We also leverage package namespaces to make the code syntax more expressive. This needs to be further refactored.
Tests
python -m mdt.run_mdt D007037 may_treat
testing logs
mdt output
Data dir