Description
This pretrained model maps SNOMED codes to corresponding ICD10-CM codes.
Predicted Entities
icd10cm_code
How to use
documentAssembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("ner_chunk")
sbert_embedder = BertSentenceEmbeddings.pretrained("sbert_jsl_medium_uncased", "en", "clinical/models")\
.setInputCols(["ner_chunk"])\
.setOutputCol("sbert_embeddings")
snomed_resolver = SentenceEntityResolverModel.pretrained("sbertresolve_snomed_conditions", "en", "clinical/models") \
.setInputCols(["sbert_embeddings"]) \
.setOutputCol("snomed_code")\
.setDistanceFunction("EUCLIDEAN")
chunkerMapper = ChunkMapperModel.pretrained("snomed_icd10cm_mapper", "en", "clinical/models")\
.setInputCols(["snomed_code"])\
.setOutputCol("icd10cm_mappings")\
.setRels(["icd10cm_code"])
pipeline = Pipeline(
stages = [
documentAssembler,
sbert_embedder,
snomed_resolver,
chunkerMapper
])
model = pipeline.fit(spark.createDataFrame([[""]]).toDF("text"))
light_pipeline= LightPipeline(model)
result = light_pipeline.fullAnnotate("Radiating chest pain")
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("ner_chunk")
val sbert_embedder = BertSentenceEmbeddings.pretrained("sbert_jsl_medium_uncased", "en", "clinical/models")
.setInputCols("ner_chunk")
.setOutputCol("sbert_embeddings")
val snomed_resolver = SentenceEntityResolverModel.pretrained("sbertresolve_snomed_conditions", "en", "clinical/models")
.setInputCols(Array("sbert_embeddings"))
.setOutputCol("snomed_code")
.setDistanceFunction("EUCLIDEAN")
val chunkerMapper = ChunkMapperModel.pretrained("snomed_icd10cm_mapper", "en", "clinical/models")
.setInputCols("snomed_code")
.setOutputCol("icd10cm_mappings")
.setRels(Array("icd10cm_code"))
val pipeline = new Pipeline(stages = Array(
documentAssembler,
sbert_embedder,
snomed_resolver,
chunkerMapper))
val data = Seq("Radiating chest pain").toDS.toDF("text")
val result= pipeline.fit(data).transform(data)
import nlu
nlu.load("en.snomed_to_icd10cm").predict("""Radiating chest pain""")
Results
| | ner_chunk | snomed_code | icd10cm_mappings |
|---:|:---------------------|--------------:|:-------------------|
| 0 | Radiating chest pain | 10000006 | R07.9 |
Model Information
Model Name: | snomed_icd10cm_mapper |
Compatibility: | Healthcare NLP 3.5.3+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [snomed_code] |
Output Labels: | [mappings] |
Language: | en |
Size: | 1.5 MB |
References
This pretrained model maps SNOMED codes to corresponding ICD10-CM codes under the Unified Medical Language System (UMLS).