Mapping UMLS Codes with Their Corresponding MESH Codes

Description

This pretrained model maps UMLS codes to corresponding MESH codes.

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

mesh_code

Open in Colab Copy S3 URI

How to use

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

chunkerMapper = DocMapperModel.pretrained("umls_mesh_mapper", "en", "clinical/models")\
      .setInputCols(["document"])\
      .setOutputCol("mappings")\
      .setRels(["mesh_code"])

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

df = spark.createDataFrame([['C0000098'], ['C0000152']]).toDF("text")

res = pipeline.fit(df).transform(df)
val document_assembler = new DocumentAssembler()
      .setInputCol("text")
      .setOutputCol("document")

val chunkerMapper = DocMapperModel.pretrained("umls_mesh_mapper", "en", "clinical/models")
      .setInputCols("document")
      .setOutputCol("mappings")
      .setRels("mesh_code")
    
val pipeline = new Pipeline(stages = Array(
        document_assembler,
        chunkerMapper
))

val data = Seq([["C0000098"], ["C0000152"]]).toDS.toDF("text")

val result= pipeline.fit(data).transform(data)

Results

+---------+---------+---------+
|umls_code|mesh_code|relation |
+---------+---------+---------+
|C0000098 |D015655  |mesh_code|
|C0000152 |D015067  |mesh_code|
+---------+---------+---------+

Model Information

Model Name: umls_mesh_mapper
Compatibility: Healthcare NLP 5.1.1+
License: Licensed
Edition: Official
Input Labels: [document]
Output Labels: [mappings]
Language: en
Size: 6.1 MB