MemoA09
ClientDr. ABC
Client OrganizationABC Department
Version1.0
StatusDraft
ClassificationInternal use only
Note: Shared synthetic NACRS/DAD data. Real hospital names are reference labels only; all patient records and outcomes are simulated.

1 Overview

1.1 Purpose of the project

Project 001 works through a complete administrative-data analysis on synthetic Alberta-style records, from the raw source files to adjusted estimates. It uses two linked data sources: emergency department (ED) visits in NACRS format and inpatient abstracts in DAD format. The project asks how ED care relates to two hospital outcomes: whether a visit ends in admission, and how long the resulting inpatient stay lasts. It then reuses the same data for a methods study of adult asthma admissions across hospitals and regions.

This memo (A09) is the project summary. It describes what the data contain, the order in which the analysis is carried out, what each memo does and what it found, and the conventions and limitations that apply across the whole project. Every number below comes from Memos A00–A08; each section names its source memo, where the full tables, model formulas and checks can be found.

Training data notice. Every patient record, clinical measurement and outcome is simulated. The 30 hospital names are real public reference labels from the AHS Emergency Services directory, but their patient volumes, case mix and results are all generated. No result describes, evaluates or ranks a real facility.

1.2 Research questions

The project answers four questions in two groups.

Original questions (A03–A05)

  1. Hospital admission (Q1). Among ED visits, are pre-disposition ED stay and CTAS level associated with admission to hospital? (A03)
  2. Inpatient length of stay (Q2). Among admitted ED visits that can be linked to their inpatient abstract, are total ED stay and CTAS level associated with inpatient length of stay? (A04, A05)

Adult-asthma extension (A06–A08)

  1. Asthma and admission. For adults whose main ED diagnosis is asthma, how much higher is the probability of admission than for comparable non-asthma patients at the same hospital? (A06, A07)
  2. Regional differences. After adjustment for patient risk, does asthma admission differ between the Calgary, Edmonton and Other hospital regions, and does the gap between asthma and non-asthma visits vary by region? (A08)

1.3 Key findings at a glance

  • Q1, admission. CTAS is the dominant factor. Compared with CTAS 1, the adjusted odds of admission fall at every level, down to an odds ratio of 0.056 at CTAS 5. Pre-disposition stay has only a small adjusted association: OR 1.024 per 60 minutes, 95% CI (1.003, 1.045), p 0.027.
  • Linkage. 4,633 of 5,810 admitted ED visits (79.7%) link to exactly one DAD abstract under the rule “same PHN, admitted within 6 hours of ED discharge”. Every unlinked visit corresponds to a defect built into the simulation: 888 have a missing or mistyped identifier and 289 were admitted more than 6 hours from ED discharge.
  • Q2, inpatient stay. Once CTAS is accounted for, ED stay is not associated with inpatient stay: −0.011 days per 60 minutes, 95% CI (−0.056, 0.034), p 0.622. CTAS is: stays after a CTAS 5 visit are 2.779 days shorter than after a CTAS 1 visit. Acute stay gives the same picture.
  • Asthma and admission. Matching 7,700 asthma/non-asthma pairs within hospitals gives admission risks of 31.8% and 21.8%, a risk difference of 10.00 percentage points, 95% CI (7.59, 12.41). Outcome regression on the same pairs gives 9.54 points, 95% CI (8.47, 10.61). Both intervals contain the simulated true value of 10.38 points.
  • Regions. For adult asthma visits with a common patient mix, Edmonton-region hospitals have a higher standardized admission risk than Other: +7.23 points, 95% CI (2.16, 12.99). Calgary versus Other is −5.72 points, 95% CI (−10.53, 0.25), so its direction is not established. The asthma–non-asthma gap clearly differs by region (joint test χ² = 78.0 on 2 df, p < 0.001).
  • Method checks. Repeated simulations with a known truth show small bias for the asthma estimators (at most 0.61 percentage points in A06 and A07), near-nominal interval coverage (92%–98% across A06–A08), and false-positive rates of 3%–4% when there is no true effect.

2 Data

