Know your registers
Which register contains what — and how they are linked
You can now inspect a dataset. The next step is to know where your variables come from: which register contains demographics, which contains diagnoses, which contains prescriptions.
This page is your decision table. Once you know which register to use, you find the exact column names, types and code examples in Phase 15 — Register reference.
SDCA’s own register database Steno Diabetes Center Aarhus has a database with variable lists, register descriptions and application templates for the Danish Health Data Authority: steno-aarhus.github.io/registers-project-database → It covers which variables and registers exist (and applications) — this guide covers how to code the extraction.
What am I looking for? — decision table
Know your question. Find the register. Look in the column.
| I want to find… | Register | Key column(s) |
|---|---|---|
| Date of birth and sex | BEF | foed_dag, koen |
| Whether a person has died — and when | DODSAARS | d_dodsdto |
| Whether a person has emigrated | VNDS | haend_dato, indud_kode |
| A somatic hospital contact (before 2019) | lpr_adm | d_inddto, recnum, c_pattype |
| A somatic diagnosis (before 2019) | lpr_diag | c_diag, c_diagtype, recnum |
| A psychiatric diagnosis (e.g. dementia, before 2019) | t_psyk_adm + t_psyk_diag | d_inddto, c_diag, c_diagtype |
| A hospital contact or diagnosis (2019+) | lpr_a_kontakt + lpr_a_diagnose | kont_starttidspunkt, diag_kode, diag_kode_type |
| A dispensed prescription | LMDB | atc, eksd |
| Education level | UDDA | hfaudd, aar |
| Household income | FAIK | famaekvivadisp_13, familie_id |
| Employment status | AKM | socio13, aar |
| Project-specific clinical variable (e.g. surgery date) | Your project’s quality register | See project guide |
| A surgical procedure / SKS code | lpr_sksopr (LPR2) / project-specific (LPR3) | c_opr, recnum / see project guide |
SKS (Sundhedsvæsenets Klassifikations System — the Danish Health Classification System) is the Danish system for coding operations and procedures in hospital — e.g. KJDF10 for Roux-en-Y gastric bypass. Equivalent to the NOMESCO codes used in the other Nordic countries.
Registers grouped by purpose
- Demographics: BEF — date of birth, sex, residence, family ID (one snapshot per person per year)
- Diagnoses (hospital): LPR — somatic and psychiatric contacts and diagnoses, split into LPR2 (before 2019) and LPR3 (2019+)
- Prescriptions: LMDB — one row per dispensed prescription, with ATC code (Anatomical Therapeutic Chemical — the international classification system for medicines) and date
- Censoring: DODSAARS (date of death) and VNDS (emigration) — define when follow-up stops
- Socioeconomics (SES): UDDA (education), FAIK (income), AKM (employment)
Join keys
Wrong join keys produce silent errors: the code runs, but you lose rows — or duplicate them.
| Register | Join key | Links to |
|---|---|---|
| BEF, DODSAARS, VNDS, LMDB, UDDA, AKM | pnr |
All other pnr registers |
| FAIK | familie_id |
Fetched from the BEF column familie_id |
lpr_diag |
recnum |
lpr_adm |
lpr_sksopr |
recnum |
lpr_adm |
lpr_a_diagnose |
dw_ek_kontakt |
lpr_a_kontakt |
Confirmed column names and join examples for each register are in Phase 15 — Register reference. The mechanics of joins are covered in Phase 11 — Joins and pivots.
Next steps
- Need the exact column names, types and code examples? → Phase 15 — Register reference
- Need to extract hospital diagnoses? → Phase 9 — Hospital contacts (LPR)
Working on DARTER / project 708421? The project uses among others DBSO (the Danish Obesity Treatment Database) and OSDC (Open Source Diabetes Classifier). See the full register overview with confirmed column names and paths: DARTER — Register paths and datastores →