eds_scikit.phenotype.cancer.cancer
CancerFromICD10
CancerFromICD10(data: BaseData, cancer_types: Optional[List[str]] = None, level: str = 'patient', subphenotype: bool = True, threshold: int = 1)
Bases: Phenotype
Phenotyping visits or patients using ICD10 cancer codes
PARAMETER | DESCRIPTION |
---|---|
data |
A BaseData object
TYPE:
|
cancer_types |
Optional list of cancer types to use for phenotyping
TYPE:
|
level |
On which level to do the aggregation, either "patient" or "visit"
TYPE:
|
subphenotype |
Whether the threshold should apply to the phenotype ("phenotype" column) of the subphenotype ("subphenotype" column)
TYPE:
|
threshold |
Minimal number of events (which definition depends on the
TYPE:
|
Source code in eds_scikit/phenotype/cancer/cancer.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
ICD10_CODES
class-attribute
ICD10_CODES = {cancer_type: {'prefix': df.code.to_list()} for (cancer_type, df) in ICD10_CODES_DF.groupby('Cancer type')}
For each cancer type, contains a set of corresponding ICD10 codes.
ALL_CANCER_TYPES
class-attribute
ALL_CANCER_TYPES = list(ICD10_CODES.keys())
Available cancer types.
compute
compute()
Fetch all necessary features and perform aggregation
Source code in eds_scikit/phenotype/cancer/cancer.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|