eds_scikit.phenotype.suicide_attempt.suicide_attempt
SuicideAttemptFromICD10
SuicideAttemptFromICD10(data: BaseData, algo: str = 'Haguenoer2008')
Bases: Phenotype
Phenotyping visits related to a suicide attempt. Two algorithms are available:
- "X60-X84": The visit needs to have at least one ICD10 code in the range X60 to X84
- "Haguenoer2008": The visit needs to have at least one ICD10 DAS code in the range X60 to X84, and a ICD10 DP code in the range S to T
PARAMETER | DESCRIPTION |
---|---|
data |
A BaseData object
TYPE:
|
algo |
The name of the algorithm. Should be either "Haguenoer2008" or "X60-X84"
TYPE:
|
Source code in eds_scikit/phenotype/suicide_attempt/suicide_attempt.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
ICD10_CODES
class-attribute
ICD10_CODES = {'X60-X84': dict(codes={'X60-X84': dict(regex=['X[67]', 'X8[0-4]'])}), 'Haguenoer2008': dict(codes={'Haguenoer2008': dict(regex=['S', 'T[0-9]'])}, additional_filtering=dict(condition_status_source_value='DP'))}
ICD10 codes used by both algorithms
compute
compute()
Fetch and aggregate features
Source code in eds_scikit/phenotype/suicide_attempt/suicide_attempt.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|