Skip to content

Add OMB 2024 standardized race_ethnicity to core.patient (#1282)#1360

Open
gopihc wants to merge 2 commits into
tuva-health:mainfrom
gopihc:issue-1282-race-ethnicity-standard
Open

Add OMB 2024 standardized race_ethnicity to core.patient (#1282)#1360
gopihc wants to merge 2 commits into
tuva-health:mainfrom
gopihc:issue-1282-race-ethnicity-standard

Conversation

@gopihc

@gopihc gopihc commented Jul 3, 2026

Copy link
Copy Markdown

Summary

Adds a derived, standardized race_ethnicity category to core.patient, aligned with the 2024 OMB SPD 15 minimum categories (American Indian or Alaska Native, Asian, Black or African American, Hispanic or Latino, Middle Eastern or North African, Native Hawaiian or Pacific Islander, White).

  • New standardize_race_ethnicity macro collapses the existing race and ethnicity columns into a single OMB category using a Hispanic-ethnicity-first convention; values that do not map to an OMB minimum category (other race, asked but unknown, unknown, missing) are null.
  • core.patient.race_ethnicity is populated from this macro.

The change is additive and non-breaking: the existing race and ethnicity columns are unchanged, no terminology seeds are modified, and core.patient has no enforced contract. Middle Eastern or North African is a new OMB category not present in the legacy race terminology, so it is only produced when a source supplies it directly (a follow-up input-layer enhancement).

Validation

Local DuckDB with synthetic data (small):

  • Rebuilt core.patient; uniqueness and not-null tests pass.
  • Verified the derivation against every race/ethnicity combination in the synthetic data. This surfaced (and the PR fixes) a matching issue: source ethnicity values are hispanic/non-hispanic rather than the terminology descriptions, so the macro matches like 'hispanic%' (plus latino), which captures Hispanic variants while correctly excluding non-hispanic and not hispanic or latino.

Release note

enhancement

Closes #1282

…#1282)

Adds a derived race_ethnicity category on core.patient aligned with the 2024
OMB SPD 15 minimum categories, produced by a new standardize_race_ethnicity
macro from the existing race and ethnicity columns. The rollup uses a
Hispanic-ethnicity-first convention and returns null for values that do not
map to an OMB minimum category.

The change is additive: the existing race and ethnicity columns are unchanged
and no terminology seeds are modified, so downstream models are unaffected.
Middle Eastern or North African is a new OMB category not present in the
legacy race terminology and is only produced when a source supplies it
directly, which is left as a follow-up input-layer enhancement.
…health#1282)

The ethnicity column has no terminology relationship test, so real source
values vary (for example 'hispanic' rather than the terminology description
'Hispanic or Latino'). Matching with like 'hispanic%' plus 'latino' captures
these variants while still excluding 'non-hispanic' and 'not hispanic or
latino', which start with non/not. Validated against synthetic data on DuckDB.
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for thetuvaproject canceled.

Name Link
🔨 Latest commit ee8c490
🔍 Latest deploy log https://app.netlify.com/projects/thetuvaproject/deploys/6a4734db19e4f900081c6276

@chase-jones chase-jones added breaking-change Changes have been made that may cause other components to fail community Issues created by community members enhancement New feature or request labels Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Changes have been made that may cause other components to fail community Issues created by community members enhancement New feature or request

Projects

Status: 👀 Ready for Review

Development

Successfully merging this pull request may close these issues.

Consider updating race/ethnicity

3 participants