Skip to content

Diabetes

Presentation

We provide the DiabetesFromICD10 class to extract visits or patients with ICD10 codes related to diabetes

Available diabetes types
  • DIABETES_IN_PREGNANCY
  • DIABETES_MALNUTRITION
  • DIABETES_TYPE_I
  • DIABETES_TYPE_II
  • OTHER_DIABETES_MELLITUS

How it works

The algorithm works by looking for either DP, DR or DAS ICD10 codes associated with cancer. Those codes are available under DiabetesFromICD10.ICD10_CODES

Usage

By default, all diabetes types mentionned above are extracted

from eds_scikit.io import HiveData
data = HiveData(DBNAME)
from eds_scikit.phenotype import DiabetesFromICD10

diabetes = DiabetesFromICD10(data)
data = diabetes.to_data()

To choose a subset of disorders, use the diabetes_types argument:

diabetes = DiabetesFromICD10(
    data,
    diabetes_types=[
        "DIABETES_TYPE_I",
        "DIABETES_IN_PREGNANCY",
    ],
)

The final phenotype DataFrame is then available at data.computed["DiabetesFromICD10"]

Optional parameters

PARAMETER DESCRIPTION
data

A BaseData object

TYPE: BaseData

diabetes_types

Optional list of diabetes types to use for phenotyping

TYPE: Optional[List[str]] DEFAULT: None

level

On which level to do the aggregation, either "patient" or "visit"

TYPE: str DEFAULT: 'visit'

subphenotype

Whether the threshold should apply to the phenotype ("phenotype" column) of the subphenotype ("subphenotype" column)

TYPE: bool DEFAULT: True

threshold

Minimal number of events (which definition depends on the level value)

TYPE: int DEFAULT: 1

Reference

Check the code reference here for a more detailled look.

Back to top