Mapping CVX Codes with Their Corresponding Vaccine Names and CPT Codes.

Description

This pretrained model maps CVX codes with their corresponding vaccine names and CPT codes. It returns 3 types of vaccine names; short_name, full_name and trade_name.

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

short_name, full_name, trade_name, cpt_code

Open in Colab Copy S3 URI

How to use

document_assembler = DocumentAssembler()\
      .setInputCol('text')\
      .setOutputCol('doc')

chunk_assembler = Doc2Chunk()\
      .setInputCols(['doc'])\
      .setOutputCol('ner_chunk')
 
chunkerMapper = ChunkMapperModel\
    .pretrained("cvx_code_mapper", "en", "clinical/models")\
    .setInputCols(["ner_chunk"])\
    .setOutputCol("mappings")\
    .setRels(["short_name", "full_name", "trade_name", "cpt_code"])


mapper_pipeline = Pipeline(stages=[
    document_assembler,
    chunk_assembler,
    chunkerMapper
])

data = spark.createDataFrame([['75'], ['20'], ['48'], ['19']]).toDF('text')

res = mapper_pipeline.fit(data).transform(data)
val documentAssembler = new DocumentAssembler()
     .setInputCol("text")
     .setOutputCol("doc")

val chunk_assembler = new Doc2Chunk()
     .setInputCols(Array("doc"))
     .setOutputCol("ner_chunk")

val chunkerMapper = ChunkMapperModel.pretrained("cvx_code_mapper", "en","clinical/models")
     .setInputCols(Array("ner_chunk"))
     .setOutputCol("mappings")
     .setRels(Array("short_name", "full_name", "trade_name", "cpt_code"))

val pipeline = new Pipeline(stages = Array(
     documentAssembler,
     chunk_assembler,
     chunkerMapper))

val data = Seq("75", "20", "48", "19").toDS.toDF("text")

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

Results

+--------+---------------------+-------------------------------------------------------------+------------+--------+
|cvx_code|short_name           |full_name                                                    |trade_name  |cpt_code|
+--------+---------------------+-------------------------------------------------------------+------------+--------+
|[75]    |[vaccinia (smallpox)]|[vaccinia (smallpox) vaccine]                                |[DRYVAX]    |[90622] |
|[20]    |[DTaP]               |[diphtheria, tetanus toxoids and acellular pertussis vaccine]|[ACEL-IMUNE]|[90700] |
|[48]    |[Hib (PRP-T)]        |[Haemophilus influenzae type b vaccine, PRP-T conjugate]     |[ACTHIB]    |[90648] |
|[19]    |[BCG]                |[Bacillus Calmette-Guerin vaccine]                           |[MYCOBAX]   |[90585] |
+--------+---------------------+-------------------------------------------------------------+------------+--------+

Model Information

Model Name: cvx_code_mapper
Compatibility: Healthcare NLP 4.2.1+
License: Licensed
Edition: Official
Input Labels: [chunk]
Output Labels: [mappings]
Language: en
Size: 12.3 KB