lake: publish primary-care attribution codes + gpci_proposed to DuckLake #630

Closed
opened 2026-08-17 16:10:10 +00:00 by kert · 1 comment
Owner

The notebook reads only DuckLake, but the MSSP designated-primary-care-service list (42 CFR 425.400(c); 109 HCPCS codes) lives only in the aco monolith as cms_provider_attribution._primary_care_hcpcs_codes, and #629's new pfs.gpci_proposed starts monolith-side too.

Extend dev/scripts/publish_reference_to_lake.py:

  1. Add gpci_proposed to the pfs schema tuple.
  2. Add an explicit rename map and publish cms_provider_attribution._primary_care_hcpcs_codes → cms.primary_care_service_code.

Run it inside the notebooks container (the script's documented path — it is currently the only venv whose duckdb can attach the migrated DuckLake catalog, see #633). Acceptance: pfs.gpci_proposed and cms.primary_care_service_code queryable from connect.ducklake() in the notebooks container with expected row counts (109 codes; ~113 localities × year-partitions).

Spec: docs/superpowers/specs/2026-08-17-cy2027-notebook-gpci-pqm-design.md (D2).

The notebook reads only DuckLake, but the MSSP designated-primary-care-service list (42 CFR 425.400(c); 109 HCPCS codes) lives only in the aco monolith as `cms_provider_attribution._primary_care_hcpcs_codes`, and #629's new `pfs.gpci_proposed` starts monolith-side too. Extend `dev/scripts/publish_reference_to_lake.py`: 1. Add `gpci_proposed` to the `pfs` schema tuple. 2. Add an explicit rename map and publish `cms_provider_attribution._primary_care_hcpcs_codes` → **`cms.primary_care_service_code`**. Run it inside the notebooks container (the script's documented path — it is currently the only venv whose duckdb can attach the migrated DuckLake catalog, see #633). Acceptance: `pfs.gpci_proposed` and `cms.primary_care_service_code` queryable from `connect.ducklake()` in the notebooks container with expected row counts (109 codes; ~113 localities × year-partitions). Spec: docs/superpowers/specs/2026-08-17-cy2027-notebook-gpci-pqm-design.md (D2).
kert added this to the P39: CY2027 Notebook Deep-Dive — GPCI locality analysis + primary-care (ACO attribution) services milestone 2026-08-17 16:10:10 +00:00
kert added the datalakehouse labels 2026-08-17 16:10:10 +00:00
Author
Owner

Published and verified from the notebook's exact read path (connect.ducklake() in the notebooks container):

  • pfs.gpci_proposed: 327 rows — (CMS-1832-P, 2026)=109, (CMS-1832-P, 2027)=109, (CMS-1848-P, 2027)=109
  • cms.primary_care_service_code: 109 rows
  • cms.ingest_log: 2 rows for pfs.gpci_proposed (run with FR citations 90 FR 32352 / 91 FR 43842, pincite keys 2KVJ2HKX / 5ITGVDJV)
  • All pre-existing tables republished [OK] with read-back verification.
Published and verified from the notebook's exact read path (`connect.ducklake()` in the notebooks container): - `pfs.gpci_proposed`: 327 rows — (CMS-1832-P, 2026)=109, (CMS-1832-P, 2027)=109, (CMS-1848-P, 2027)=109 - `cms.primary_care_service_code`: 109 rows - `cms.ingest_log`: 2 rows for `pfs.gpci_proposed` (run with FR citations 90 FR 32352 / 91 FR 43842, pincite keys 2KVJ2HKX / 5ITGVDJV) - All pre-existing tables republished `[OK]` with read-back verification.
kert closed this issue 2026-08-17 16:39:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#630