sparknlp_jsl.functions#

Module Contents#

Functions#

profile(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model, default version: 28, combined.

profileESRDV21Y19(code_array, age, sex[, elig, orec, ...])

CMS-HCC ESRD model version 21, year: 2019.

profileRxHCCV05Y20(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 05, year 2020.

profileRxHCCV05Y21(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 05, year 2021.

profileRxHCCV05Y22(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 05, year 2022.

profileRxHCCV05Y23(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 05, year 2023.

profileRxHCCV08Y22(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 08, year 2022.

profileRxHCCV08Y23(code_array, age, sex[, elig, orec, ...])

The CMS-RxHCC risk adjustment module: version 08, year 2023.

profileV22(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, combined.

profileV22Y17(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2017.

profileV22Y18(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2018.

profileV22Y19(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2019.

profileV22Y20(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2020.

profileV22Y21(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2021.

profileV22Y22(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 22, year 2022.

profileV23(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 23, combined.

profileV23Y18(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 23, year 2018.

profileV23Y19(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 23, year 2019.

profileV24(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 24, combined.

profileV24Y19(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 24, year 2019.

profileV24Y20(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 24, year 2020.

profileV24Y21(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 24, year 2021.

profileV24Y22(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 24, year 2022.

profileV28(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 28, Combined.

profileV28Y24(code_array, age, sex[, elig, orec, medicaid])

CMS-HCC model version 28, year 2024.

profile(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model, default version: 28, combined.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileESRDV21Y19(code_array, age, sex, elig='DI', orec='0', medicaid=False)#

CMS-HCC ESRD model version 21, year: 2019.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “DI”: Dialysis Continuing Enrollee

  • “GC”: Functioning Graft Community

  • “GI”: Functioning Graft Institutional

  • “DNE”: Dialysis New Enrollee

  • “GNE”: Functioning Graft New Enrollee

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileRxHCCV05Y20(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 05, year 2020.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileRxHCCV05Y21(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 05, year 2021.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileRxHCCV05Y22(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 05, year 2022.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileRxHCCV05Y23(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 05, year 2023.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileRxHCCV08Y22(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 08, year 2022.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileRxHCCV08Y23(code_array, age, sex, elig='CE_NoLowAged', orec='0', esrd=False)#

The CMS-RxHCC risk adjustment module: version 08, year 2023.

Returns the RxHCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. There are five risk adjustable continuing models and three new enrollee models.

  • “CE_NoLowAged”: Community, Non-Low Income, Aged, Continuing Enrollee

  • “CE_NoLowNoAged”: Community, Non-Low Income, Non-Aged, Continuing Enrollee

  • “CE_LowAged”: Community, Low Income, Aged, Continuing Enrollee

  • “CE_LowNoAged”: Community, Low Income, Non-Aged, Continuing Enrollee

  • “CE_LTI”: Institutional Continuing Enrollee

  • “NE_NoLo”: Community, Non-Low Income, New Enrollee

  • “NE_Lo”: Community, Low Income, New Enrollee

  • “NE_LTI”: Institutional New Enrollee

The term “Non-Aged” is used for those younger than 65 because this group includes beneficiaries eligible for Medicare because of end-stage renal disease(ESRD) as well as those eligible because of disability.

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits (DISABILITY)

  • “2”: End-stage renal disease (ESRD)

  • “3”: Both DISABILITY and ESRD

esrd: bool
End-stage renal disease indicator with the following values for the payment year:
  • False: no ESRD

  • True: If the person is in any of the following statuses: ESRD dialysis, transplant, post graft.

The esrd variable is needed for New Enrollee models. If False, the New Enrollee scores for the beneficiary will be missing. Set to False if not known to get the non—ESRD score, the most common situation.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “rxhcc_lst” : The list of RxHCC’s before interaction.

  • “rxhcc_map” : The dictionary of RxHCC mapping before applying hierarchy.

  • “model” : The model of the CMS-RxHCC.

  • “parameters” : The information of the parameters.

profileV22(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, combined.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y17(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2017.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y18(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2018.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y19(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2019.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y20(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2020.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y21(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2021.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV22Y22(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 22, year 2022.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV23(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 23, combined.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV23Y18(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 23, year 2018.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV23Y19(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 23, year 2019.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV24(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 24, combined.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV24Y19(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 24, year 2019.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV24Y20(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 24, year 2020.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV24Y21(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 24, year 2021.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV24Y22(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 24, year 2022.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV28(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 28, Combined.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.

profileV28Y24(code_array, age, sex, elig='CNA', orec='0', medicaid=False)#

CMS-HCC model version 28, year 2024.

Returns the HCC risk profile of a given patient information. It may throw an exception if there is an illegal argument in the input parameters.

INPUT PARAMETERS#

code_arraylist of str

A list of ICD10 codes for the measurement year.

ageint

The age of the patient.

sexstr
The sex of the patient.
  • “M” : Male

  • “F” : Female

eligstr

The eligibility segment of the patient. The risk score can vary when different “elig” are used. Allowed values are as follows:

  • “CFA”: Community Full Benefit Dual Aged

  • “CFD”: Community Full Benefit Dual Disabled

  • “CNA”: Community NonDual Aged

  • “CND”: Community NonDual Disabled

  • “CPA”: Community Partial Benefit Dual Aged

  • “CPD”: Community Partial Benefit Dual Disabled

  • “INS”: Long Term Institutional

  • “NE”: New Enrollee

  • “SNPNE”: SNP NE (New Enrollee model for Chronic Disease SNP plans only)

orec: str
Original reason for entitlement code.
  • “0”: Old age and survivor’s insurance

  • “1”: Disability insurance benefits

  • “2”: End-stage renal disease

  • “3”: Both DIB and ESRD

medicaid: bool

If the patient is in Medicaid or not.

OUTPUT PARAMETERS#

  • “risk_score” : The risk score of the patient according to the given INPUT parameters.

  • “risk_score_age” : The risk score related to the patient’s age.

  • “risk_score_adj” : The patient’s risk score in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “risk_score_age_adj” : The risk score related to the patient’s age in which the coding pattern(intensity) adjustment and normalization factor was included in the calculation.

  • “details”: The dictionary of coefficients and risk scores.

  • “hcc_lst” : The list of HCC’s before interaction.

  • “hcc_map” : The dictionary of HCC mapping before applying hierarchy.

  • “model” : The model of the CMS-HCC.

  • “parameters” : The information of the parameters.