updated outpatient_diagnosis_encounters script