SOFA
The eds.sofa
component extracts Sequential Organ Failure Assessment (SOFA) scores, used to track a person's status during the stay in an intensive care unit to determine the extent of a person's organ function or rate failure.
Examples
import edsnlp
nlp = edsnlp.blank("eds")
nlp.add_pipe("eds.sentences")
nlp.add_pipe("eds.normalizer")
nlp.add_pipe("eds.sofa")
text = """
SOFA (à 24H) : 12.
OMS:
"""
doc = nlp(text)
doc.ents
# Out: (SOFA (à 24H) : 12,)
Extensions
Each extraction exposes 3 extensions:
ent = doc.ents[0]
ent._.score_name
# Out: 'sofa'
ent._.score_value
# Out: 12
ent._.score_method
# Out: '24H'
Score method can here be "24H", "Maximum", "A l'admission" or "Non précisée"
Parameters
PARAMETER | DESCRIPTION |
---|---|
nlp | The pipeline object TYPE: |
name | The name of the component TYPE: |
regex | A list of regexes to identify the SOFA score TYPE: |
attr | Whether to match on the text ('TEXT') or on the normalized text ('CUSTOM_NORM') TYPE: |
value_extract | Regex to extract the score value TYPE: |
score_normalization | Function that takes the "raw" value extracted from the TYPE: |
window | Number of token to include after the score's mention to find the score's value TYPE: |
ignore_excluded | Whether to ignore excluded spans TYPE: |
ignore_space_tokens | Whether to ignore space tokens TYPE: |
flags | Flags to pass to the regex TYPE: |
label | Label name to use for the TYPE: |
span_setter | How to set matches on the doc TYPE: |