|
| 1 | +--- |
| 2 | +layout: model |
| 3 | +title: Explain Clinical Document - Radiology |
| 4 | +author: John Snow Labs |
| 5 | +name: explain_clinical_doc_radiology |
| 6 | +date: 2024-06-25 |
| 7 | +tags: [licensed, en, radiology, ner, pipeline, posology, assertion, relation_extraction] |
| 8 | +task: [Pipeline Healthcare, Named Entity Recognition, Assertion Status, Relation Extraction] |
| 9 | +language: en |
| 10 | +edition: Healthcare NLP 5.3.3 |
| 11 | +spark_version: 3.0 |
| 12 | +supported: true |
| 13 | +annotator: PipelineModel |
| 14 | +article_header: |
| 15 | + type: cover |
| 16 | +use_language_switcher: "Python-Scala-Java" |
| 17 | +--- |
| 18 | + |
| 19 | +## Description |
| 20 | + |
| 21 | +This specialized radiology pipeline can; |
| 22 | + |
| 23 | +- extract radiology related entities, |
| 24 | + |
| 25 | +- assign assertion status to the extracted entities, |
| 26 | + |
| 27 | +- establish relations between the extracted entities from the clinical documents. |
| 28 | + |
| 29 | +In this pipeline, five NER, one assertion and one relation extraction model were used to achive those tasks. |
| 30 | + |
| 31 | +- Clinical Entity Labels: `Imaging_Test`, `Imaging_Technique`, `ImagingFindings`, `OtherFindings`, `BodyPart`, `Direction`, `Test`, `Symptom`, `Disease_Syndrome_Disorder`, `Medical_Device`, `Procedure`, `Measurements`, `Units`, `Gender`, `Metastasis`, `Invasion`, `Route`, `Treatment`, `Drug`, `Form`, `Frequency`, `Dosage`, `Date`, `Test_Result` |
| 32 | + |
| 33 | +- Assertion Status Labels: `Confirmed`, `Suspected`, `Negative` |
| 34 | + |
| 35 | +- Relation Extraction Labels: `is_related`, `not_related` |
| 36 | + |
| 37 | +{:.btn-box} |
| 38 | +<button class="button button-orange" disabled>Live Demo</button> |
| 39 | +<button class="button button-orange" disabled>Open in Colab</button> |
| 40 | +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/explain_clinical_doc_radiology_en_5.3.3_3.0_1719318745883.zip){:.button.button-orange.button-orange-trans.arr.button-icon.hidden} |
| 41 | +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/explain_clinical_doc_radiology_en_5.3.3_3.0_1719318745883.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} |
| 42 | + |
| 43 | +## How to use |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +<div class="tabs-box" markdown="1"> |
| 48 | +{% include programmingLanguageSelectScalaPythonNLU.html %} |
| 49 | + |
| 50 | +```python |
| 51 | + |
| 52 | +from sparknlp.pretrained import PretrainedPipeline |
| 53 | + |
| 54 | +ner_pipeline = PretrainedPipeline("explain_clinical_doc_radiology", "en", "clinical/models") |
| 55 | + |
| 56 | +result = ner_pipeline.annotate("""Bilateral breast ultrasound was subsequently performed, which demonstrated an ovoid mass measuring approximately 0.5 x 0.5 x 0.4 cm in diameter |
| 57 | +located within the anteromedial aspect of the left shoulder. This mass demonstrates isoechoic echotexture to the adjacent muscle, with no evidence of internal color flow. |
| 58 | +This may represent benign fibrous tissue or a lipoma.""") |
| 59 | + |
| 60 | +``` |
| 61 | +```scala |
| 62 | + |
| 63 | +import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline |
| 64 | + |
| 65 | +val ner_pipeline = PretrainedPipeline("explain_clinical_doc_radiology", "en", "clinical/models") |
| 66 | + |
| 67 | +val result = ner_pipeline.annotate("""Bilateral breast ultrasound was subsequently performed, which demonstrated an ovoid mass measuring approximately 0.5 x 0.5 x 0.4 cm in diameter |
| 68 | +located within the anteromedial aspect of the left shoulder. This mass demonstrates isoechoic echotexture to the adjacent muscle, with no evidence of internal color flow. |
| 69 | +This may represent benign fibrous tissue or a lipoma.""") |
| 70 | + |
| 71 | +``` |
| 72 | +</div> |
| 73 | + |
| 74 | +## Results |
| 75 | + |
| 76 | +```bash |
| 77 | + |
| 78 | +# NER Result |
| 79 | + |
| 80 | ++----------------------------------------+-----+---+-------------------------+ |
| 81 | +|ner_chunk |begin|end|ner_label | |
| 82 | ++----------------------------------------+-----+---+-------------------------+ |
| 83 | +|Bilateral breast |0 |15 |BodyPart | |
| 84 | +|ultrasound |17 |26 |Imaging_Test | |
| 85 | +|ovoid mass |78 |87 |ImagingFindings | |
| 86 | +|0.5 x 0.5 x 0.4 cm |113 |130|Measurements | |
| 87 | +|anteromedial aspect of the left shoulder|163 |202|BodyPart | |
| 88 | +|mass |210 |213|ImagingFindings | |
| 89 | +|isoechoic echotexture |228 |248|ImagingFindings | |
| 90 | +|adjacent muscle |257 |271|BodyPart | |
| 91 | +|internal color flow |294 |312|ImagingFindings | |
| 92 | +|benign fibrous tissue |334 |354|ImagingFindings | |
| 93 | +|lipoma |361 |366|Disease_Syndrome_Disorder| |
| 94 | ++----------------------------------------+-----+---+-------------------------+ |
| 95 | + |
| 96 | +# Assertion Result |
| 97 | + |
| 98 | ++---------------------+-----+---+-------------------------+---------+-----------+ |
| 99 | +|chunks |begin|end|entities |assertion|confidence)| |
| 100 | ++---------------------+-----+---+-------------------------+---------+-----------+ |
| 101 | +|ovoid mass |78 |87 |ImagingFindings |Confirmed|0.9966 | |
| 102 | +|mass |210 |213|ImagingFindings |Confirmed|0.9683 | |
| 103 | +|isoechoic echotexture|228 |248|ImagingFindings |Confirmed|0.9932 | |
| 104 | +|internal color flow |294 |312|ImagingFindings |Negative |0.9632 | |
| 105 | +|benign fibrous tissue|334 |354|ImagingFindings |Suspected|0.9951 | |
| 106 | +|lipoma |361 |366|Disease_Syndrome_Disorder|Suspected|0.9676 | |
| 107 | ++---------------------+-----+---+-------------------------+---------+-----------+ |
| 108 | + |
| 109 | +# Relation Extraction Result |
| 110 | + |
| 111 | ++------------+-----------------+---------------+-----------------------+-----------------+-----------------+---------------+--------------------+-----------------+---------------------------+ |
| 112 | +| sentence | entity1_begin | entity1_end | chunk1 | entity1 | entity2_begin | entity2_end | chunk2 | entity2 | relation | confidence | |
| 113 | +|-----------:|----------------:|--------------:|:----------------------|:----------------|----------------:|--------------:|:-------------------|:----------------|:-----------|-------------:| |
| 114 | +| 0 | 0 | 15 | Bilateral breast | BodyPart | 17 | 26 | ultrasound | Imaging_Test | is_related | 1 | |
| 115 | +| 0 | 0 | 15 | Bilateral breast | BodyPart | 78 | 87 | ovoid mass | ImagingFindings | is_related | 0.999997 | |
| 116 | +| 0 | 17 | 26 | ultrasound | Imaging_Test | 78 | 87 | ovoid mass | ImagingFindings | is_related | 0.999569 | |
| 117 | +| 0 | 78 | 87 | ovoid mass | ImagingFindings | 113 | 130 | 0.5 x 0.5 x 0.4 cm | Measurements | is_related | 1 | |
| 118 | +| 1 | 210 | 213 | mass | ImagingFindings | 257 | 271 | adjacent muscle | BodyPart | is_related | 0.997639 | |
| 119 | +| 1 | 228 | 248 | isoechoic echotexture | ImagingFindings | 257 | 271 | adjacent muscle | BodyPart | is_related | 0.999999 | |
| 120 | ++------------+-----------------+---------------+-----------------------+-----------------+-----------------+---------------+--------------------+-----------------+---------------------------+ |
| 121 | + |
| 122 | +``` |
| 123 | + |
| 124 | +{:.model-param} |
| 125 | +## Model Information |
| 126 | + |
| 127 | +{:.table-model} |
| 128 | +|---|---| |
| 129 | +|Model Name:|explain_clinical_doc_radiology| |
| 130 | +|Type:|pipeline| |
| 131 | +|Compatibility:|Healthcare NLP 5.3.3+| |
| 132 | +|License:|Licensed| |
| 133 | +|Edition:|Official| |
| 134 | +|Language:|en| |
| 135 | +|Size:|1.8 GB| |
| 136 | + |
| 137 | +## Included Models |
| 138 | + |
| 139 | +- DocumentAssembler |
| 140 | +- SentenceDetectorDLModel |
| 141 | +- TokenizerModel |
| 142 | +- WordEmbeddingsModel |
| 143 | +- MedicalNerModel |
| 144 | +- NerConverterInternalModel |
| 145 | +- MedicalNerModel |
| 146 | +- NerConverterInternalModel |
| 147 | +- MedicalNerModel |
| 148 | +- NerConverterInternalModel |
| 149 | +- MedicalNerModel |
| 150 | +- NerConverterInternalModel |
| 151 | +- MedicalNerModel |
| 152 | +- NerConverterInternalModel |
| 153 | +- ChunkMergeModel |
| 154 | +- ChunkMergeModel |
| 155 | +- AssertionDLModel |
| 156 | +- PerceptronModel |
| 157 | +- DependencyParserModel |
| 158 | +- RelationExtractionModel |
0 commit comments