How yubin-park/hccpy works
hccpy is a Python package for health-risk adjustment: callers provide member demographics and diagnosis codes (plus drug and procedure codes for HHS), and receive HCC profiles and risk scores. CMS-HCC and HHS-HCC engines map codes, apply edits and hierarchies, generate model interactions, and calculate scores; CMS scoring also supports normalization and coding-intensity adjustment. The package additionally describes HCCs, compares HCC lists, and checks claim-code eligibility. Unsampled modules and data are represented only at paths supported by the tree and documented interfaces.
Main entry points: hcc.py CMS-HCC engine · hhshcc.py HHS-HCC engine · utils.py CMS data readers · utils_hhs.py HHS data readers
Components 25
Risk engines
- CMS-HCC engine
hccpy/hcc.py - HHS-HCC engine
hccpy/hhshcc.py
Code classification
- CMS model data
hccpy/data - HHS model data
hccpy/data - CMS data readers
hccpy/utils.py - HHS data readers
hccpy/utils_hhs.py - CMS age-sex edits
hccpy/_V22I0ED2.py - V28 age-sex edits
hccpy/_V28I0ED1.py - HHS age-sex edits
hccpy/_I0V05ED2.py - HCC hierarchy
hccpy/hcc.py - CMS demographics
hccpy/_AGESEXV2.py - HHS demographics
hccpy/_AGESEXV6.py
Risk scoring
- CMS interactions
hccpy/_V2419P1M.py - V22 interactions
hccpy/_V2218O1M.py - V23 interactions
hccpy/_V2318P1M.py - V28 interactions
hccpy/_V2823T2M.py - ESRD interactions
hccpy/_E2118P1M.py - HHS interactions
hccpy/_V0519F3M.py - CMS coefficients
hccpy/_V2218O1P.py - ESRD coefficients
hccpy/_E2118P1P.py - HHS coefficients
hccpy/_V0519F3P.py
Eligibility and support
- Claim eligibility
hccpy/raeligible.py - Describe and diff
hccpy/hcc.py - HHS profile diff
hccpy/hhshcc.py
Other components
- Package caller
Connections 24
- Package caller → CMS-HCC engine: profiles member
- Package caller → HHS-HCC engine: profiles member
- Package caller → Claim eligibility: checks claims
- CMS-HCC engine → CMS data readers: loads model data
- CMS data readers → CMS model data: reads mappings and factors
- CMS-HCC engine → CMS demographics: derives demographics
- CMS-HCC engine → CMS age-sex edits: edits diagnoses
- CMS-HCC engine → V28 age-sex edits: edits V28 diagnoses
- CMS-HCC engine → HCC hierarchy: applies hierarchy
- CMS-HCC engine → V22 interactions: dispatches V22
- CMS-HCC engine → V23 interactions: dispatches V23
- CMS-HCC engine → CMS interactions: dispatches V24
- CMS-HCC engine → V28 interactions: dispatches V28
- CMS-HCC engine → ESRD interactions: dispatches ESRD
- CMS-HCC engine → CMS coefficients: scores CMS models
- CMS-HCC engine → ESRD coefficients: scores ESRD
- HHS-HCC engine → HHS data readers: loads model data
- HHS data readers → HHS model data: reads mappings and factors
- HHS-HCC engine → HHS demographics: derives demographics
- HHS-HCC engine → HHS age-sex edits: edits diagnoses
- HHS-HCC engine → HHS interactions: creates interactions
- HHS-HCC engine → HHS coefficients: calculates risk score
- Package caller → Describe and diff: describes or compares HCCs
- Package caller → HHS profile diff: compares HHS lists