2.1 Source workbooks

The two shared source workbooks
Workbook Contents Records Raw variables Analytic variables after A00 Date coverage
pseudo_NACRS.xlsx ED visits (NACRS) 30,000 39 50 Arrivals 1 Jan – 28 Dec 2025
pseudo_DAD.xlsx Inpatient abstracts (DAD) 60,000 60 64 Admissions 1 Jan – 31 Dec 2025

Both workbooks contain the same hospital_reference sheet and a data dictionary; the DAD workbook also holds the linkage answer key and notes. Every record carries the dataset identifier 1.0-2026-10-09. The records span the Alberta fiscal years 2024-25 and 2025-26 (April to March).

A00 reads both workbooks and writes the analytic files analytic_nacrs.rds and analytic_dad.rds; A04 adds analytic_linkage.rds. These RDS files are working caches, not separate datasets. The counterfactual probabilities and the hospital effects used to generate the data are stored separately in data/simulation_truth.rds and never enter any fitting, matching or linkage step.

2.2 Hospitals, regions and residence

The data cover 30 hospitals with study codes H001–H030, 10 in each of three study regions:

  • Calgary and Edmonton, each including surrounding towns according to the referenced AHS zone geography;
  • Other, made up of selected hospitals from the Central, North and South zones.

This is a deliberately chosen teaching sample, not a census of Alberta hospitals and not weighted by real activity. Three location fields are kept apart: hospital_city is the municipality, hospital_region is the study region, and patient_residence is where the patient lives. health_zone keeps five referenced zone labels. ED visits are spread across regions as follows: Edmonton 10,530 (35.1%), Calgary 10,328 (34.4%) and Other 9,142 (30.5%).

2.3 How the records were generated

  • Each NACRS patient has exactly one ED visit, so the 30,000 visits are 30,000 different patients.
  • Every admitted ED visit (5,810) continues as exactly one DAD abstract at the same hospital. The other 54,190 DAD abstracts are inpatients from outside the NACRS extract. The 90,000 rows are therefore not 90,000 independent patients.
  • To create a realistic linkage exercise, some continuations carry deliberate defects: 467 have a missing patient identifier, 421 a mistyped identifier, and 289 an inpatient admission more than 6 hours from the ED discharge.
  • Transfers between hospitals are not simulated. The 72-hour revisit and 30-day readmission flags are generated labels, not reconstructed follow-up.
  • A small group of visits that left without being seen (605) keeps the diagnosis assigned at generation, as a teaching simplification.
  • The pre-care ED severity score is synthetic, has arbitrary units, and is affected by the current episode; it is not a validated clinical score.

2.4 Cohort profile

ED visits (A01). Mean age is 44.2 years (SD 21.6) and 50.3% of patients are female. 14.0% arrive by ground ambulance. CTAS levels 1 to 5 account for 12.9%, 23.0%, 28.7%, 22.9% and 12.4% of visits. 78.6% of visits end in discharge home, 19.4% (5,810) in admission and 2.0% (605) in leaving without being seen. Asthma is the main diagnosis for 9,159 visits (30.5%). The median total ED stay is 196 minutes (mean 213.9), split into a median of 170 minutes before the disposition decision and 22 minutes after it. 98.0% of visits pass the timing checks; the other 605 have no physician wait recorded.

Inpatient abstracts (A02). Mean age at admission is 45.6 years. 54.8% of admissions are urgent and 9.7% (5,810) come from the ED. Mean length of stay is 4.15 days (median 4); after removing alternate-level-of-care days, mean acute stay is 3.95 days. 5.4% of stays include ICU time and 1.5% (883) end in death.

3 How the project proceeds

Source filespseudo_NACRS.xlsxpseudo_DAD.xlsxA00Build variablesA01 · A02Describe NACRS and DADA03Q1: hospital admissionA04Link ED visits to DADA05Q2: inpatient stayA06Asthma: matched pairsA07Outcome regressionA08Asthma: regional GLMMA09Summary
Figure 1. How the ten memos fit together. A00 builds the analytic files that every later memo reads. Blue boxes answer the two original questions, green boxes form the adult-asthma extension, and A09 brings all results together.

