bcda: migrate client + flatteners to BCDA v3 and prove it against the Large Model Entity sandbox #1139
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
BCDA v3 went GA 2026-07-01; v1/v2 are discontinued 2027-07-30. The current
bcdamodule targets v2: the client defaults to/api/v2, and the flattener matches BlueButton extensions by the retiredresources/variables/<name>URL suffix, so on v3 payloads it silently emits NULL for almost every coded field.Findings from the live sandbox spike (2026-10-25, Large Model Entity creds)
fhirVersion 4.0.1, software r302).GET /api/v{2,3}/jobsrequiresPrefer: respond-async+Accept: application/fhir+jsonand returns a FHIR Bundle of Task resources — the existingClient.jobs()was broken on both versions.404 Job has been cancelledseconds after creation; the public sandbox credentials are shared, so any caller can cancel any job. The client must surface the OperationOutcome diagnostics instead of a bare HTTPStatusError.Scope
v3;_typeFiltersupport; fixjobs()headers and Bundle shape; OperationOutcome diagnostics on 4xx;/_version+/_health.sourceColumn, withccwMapping/cclfMappingcrosswalk) into the existingbcda.*tables, with v3-native columns added where v2 had none (Coverage.period per plan, dual Coverage, System-Type/Final-Action tags, claim control number, consolidated adjudication amounts). v2 payloads keep working (auto-detected).dev/seeds/*.csv→reference_data.vendor_bcda_app.py --check/--syncscript and a weekly workflow that files an issue on drift.notebooks/bcda_v3_sandbox.py: metadata → auth → export (or reuse a completed job) → Store download → flatten → DuckDB load → proof queries (MBI coverage, Coverage per plan, EOB by System-Type/EOB-TYPE, claim-control-number dedupe, dictionary field population) and the crosswalk tables.Out of scope (follow-ups)
bcda.express.cclf(input_layer pipeline) for v3 semantics beyond keeping it running on the new columns._typeFilter, which the client will support, but the sandbox Large entity is adjudicated-only.