Description
This pipeline maps clinical entities to their corresponding ICD-10-CM codes. It provides fast and accurate clinical code mapping without requiring embeddings.
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("icd10cm_mapper_pipeline", "en", "clinical/models")
sample_text = """ A 58-year-old male presents with sciatica and myalgia affecting his lower extremities. He has a history of polymyositis, currently managed with medication. The patient also reports glossitis and beriberi due to nutritional deficiency. Recently, he developed spondylolysis and experiences motion sickness during travel."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
from johnsnowlabs import nlp, medical
pipeline = nlp.PretrainedPipeline("icd10cm_mapper_pipeline", "en", "clinical/models")
sample_text = """ A 58-year-old male presents with sciatica and myalgia affecting his lower extremities. He has a history of polymyositis, currently managed with medication. The patient also reports glossitis and beriberi due to nutritional deficiency. Recently, he developed spondylolysis and experiences motion sickness during travel."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = PretrainedPipeline("icd10cm_mapper_pipeline", "en", "clinical/models")
val sample_text = """ A 58-year-old male presents with sciatica and myalgia affecting his lower extremities. He has a history of polymyositis, currently managed with medication. The patient also reports glossitis and beriberi due to nutritional deficiency. Recently, he developed spondylolysis and experiences motion sickness during travel."""
val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
Results
|ner_chunk |mapping_result|
|----------------------|--------------|
|sciatica |M54.3 |
|myalgia |M79.1 |
|polymyositis |M33.2 |
|glossitis |K14.0 |
|beriberi |E51.1 |
|nutritional deficiency|E63.9 |
|spondylolysis |M43.0 |
|motion sickness |T75.3 |
Model Information
| Model Name: | icd10cm_mapper_pipeline |
| Type: | pipeline |
| Compatibility: | Healthcare NLP 6.3.0+ |
| License: | Licensed |
| Edition: | Official |
| Language: | en |
| Size: | 1.7 GB |
Included Models
- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMapperModel