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

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")\
.setRel("Strength_NDC") 

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

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

lp = LightPipeline(model)

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

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

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

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

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

Results

|---:|:------------|:-------------------------|:----------------------------------------------------------|
|    | Brandname   | Strenth_NDC              | Other_NDSs                                                |
|---:|:------------|:-------------------------|:----------------------------------------------------------|
|  0 | zytiga      | 500 mg/1 | 57894-195     | ['250 mg/1 | 57894-150']                                  |
|  1 | zyvana      | 527 mg/1 | 69336-405     | ['']                                                      |
|  2 | ZYVOX       | 600 mg/300mL | 0009-4992 | ['600 mg/300mL | 66298-7807', '600 mg/300mL | 0009-7807'] |
|  3 | ZYTIGA      | 500 mg/1 | 57894-195     | ['250 mg/1 | 57894-150']                                  |
|---:|:------------|:-------------------------|:----------------------------------------------------------|

Model Information

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