copd-model-e / training /src /processing /misc /process_validation_presc.py
IamGrooooot's picture
Model E: Unsupervised PCA + clustering risk stratification
53a6def
raw
history blame contribute delete
518 Bytes
from utils.presc_common import initialize_presc_data, track_medication
def main():
# Read in data
presc_file = "<YOUR_DATA_PATH>/EXAMPLE_STUDY_DATA/Pharmacy_Cohort3R.csv"
presc = initialize_presc_data(presc_file)
# Track salbutamol and rescue meds
presc = track_medication(presc)
# Reduce columns
presc_reduced = presc[['SafeHavenID', 'PRESC_DATE', 'rescue_meds']]
# Save data
presc_reduced.to_pickle('<YOUR_DATA_PATH>/Model_E_Extracts/validation_presc_proc-og.pkl')
main()