The data and source code for MEGACare: Knowledge-guided Multi-view Hypergraph Predictive Framework for Healthcare. Related code and data will be published in a new repository after review.
conda create -c conda-forge -n MEGACare rdkit && conda activate MEGACare
Install the required packages
pip install rdkit-pypi, scikit-learn, dill, dnc
Finally, install other packages if necessary
pip install [xxx] # any required package if necessary
Go to https://physionet.org/content/mimiciii/1.4/ to download the MIMIC-III dataset (You may need to get the certificate)
cd ./data
wget -r -N -c -np --user [account] --ask-password https://physionet.org/files/mimiciii/1.4/
Processing the data to get a complete records_final.pkl
Go into the folder and unzip three main files
cd ./physionet.org/files/mimiciii/1.4
gzip -d PROCEDURES_ICD.csv.gz # Procedure information
gzip -d PRESCRIPTIONS.csv.gz # Medication information
gzip -d DIAGNOSES_ICD.csv.gz # Diagnosis information
data/
- Input:
- PRESCRIPTIONS.csv
- DIAGNOSES_ICD.csv
- PROCEDURES_ICD.csv
- RXCUI2atc4.csv
- drug-atc.csv
- ndc2RXCUI.txt
- drugbank_drugs_info.csv
- drug-DDI.csv
- Output:
- atc3toSMILES.pkl
- ADDI.pkl
- SDDI.pkl
- records_final.pkl: we only provide the first 100 entries as examples here. We cannot distribute the whole MIMIC-III data.
- voc_final.pkl
- Input:
src/
- Baselines:
- LR.py
- CNN.py
- RNN.py
- GRAM.py
- KAME.py
- Dipole.py
- RETAIN.py
- GAMENet.py
- SafeDrug.py
- MICRON.py
- COGNet.py
- LEAP.py
- Retain.py
- processdata_new.py
- Pre-trainMPNN.py
- proposedmethod.py: Our method.
- Setting file
- model.py
- SafeDrug_model.py
- COGNet_model.py
- Statistic_ddi_rate_in_mimic.py
- util.py
- layer.py
- Baselines:
The current statistics are shown below:
#patients 6,350
#clinical events 15,031
#diagnosis 1,958
#med(ATC-3rd) 132
#procedure 1,430
#avg of diagnoses 10.5089
#avg of medicines 11.1864
#avg of procedures 3.8436
#avg of vists 2.3672
#max of diagnoses 128
#max of medicines 64
#max of procedures 50
#max of visit 29
python proposedmethod.py
usage: proposedmethod.py [-h] [--Test] [--model_name MODEL_NAME]
[--resume_path RESUME_PATH] [--lr LR]
[--target_addi TARGET_ADDI] [--target_sddi TARGET_SDDI] [--kp KP] [--dim DIM]
Welcome to contact me jialunwu96@163.com for any question.