eds_scikit.biology.utils.process_concepts
ConceptsSet
ConceptsSet(name: str, concept_codes: List[str] = None)
Class defining the concepts-sets with 2 attributes:
name
: the name of the concepts-setconcept_codes
: the list of concepts codes included in the concepts-set
Source code in eds_scikit/biology/utils/process_concepts.py
26 27 28 29 30 31 |
|
fetch_all_concepts_set
fetch_all_concepts_set(concepts_sets_table_name: str = 'default_concepts_sets') -> List[ConceptsSet]
Returns a list of all the concepts-sets of the chosen tables. By default, the table is here.
PARAMETER | DESCRIPTION |
---|---|
concepts_sets_table_name |
Name of the table to extract concepts-sets from
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[ConceptsSet]
|
The list of all concepts-sets in the selected table |
Source code in eds_scikit/biology/utils/process_concepts.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
get_concept_src_to_std
get_concept_src_to_std(concept: DataFrame, concept_relationship: DataFrame, concepts_sets: List[ConceptsSet], standard_concept_regex: dict = default_standard_concept_regex, standard_terminologies: List[str] = default_standard_terminologies) -> pd.DataFrame
Process Concept
and Concept Relationship
tables to obtain a wide DataFrame that gives for all concepts-sets the source code along with the standard concepts codes.
PARAMETER | DESCRIPTION |
---|---|
concept |
Concept OMOP table
TYPE:
|
concept_relationship |
Concept Relationship OMOP table
TYPE:
|
concepts_sets |
List of concepts-sets to select
TYPE:
|
standard_concept_regex |
EXAMPLE:
TYPE:
|
standard_terminologies |
EXAMPLE:
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
pd.DataFrame
|
DataFrame with a column for the source concepts codes and columns for the selected standard concepts codes |
Source code in eds_scikit/biology/utils/process_concepts.py
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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|