Healthcare data science · Independent project
From fragmented claims
to an inspectable decision.
CareLens connects a reconciled Medicare claims pipeline, population analytics, and a future-spending benchmark in one working product. The question: which members would an analyst review first, and what evidence supports that list?

The business comparison
At a 5% review capacity, a team can inspect 596 of 11,908 held-out members. I compared a boosted-tree model with ranking the same members by prior-year medical spending.
| 2010 held-out result | Predictive model | Prior-spending baseline |
|---|---|---|
| Future high spenders in the review list | 106 | 81 |
| Precision at 5% | 17.79% | 13.59% |
| Recall at 5% | 18.00% | 13.75% |
| Average precision | 0.1627 | 0.0912 |
Precision increased by 4.19 percentage points. The 95% paired-bootstrap interval was +1.68 to +6.38 points across 1,000 resamples. The fixed high-spending threshold was $12,780, learned only from training outcomes.
The engineering work behind the charts
Eight source archives contain about 11.15 million claim and prescription-event records. The warehouse reconciles all 343,644 beneficiary-year summaries to inpatient, outpatient and carrier payments to the cent. All 23 quality checks pass.
The segment audit found a specific financial trap: adding every institutional row would overstate payments by $16,510,060. Secondary segments were undated and carried differing header values. Canonical primary segments reconcile exactly; supplemental records are retained separately, including 278 outpatient segments without a primary header.
- Annual enrollment counts support a clearly defined full-year cohort; no partial-year monthly eligibility is invented.
- Medical Medicare payments and prescription gross costs remain separate, with separate Part D denominators.
- Beneficiary-disjoint development and testing prevent the same people from appearing in training and final evaluation.
- Models use dated baseline evidence. Future spending, enrollment and deaths never enter the predictors.
- TreeSHAP contributions reconstruct the raw model score and are labeled in log-odds, without causal claims.
Show the evidence

The matching Power BI project has three report pages. Its full Desktop import, actual DAX measures, and rendered charts and tables were verified against the warehouse. The editable project, CSV imports, theme and verification record are included in the Power BI download.
The browser demo reads compact, versioned exports from the same pipeline used by Power BI. Member histories load on demand.
A small, measured AI feature
DeepSeek curates approved statements through fal.ai. A fixed evaluation used 3 paid requests, one for each annual all-member cohort, with no regeneration. 3/3 outputs passed the citation, exact-statement and length checks. The provider-reported total cost was $0.001217, within the $3 project budget.
The public demo serves accepted outputs from a static cache. Visitors make no paid model requests, and the local API key is never deployed. Other cohort briefs retain their computed narrative. A rejected response falls back to the same evidence-linked narrative.
This tests a restricted curation task: the model selects and orders verified factual sentences. Three samples do not establish a general hallucination rate or clinical reliability. Adversarial checks run offline. Inspect the evaluation record.
Explore the implementation
The source bundle includes the Python pipeline, dbt models and tests, model selection safeguards, React interface, Power BI definitions, source checksums, model card, and reproduction instructions. Raw CMS files and credentials are excluded. The Power BI bundle includes all four CSV import tables and instructions for setting its local export-directory parameter.
The full monthly fact table is split into three smaller downloads: 2008 data, 2009 data, 2010 data. Extract the report and all three data ZIPs into the same folder, then run Combine-PowerBIData.ps1 to reconstruct the complete CSV. The bundle's README explains refresh and verification status.