The analysis runs in nine steps. Each memo reads only the files produced by the steps before it.

  1. Build the analytic files (A00). Read both workbooks, derive the research variables from source fields (ED stay before and after the disposition decision, admission indicator, inpatient and acute length of stay, fiscal year, centred age, season and the asthma indicator), and check that every derived field agrees with its source.
  2. Describe the files (A01, A02). Profile the NACRS and DAD analytic files: coverage, continuous and categorical summaries, and data-quality checks.
  3. Answer Q1 (A03). Fit logistic regressions of admission on pre-disposition stay and CTAS, with single-covariate and fuller models as comparisons.
  4. Link admitted visits to their inpatient abstracts (A04). Match each admitted ED visit to the DAD abstract with the same PHN admitted closest to the ED discharge, within ±6 hours.
  5. Answer Q2 (A05). Fit linear regressions of inpatient length of stay on total ED stay and CTAS in the linked cohort, with acute stay as a sensitivity outcome.
  6. Estimate the asthma admission difference by matching (A06). Select adults, fit a propensity score from pre-visit background factors, and match asthma to non-asthma visits 1:1 within each hospital.
  7. Re-estimate it with outcome regression (A07). Fit logistic outcome models to the same fixed pairs and standardize the predicted risks.
  8. Compare regions (A08). Fit hospital random-intercept logistic models to all adult visits and standardize regional risks to a common patient mix.
  9. Summarize (A09). Bring the questions, methods and results together in this memo.
Memo guide
Memo Role Analysis population Main method Main output
A00 Data preparation All 30,000 visits and 60,000 abstracts Variable derivation and construction checks Analytic NACRS and DAD files
A01 Description 30,000 ED visits Standardized descriptive profile NACRS coverage, distributions, quality checks
A02 Description 60,000 inpatient abstracts Standardized descriptive profile DAD coverage, distributions, quality checks
A03 Q1: admission 30,000 ED visits Logistic regression Odds ratios for pre-disposition stay and CTAS
A04 Record linkage 5,810 admitted ED visits Deterministic PHN and ±6-hour rule 4,633 linked visits
A05 Q2: inpatient stay 4,633 linked visits Linear regression (OLS) Day differences for ED stay and CTAS
A06 Asthma: matching 24,926 adults; 7,700 matched pairs Propensity-score matching within hospitals Matched risk difference and risk ratio
A07 Asthma: outcome regression The same 7,700 pairs Logistic regression and standardization Standardized risk difference and risk ratio
A08 Asthma: regions 24,926 adults; 8,170 asthma visits Logistic GLMM with hospital random intercepts Standardized regional risks and differences
A09 Summary Results of A00–A08 Synthesis This memo

4 What each memo does and finds

4.1 A00: building the analytic files

A00 keeps the source workbooks unchanged and derives every research variable from source fields, so that each definition is written down once. The main derived fields are:

  • los_min, total ED stay from arrival to discharge, split at the disposition decision into pre_disposition_los_min and post_disposition_los_min;
  • admitted_flag, equal to 1 when the disposition is Admitted inpatient, plus lwbs_flag and ambulance_flag;
  • los_days, calendar days from inpatient admission to discharge, and acute_los_days, the same stay minus alternate-level-of-care days;
  • fiscal_year, death_flag and timing_quality_flag;
  • for the asthma memos, age10 = (age − 50)/10, season from the arrival month, and asthma_visit = 1 when the main diagnosis begins with J45.

All seven construction checks pass with no violations; for example, pre- and post-disposition stay add up to total stay for all 30,000 visits.

4.2 A01 and A02: describing the files

A01 profiles the 30,000 ED visits and A02 the 60,000 inpatient abstracts (see the cohort profile above). Both use the same standardized format: date and fiscal-year coverage, continuous summaries with percentiles, one frequency table per categorical variable, and data-quality distributions. In A02 the linkage-quality fields show 59,112 abstracts with an exact identifier, 467 with a missing one and 421 with a mistyped one; these are the defects that A04 has to deal with.

