Drug Substance to UMLS Code Pipeline

Description

This pretrained pipeline maps entities (Drug Substances) with their corresponding UMLS CUI codes. You’ll just feed your text and it will return the corresponding UMLS codes.

Open in Colab Download Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

pipeline= PretrainedPipeline("umls_drug_substance_resolver_pipeline", "en", "clinical/models")
pipeline.annotate("The patient was given  metformin, lenvatinib and Magnesium hydroxide 100mg/1ml")

import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline= PretrainedPipeline("umls_drug_substance_resolver_pipeline", "en", "clinical/models")
val pipeline.annotate("The patient was given  metformin, lenvatinib and Magnesium hydroxide 100mg/1ml")

import nlu
nlu.load("en.map_entity.umls_drug_substance_resolver").predict("""The patient was given  metformin, lenvatinib and Magnesium hydroxide 100mg/1ml""")

Results

+-----------------------------+---------+---------+
|chunk                        |ner_label|umls_code|
+-----------------------------+---------+---------+
|metformin                    |DRUG     |C0025598 |
|lenvatinib                   |DRUG     |C2986924 |
|Magnesium hydroxide 100mg/1ml|DRUG     |C1134402 |
+-----------------------------+---------+---------+

Model Information

Model Name: umls_drug_substance_resolver_pipeline
Type: pipeline
Compatibility: Healthcare NLP 4.3.2+
License: Licensed
Edition: Official
Language: en
Size: 5.1 GB

Included Models

  • DocumentAssembler
  • SentenceDetector
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverter
  • ChunkMapperModel
  • ChunkMapperModel
  • ChunkMapperFilterer
  • Chunk2Doc
  • BertSentenceEmbeddings
  • SentenceEntityResolverModel
  • ResolverMerger