Large-scale healthcare datasets

Fantastic Data and Where to Find Them

Yu Cheng Hsu

Learning objectives

  • Identify different type of medical data sources
  • Understand the pros and cons of different medical data sources

Landscape & Taxonomy of Large-Scale Health Data

Source of the large-scale data

  • Electronic Health Record (EHR)
    • Granular, contains vitals, lab values,
    • Bedside observations, clinical narrative
    • Fragmented across provider systems.
  • Billing/Claims (Payer Focus):
    • Comprehensive longitudinal spend and encounter tracking, reliable billing codes (ICD, CPT)
    • Zero clinical nuance (e.g., you know an HbA1c test was billed, but not the actual value).
  • Governments
    • Official statistics (e.g. life and death)
    • Disease surveilance (e.g. COVID-19)
    • Policy formulation (e.g. smoke, alcohol)
  • Research groups
    • Speicific scientific questions
  • NGOs

Comparison of data sources

Dimension Government Official Statistics Electronic Health Records (EHR) Insurance claim
Purpose Governance, resource allocation, and public policy Direct clinical care and patient management Financial reimbursement and payer audit
Granularity Population-level/aggregate summaries Highly granular microdata (time-stamped labs, dosage, clinical narrative) Episode-of-care microdata (billed diagnostic & procedural codes, costs)
Dimension Government Official Statistics Electronic Health Records (EHR) Insurance claim
Denominator Entire geographic population (census-based or legally registered residents) Care-seeking population only Insured/enrolled cohort only
Selection Bias Low overall coverage bias; non-response bias in health survey High (sicker patients have more data; informed presence bias) Moderate to high (churn across employers/plans; excludes uninsured)

Government Official statistics

Government Official statistics

  • Aggregated data to the district/state/country level
  • Ground truth of denominator
    • Government census data provides age-, sex-, and district-stratified population denominators
    • Revealing the incidence/prevalence rateand fair comparison acrross different region
  • Life event (birth, migrate and death) ground truth
    • Death and migrate might not reveal in health system
    • Birth and immgrate events could happen abroad

Medical Claim

Health Insurance Claims Data

The Claims Lifecycle

  1. Patient Encounter: Patient receives care (inpatient admission, outpatient clinic visit, or pharmacy fill).
  2. Medical Coding: Medical coders translate clinical documentation into standardized billing codes (ICD for diagnoses, CPT/HCPCS for procedures, NDC for prescription drugs).
  3. Claim Submission: The provider submits a claim form
  4. Adjudication: The payer evaluates the claim against the patient’s coverage policy, determines negotiated rates, calculates patient cost-sharing and issues payment.

Medication adherence

Medication adherence

Rresearchers can compute standardized pharmacoepidemiologic adherence metrics by the claim frequency and the dispense records

Medication Possession Ratio (MPR): \[ \begin{aligned} \text{MPR} = & \\ & \frac{\sum \text{Days Supply of Medication in Period}}{\text{Total Days in Period}} \end{aligned} \]

Health Economics

Health Economics and Cost-Effectiveness

Claims represent actual economic transactions:

  • Billed Amount (chargemaster rate - often inflated)
  • Allowed Amount (contractually negotiated rate)
  • Paid Amount (actual money reimbursed by insurer)
  • Out-of-Pocket Cost (patient copay, deductible, coinsurance)

\[ \begin{aligned} \text{Billed Amount} = & \underbrace{\text{Paid Amount} + \text{Out-of-Pocket Cost}}_{\text{Allowed Amount}} + \\ & \text{Contractual Adjustment} \end{aligned} \]

Limitation of medical claim

  • Upcoding
    • Assign expensive diagnostic or complex procedure codes to qualify for larger reimbursements
  • Long-term longitudinal follow-up
    • Commerical plan are usually valid for 2-3 years
    • Long-term longitudinal follow-up (e.g., 10-year chronic diseases) is severely censored.
  • Lack of clinical nuances
    • know what have been done
    • Don’t know what are the results

Electronic Health Record

What is an EHR?

An Electronic Health Record (EHR) is the digital chart of a patient’s encounters with the health system—visits, diagnoses, labs, prescriptions, and clinical notes stored so clinicians (and later analysts) can reuse them.

Toy timeline (one patient):

  1. Visit the clinic → demographics recorded
  2. Doctor records a diagnosis → coded (e.g. ICD)
  3. Lab is ordered → result coded (e.g. LOINC)
  4. Prescription is filled → drug coded (e.g. ATC / RxNorm)

Coding systems are a shared language so different hospitals and software can mean the same clinical idea.

Components in EHR System

  • Demographics & Social Determinants: Age, sex, ethnicity, socioeconomic indicators.
  • Clinical Encounters & Diagnoses: Coded using international diagnostic standards:
    • ICD-9 / ICD-10 / ICD-11: International Classification of Diseases.
    • SNOMED-CT: Systematized Nomenclature of Medicine for clinical concepts.
  • Prescriptions & Pharmacy Records: Coded using ATC or RxNorm frameworks.
  • Laboratory & Diagnostic Results: Coded using LOINC standards.
  • Unstructured Clinical Text: Progress notes, discharge summaries, radiological reports.

