patients_sample = patients[patients.SUBJECT_ID.isin(SAMPLE_IDS)]

patients_sample.head()

DECEASED_TO_DATE = patients_sample[patients_sample.EXPIRE_FLAG == 1]\
    .set_index('SUBJECT_ID').DOD.map(lambda x: pd.to_datetime(x).date()).to_dict()
