The purpose of this memo is to link hospitalized emergency visits to the
inpatient abstract for the same stay. The cohort consists of all NACRS
visits with admitted_flag equal to 1. Memo A00 sets that
flag when disposition is Admitted inpatient.
Linkage is visit-level, not person-level. A person with two admitted emergency visits can match two different DAD abstracts. The personal health number (PHN) is matched first, and the time window is then applied only to abstracts that share that number. A DAD abstract with a different personal health number is never accepted, even if the times are close.
Data preparation is completed in Memo A00. This memo
reads analytic_nacrs.rds and analytic_dad.rds.
In these files the personal health number is stored as
patient_id. There is no separate PHN column. Let visit
\(i\) be a hospitalized NACRS visit and
abstract \(j\) a DAD record. The visit
links to the abstract only when both conditions hold:
\[\mathrm{PHN}_i = \mathrm{PHN}_j\]
\[\left| t_i^{\mathrm{discharge}} - t_j^{\mathrm{admission}} \right| \le 6 \text{ hours}\]
\(t_i^{\mathrm{discharge}}\) is the
NACRS discharge_datetime. \(t_j^{\mathrm{admission}}\) is the DAD
admission_datetime. The comparison uses the absolute
difference, so an admission up to 6 hours before or after the emergency
discharge is eligible. A difference of exactly 6 hours is included.
If more than one abstract passes both tests, the abstract with the
smallest absolute difference is kept. If two abstracts tie for the
smallest difference, the visit is left unlinked and counted as
ambiguous. DAD rows with a missing patient_id cannot pass
the first test.
| File | Records | Used in linkage |
|---|---|---|
| analytic_nacrs.rds | 30000 | 5,810 hospitalized visits |
| analytic_dad.rds | 60000 | 59,533 abstracts with a PHN |
One row per hospitalized visit is written to
data/analytic_linkage.rds. Unlinked visits are kept, with
the DAD record ID left missing.
The counts below are hospitalized emergency visits. Each step keeps only the visits that passed the previous step.
| Step | Visits | Share of hospitalized visits |
|---|---|---|
| Hospitalized NACRS visits | 5810 | 100.0% |
| Same PHN on at least one DAD abstract | 4922 | 84.7% |
| Discharge within 6 hours of that admission | 4633 | 79.7% |
| Status | Visits | Share of hospitalized visits |
|---|---|---|
| Linked | 4633 | 79.7% |
| PHN match outside the 6-hour window | 289 | 5.0% |
| No PHN match in DAD | 888 | 15.3% |
4,633 of 5,810 hospitalized visits (79.7%) link to exactly one DAD abstract. 289 visits share a personal health number with at least one abstract, but none of those admissions fall inside the six-hour window. 888 visits have no DAD abstract with the same personal health number. Exact PHN matching cannot recover a blank or mistyped identifier. In the DAD file, 467 abstracts have a missing patient identifier and 0 are flagged as a one-digit identifier error.
| Measure | Value |
|---|---|
| Linked visits | 4,633 |
| Distinct DAD abstracts | 4,633 |
| Same facility | 4,633 of 4,633 |
| DAD admission source | Emergency Department 4633 |
| Hours, admission minus discharge: minimum | 0.17 |
| Hours, admission minus discharge: median | 1.07 |
| Hours, admission minus discharge: maximum | 2.00 |
The hours column is DAD admission time minus NACRS discharge time. A positive value means the inpatient admission is after the emergency discharge. Among the linked pairs, the median difference is 1.07 hours, and every difference is within 6.00 hours by construction. 4,633 of the linked pairs are at the same facility.
| Measure | Value |
|---|---|
| Visits | 289 |
| Closest PHN match, absolute hours: minimum | 7.00 |
| Closest PHN match, absolute hours: median | 16.00 |
| Closest PHN match, absolute hours: maximum | 24.00 |
These 289 visits do have a DAD abstract with the same personal health number. The closest of those admissions is still more than 6 hours from the emergency discharge. The closest gaps range from 7.00 to 24.00 hours, so these visits are not linked.
Memo A05 uses only the linked visits, which are a subset of all hospitalized visits. The table below compares linked and unlinked visits on CTAS, total emergency stay, and pre-disposition stay. The hospitalization question uses pre-disposition stay. The length-of-stay question uses total emergency stay.
| Measure | Linked | Not linked |
|---|---|---|
| Visits | 4,633 | 1,177 |
| Median total emergency stay, minutes | 235 | 239 |
| Median pre-disposition stay, minutes | 189 | 194 |
| CTAS 1 | 1,443 (31.1%) | 347 (29.5%) |
| CTAS 2 | 1,488 (32.1%) | 393 (33.4%) |
| CTAS 3 | 1,110 (24.0%) | 290 (24.6%) |
| CTAS 4 | 456 (9.8%) | 117 (9.9%) |
| CTAS 5 | 136 (2.9%) | 30 (2.5%) |
Any difference in this table means that the length-of-stay results do not automatically extend to the unlinked hospitalized visits. No length of stay is imputed for them.