Given a dataset of patient visits, write a Python script to calculate the average time between a diagnosis and the first treatment.