Correlations
Which findings, immunizations, allergies and medicines occur together in the same patients more or less often than chance, by age, gender and region. Co-occurrence, not cause.

- Period and adjustment – The period of the records, adjusting for age and gender, and what the cells show.
- Patients – Everyone with a record in the period, and how complete their age, gender and city are.
- Facts – The facts in the matrix as chips; Add facts opens a search with one row per concept, Suggested sets adds a ready-made set.
- Matrix – Odds ratio per pair: warm more often together, blue less often, grey not significant or too few.
Open Correlations at the top of the left panel, under Overview. The page turns the records of each patient in the chosen period into facts, and counts how often two facts are found in the same patients.
- Facts
- Observation: a code above or below its normal range (the interpretation H or L, or the reference range); without ranges in the data, the top or bottom 10% of the values; or a threshold you add (≥ or ≤ a value). Immunization: a vaccine code. Allergy: an active, not refuted AllergyIntolerance recorded before the end of the period. Medication dispensed (MedicationDispense) and Medication administered (MedicationAdministration): a medication code, R4
medicationCodeableConceptor R5medication.concept. Codes with fewer than 10 patients are not offered; at most 16 facts at a time. - Choosing facts
- The facts in the matrix show as chips above it; ✕ removes one. Add facts opens a panel on the right: search by name, synonym or code, pick a kind, and click the choices of a row (High, Low, a value range, Measured, Dispensed…). Own threshold… adds a ≥ or ≤ value of your own. Suggested sets adds a ready-made set (heart and metabolism, kidneys, lungs, vaccines and allergies, the most frequent).
- One row per concept
- Codes that mean the same are one row with a short name: the same code with displays in other languages, ICD-10, ICD-10-CM and ICD-10-GM spellings of one code, the WHO and German ATC, the LOINC® codes of one result (eGFR, HbA1c and the other results of the Digital twin, with values converted to one unit), the CVX and ATC codes of one kind of vaccine, an allergy recorded as a finding or as its substance, and a local product code with its ATC medicine. The row says which codes were merged.
- Patients
- Everyone with at least one of these records in the period. Age (at the end of the period), gender and address come from the Patient resource; the tiles say how complete they are.
- Matrix
- Each cell compares two facts: the odds ratio (or lift, phi, or the number of patients with both). Warm: more often together than chance; blue: less often. Grey: not significant after correcting for the number of pairs (Benjamini-Hochberg q ≥ 0.05) or too few patients. Adjust for age and gender compares within age bands (0–17, 18–39, 40–64, 65–79, 80+) and gender (Mantel-Haenszel).
- Breakdown
- Click a cell: the 2×2 table, the crude and adjusted odds ratio with their 95% confidence intervals, lift, and for two measurements the rank correlation (Spearman) of their values. Below, the odds ratio per age band and gender and per region (city, postcode area of 2 to 4 characters, state or country), with the overall value as a dotted line. Cities, states and countries are also drawn on a world map (see Maps below).
Reading it
The page shows co-occurrence, never cause. A pair can go together because one is the reason for the other (metformin for a high HbA1c), because one rules out the other (amoxicillin is not given with a penicillin allergy), because both depend on something else (age, a vaccination campaign, how often someone sees a doctor), or by chance. When the adjusted value is much closer to 1 than the crude one, age and gender explain much of it. A pattern between regions does not have to hold for the people in them.
Privacy
Only counts are shown, never patients. A table with a count from 1 to 4 shows no counts and no statistics (one hidden count could be worked out from the others), and age, gender and region groups under 20 patients are left out. Restricted patients take no part, and facts of types your account cannot see are not offered.
Make the sample with python3 tools/sample-data/generate_correlations.py and load it. Choose HbA1c: high and metformin (by indication), Allergy to penicillin with amoxicillin and clarithromycin (ruled out, given instead), Influenza and Pneumococcal vaccine with and without adjusting (age), and Vitamin D: low by city (lower in the north).
viewer:browse and access to Patient. Results are kept for 10 minutes per period; a new load shows after that.