Projects
Applied health data science on Alberta-style administrative data, designed from official documentation and built entirely on simulated or public information.
From Emergency Department to Inpatient Care: Admission, Length of Stay and Asthma-Related Risk in Simulated Alberta Administrative Data
Project 001 follows patients along one care pathway using a single, unified set of simulated Alberta administrative health data. It asks which factors are linked to being admitted and to how long patients then stay, and goes on to study admission risk and regional differences for adults who come to the emergency department with asthma.
It tackles two kinds of problem at once: health services research questions, and the methods question of how to answer them credibly and reproducibly. Memos A00–A09 now connect data preparation, record linkage, statistical analysis and simulation checks into one complete workflow.
One patient pathway, two data sources
- Emergency visitDiagnosis, triage acuity, timing and hospital
- Admitted or notThe disposition at the end of the ED visit
- Length of stayHow long the inpatient stay lasts
- NACRS
- One record per emergency visit: main diagnosis, triage level (CTAS), visit times, hospital and whether the patient was admitted. 30,000 ED visits.
- DAD
- One record per inpatient stay: admission, discharge and length of stay. 60,000 inpatient records.
Some records describe the same patient moving from the ED into hospital, so the 90,000 rows across both files are not 90,000 independent patients. Every memo now draws on these same two sources.
Four research questions
| Question | Why it matters | Methods and memos |
|---|---|---|
| How are time in the ED and triage acuity related to the chance of admission? | Understanding admission need among ED patients, and how time-based measures should be read | A03 logistic regression, built on data preparation and profiling in A00–A02 |
| Among admitted patients, is time spent in the ED related to how long they then stay in hospital? | Treats the ED visit and the inpatient stay as one continuous episode of care | A04 links NACRS to DAD, A05 linear regression, A06 brings the findings together |
| Are adults who come to the ED with asthma more likely to be admitted than patients with other reasons for their visit? | Separates differences in patient background from admission risk associated with asthma | A07 propensity-score matching, A08 outcome models and risk estimates on the matched pairs |
| Does the asthma-related difference in admission vary between Calgary, Edmonton and other regions? | Asks whether region matters beyond patient mix and hospital differences | A09 logistic GLMM that accounts for patients clustering within hospitals |
The first two questions are the project's original focus. The link between ED time and admission cannot be read as "the longer you wait, the more likely you are to be admitted": how complex the case is, the tests it needs and bed availability all shape that time. Waiting after the decision to admit, in particular, cannot be a cause of a decision that came before it. A03's main analysis therefore uses ED time up to the disposition decision, and both A03 and A05 are associational analyses.
Adult asthma: building a fairer comparison
The asthma study moves the project from describing associations to designing a fair comparison. From NACRS it selects visits by patients aged 18 or over whose main diagnosis for that visit is in the asthma J45 family. The study population is people who came to the ED because of asthma this time, not everyone with a history of asthma and not everyone presenting with shortness of breath. The unified data hold 24,926 adult ED visits, of which 8,170 have asthma as the main diagnosis.
A straight comparison of admission rates would be unfair, because the asthma group may differ in age, smoking, obesity, medical history and past ED use. A07 therefore uses propensity scores to find non-asthma patients with similar backgrounds at the same hospital, producing 7,700 matched pairs. A08 then fits outcome models on those fixed pairs to estimate adjusted admission probabilities, the risk difference and the risk ratio.
| Adjusted admission probability, asthma | 31.8% |
|---|---|
| Adjusted admission probability, matched controls | 22.2% |
| Risk difference | +9.54 points 95% CI 8.47 to 10.61 |
| Risk ratio | 1.43 95% CI 1.37 to 1.49 |
These estimates apply to the asthma visits that were successfully matched. Matching improves comparability on measured background factors, but it does not remove all confounding, and matching alone cannot prove a causal effect in the real world.
Two regional questions
Among asthma patients only
When age, medical history and severity on arrival are comparable, does the probability of admission differ across the three regions?
Asthma versus other visits
Does the extra admission risk associated with asthma differ by region? This is the asthma × region interaction in the model. The two questions are related but mean different things.
Calgary and Edmonton include hospitals in surrounding towns, and patients are grouped by the region of the hospital they attended. Because the outcome is admitted or not, A09 uses a logistic GLMM: region enters as a fixed effect, and a random intercept for hospital captures how patients at the same hospital resemble each other. In the current simulation, adult asthma patients in Edmonton have a higher adjusted admission probability than those in other regions. Calgary's point estimate is lower, but the interval for its difference from other regions includes zero, so the direction is not yet clear. A higher or lower admission rate is not, on its own, a measure of better or worse care.
Can the methods recover the truth?
Because the patient data are simulated, the true effects built into the data are known. The project can therefore generate many datasets with and without an effect and check whether matching, regression and mixed models are biased and whether their confidence intervals can be trusted. That says far more about how a method performs than running one model once and reading off a p-value.
Where the project stands
The unified data, memos A00–A09, the main models and the simulation checks are all complete. What the project offers is a reproducible worked example of ED-to-inpatient research, along with a test of the methods used. Whether these effects exist among real Alberta patients is a question only research on real data can answer.
The names of the 30 hospitals come from real public sources, but the patients, admission outcomes and hospital and regional effects are all simulated. None of these results can be used to judge any real hospital.
Alberta Health Data Atlas
An interactive learning atlas of nine commonly used Alberta administrative health datasets and clinical information systems. It is the reference Project 001 was designed from.
- DAD, NACRS, Practitioner Claims, Lab, PIN, Vital Statistics, Registry, Sunrise Clinical Manager, Connect Care
- Deep dives on DAD, NACRS and PIN, with field maps and fictional example records
- Cohort design, linkage notes, access pathways and a responsible-use checklist
Independent educational resources. Not official publications of Alberta Health Services, the University of Calgary, the Government of Alberta or CIHI, and no patient-level data is included.