Mapping Drug Brand Names with Corresponding National Drug Codes

Description

This pretrained model maps drug brand names to corresponding National Drug Codes (NDC). Product NDCs for each strength are returned in result and metadata.

Predicted Entities

Strength_NDC

Open in Colab Copy S3 URI

How to use

document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("chunk")

chunkerMapper = ChunkMapperModel.pretrained("drug_brandname_ndc_mapper", "en", "clinical/models")\
.setInputCols(["chunk"])\
.setOutputCol("ndc")\
.setRels(["Strength_NDC"])\
.setLowerCase(True)


pipeline = Pipeline().setStages([
			document_assembler,
			chunkerMapper])  


model = pipeline.fit(spark.createDataFrame([[""]]).toDF("text")) 

light_pipeline = LightPipeline(model)

result = light_pipeline.fullAnnotate(["zytiga", "zyvana", "ZYVOX"])
val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("chunk")

val chunkerMapper = ChunkMapperModel.pretrained("drug_brandname_ndc_mapper", "en", "clinical/models")
.setInputCols(Array("chunk"))
.setOutputCol("ndc")
.setRels(Array("Strength_NDC"))
.setLowerCase(True)


val pipeline = new Pipeline().setStages(Array(
				  document_assembler,
				  chunkerMapper))

val sample_data = Seq("zytiga", "zyvana", "ZYVOX").toDS.toDF("text")

val result = pipeline.fit(sample_data).transform(sample_data)
import nlu
nlu.load("en.map_entity.drug_brand_to_ndc").predict("""Put your text here.""")

Results

|    | Brandname   | Strength_NDC             |
|---:|:------------|:-------------------------|
|  0 | zytiga      | 500 mg/1 | 57894-195     |
|  1 | zyvana      | 527 mg/1 | 69336-405     |
|  2 | ZYVOX       | 600 mg/300mL | 0009-4992 |

Model Information

Model Name: drug_brandname_ndc_mapper
Compatibility: Healthcare NLP 3.5.3+
License: Licensed
Edition: Official
Input Labels: [chunk]
Output Labels: [mappings]
Language: en
Size: 3.0 MB