Fix USCDI clinical data templates against a working implementation - #91
Merged
Merged
Conversation
…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
force-pushed
the
akim/data-integration-uscdi-corrections
branch
from
September 10, 2026 12:32
23a4d8a to
8819708
Compare
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
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 noissued, which US Core requires once a report'sstatusispartial/preliminary/final/amended/corrected/appended. The spec page calledissued"If available", which is what let a non-conformant example through — fixed the template rows and the wording (now states the real conditional requirement, forissuedandeffective_datetimeboth).social_history: SH-0001's occupation row named novalue_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 gavevalue_systemits own table row instead of folding it intovalue_code's description.practitioners: the Fox/Dana row (a clinician with no location, org, or contact info) produced a PractitionerRole that fails Plan-Netpd-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 lintpasses (only pre-existing, unrelated warnings)bun assets:hashrun, all references updatedinterbox-workspace-private's USCDI-clinical pipeline logic (normalize filters + mapping rules) for all three fixes🤖 Generated with Claude Code