From Individual Care to Population & Global Health

  • Scaling clinical observations from single patient encounters to entire populations.

  • Clinical Medicine: Focuses on diagnosis, treatment, and immediate patient outcomes.

  • Population Health: Health outcomes, determinants, and patterns across defined groups (e.g., regional populations, disease cohorts).

  • Global Health & Digital Health Venture: Scalable health solutions, cross-border disease surveillance, and commercialization of data-driven digital health products.

Case: Census on an influenza

Consider a influenza outbreak in district \(D_1\). and \(D_2\). with two hospitals \(H_A\) (in \(D_1\)). and \(H_B\) (in \(D_2\)). Scientists would like to investigate the incidence rate of the influenza. The fact sheet is below

District Population Active pateients New influenza cases \(H_A\) share \(H_B\) share
\(D_1\) 100K 25K 500 80% 20%
\(D_2\) 200K 50K 1000 30% 70%

\[ \text{Incidence rate} = \frac{\text{New cases in a time interval}}{\text{Total poppulation at risk}} \]

  • True incidence rate \(0.5\%\)

Census data as denominator

Using government census data as denominator:

District Population Case reported in the hospital Rate
\(D_1\) 100,000 \(400\) \(0.4\%\)
\(D_2\) 200,000 \(700\) \(0.35\%\)

If we consider all cases in \(H_A\) with population from \(D_1 + D_2\) the rate will be \(0.13\%\)

  • Cross-Boundary Leakage
    • Residents of District \(D\) do not exclusively visit Hospital in \(D\)
    • The reported rate is underreported
  • Tertiary Referral Inflow
    • Patients travel from other regions or abroad for treatment.
    • The reported rate is overreported

EHR data as denominator

Using EHR active user as denominator and the new cases in

District Active patients Case reported in the hospital Rate
\(D_1\) 25,000 \(700\) \(2.8\%\)
\(D_2\) 50,000 \(800\) \(700\) \(1.6\%\)
  • Health-Seeking bias (Berkson’s Bias)
    • Healthy individuals with zero medical encounters/ new immigrants will be excluded
    • The reported rate is overreported
  • The “Ghost Patient” & Churn Problem
    • Patients could migrate, die, or change health systems.
    • The reported rate is underreported

Fix the calculation

  1. Correct on the numerator: $n_{D_1} = 0.8 n_{H_A} + 0.3 n_{H_B} $

or

  1. Correct on the denominater: $P_{D_1} = 0.8 n_{D_1} + 0.3 n_{D_2} $
  • District specific calculation need to consider the market share
    • Corrections is needed
    • Try to include all service provider statistics

Think twice about the context

  • Healthcare system Close v.s Open
    • Closed / Single-Payer Networks (e.g., Hong Kong Hospital Authority, UK NHS, Veterans Affairs): High population coverage (up to 90%+ of inpatient care) minimizes leakage,
    • geographic census denominators much more viable.
  • Open / Multi-Payer Systems (e.g., US EHRs):
    • Prone to denominator fragmentation.
    • Insurance claims enrollment periods rather than pure EHR visits to establish continuous coverage.
  • Disease context
    • Serious/ rare disease are more often in the medical centers

EHR for idea generation

Problem

  • Many biomedical startups fail due to building solutions for undersized or ill-defined patient markets.

  • How many potential customers could benefit from the product?

EHR can

  • Analyzing epidemiological EHR data allows founders to precisely quantify unmet clinical needs
  • Facilitate further pricing strategy, potential market size.

EHR as a product

Problem

  • Using EHR to develop new algorithms for diagnostic AI
  • Software-as-a-Medical-Device (SaMD: software that itself is regulated as a medical device)
  • Enhance accessibility of EHR, e.g. dashboard

EHR can

  • Provide fruitful training sources
  • Serve as an information service for clinical decisions

EHR as an evidence

Problem Traditional Randomized Controlled Trials (RCTs) are

  • expensive,
  • slow, and often lack generalizability.

EHR can

Regulatory bodies (e.g., US FDA, EMA, NMPA) increasingly accept real-world evidence (RWE)—evidence generated from routine care data such as EHRs, not only from traditional trials—for

  • Post-market surveillance,
  • Label expansions, and
  • Synthetic control arms in clinical trials.

Challenges in EHR

Missingness (missing for a reason)

  • Clinic vignette: sicker patients get more labs ordered; healthier patients may have blank lab fields. A “missing” lab is often informative, not random noise.
  • Formal label: this pattern is often called missing not at random (MNAR) (contrast: completely random gaps vs gaps explained by other recorded variables).
  • Labs/tests are ordered based on clinical suspicion, leading to missing baseline data.
  • Loss to follow-up due to stigma and/or economic difficulties.

Challenges in EHR

Selection / Sampling Bias

  • EHRs represent health-seeking populations, not necessarily the general population.
  • People who are not covered in the health care system

Measurement / Coding Error

  • Inaccurate ICD codes or changes in institutional coding policies over time.
  • Human errors in the process
  • Misdiagnosis