4.3 A03: hospital admission (Q1)

A03 fits logistic regressions of admission on ED visit characteristics. The primary model enters pre-disposition stay and CTAS together. Total ED stay is not used as the primary exposure, because the minutes after the disposition decision can be a consequence of deciding to admit.

A03 primary model: admission on pre-disposition stay and CTAS (30,000 visits, 5,810 admissions)
Term Odds ratio 95% CI P value
Pre-disposition stay, per 60 minutes 1.024 (1.003, 1.045) 0.027
CTAS 2 vs 1 0.441 (0.406, 0.480) <0.001
CTAS 3 vs 1 0.231 (0.212, 0.252) <0.001
CTAS 4 vs 1 0.109 (0.098, 0.122) <0.001
CTAS 5 vs 1 0.056 (0.048, 0.067) <0.001
  • CTAS shows a steep gradient: the less urgent the triage level, the lower the odds of admission.
  • Pre-disposition stay on its own looks strongly associated with admission (OR 1.226 per 60 minutes, 95% CI (1.204, 1.249)), but most of that disappears once CTAS is in the model. The remaining association is small, though statistically significant.
  • Appendix models. Replacing pre-disposition stay with total ED stay gives a similar adjusted association (OR 1.224 per 60 minutes, 95% CI (1.200, 1.250)) with weaker CTAS gradients. In single-covariate models, older age, male sex, ground-ambulance arrival and the South zone are associated with higher odds of admission, and injury, mental-health presentations and longer waits with lower odds; pain score is not associated. These models are exploratory.

4.4 A04: linking ED visits to inpatient abstracts

Linkage is done per visit, not per person. An admitted ED visit links to a DAD abstract only when both records carry the same PHN (stored as patient_id) and the inpatient admission is within 6 hours before or after the ED discharge; when several abstracts qualify, the closest in time is kept, and ties are left unlinked.

A04 linkage funnel
Step Visits Share of admitted visits
Admitted NACRS visits 5,810 100.0%
Same PHN on at least one DAD abstract 4,922 84.7%
Admitted within 6 hours of ED discharge (linked) 4,633 79.7%
  • Linked pairs. Every linked pair is at the same facility and has an ED admission source. The inpatient admission follows the ED discharge by a median of 1.07 hours (range 0.17 to 2.00 hours).
  • Failures. 888 visits have no abstract with the same PHN; exact matching cannot recover a blank or mistyped identifier. Another 289 share a PHN, but the closest admission is 7 to 24 hours (median 16) from the ED discharge.
  • Representativeness. Linked and unlinked visits look alike on CTAS and on median ED stay (235 versus 239 minutes total; 189 versus 194 minutes before the disposition decision). Even so, A05’s results apply only to the linked subset, and no length of stay is imputed for unlinked visits.

4.5 A05: inpatient length of stay (Q2)

A05 fits linear regressions (ordinary least squares) of inpatient calendar stay on total ED stay and CTAS among the 4,633 linked visits. Total ED stay is appropriate here, because the patients have already been admitted. Mean stay in this cohort is 4.79 days (median 4, range 1 to 29).

A05 primary model: calendar stay on total ED stay and CTAS (4,633 linked visits)
Term Coefficient, days 95% CI P value
Total ED stay, per 60 minutes −0.011 (−0.056, 0.034) 0.622
CTAS 2 vs 1 −1.141 (−1.320, −0.962) <0.001
CTAS 3 vs 1 −1.691 (−1.888, −1.494) <0.001
CTAS 4 vs 1 −2.264 (−2.529, −1.999) <0.001
CTAS 5 vs 1 −2.779 (−3.214, −2.343) <0.001
  • ED stay. On its own, ED stay is associated with a slightly longer inpatient stay (+0.147 days per 60 minutes, 95% CI (0.102, 0.192)), but the association vanishes once CTAS is included. The unadjusted association therefore reflects case mix.
  • CTAS. Inpatient stay shortens steadily as triage urgency decreases, by about 2.8 days from CTAS 1 to CTAS 5.
  • Sensitivity. With acute stay as the outcome, the results are almost unchanged: ED stay −0.008 days per 60 minutes, 95% CI (−0.054, 0.038), p 0.733; CTAS 5 vs 1 −2.695 days.
  • Appendix. Older age is associated with longer stays (+0.022 days per year); sex and health zone are not.

