finalrehab__report_queue_item_feature
marts/rehab/final/rehab__report_queue_item_feature.sql
The published QueueItem feature contract, one row per (hsp_account_id, order_proc_id, discipline, visit_type) — the RFC FeaturesKey. Point-in-time current snapshot, fully rewritten each run; history for replay and training accumulates in the daily agg table.
A feature that is not built is absent from this schema rather than a typed NULL, so the policy fails at construction instead of ranking on a silent null. Absent today: has_vascular_surgery (needs an order-comment extract) and the remaining-LOS p10/p90 interval and confidence flag (the surface ships only the p50 median). remaining_los_p50 itself is per-row nullable: null where the stay has no scored board row for the policy date.
Every feature join is onto a model whose grain is asserted upstream, which is what keeps this at the FeaturesKey grain — the combination test below is what proves it still holds.
- materialized
- table
- schema
- rehab_final
- group
- rehab
- depends on
- 12
- feeds
- 3
- ancestors
- 73
- descendants
- 4
- dbt tests
- 17
- rows (synthetic)
- ~6,311