medkit.text.ner.adicap_norm_attribute
medkit.text.ner.adicap_norm_attribute#
Classes:
|
Attribute describing tissue sample using the ADICAP (Association pour le Développement de l'Informatique en Cytologie et Anatomo-Pathologie) coding. |
- class ADICAPNormAttribute(code, sampling_mode=None, technic=None, organ=None, pathology=None, pathology_type=None, behaviour_type=None, metadata=None, uid=None)[source]#
Attribute describing tissue sample using the ADICAP (Association pour le Développement de l’Informatique en Cytologie et Anatomo-Pathologie) coding.
Cf https://smt.esante.gouv.fr/wp-json/ans/terminologies/document?terminologyId=terminologie-adicap&fileName=cgts_sem_adicap_fiche-detaillee.pdf for a complete description of the coding.
This class is replicating EDS-NLP’s Adicap class, making it a medkit Attribute.
The code field fully describes the tissue sample. Additional information is derived from code in human readable fields (sampling_code, technic, organ, pathology, pathology_type, behaviour_type)
- Variables
uid – Identifier of the attribute
label – The attribute label, always set to
EntityNormAttribute.LABEL
value – ADICAP code prefix with “adicap:” (ex: “adicap:BHGS0040”)
code – ADICAP code as a string (ex: “BHGS0040”)
kb_id – Same as code
sampling_mode (Optional[str]) – Sampling mode (ex: “BIOPSIE CHIRURGICALE”)
technic (Optional[str]) – Sampling technic (ex: “HISTOLOGIE ET CYTOLOGIE PAR INCLUSION”)
organ (Optional[str]) – Organ and regions (ex: “SEIN (ÉGALEMENT UTILISÉ CHEZ L’HOMME)”)
pathology (Optional[str]) – General pathology (ex: “PATHOLOGIE GÉNÉRALE NON TUMORALE”)
pathology_type (Optional[str]) – Pathology type (ex: “ETAT SUBNORMAL - LESION MINEURE”)
behaviour_type (Optional[str]) – Behaviour type (ex: “CARACTERES GENERAUX”)
metadata – Metadata of the attribute
Methods:
copy
()Create a new attribute that is a copy of the current instance, but with a new identifier
from_dict
(adicap_dict)Creates an Attribute from a dict
get_subclass_for_data_dict
(data_dict)Return the subclass that corresponds to the class name found in a data dict
to_brat
()Return a value compatible with the brat format
to_spacy
()Return a value compatible with spaCy
- copy()#
Create a new attribute that is a copy of the current instance, but with a new identifier
This is used when we want to duplicate an existing attribute onto a different annotation.
- Return type
- classmethod get_subclass_for_data_dict(data_dict)#
Return the subclass that corresponds to the class name found in a data dict
- Parameters
data_dict (
Dict
[str
,Any
]) – Data dict returned by the to_dict() method of a subclass (or of the base class itself)- Return type
Optional
[Type
[Self
]]- Returns
subclass – Subclass that generated data_dict, or None if data_dict correspond to the base class itself.
- to_brat()#
Return a value compatible with the brat format
- Return type
str
- to_spacy()#
Return a value compatible with spaCy
- Return type
str