4.6 A06: asthma and admission, within-hospital matching

A06 restricts the data to the 24,926 adult ED visits, of which 8,170 have asthma (J45) as the main diagnosis. A logistic propensity score is estimated from pre-visit background factors only: age, sex, smoking, obesity, cardiometabolic history, asthma history, prior ED visits, residence and season. Arrival severity and CTAS are excluded, because the current asthma episode affects them; the target is the total difference in admission risk. Asthma visits are matched 1:1 to non-asthma visits within the same hospital, using a caliper of 0.20 standard deviations of the logit propensity score.

  • Matching. 7,700 pairs from all 30 hospitals are formed, retaining 94.2% of asthma visits. The largest standardized mean difference falls from 0.302 before matching to 0.025 after.
  • Results. Admission risk is 31.8% for asthma and 21.8% for matched controls: a risk difference of 10.00 percentage points, 95% CI (7.59, 12.41), and a risk ratio of 1.46, 95% CI (1.34, 1.59). The simulated true value for the same target is 10.38 points.
  • Comparisons. The crude, unmatched difference is 16.24 points. With a narrower caliper of 0.10, 7,449 pairs give 9.59 points, 95% CI (7.20, 11.97).
  • Uncertainty. Intervals are hospital-clustered: pair-level influence values are summed by hospital, with a t critical value on 29 degrees of freedom.
  • Validation. In 100 positive-effect and 100 null-effect simulations, mean bias is 0.49 and 0.61 points, interval coverage is 98% and 97%, and the null scenario wrongly excludes zero in 3% of runs.

4.7 A07: asthma and admission, outcome regression on the same pairs

A07 keeps A06’s 7,700 pairs unchanged and fits a logistic outcome model with hospital fixed effects and an asthma-by-region interaction. Each matched asthma patient’s admission probability is predicted twice, with the asthma indicator set to 1 and to 0, and the predictions are averaged. Standard errors use a hospital-clustered (HC1) sandwich covariance. A flexible model adds an age spline and asthma interactions with every background factor.

  • Results. Standardized risks are 31.8% for asthma and 22.2% without asthma: a risk difference of 9.54 percentage points, 95% CI (8.47, 10.61), and a risk ratio of 1.43, 95% CI (1.37, 1.49). The flexible model gives the same values.
  • Comparison with A06. The estimate is 0.84 points below the simulated truth and has a narrower interval than A06. Because A07 reuses the same pairs, agreement between A06 and A07 is not two independent pieces of evidence.
  • Validation. Replaying A06’s 200 simulations, both A07 models fit in every run, with mean bias of 0.20 to 0.33 points, coverage of 95% to 97%, and false-positive rates of 3% to 4% under the null.

4.8 A08: asthma admission across hospital regions

A08 uses all 24,926 adults rather than A06’s matched subset, so that the regional comparison does not depend on matching decisions made for a different question.

  • Crude risks. Asthma admission risk is 34.2% in Other, 27.0% in Calgary and 38.8% in Edmonton.
  • Primary model. Among asthma visits only, a logistic GLMM includes region as a fixed effect, background factors and arrival severity (comparable across hospitals for this question), and a random intercept for each hospital. Regional risks are standardized to the common mix of all adult asthma patients, integrating over the hospital random-effect distribution.
  • Secondary model. All adults are used, with an asthma-by-region interaction and without severity, to ask whether the asthma–non-asthma gap differs by region.
  • Uncertainty. Intervals come from 200 parametric bootstrap refits per model.
