Pipeline for Extracting Clinical Entities Related to RxCUI Codes

Description

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

1 NER model and a Text Matcher are used to achieve those tasks.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

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

result = ner_pipeline.annotate("""
The patient was prescribed Albuterol inhaler when needed. She was seen by the endocrinology service, prescribed Avandia 4 mg at nights,
Coumadin 5 mg with meals, Metformin 100 mg two times a day, and a daily dose of Lisinopril 10 mg.
""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

val result = ner_pipeline.annotate("""
The patient was prescribed Albuterol inhaler when needed. She was seen by the endocrinology service, prescribed Avandia 4 mg at nights,
Coumadin 5 mg with meals, Metformin 100 mg two times a day, and a daily dose of Lisinopril 10 mg.
""")

Results

|    | chunks            |   begin |   end | entities   |
|---:|:------------------|--------:|------:|:-----------|
|  0 | Albuterol inhaler |      28 |    44 | DRUG       |
|  1 | Avandia 4 mg      |     113 |   124 | DRUG       |
|  2 | Coumadin 5 mg     |     137 |   149 | DRUG       |
|  3 | Metformin 100 mg  |     163 |   178 | DRUG       |
|  4 | Lisinopril 10 mg  |     217 |   232 | DRUG       |

Model Information

Model Name: ner_rxcui_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
  • TextMatcherInternalModel
  • ChunkMergeModel