Effects of distances to hospital and GP surgery on hospital inpatient episodes, controlling for needs and provision