Skip to content

Fix/cdm 542 field concepts - #81

Open
gkennos wants to merge 2 commits into
mainfrom
fix/cdm-542-field-concepts
Open

gkennos wants to merge 2 commits into
mainfrom
fix/cdm-542-field-concepts

Conversation

@gkennos

@gkennos gkennos commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

ModifierFieldConcepts used CDM 6.0 field concepts for drug and device, and the CDM 5.4.0-only concept for
episode. Corrected to CDM 5.4.2, checked against the vocabulary's Contained in version relationships:

Constant Was Now
DRUG_EXPOSURE 1147707 (CDM 6.0) 1147094
DEVICE_EXPOSURE 1147693 (CDM 6.0) 1147115
EPISODE 756290 (CDM 5.4.0 only) 798885 (CDM 5.4.1 and 5.4.2)

Condition, measurement, observation and procedure are unchanged.

  • The omop-semantics modifier_fields registry (0.8.0) is the source of truth. Alchemy keeps its own constants,
    because omop-semantics is an optional extra and core CDM models must import without it.
  • New tests/test_cdm_field_concepts.py fails if alchemy and the registry disagree, in values or in tables. It
    runs whenever the semantics extra is installed, which CI does.
  • The semantics extra pin moves to omop-semantics>=0.8,<0.9.

Effect: episode-event and modifier links built through clinical_event_model_spec and ResolvedEpisodeEvent
now use the 5.4.2 ids that the ETL writes.

Checklist

  • Applied exactly one label (breaking, feature, fix, dependencies, or chore)
  • Tests pass locally (uv run pytest -q)
  • Lint passes (uv run ruff check .)

@gkennos gkennos added the fix Bug fix, backwards-compatible. PATCH: x.y.z+1 label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix, backwards-compatible. PATCH: x.y.z+1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant