Pipeline for Extracting Clinical Entities Related to SNOMED Drug Codes

Description

This pipeline is designed to extract all entities mappable to SNOMED Drug codes.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

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

result = ner_pipeline.annotate("""
John's doctor prescribed aspirin for his heart condition, along with paracetamol for his fever and headache, amoxicillin for his tonsilitis and lansoprazole for his GORD on 2023-12-01.
""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

val result = ner_pipeline.annotate("""
John's doctor prescribed aspirin for his heart condition, along with paracetamol for his fever and headache, amoxicillin for his tonsilitis and lansoprazole for his GORD on 2023-12-01.
""")

Results

|    | chunks       |   begin |   end | entities   |
|---:|:-------------|--------:|------:|:-----------|
|  0 | aspirin      |      26 |    32 | DRUG       |
|  1 | paracetamol  |      70 |    80 | DRUG       |
|  2 | amoxicillin  |     110 |   120 | DRUG       |
|  3 | lansoprazole |     145 |   156 | DRUG       |

Model Information

Model Name: ner_snomed_drug_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
  • TextMatcherInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • ChunkMergeModel