Files
stack/docs/docs/cli/bcda-export.md
kert 2cc13008a9
Some checks failed
CI / lint (push) Successful in 54s
CI / notebooks-smoke (push) Successful in 1m43s
CI / test (push) Failing after 2m56s
Infra CI / zotero (push) Successful in 15s
Infra CI / notebooks (push) Successful in 1m1s
Infra CI / api (push) Successful in 1m7s
Infra CI / docs (push) Successful in 1m50s
Infra CI / llm (push) Successful in 49s
Infra CI / mc (push) Failing after 35s
Infra CI / bcda (push) Successful in 1m42s
CI / lint (pull_request) Successful in 45s
CI / notebooks-smoke (pull_request) Successful in 1m38s
CI / test (pull_request) Failing after 2m53s
Infra CI / mc (pull_request) Failing after 30s
Infra CI / zotero (pull_request) Successful in 16s
Infra CI / notebooks (pull_request) Successful in 58s
Infra CI / docs (pull_request) Successful in 16s
Infra CI / api (pull_request) Successful in 15s
Infra CI / bcda (pull_request) Successful in 21s
Infra CI / llm (pull_request) Successful in 17s
feat(bcda): close the upstream-review gaps — partial exports, claim identity across systems, attribution checks, filter grammar, vendored behaviour
Closes #1293 #1294 #1295 #1296 #1297 #1298 #1299 #1300 (upstream review
docs/superpowers/specs/2026-10-25-bcda-upstream-review.md).

Partial exports (#1293). The manifest's `error` list is downloaded as
OperationOutcome[.N].ndjson with resource_type=OperationOutcome; every
URL is attempted and failures are recorded per file, then raised once as
DownloadError. A job with error files is `partial`: it still reconciles
(its rows are real) but never becomes the watermark, check_since warns
`partial_job`, the Store page lists the issues and `stack bcda errors`
prints them.

Claim identity (#1294), per bcda.cms.gov "Matching multiple EOBs to the
same claim": three new header columns — clm_cntl_num_match (VMS leading 1
stripped on SharedSystem DME), clm_natural_key (Part D events without a
control number: bene · line from-date · provider qualifier · service
provider · RX number · fill number) and superseded_by — plus
prvdr_srvc_id_qlfyr_cd. bcda.sync keys claims on match → control number
→ natural key → id, marks every claim another current claim names in
`related` as superseded (chain walked), counts `superseded`, and a new
invariant forbids a live claim being named predecessor by another live
claim. The connector dedupes on the same identity and drops superseded
rows. Partitions and current tables flattened before these columns
existed get them as NULLs.

Attribution (#1295): `attribution_expired` (block) from
expiration_dates, `attribution_floor` (warn) from the earliest
last_attribution_update recorded on job rows (new column), and the
server's 404/400/429 texts explained by explain_server_error.

Adoption (#1296): completed_jobs() drops jobs older than the 24 h file
retention; downloads no longer stop at the first failed file.

_typeFilter (#1297): build_type_filter follows bcda/fhir/param.go —
outcome lists, service-date earliest and latest bounds with eq/gt/ge/lt/le
on YYYY[-MM[-DD]], no comma lists, no conflicting prefixes; CLI and
Exports page expose them.

Runout (#1298): `runout_window` warn after July; population column on
the Sync page ledger.

Vendoring (#1299): the manifest now pins bcda-app's param.go,
bluebutton.go, service.go, constants, models and prod.yml, the docs
source (CMSgov/bcda-static-site: filter/access/migrate/PAC/FAQ pages and
announcements) and the PAC and unmapped-fields dictionaries.

Docs (#1300): the reconciliation design record states the server's
window `(since, transactionTime]`, the lookback bound, the silent
exclusions, re-loads, partial exports and the identity rules.

refs #1139
2026-10-25 17:10:24 -04:00

3.6 KiB

title, sidebar_position
title sidebar_position
stack bcda export 14

stack bcda export

Usage: stack bcda export [OPTIONS]                                             
                                                                                
 Run an export through the store (blocks until downloaded).                     
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --preset                              TEXT     Public sandbox entity when    │
│                                                BCDA_CLIENT_ID is unset.      │
│                                                [default: Large Model Entity] │
│ --type               -t               TEXT     Resource type(s); default all │
│                                                three.                        │
│ --endpoint                            TEXT     Group/all, Group/runout or    │
│                                                Patient.                      │
│                                                [default: Group/all]          │
│ --since                               TEXT     FHIR instant                  │
│                                                (2026-10-01T00:00:00+00:00)   │
│                                                or 'auto' = the per-type      │
│                                                watermark.                    │
│ --force                                        Start even when the _since    │
│                                                checks say block.             │
│ --system-type                         TEXT     _typeFilter System-Type       │
│                                                tag(s).                       │
│ --outcome                             TEXT     _typeFilter outcome: partial  │
│                                                and/or complete.              │
│ --service-date-from                   TEXT     _typeFilter earliest          │
│                                                service-date (YYYY[-MM[-DD]], │
│                                                optional gt/ge/eq prefix).    │
│ --service-date-to                     TEXT     _typeFilter latest            │
│                                                service-date (optional lt/le  │
│                                                prefix).                      │
│ --per-type               --one-job             One job per type (survives    │
│                                                sandbox sweeps).              │
│                                                [default: per-type]           │
│ --cancel-retries                      INTEGER  Restarts after server-side    │
│                                                cancellation.                 │
│                                                [default: 6]                  │
│ --poll-interval                       FLOAT    Seconds between status polls. │
│                                                [default: 15.0]               │
│ --help                                         Show this message and exit.   │
╰──────────────────────────────────────────────────────────────────────────────╯