CHADSVASCPhenotype
CHADSVASCComponents
dataclass
Database specific components of CHA2DS2-VASc score calculation.
This dataclass encapsulates all the database-specific definitions needed to calculate the CHA2DS2-VASc score, including codelists for diagnoses, filters for demographic characteristics, and domain names for data tables.
Attributes:
| Name | Type | Description |
|---|---|---|
codelist_heart_failure |
Codelist
|
Codelist containing codes for congestive heart failure diagnosis (C component, 1 point). |
codelist_hypertension |
Codelist
|
Codelist containing codes for hypertension diagnosis (H component, 1 point). |
codelist_diabetes |
Codelist
|
Codelist containing codes for diabetes mellitus diagnosis (D component, 1 point). |
codelist_stroke_tia |
Codelist
|
Codelist containing codes for prior stroke or transient ischemic attack (S2 component, 2 points). |
codelist_vascular_disease |
Codelist
|
Codelist containing codes for vascular disease (V component, 1 point). This includes prior myocardial infarction, peripheral artery disease, or aortic plaque. |
filter_sex_female |
CategoricalFilter
|
CategoricalFilter to identify female patients (Sc component, 1 point). Should filter for the appropriate sex value (e.g., "F", "Female", or database-specific code). |
domain_diagnosis |
str
|
Name of the domain/table containing diagnosis codes. Defaults to "CONDITION_OCCURRENCE_SOURCE" (OMOP CDM convention). |
domain_sex |
str
|
Name of the domain/table containing patient demographics including sex. Defaults to "PERSON" (OMOP CDM convention). |
Note
Age-based components (A and A2) are calculated automatically from the patient's birth date and do not require codelist configuration.
Component Summary
| Type | Number |
|---|---|
| Codelists | 5 |
| Categorical Filters | 1 |
| Domains | 2 |
Source code in phenex/phenotypes/factory/chadsvasc.py
CHADSVASCPhenotype(components, relative_time_range, name='chadsvasc', value_filter=None)
Operational definition for CHADS-VASc as defined in Refining clinical risk stratification for predicting stroke and thromboembolism in atrial fibrillation using a novel risk factor-based approach: the euro heart survey on atrial fibrillation, Lip et. al.
This is a database agnostic implementation. Database specific components are specified by various CHADSVASCComponents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
components
|
CHADSVASCComponents
|
Database specific definitions of codelists, categorical filters, and domains. See documentation for CHADSVASCComponents for more details. |
required |
relative_time_range
|
RelativeTimeRangeFilter
|
Required specificiation of a relative time range which defines the date at which the score will be calculated (i.e. calculated at the anchor date) |
required |
name
|
Optional[str]
|
Optional override of default name 'chadsvasc'. |
'chadsvasc'
|
value_filter
|
Optional[ValueFilter]
|
Optional filtering of persons by the calculated chadsvasc value |
None
|
Source code in phenex/phenotypes/factory/chadsvasc.py
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |