Description
This specialized ADE (Adverse Drug Event) pipeline can;
-
extract
ADE
andDRUG
entities, -
classify sentences whether they contain ADE entities or not,
-
establish relations between the extracted
DRUG
andADE
results from the clinical documents.
In this pipeline, two NER, one text matcher, one sentence classifier, one assertion status detection and one relation extraction model were employed to accomplish the designated tasks.
-
Clinical Entity Labels:
ADE
,DRUG
-
Assertion Status Labels:
present
,absent
,possible
,conditional
,associated_with_someone_else
,hypothetical
-
Relation Extraction Labels:
1
,0
-
Classification Model Labels:
ADE
,noADE
Available as Private API Endpoint
How to use
from sparknlp.pretrained import PretrainedPipeline
ade_pipeline = PretrainedPipeline("explain_clinical_doc_ade", "en", "clinical/models")
result = ade_pipeline.fullAnnotate("""The side effects of 5-FU in a colon cancer patient who suffered severe mucositis, desquamating dermatitis and prolonged myelosuppression. Last week the patient experienced anterior lumbosacral radiculopathy and blurred vision after intrathecal methotrexate treatment.""")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val ade_pipeline = PretrainedPipeline("explain_clinical_doc_ade", "en", "clinical/models")
val result = ade_pipeline.fullAnnotate("""The side effects of 5-FU in a colon cancer patient who suffered severe mucositis, desquamating dermatitis and prolonged myelosuppression. Last week the patient experienced anterior lumbosacral radiculopathy and blurred vision after intrathecal methotrexate treatment.""")
Results
NER and ASSERTION Result
| | chunks | begin | end | entities | assertion |
|---:|:-----------------------------------|--------:|------:|:-----------|:------------|
| 0 | 5-FU | 20 | 23 | DRUG | Past |
| 1 | severe mucositis | 64 | 79 | ADE | Past |
| 2 | desquamating dermatitis | 82 | 104 | ADE | Past |
| 3 | myelosuppression | 120 | 135 | ADE | Past |
| 4 | anterior lumbosacral radiculopathy | 172 | 205 | ADE | Past |
| 5 | blurred vision | 211 | 224 | ADE | Past |
| 6 | methotrexate | 244 | 255 | DRUG | Past |
# RE Result
| | relation | entity1 | entity1_begin | entity1_end | chunk1 | entity2 | entity2_begin | entity2_end | chunk2 | confidence |
|---:|-----------:|:----------|----------------:|--------------:|:-----------------------------------|:----------|----------------:|--------------:|:------------------------|-------------:|
| 0 | 1 | DRUG | 20 | 23 | 5-FU | ADE | 64 | 79 | severe mucositis | 1 |
| 1 | 1 | DRUG | 20 | 23 | 5-FU | ADE | 82 | 104 | desquamating dermatitis | 1 |
| 2 | 1 | DRUG | 20 | 23 | 5-FU | ADE | 120 | 135 | myelosuppression | 1 |
| 3 | 1 | ADE | 172 | 205 | anterior lumbosacral radiculopathy | DRUG | 244 | 255 | methotrexate | 1 |
| 4 | 1 | ADE | 211 | 224 | blurred vision | DRUG | 244 | 255 | methotrexate | 1 |
# Classification Result
| | sentence_ID | sentence | prediction |
|---:|--------------:|:------------------------------------------------------------------------------------------------------------------------------------------|:-------------|
| 0 | 0 | The side effects of 5-FU in a colon cancer patient who suffered severe mucositis, desquamating dermatitis and prolonged myelosuppression. | ADE |
| 1 | 1 | Last week the patient experienced anterior lumbosacral radiculopathy and blurred vision after intrathecal methotrexate treatment. | ADE |
Model Information
Model Name: | explain_clinical_doc_ade |
Type: | pipeline |
Compatibility: | Healthcare NLP 5.3.0+ |
License: | Licensed |
Edition: | Official |
Language: | en |
Size: | 2.2 GB |
Included Models
- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- WordEmbeddingsModel
- TextMatcherInternalModel
- MedicalNerModel
- NerConverterInternalModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMergeModel
- ChunkMergeModel
- ChunkMapperModel
- AssertionDLModel
- MedicalBertForSequenceClassification
- PerceptronModel
- DependencyParserModel
- RelationExtractionModel