Recall Spend Window
recall_spend_windowGiven an FDA-assigned recall_number, returns recall metadata plus Medicare Part D and Medicaid SDUD federal spend on the recalled drug during the recall window (initiation -> termination), summed SERVER-SIDE with per-year Part D rows and per-NDC Medicaid rows riding the answer. The recall source carries NO NDC (openfda_product_ndc_first is NULL on all 17,830 current rows), so the Medicaid leg reaches NDCs through dim_drug on the openFDA product name and says so. Each leg reports its own published-year coverage, so 'no spend', 'not published yet' and 'no join key' are three different answers instead of one null.
Medicaid totals EXCLUDE the SDUD national roll-up, which CMS publishes under state 'XX' beside the 50 state rows and which would otherwise roughly double every Medicaid figure.
Reference demo: recall_number D-1489-2019 (Fresenius Kabi fluorouracil, Class I, window 2019-2022) exercises both legs and the NDC bridge. This description quotes NO dollar figure on purpose: the answer is the only place a number lives, so a change to the computation can never leave a stale figure in the documentation. It did once -- the demo totals here were the pre-2026-08-10 national-roll-up double count and stood six weeks after the fix.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail_limit | No | ||
| recall_number | Yes | ||
| acknowledge_era_break | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | ||
| as_of | No | ||
| value | Yes | ||
| source | Yes | ||
| status | No | complete | |
| caveats | No | ||
| failure | No | ||
| quality | No | ||
| refusal | No | ||
| vintage | No | as_restated | |
| audit_id | Yes | UUID; ties to medicare_silver.audit_log row. | |
| signature | No | ||
| tenant_id | No | Calling tenant slug, resolved by the binding and stamped via the per-call tenant context. Defaults to the bootstrap 'internal' tenant for local/in-process callers. | |
| timestamp | Yes | ||
| confidence | No | ||
| data_as_of | No | ||
| request_id | Yes | ||
| methodology | No | ||
| snapshot_set | Yes | {table_fqn → iceberg_snapshot_id (int64)}. Per M-2 §2.2. | |
| tool_version | Yes | ||
| response_hash | Yes | SHA-256 of canonicalized form per M-2 §2.4. | |
| result_status | Yes | ||
| vintage_basis | No | default_unmeasured | |
| as_of_asserted | No | ||
| as_of_observed | No | ||
| parse_revision | No | ||
| as_of_effective | No | ||
| freshness_state | No | unknown | |
| methodology_era | No | ||
| confidence_basis | No | ||
| semantic_version | Yes | ||
| invariants_applied | No | ||
| finality_confidence | No | ||
| cms_vintage_sequence | Yes | ||
| parser_artifact_hash | Yes | ||
| methodology_blend_factors | No | ||
| parser_artifact_hash_basis | No | not_evaluated |