Link together ECDS A&E records to HES/SUS inpatient records on NHS number, Hospital Number and Date of Birth.
link_ae_inpatient(
ae_data,
ae_in,
ae_out,
inpatient_data,
admission_date,
spell_id,
nhs_number = c("nhs_number", "nhs_number"),
hospital_number = c("local_patient_identifier", "local_patient_identifier"),
patient_dob = c("patient_birth_date", "date_birth"),
org_code = c("organisation_code_of_provider", "organisation_code_code_of_provider"),
.forceCopy = FALSE
)
the ECDS A&E dataset
the ECDS arrival date
the ECDS discharge date
the HES/SUS inpatient dataset
a vector containing the inpatient (HES/SUS) admission date
the HES/SUS spell id
a vector containing the columns for the NHS numbers
a vector containing the columns for the Hospital numbers
a vector containing the columns for the date of birth
a vector containing the columns for the organisation codes
a boolean to control if you want to copy the dataset before linking together
a patient level linked hospital record
group_time continuous_inpatient_spells