sparknlp_jsl.utils.risk_adjustment_utils#

Module Contents#

Classes#

RiskAdjustmentUtil

Provides util functions for working with Risk Adjustment Hierarchical Condition Categories (HCCs).

class RiskAdjustmentUtil#

Bases: object

Provides util functions for working with Risk Adjustment Hierarchical Condition Categories (HCCs).

HCCs are used to assess the health status of patients for various medical applications. This class offers functionality to retrieve HCC information based on International Classification of Diseases, 10th Revision (ICD-10) codes, obtain medical descriptions for HCCs, and calculate the difference between two sets of HCCs for a specific measurement year.

static HCC_from_ICD(module: str, version: str, year: int, icd10_codes: list)#

Retrieves the mapping of Risk Adjustment Hierarchical Condition Categories (RXHCC) or Hierarchical Condition Categories (HCC).

Based on a list of International Classification of Diseases, 10th Revision (ICD-10) codes for a specific measurement year.

This method allows for the retrieval of RXHCC or HCC associated with the provided ICD-10 codes for a particular year.

Parameters:
  • module (str) – The module identifier or name for the specific risk adjustment module. [HCC, RXHCC]

  • version (str) – The version identifier for the risk adjustment module.

  • year (int) – The measurement year for which the risk adjustment is being calculated.

  • icd10_codes (list) – A list of ICD-10 codes for which RXHCC or HCC information is to be retrieved.

Returns:

A mapping of ICD-10 codes to their corresponding RXHCC or HCC codes.

Return type:

dict

static HCC_labels(module: str, version: str, year: int, hcc_list: list)#

Retrieves the medical descriptions associated with a given list of Risk Adjustment Hierarchical Condition Categories (RXHCCs) and Hierarchical Condition Categories (HCCs) for a specified measurement year.

This method allows for the retrieval of medical descriptions corresponding to the provided RXHCCs and HCCs for a particular year.

Parameters:
  • module (str) – The module identifier or name for the specific risk adjustment module. [HCC, RXHCC]

  • version (str) – The version identifier for the risk adjustment module.

  • year (int) – The measurement year for which the risk adjustment is being calculated.

  • hcc_list (list) – A list of RXHCCs and HCCs for which medical descriptions are to be retrieved.

Returns:

A mapping of RXHCCs and HCCs to their respective medical descriptions.

Return type:

dict

static diff_between_HCCs(module: str, version: str, year: int, before_HCC_list: list, after_HCC_list: list)#

Calculates the difference between two lists of Hierarchical Condition Categories (HCCs) or Risk Adjustment Hierarchical Condition Categories (RXHCCs) for a specific measurement year.

This method identifies and categorizes the added, deleted, and upgraded HCCs between the “before_HCC_list” and “after_HCC_list” states.

HCCs and RXHCCs evolve over time. New conditions emerge with age, causing additions and removals of CCs. Some CCs might escalate to higher levels of severity, representing an upgrade.

Parameters:
  • module (str) – The module identifier or name for the specific risk adjustment module. [HCC, RXHCC]

  • version (str) – The version identifier for the risk adjustment module.

  • year (int) – The measurement year for which the risk adjustment is being calculated.

  • before_HCC_list (list) – A list of HCCs that were present before the change.

  • after_HCC_list (list) – A list of HCCs that are present currently, representing the updated state.

Returns:

A mapping highlighting the added, deleted, and upgraded HCCs between the “before_HCC_list” and “after_HCC_list” lists.

Return type:

dict