A08 standardized results (percentages and percentage points)
Quantity Estimate 95% CI
Asthma admission risk, Other 32.93% (28.97, 36.04)
Asthma admission risk, Calgary 27.21% (23.39, 30.92)
Asthma admission risk, Edmonton 40.16% (35.60, 44.68)
Calgary vs Other −5.72 (−10.53, 0.25)
Edmonton vs Other 7.23 (2.16, 12.99)
Asthma minus non-asthma, Other 9.55 (7.42, 11.62)
Asthma minus non-asthma, Calgary 3.50 (1.66, 5.16)
Asthma minus non-asthma, Edmonton 16.76 (14.46, 18.85)
Difference in gap, Calgary vs Other −6.05 (−8.76, −3.00)
Difference in gap, Edmonton vs Other 7.22 (4.12, 10.32)
  • Regions among asthma patients. Edmonton-region hospitals have a higher standardized admission risk than Other. The Calgary-versus-Other interval includes zero, so that comparison does not establish a direction.
  • Gap by region. The asthma–non-asthma gap is largest in Edmonton and smallest in Calgary. The joint likelihood-ratio test for the interaction gives χ² = 78.0 on 2 df, p < 0.001.
  • Model checks. All 400 bootstrap refits succeed without warnings. The estimated hospital random-intercept SD is 0.340, close to the generating value of 0.35. In 100-run known-scenario checks, Wald coverage is 92%–95%, the joint test detects the regional effect in 93% of positive runs, and it falsely rejects in 3% of null runs.

5 Conclusions

Read together, the memos give the following answers.

  1. Q1, admission. In these data, admission is driven mainly by triage urgency. Pre-disposition ED stay has a small residual association once CTAS is accounted for. Most of its large unadjusted association reflects the fact that sicker patients both stay longer and are admitted more often.
  2. Linkage. A simple deterministic rule (same PHN and an admission within 6 hours) links about four in five admitted visits. It fails exactly where identifiers are missing or mistyped, or where the admission time is far from the ED discharge. Linked and unlinked visits look similar, but A05 applies only to the linked subset.
  3. Q2, inpatient stay. ED stay does not predict inpatient stay once CTAS is included, while more urgent triage is associated with stays roughly 1 to 3 days longer. Removing alternate-level-of-care days does not change this.
  4. Asthma. Adult asthma visits have an admission risk about 10 percentage points higher (a risk ratio of about 1.4 to 1.5) than comparable non-asthma visits at the same hospital. Matching and outcome regression agree, and both recover the simulated truth.
  5. Regions. With a common patient mix, asthma admission is higher in Edmonton-region hospitals than in Other; the Calgary comparison is inconclusive. The asthma–non-asthma gap varies clearly across regions. These are properties of the simulation and say nothing about real regional performance.
Headline estimates
Question Measure Estimate 95% CI Memo
Q1 admission OR per 60 min of pre-disposition stay, adjusted for CTAS 1.024 (1.003, 1.045) A03
Q1 admission OR, CTAS 5 vs 1, adjusted for pre-disposition stay 0.056 (0.048, 0.067) A03
Linkage Admitted visits linked 4,633 of 5,810 (79.7%) – A04
Q2 inpatient stay Days per 60 min of ED stay, adjusted for CTAS −0.011 (−0.056, 0.034) A05
Q2 inpatient stay Days, CTAS 5 vs 1, adjusted for ED stay −2.779 (−3.214, −2.343) A05
Asthma Matched risk difference, percentage points 10.00 (7.59, 12.41) A06
Asthma Standardized risk difference, percentage points 9.54 (8.47, 10.61) A07
Regions Edmonton vs Other, asthma admission, percentage points 7.23 (2.16, 12.99) A08
Regions Calgary vs Other, asthma admission, percentage points −5.72 (−10.53, 0.25) A08

