Skip to content

ADL Score[source]

The eds.adl_score component extracts the adl score (Activities of Daily Life) score.

Examples

import edsnlp, edsnlp.pipes as eds

nlp = edsnlp.blank("eds")
nlp.add_pipe(eds.sentences())
nlp.add_pipe(eds.normalizer())
nlp.add_pipe(eds.adl_score())

text = """
ADL 6/6.
"""

doc = nlp(text)
doc.ents
# Out: (ADL 6/6,)

Extensions

Each extraction exposes 2 extensions:

ent = doc.ents[0]

ent._.adl_score
# Out: 6.0

ent._.functional_status
# Out: 'healthy'

Parameters

PARAMETER DESCRIPTION
nlp

The pipeline object

TYPE: PipelineProtocol

name

Name of the component

TYPE: Optional[str] DEFAULT: 'adl_score'

patterns

A list of regexes to identify the score

TYPE: List[str] DEFAULT: default_patterns

attr

Whether to match on the text ('TEXT') or on the normalized text ('NORM')

TYPE: str DEFAULT: 'NORM'

score_normalization

Function that takes the "raw" value extracted from the value_extract regex and should return:

  • None if no score could be extracted
  • The desired score value else

TYPE: Union[str, Callable[[Union[str, None]], Any]] DEFAULT: make_find_value_and_reference(admissible_references=[6], default_reference=6)

label

Label name to use for the Span object and the extension

TYPE: str DEFAULT: 'adl_score'

span_setter

How to set matches on the doc

TYPE: SpanSetterArg DEFAULT: {'ents': True, 'adl_score': True, 'functional_status': True}

domain

The frailty domain the score is related to

TYPE: str

severity_assigner

Function that takes the score value and assigns the corresponding severity for the domain.

TYPE: Callable[[Span], Any] DEFAULT: adl_severity_assigner

RETURNS DESCRIPTION
SimpleScoreMatcher