Thresholder
A class to simplify the interpretation of thresholded values
The class organizes the interpretation of numerical values for tests such as blood potassium. Results can be low, normal, or high, and there is an HPO term for each. The class also provides commonly used normal ranges. We note that many lab tests have different ranges for males and females or for adults and children. We do not attempt to model this, but instead provide ranges for adults. In cases where there are different ranges for males and females, we by default use the minimum and maximum value for each sex. It is possible to specify the range that should be used in the constructor method; in this case, the default values are overriden. In very complicated cases with multiple different normal ranges, consider using the OptionColumnMapper.
Source code in pyphetools/creation/thresholder.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 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 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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
ALT_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
ALT_blood in the blood circulation (U/L)‚
Source code in pyphetools/creation/thresholder.py
AST_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
AST_blood in the blood circulation (U/L)‚
Source code in pyphetools/creation/thresholder.py
CRP_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
HDL_cholesterol_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
HDL cholesterol blood
Source code in pyphetools/creation/thresholder.py
LDL_cholesterol_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
LDL cholesterol blood
Source code in pyphetools/creation/thresholder.py
NTproBNP_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
NT-proBNP < 100 picograms per milliliter (pg/mL)
Source code in pyphetools/creation/thresholder.py
__init__(unit, hpo_term_low=None, hpo_term_high=None, hpo_term_abn=None, threshold_low=None, threshold_high=None)
if hpo_term_low is not None and not isinstance(hpo_term_low, HpTerm): raise ValueError(f"hpo_term_low argument must be HpTerm but was {type(hpo_term_low)}") if hpo_term_high is not None and not isinstance(hpo_term_high, HpTerm): raise ValueError(f"hpo_term_high argument must be HpTerm but was {type(hpo_term_high)}") if hpo_term_abn is not None and not not isinstance(hpo_term_abn, HpTerm): raise ValueError(f"hpo_term_abn argument must be HpTerm but was {type(hpo_term_abn)}")
Source code in pyphetools/creation/thresholder.py
albumin_urine(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Albuminuria - Urine Albumin-Creatinine Ratio (uACR)
Source code in pyphetools/creation/thresholder.py
alkaline_phophatase_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Alkaline phosphatase in the blood circulation (U/L)
Source code in pyphetools/creation/thresholder.py
calcium_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Calcium in the blood circulation 8.5 to 10.2 mg/dL (2.13 to 2.55 millimol/L).
Source code in pyphetools/creation/thresholder.py
creatine_kinase_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
CK females is 30 to 145 U/L; males 55 to 170 U/L
Source code in pyphetools/creation/thresholder.py
creatinine_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Serum crea, 0.6-1.2 mg/dL in adult males and 0.5-1.1 mg/dL in adult females
Source code in pyphetools/creation/thresholder.py
free_fatty_acid_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
free fatty acid
glucose_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
fasting blood glucose; 70 mg/dL (3.9 mmol/L) and 100 mg/dL (5.6 mmol/L).
Source code in pyphetools/creation/thresholder.py
hemoglobin_A1c(unit=None, low_thresh=None, high_thresh=None)
staticmethod
insulin_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
lactate_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Serum lactate (0.5-1 mmol/L)
potassium_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Serum potassium 3.5 to 5.2 mEq/L (adults)
Source code in pyphetools/creation/thresholder.py
set_high_threshold(value)
Set a user-defined high threshold value. This can be useful, for instance, if a paper uses mg/dL instead of SI units
set_low_threshold(value)
Set a user-defined low threshold value. This can be useful, for instance, if a paper uses mg/dL instead of SI units
set_unit(unit)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
unit
|
str
|
a user-defined unit. This can be useful, for instance, if a paper uses mg/dL instead of SI units |
required |
sodium_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
Sodium in the blood circulation 135-145 mEq/L
Source code in pyphetools/creation/thresholder.py
total_cholesterol_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
total cholesterol blood
Source code in pyphetools/creation/thresholder.py
triglyceride_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
triglyceride blood
troponin_t_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
troponin t blood
uric_acid_blood(unit=None, low_thresh=None, high_thresh=None)
staticmethod
uric acid blood