Mapping ICD10-CM Codes with Their Corresponding SNOMED Codes

Description

This pretrained model maps ICD10-CM codes to corresponding SNOMED codes under the Unified Medical Language System (UMLS).

Predicted Entities

snomed_code

Open in Colab Copy S3 URI

How to use

documentAssembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("ner_chunk")

sbert_embedder = BertSentenceEmbeddings.pretrained("sbiobert_base_cased_mli", "en", "clinical/models")\
.setInputCols(["ner_chunk"])\
.setOutputCol("sbert_embeddings")

icd_resolver = SentenceEntityResolverModel.pretrained("sbiobertresolve_icd10cm_augmented_billable_hcc", "en", "clinical/models") \
.setInputCols(["sbert_embeddings"]) \
.setOutputCol("icd10cm_code")\
.setDistanceFunction("EUCLIDEAN")

chunkerMapper = ChunkMapperModel.pretrained("icd10cm_snomed_mapper", "en", "clinical/models")\
.setInputCols(["icd10cm_code"])\
.setOutputCol("mappings")\
.setRels(["snomed_code"])


pipeline = Pipeline(stages = [
documentAssembler,
sbert_embedder,
icd_resolver,
chunkerMapper])

model = pipeline.fit(spark.createDataFrame([[""]]).toDF("text"))

light_pipeline= LightPipeline(model)

result = light_pipeline.fullAnnotate("Diabetes Mellitus")
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("ner_chunk")

val sbert_embedder = BertSentenceEmbeddings.pretrained("sbiobert_base_cased_mli", "en", "clinical/models")
.setInputCols(Array("ner_chunk"))
.setOutputCol("sbert_embeddings")

val icd_resolver = SentenceEntityResolverModel.pretrained("sbiobertresolve_icd10cm_augmented_billable_hcc", "en", "clinical/models")
.setInputCols(Array("sbert_embeddings"))
.setOutputCol("icd10cm_code")
.setDistanceFunction("EUCLIDEAN")

val chunkerMapper = ChunkMapperModel.pretrained("icd10cm_snomed_mapper", "en","clinical/models")
.setInputCols(Array("icd10cm_code"))
.setOutputCol("mappings")
.setRels(Array("snomed_code"))


val pipeline = new Pipeline(stages = Array(
documentAssembler,
sbert_embedder,
icd_resolver,
chunkerMapper))


val data = Seq("Diabetes Mellitus").toDS.toDF("text")

val result= pipeline.fit(data).transform(data)
import nlu
nlu.load("en.icd10cm_to_snomed").predict("""Diabetes Mellitus""")

Results

|    | ner_chunk         | icd10cm_code   |   snomed_mappings |
|---:|:------------------|:---------------|------------------:|
|  0 | Diabetes Mellitus | Z833           |         160402005 |

Model Information

Model Name: icd10cm_snomed_mapper
Compatibility: Healthcare NLP 3.5.3+
License: Licensed
Edition: Official
Input Labels: [icd10_code]
Output Labels: [mappings]
Language: en
Size: 1.1 MB