Skip to content

Fix USCDI clinical data templates against a working implementation - #91

Merged
akim1995 merged 1 commit into
mainfrom
akim/data-integration-uscdi-corrections
Sep 11, 2026
Merged

Fix USCDI clinical data templates against a working implementation#91
akim1995 merged 1 commit into
mainfrom
akim/data-integration-uscdi-corrections

Conversation

@akim1995

Copy link
Copy Markdown
Contributor

Summary

Three example rows in the USCDI clinical data templates didn't satisfy the rules their own spec pages describe, so they silently failed validation when ingested by a real implementation instead of demonstrating a working delivery.

  • diagnostic_reports: DR-772/DR-773 had no issued, which US Core requires once a report's status is partial/preliminary/final/amended/corrected/appended. The spec page called issued "If available", which is what let a non-conformant example through — fixed the template rows and the wording (now states the real conditional requirement, for issued and effective_datetime both).
  • social_history: SH-0001's occupation row named no value_system. The spec page pointed at "ONET-SOC" with no system URI; occupation actually needs Occupational Data for Health (ODH) stated explicitly, since a bare ONET-SOC code and an ODH composite code are different code spaces. Fixed the template row and gave value_system its own table row instead of folding it into value_code's description.
  • practitioners: the Fox/Dana row (a clinician with no location, org, or contact info) produced a PractitionerRole that fails Plan-Net pd-1 ("SHALL have contact information or a reference to..."). Gave it a phone number — the minimal fix that keeps it valid while still illustrating "a clinician missing from the directory".

Found while reviewing HealthSamurai/interbox-workspace-private#13 — a working pipeline correctly rejected these rows, which is what surfaced the mismatch.

Test plan

  • bun lint passes (only pre-existing, unrelated warnings)
  • bun assets:hash run, all references updated
  • Verified against interbox-workspace-private's USCDI-clinical pipeline logic (normalize filters + mapping rules) for all three fixes

🤖 Generated with Claude Code

…plementation

diagnostic_reports: DR-772/DR-773 were missing `issued`, which US Core
requires once a report's status is partial/preliminary/final/amended/
corrected/appended — both rows were silently dropped on ingest. The
spec page also called `issued` "If available", which is what let this
slip into the template in the first place; it now states the real
conditional requirement.

social_history: SH-0001's occupation row named no `value_system`, and
the spec page pointed at O*NET-SOC without a system URI. Occupation
codes need Occupational Data for Health (ODH) explicitly — a plain
O*NET-SOC code and an ODH composite code are not the same code space,
so there's no safe default. Fixed the template row and gave
`value_system` its own table row instead of folding it into `value_code`.

practitioners: the Fox/Dana row (a clinician with no location, org, or
contact info) produced a PractitionerRole that fails Plan-Net pd-1 and
was silently dropped. Gave it a phone number, the minimal contact
detail that makes the row valid while still demonstrating "a clinician
missing from the directory".

Found via HealthSamurai/interbox-workspace-private#13.
@akim1995
akim1995 force-pushed the akim/data-integration-uscdi-corrections branch from 23a4d8a to 8819708 Compare September 10, 2026 12:32
@akim1995
akim1995 merged commit 250254e into main Sep 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant