Mapping CPT Codes with Their Corresponding UMLS Codes

Description

This pretrained model maps CPT codes to corresponding UMLS codes.

Predicted Entities

umls_code

How to use

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

chunk_assembler = Doc2Chunk()\
    .setInputCols(['doc'])\
    .setOutputCol('cpt_code')
 
mapperModel = ChunkMapperModel.load("cpt_umls_mapper")\
    .setInputCols(["cpt_code"])\
    .setOutputCol("mappings")\

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

data = spark.createDataFrame([["2016F"],["48155"],["64823"],["4500F"]]).toDF("text")

mapper_model = mapper_pipeline.fit(data)
result= mapper_model.transform(data)                                 
val document_assembler = new DocumentAssembler()
    .setInputCol("text")
    .setOutputCol("doc")
	
val chunk_assembler = new Doc2Chunk()
    .setInputCols(Array("doc"))
    .setOutputCol("cpt_code")
	
val mapperModel = ChunkMapperModel.load("cpt_umls_mapper")
    .setInputCols(Array("cpt_code"))
    .setOutputCol("mappings")
	
val mapper_pipeline = new Pipeline().setStages(Array(
    document_assembler, 
    chunk_assembler, 
    mapperModel ))
	
val data = Seq("2016F", "48155", "64823", "4500F").toDF("text")
	
val mapper_model = mapper_pipeline.fit(data)
result= mapper_model.transform(data)

Results

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

Model Information

Model Name: cpt_umls_mapper
Compatibility: Healthcare NLP 5.2.1+
License: Licensed
Edition: Official
Input Labels: [ner_chunk]
Output Labels: [mappings]
Language: en
Size: 319.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.