[Experimental]

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
)

Arguments

ae_data

the ECDS A&E dataset

ae_in

the ECDS arrival date

ae_out

the ECDS discharge date

inpatient_data

the HES/SUS inpatient dataset

admission_date

a vector containing the inpatient (HES/SUS) admission date

spell_id

the HES/SUS spell id

nhs_number

a vector containing the columns for the NHS numbers

hospital_number

a vector containing the columns for the Hospital numbers

patient_dob

a vector containing the columns for the date of birth

org_code

a vector containing the columns for the organisation codes

.forceCopy

a boolean to control if you want to copy the dataset before linking together

Value

a patient level linked hospital record

See also

group_time continuous_inpatient_spells