Description
This pretrained model maps vaccine products with their corresponding CVX codes, 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
cvx_code
, short_name
, full_name
, trade_name
, cpt_code
How to use
document_assembler = DocumentAssembler()\
.setInputCol('text')\
.setOutputCol('doc')
chunk_assembler = Doc2Chunk()\
.setInputCols(['doc'])\
.setOutputCol('ner_chunk')
chunkerMapper = ChunkMapperModel\
.pretrained("cvx_name_mapper", "en", "clinical/models")\
.setInputCols(["ner_chunk"])\
.setOutputCol("mappings")\
.setRels(["cvx_code", "short_name", "full_name", "trade_name", "cpt_code"])
mapper_pipeline = Pipeline(stages=[
document_assembler,
chunk_assembler,
chunkerMapper
])
data = spark.createDataFrame([['DTaP'], ['MYCOBAX'], ['cholera, live attenuated']]).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_name_mapper", "en","clinical/models")
.setInputCols(Array("ner_chunk"))
.setOutputCol("mappings")
.setRels(Array("cvx_code", "short_name", "full_name", "trade_name", "cpt_code"))
val pipeline = new Pipeline(stages = Array(
documentAssembler,
chunk_assembler,
chunkerMapper))
val data = Seq("DTaP", "MYCOBAX", "cholera, live attenuated").toDS.toDF("text")
val result= pipeline.fit(data).transform(data)
import nlu
nlu.load("en.map_entity.cvx_name").predict("""cholera, live attenuated""")
Results
+--------------------------+--------+--------------------------+-------------------------------------------------------------+------------+--------+
|chunk |cvx_code|short_name |full_name |trade_name |cpt_code|
+--------------------------+--------+--------------------------+-------------------------------------------------------------+------------+--------+
|[DTaP] |[20] |[DTaP] |[diphtheria, tetanus toxoids and acellular pertussis vaccine]|[ACEL-IMUNE]|[90700] |
|[MYCOBAX] |[19] |[BCG] |[Bacillus Calmette-Guerin vaccine] |[MYCOBAX] |[90585] |
|[cholera, live attenuated]|[174] |[cholera, live attenuated]|[cholera, live attenuated] |[VAXCHORA] |[90625] |
+--------------------------+--------+--------------------------+-------------------------------------------------------------+------------+--------+
Model Information
Model Name: | cvx_name_mapper |
Compatibility: | Healthcare NLP 4.2.1+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [chunk] |
Output Labels: | [mappings] |
Language: | en |
Size: | 25.1 KB |