Mapping UMLS Codes with Their Corresponding CPT Codes

Description

This pretrained model maps UMLS codes to corresponding CPT codes.

Predicted Entities

cpt_code

How to use

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

chunkAssembler = Doc2Chunk()\
    .setInputCols("doc")\
    .setOutputCol("umls_code")\

chunkerMapper = ChunkMapperModel.load("umls_cpt_mapper")\
    .setInputCols(["umls_code"])\
    .setOutputCol("mappings")\

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

data = spark.createDataFrame([["C3248275"],["C3496535"],["C0973430"],["C3248301"]]).toDF("text")

mapper_model = mapper_pipeline.fit(data)
result= mapper_model.transform(data)                                 
val document_assembler = new DocumentAssembler()
    .setInputCol("text")
    .setOutputCol("doc")
	
val chunkAssembler = new Doc2Chunk()
    .setInputCols("doc")
    .setOutputCol("umls_code")
	
val chunkerMapper = ChunkMapperModel.load("umls_cpt_mapper")
    .setInputCols(Array("umls_code"))
    .setOutputCol("mappings")
	
val mapper_pipeline = new Pipeline().setStages(Array( 
    document_assembler,
    chunkAssembler,
    chunkerMapper))
	
val data = Seq("C3248275", "C3496535", "C0973430", "C3248301").toDF("text")
	
val mapper_model = mapper_pipeline.fit(data)
result= mapper_model.transform(data)

Results

+---------+--------+
|umls_code|cpt_code|
+---------+--------+
|C3248275 |2016F   |
|C3496535 |48155   |
|C0973430 |64823   |
|C3248301 |4500F   |
+---------+--------+

Model Information

Model Name: umls_cpt_mapper
Compatibility: Healthcare NLP 5.2.1+
License: Licensed
Edition: Official
Input Labels: [ner_chunk]
Output Labels: [mappings]
Language: en
Size: 601.8 KB

References

CPT resolver models are removed from the Models Hub due to license restrictions and can only be shared with the users who already have a valid CPT license. If you possess one and wish to use this model, kindly contact us at support@johnsnowlabs.com.