Hello everyone,
I have a large dataset with 10 million observations of hospital admissions. I need to follow up on (or keep track of) patients who had a specific admission of interest (IndexAdmission) across all subsequent observations/admissions.
In the small example below, I need to track patients with IDs 9428683, 5779720, 3324298, 10020366, and 6020031, and flag them throughout the entire dataset.
I would greatly appreciate any help, as I am currently stuck with this task.
Best regards
I have a large dataset with 10 million observations of hospital admissions. I need to follow up on (or keep track of) patients who had a specific admission of interest (IndexAdmission) across all subsequent observations/admissions.
In the small example below, I need to track patients with IDs 9428683, 5779720, 3324298, 10020366, and 6020031, and flag them throughout the entire dataset.
I would greatly appreciate any help, as I am currently stuck with this task.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long PatientID int IndexAdmission 9428683 1 5779720 1 3324298 1 10020366 1 6020031 1 9597902 0 8664997 0 9428683 0 13746335 0 6354018 0 9428683 0 4510983 0 1164266 0 8572130 0 3324298 0 12393016 0 6164436 0 3324298 0 4764362 0 9428683 0 5701333 0 9428683 0 end
Comment