Description
This pretrained model maps LOINC codes to corresponding UMLS codes.
Predicted Entities
umls_code
How to use
document_assembler = DocumentAssembler()\
.setInputCol('text')\
.setOutputCol('doc')
chunkAssembler = Doc2Chunk()\
.setInputCols("doc")\
.setOutputCol("loinc_code")
chunkerMapper = ChunkMapperModel.pretrained("loinc_umls_mapper", "en", "clinical/models")\
.setInputCols(["loinc_code"])\
.setOutputCol("mappings")
mapper_pipeline = Pipeline(stages=[
document_assembler,
chunkAssembler,
chunkerMapper
])
data = spark.createDataFrame([["LA26702-3"],["LP99998-4"]]).toDF("text")
result = mapper_pipeline.fit(data).transform(data)
document_assembler = nlp.DocumentAssembler()\
.setInputCol('text')\
.setOutputCol('doc')
chunkAssembler = nlp.Doc2Chunk()\
.setInputCols("doc")\
.setOutputCol("loinc_code")
chunkerMapper = medical.ChunkMapperModel.pretrained("loinc_umls_mapper", "en", "clinical/models")\
.setInputCols(["loinc_code"])\
.setOutputCol("mappings")
mapper_pipeline = nlp.Pipeline(stages=[
document_assembler,
chunkAssembler,
chunkerMapper
])
data = spark.createDataFrame([["LA26702-3"],["LP99998-4"]]).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("loinc_umls_mapper", "en", "clinical/models")
.setInputCols(Array("umls_code"))
.setOutputCol("mappings")
val mapper_pipeline = Pipeline().setStages(Array(
document_assembler,
chunk_assembler,
chunkerMapper))
val data = Seq("LA26702-3","LP99998-4").toDF("text")
val result = mapper_pipeline.fit(data).transform(data)
Results
+----------+---------+
|loinc_code|umls_code|
+----------+---------+
|LA26702-3 |C0004057 |
|LP99998-4 |C0050078 |
+----------+---------+
Model Information
Model Name: | loinc_umls_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