Pipeline for National Drug Codes (NDC) Sentence Entity Resolver

Description

This advanced pipeline extracts medication entities from clinical texts and utilizes the sbiobert_base_cased_mli Sentence Bert Embeddings to map these entities to their corresponding National Drug Codes (NDC) codes.

Predicted Entities

NDC

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

ndc_pipeline = PretrainedPipeline("ndc_resolver_pipeline", "en", "clinical/models")

result = ndc_pipeline.fullAnnotate("""The patient was given aspirin 81 mg and metformin 500 mg""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val ndc_pipeline = PretrainedPipeline("ndc_resolver_pipeline", "en", "clinical/models")

val result = ndc_pipeline.fullAnnotate("""The patient was given aspirin 81 mg and metformin 500 mg""")

Results

+----------------+-----+---+---------+----------+----------------+------------------------------------------------------------+
|           chunk|begin|end|ner_label|  ndc_code|     description|                                                  aux_labels|
+----------------+-----+---+---------+----------+----------------+------------------------------------------------------------+
|   aspirin 81 mg|   22| 34|     DRUG|41250-0780|   aspirin 81 mg|{'packages': "['1 BOTTLE, PLASTIC in 1 PACKAGE (41250-780...|
|metformin 500 mg|   40| 55|     DRUG|62207-0491|metformin 500 mg|{'packages': "['5000 TABLET in 1 POUCH (62207-491-31)', '...|
+----------------+-----+---+---------+----------+----------------+------------------------------------------------------------+

Model Information

Model Name: ndc_resolver_pipeline
Type: pipeline
Compatibility: Healthcare NLP 5.4.1+
License: Licensed
Edition: Official
Language: en
Size: 2.9 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • TextMatcherInternalModel
  • MedicalNerModel
  • NerConverter
  • MedicalNerModel
  • NerConverterInternalModel
  • ChunkMergeModel
  • Chunk2Doc
  • BertSentenceEmbeddings
  • SentenceEntityResolverModel