Add OMB 2024 standardized race_ethnicity to core.patient (#1282)#1360
Open
gopihc wants to merge 2 commits into
Open
Add OMB 2024 standardized race_ethnicity to core.patient (#1282)#1360gopihc wants to merge 2 commits into
gopihc wants to merge 2 commits into
Conversation
…#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.
✅ Deploy Preview for thetuvaproject canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a derived, standardized
race_ethnicitycategory tocore.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).standardize_race_ethnicitymacro collapses the existingraceandethnicitycolumns 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_ethnicityis populated from this macro.The change is additive and non-breaking: the existing
raceandethnicitycolumns are unchanged, no terminology seeds are modified, andcore.patienthas 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):core.patient; uniqueness and not-null tests pass.ethnicityvalues arehispanic/non-hispanicrather than the terminology descriptions, so the macro matcheslike 'hispanic%'(pluslatino), which captures Hispanic variants while correctly excludingnon-hispanicandnot hispanic or latino.Release note
enhancement
Closes #1282