Constructing episodes of inpatient care: data infrastructure for population-based research