Mapping UMLS Codes with Their Corresponding LOINC Codes

Description

This pretrained model maps UMLS codes to corresponding LOINC codes.

Predicted Entities

loinc_code

Copy S3 URI

How to use


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

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

chunkerMapper = ChunkMapperModel.pretrained("umls_loinc_mapper", "en", "clinical/models")\
    .setInputCols(["umls_code"])\
    .setOutputCol("mappings")

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

data = spark.createDataFrame([["C0000530"],["C0000726"],["C0000343"],["C0000714"]]).toDF("text")

result = mapper_pipeline.fit(data).transform(data)


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

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

chunkerMapper = medical.ChunkMapperModel.pretrained("umls_loinc_mapper", "en", "clinical/models")\
    .setInputCols(["umls_code"])\
    .setOutputCol("mappings")

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

data = spark.createDataFrame([["C0000530"],["C0000726"],["C0000343"],["C0000714"]]).toDF("text")

result = mapper_pipeline.fit(data).transform(data)


val document_assembler = new DocumentAssembler()
      .setInputCol("text")
      .setOutputCol("document")

val chunk_assembler = new Doc2Chunk()
      .setInputCols("document")
      .setOutputCol("umls_code")

val chunkerMapper = ChunkMapperModel
      .pretrained("umls_loinc_mapper", "en", "clinical/models")
      .setInputCols(Array("umls_code"))
      .setOutputCol("mappings")

val mapper_pipeline = Pipeline().setStages(Array(
                                            document_assembler,
                                            chunk_assembler,
                                            chunkerMapper))

val data = Seq("C0000530","C0000726","C0000343","C0000714").toDF("text")

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


Results


+---------+----------+
|umls_code|loinc_code|
+---------+----------+
|C0000530 |LP15305-3 |
|C0000726 |LP234820-1|
|C0000343 |LP40352-4 |
|C0000714 |LP101132-1|
+---------+----------+

Model Information

Model Name: umls_loinc_mapper
Compatibility: Healthcare NLP 5.5.1+
License: Licensed
Edition: Official
Input Labels: [ner_chunk]
Output Labels: [mappings]
Language: en
Size: 3.4 MB

References

Trained on concepts from LOINC for the 2024AB release of the Unified Medical Language System® (UMLS) Knowledge Sources: https://www.nlm.nih.gov/research/umls/index.html