Pipeline for Extracting Clinical Entities Related to CPT Codes

Description

This pipeline is designed to extract all entities mappable to CPT codes.

2 NER models are used to achieve those tasks.

Open in Colab

How to use


from sparknlp.pretrained import PretrainedPipeline

ner_pipeline = PretrainedPipeline("ner_cpt_pipeline", "en", "clinical/models")

result = ner_pipeline.annotate("""
She was admitted to the hospital with chest pain and found to have bilateral pleural effusion, the right greater than the left. CT scan of the chest also revealed a large mediastinal lymph node.
We reviewed the pathology obtained from the pericardectomy in March 2006, which was diagnostic of mesothelioma.
At this time, chest tube placement for drainage of the fluid occurred and thoracoscopy, which were performed, which revealed epithelioid malignant mesothelioma.
""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val ner_pipeline = PretrainedPipeline("ner_cpt_pipeline", "en", "clinical/models")

val result = ner_pipeline.annotate("""
She was admitted to the hospital with chest pain and found to have bilateral pleural effusion, the right greater than the left. CT scan of the chest also revealed a large mediastinal lymph node.
We reviewed the pathology obtained from the pericardectomy in March 2006, which was diagnostic of mesothelioma.
At this time, chest tube placement for drainage of the fluid occurred and thoracoscopy, which were performed, which revealed epithelioid malignant mesothelioma.
""")

Results

|    | chunks               |   begin |   end | entities   |
|---:|:---------------------|--------:|------:|:-----------|
|  0 | pericardectomy       |     240 |   253 | Procedure  |
|  1 | chest tube placement |     322 |   341 | Procedure  |
|  2 | thoracoscopy         |     382 |   393 | Procedure  |

Model Information

Model Name: ner_cpt_pipeline
Type: pipeline
Compatibility: Healthcare NLP 6.0.2+
License: Licensed
Edition: Official
Language: en
Size: 1.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • ChunkMergeModel

References

CPT resolver models are removed from the Models Hub due to license restrictions and can only be shared with the users who already have a valid CPT license. If you possess one and wish to use this model, kindly contact us at support@johnsnowlabs.com.