- BIO_NORMALS passe de 13 à 33 tests (cardio, infectio, métabo, thyroïde, hémato, hépatique) - _BIO_INTERPRETATION synchronisé (33 entrées, 3 clés high/low/normal chacune) - _DAS_BIO_CHECKS étendu de 13 à 38 patterns (sepsis, infarctus, EP, diabète, thyroïde, etc.) - lab_value_sanity.yaml étendu avec 20 garde-fous plausibilité nouveaux tests - tests/test_bio_normals.py : 32 tests (complétude, concordance, _is_abnormal) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
145 lines
2.3 KiB
YAML
145 lines
2.3 KiB
YAML
# Garde-fous de parsing des valeurs biologiques
|
|
# ------------------------------------------------
|
|
# Objectif: éviter des faux positifs dus à des artefacts PDF/OCR
|
|
# (ex: "8" au lieu de "4.8" pour le potassium).
|
|
#
|
|
# IMPORTANT:
|
|
# - Ce fichier ne définit PAS des "normes biologiques" (ça c'est reference_ranges.yaml)
|
|
# - Ici on définit des bornes *plausibles* très larges + quelques heuristiques "anti-OCR".
|
|
#
|
|
# Clés des tests: minuscules, sans accents, ex: potassium, sodium, plaquettes, hemoglobine...
|
|
version: 1
|
|
|
|
policy:
|
|
drop_out_of_range: true # écarte les valeurs hors bornes plausibles du dossier
|
|
keep_suspect: true # conserve les valeurs suspectes (audit) mais les règles privilégient les valeurs ok
|
|
|
|
tests:
|
|
potassium:
|
|
hard_min: 0.5
|
|
hard_max: 9.0
|
|
suspect:
|
|
single_digit_over: 6.0 # "8" seul est souvent une décimale perdue (4,8 -> 8)
|
|
|
|
sodium:
|
|
hard_min: 90
|
|
hard_max: 200
|
|
|
|
plaquettes:
|
|
hard_min: 5
|
|
hard_max: 2000
|
|
|
|
hemoglobine:
|
|
hard_min: 3
|
|
hard_max: 25
|
|
|
|
creatinine:
|
|
hard_min: 1
|
|
hard_max: 5000
|
|
|
|
crp:
|
|
hard_min: 0
|
|
hard_max: 1000
|
|
|
|
alat:
|
|
hard_min: 0
|
|
hard_max: 5000
|
|
|
|
asat:
|
|
hard_min: 0
|
|
hard_max: 5000
|
|
|
|
ggt:
|
|
hard_min: 0
|
|
hard_max: 5000
|
|
|
|
pal:
|
|
hard_min: 0
|
|
hard_max: 5000
|
|
|
|
bilirubine totale:
|
|
hard_min: 0
|
|
hard_max: 2000
|
|
|
|
# --- Nouveaux tests (Phase 5) ---
|
|
|
|
bilirubine directe:
|
|
hard_min: 0
|
|
hard_max: 1000
|
|
|
|
ldh:
|
|
hard_min: 0
|
|
hard_max: 10000
|
|
|
|
vs:
|
|
hard_min: 0
|
|
hard_max: 200
|
|
|
|
tp:
|
|
hard_min: 0
|
|
hard_max: 150
|
|
|
|
tca:
|
|
hard_min: 10
|
|
hard_max: 200
|
|
|
|
ferritine:
|
|
hard_min: 0
|
|
hard_max: 100000 # surcharge massive possible (hémochromatose)
|
|
|
|
uree:
|
|
hard_min: 0
|
|
hard_max: 200
|
|
|
|
troponine:
|
|
hard_min: 0
|
|
hard_max: 1000
|
|
|
|
bnp:
|
|
hard_min: 0
|
|
hard_max: 50000
|
|
|
|
nt-probnp:
|
|
hard_min: 0
|
|
hard_max: 100000
|
|
|
|
d-dimeres:
|
|
hard_min: 0
|
|
hard_max: 100000
|
|
|
|
inr:
|
|
hard_min: 0.1
|
|
hard_max: 20
|
|
|
|
fibrinogene:
|
|
hard_min: 0
|
|
hard_max: 20
|
|
|
|
procalcitonine:
|
|
hard_min: 0
|
|
hard_max: 1000
|
|
|
|
lactate:
|
|
hard_min: 0
|
|
hard_max: 30
|
|
|
|
glycemie:
|
|
hard_min: 0
|
|
hard_max: 100
|
|
|
|
hba1c:
|
|
hard_min: 2
|
|
hard_max: 20
|
|
|
|
albumine:
|
|
hard_min: 0
|
|
hard_max: 100
|
|
|
|
acide urique:
|
|
hard_min: 0
|
|
hard_max: 2000
|
|
|
|
tsh:
|
|
hard_min: 0
|
|
hard_max: 500
|