File size: 518 Bytes
53a6def | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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()
|