AIDS[source]
The eds.aids
pipeline component extracts mentions of AIDS. It will notably match:
- Mentions of VIH/HIV at the SIDA/AIDS stage
- Mentions of VIH/HIV with opportunistic(s) infection(s)
Details of the used patterns
# fmt: off
# fmt: on
On HIV infection
pre-AIDS HIV infection are not extracted, only AIDS.
Extensions
On each span span
that match, the following attributes are available:
span._.detailed_status
: set to Nonespan._.assigned
: dictionary with the following keys, if relevant:opportunist
: list of opportunist infections extracted around the HIV mentionstage
: stage of the HIV infection
Examples
import edsnlp, edsnlp.pipes as eds
nlp = edsnlp.blank("eds")
nlp.add_pipe(eds.sentences())
nlp.add_pipe(
eds.normalizer(
accents=True,
lowercase=True,
quotes=True,
spaces=True,
pollution=dict(
information=True,
bars=True,
biology=True,
doctors=True,
web=True,
coding=True,
footer=True,
),
),
)
nlp.add_pipe(f"eds.aids")
Below are a few examples:
text = "Patient atteint du VIH au stade SIDA."
doc = nlp(text)
spans = doc.spans["aids"]
spans
# Out: [VIH au stade SIDA]
text = "Patient atteint du VIH."
doc = nlp(text)
spans = doc.spans["aids"]
spans
# Out: []
text = "Il y a un VIH avec coinfection pneumocystose"
doc = nlp(text)
spans = doc.spans["aids"]
spans
# Out: [VIH]
span = spans[0]
span._.assigned
# Out: {'opportunist': [coinfection, pneumocystose]}
text = "Présence d'un VIH stade C"
doc = nlp(text)
spans = doc.spans["aids"]
spans
# Out: [VIH]
span = spans[0]
span._.assigned
# Out: {'stage': [C]}
Parameters
PARAMETER | DESCRIPTION |
---|---|
nlp | The pipeline object TYPE: |
name | The name of the component TYPE: |
patterns | The patterns to use for matching DEFAULT: |
label | The label to use for the TYPE: |
span_setter | How to set matches on the doc TYPE: |
Authors and citation
The eds.aids
component was developed by AP-HP's Data Science team with a team of medical experts, following the insights of the algorithm proposed by Petit-Jean et al., 2024.
Petit-Jean T., Gérardin C., Berthelot E., Chatellier G., Frank M., Tannier X., Kempf E. and Bey R., 2024. Collaborative and privacy-enhancing workflows on a clinical data warehouse: an example developing natural language processing pipelines to detect medical conditions. Journal of the American Medical Informatics Association. 31, pp.1280-1290. 10.1093/jamia/ocae069