Mapping National Drug Codes (NDC) with Corresponding HCPCS Codes and Descriptions

Description

This pretrained model maps National Drug Codes (NDC) with their corresponding HCPCS codes and their descriptions.

Important Note: Mappers extract additional information such as extended descriptions and categories related to Concept codes (such as RxNorm, ICD10, CPT, MESH, NDC, UMLS, etc.). They generally take Concept Codes, which are the outputs of EntityResolvers, as input. When creating a pipeline that contains ‘Mapper’, it is necessary to use the ChunkMapperModel after an EntityResolverModel.

Predicted Entities

hcpcs_code, hcpcs_description

Open in Colab Download Copy S3 URI

How to use

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

chunkerMapper = DocMapperModel.pretrained("ndc_hcpcs_mapper", "en", "clinical/models")\
      .setInputCols(["ndc_chunk"])\
      .setOutputCol("hcpcs")\
      .setRels(["hcpcs_code", "hcpcs_description"])

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

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

lp = LightPipeline(model)

res = lp.fullAnnotate(["16714-0892-01", "00990-6138-03", "43598-0650-11"])
val document_assembler = new DocumentAssembler()
       .setInputCol("text")\
       .setOutputCol("ndc_chunk")

val chunkerMapper = DocMapperModel
       .pretrained("ndc_hcpcs_mapper", "en", "clinical/models")
       .setInputCols(Array("ndc_chunk"))
       .setOutputCol("mappings")
       .setRels(Array("hcpcs_code", "hcpcs_description")) 

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


val data = Seq(Array("16714-0892-01", "00990-6138-03", "43598-0650-11")).toDS.toDF("text")
val result = pipeline.fit(data).transform(data) 

Results

+-------------+----------------------------+-----------------+
|ndc_chunk    |mappings                    |relation         |
+-------------+----------------------------+-----------------+
|16714-0892-01|J0878                       |hcpcs_code       |
|16714-0892-01|INJECTION, DAPTOMYCIN, 1 MG |hcpcs_description|
|00990-6138-03|A4217                       |hcpcs_code       |
|00990-6138-03|STERILE WATER/SALINE, 500 ML|hcpcs_description|
|43598-0650-11|J9340                       |hcpcs_code       |
|43598-0650-11|INJECTION, THIOTEPA, 15 MG  |hcpcs_description|
+-------------+----------------------------+-----------------+

Model Information

Model Name: ndc_hcpcs_mapper
Compatibility: Healthcare NLP 4.4.0+
License: Licensed
Edition: Official
Input Labels: [ner_chunk]
Output Labels: [mappings]
Language: en
Size: 203.1 KB