6 Conventions used across the project

  • Associations and effects. A03 and A05 report associations in synthetic records, not causal effects. A06–A08 estimate effects under a known generating mechanism, which is what allows their results to be compared with the simulated truth.
  • Statistical reporting. All intervals are 95% confidence intervals written as (lower, upper). A03 uses Wald tests and A05 t-tests, with p < 0.05 treated as statistically significant. A06 and A07 use hospital-clustered intervals with a t critical value on 29 degrees of freedom. A08 uses parametric-bootstrap percentile intervals.
  • Reference levels. CTAS level 1, sex F, health zone Edmonton and arrival mode Walk-in in A03 and A05; region Other in A08. Duration terms are fitted per minute and also reported per 60 minutes.
  • Choice of stay measure. Q1 uses pre-disposition stay, because time after the admission decision can be a consequence of that decision. Q2 uses total ED stay, because the patients have already been admitted.
  • Role of severity. Arrival severity and CTAS are downstream of the current asthma episode, so A06 and A07 leave them out to estimate the total asthma difference. A08’s primary regional model includes severity to compare regions for patients of similar severity. A variable’s role depends on the question being asked.
  • Hospital clustering. A03 and A05 keep conventional model-based standard errors, which ignore the clustering of visits within hospitals, so their p values are illustrative. A06–A08 handle clustering explicitly.
  • Different targets. A06 and A07 estimate the difference among matched asthma patients. A08’s primary model standardizes to all adult asthma patients, and its secondary model to all adults. These are different estimands and should not be pooled.
  • Validation runs. The repeated simulations in A06–A08 are method checks drawn from the same generator. They are not added to the project data.

7 Limitations

  • Synthetic data. All results describe a simulated mechanism with prespecified parameters. They show that the workflow behaves as intended; they say nothing about real Alberta patients or hospitals.
  • Hospital sample. The 30 hospitals are a selected sample with real names but generated volumes, so no rate or ranking reflects actual care quality.
  • Simplified care pathways. Admission is simplified to admission at the same hospital. Transfers, observation beds and repeat visits are not modelled, and revisit and readmission flags are generated labels.
  • Linkage. Exact PHN matching cannot recover missing or mistyped identifiers. A probabilistic or multi-field linkage would be needed in real data, and the inpatient-stay results apply only to linked visits.
  • Clustering in A03 and A05. Ignoring clustering means their p values are likely too small. A version with hospital-clustered standard errors would be the natural next step.
  • Causal assumptions. Matching, regression adjustment and mixed models cannot remove unmeasured confounding, diagnosis-timing bias or selection into the ED in real data. The asthma “intervention” is hypothetical.
  • Finite simulation checks. Validation results based on 100–200 runs, and bootstrap intervals based on 200 refits, carry Monte Carlo error.

8 Reproducibility

The whole project can be rebuilt from the two workbooks with one command, run from the project root:

Rscript --vanilla code/rebuild_unified_project.R

The pipeline refreshes A00, runs the A06–A08 analyses and their validation simulations, runs the invariant and numerical checks, and renders all ten memos. Each result bundle records checksums of its input files and analysis code, and a memo stops with an error if any input has changed since its results were computed.

  • Analytic caches: data/analytic_nacrs.rds, data/analytic_dad.rds and data/analytic_linkage.rds.
  • Asthma results: outputs/asthma_a06/, outputs/asthma_a07/ and outputs/asthma_a08/.
  • Simulated truth: data/simulation_truth.rds, used only after fitting, to check results.
  • Reference tables: config/hospital_reference.csv and config/variable_dictionary.csv.

By project convention, working code, patient-level synthetic files and result bundles stay local and out of Git. The rendered HTML memos and the public reference tables can be shared.

9 Memo index

  • A00: Importing the shared NACRS/DAD workbooks and deriving the research variables
  • A01: Descriptive profile of the analytic NACRS emergency department cohort
  • A02: Descriptive profile of the analytic DAD inpatient cohort
  • A03: Pre-disposition ED stay, CTAS, and the odds of hospital admission
  • A04: Linking admitted ED visits to inpatient records and comparing linked and unlinked visits
  • A05: ED length of stay, CTAS, and inpatient length of stay in the linked cohort
  • A06: Adult asthma ED visits, within-hospital propensity-score matching, and admission risk
  • A07: Outcome regression and standardized admission risk after within-hospital matching
  • A08: Regional differences in adult asthma admission: hospital-level logistic GLMM

Back to project