Sentence Entity Resolver for Snomed Concepts, Body Structure Version (sbiobert_base_cased_mli)

Description

This model maps extracted medical (anatomical structures) entities to Snomed codes (body structure version) using sentence embeddings.

Predicted Entities

Snomed Codes and their normalized definition with sbiobert_base_cased_mli embeddings.

Open in Colab Copy S3 URI

How to use

sbiobertresolve_snomed_bodyStructure resolver model must be used with sbiobert_base_cased_mli as embeddings ner_jsl as NER model. Disease_Syndrome_Disorder, External_body_part_or_region set in .setWhiteList().

sbiobertresolve_snomed_bodyStructure resolver model must be used with sbiobert_base_cased_mli as embeddings ner_jsl as NER model. No need to set .setWhiteList().

Merge ner_jsl and ner_anatomy_coarse model chunks.

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

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

snomed_resolver = SentenceEntityResolverModel\
.pretrained("sbiobertresolve_snomed_bodyStructure, "en", "clinical/models) \
.setInputCols(["ner_chunk", "sbert_embeddings"]) \
.setOutputCol("snomed_code")

snomed_pipelineModel = PipelineModel(
stages = [
documentAssembler,
jsl_sbert_embedder,
snomed_resolver])

snomed_lp = LightPipeline(snomed_pipelineModel)
result = snomed_lp.fullAnnotate("Amputation stump")
val document_assembler = 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 snomed_resolver = SentenceEntityResolverModel
.pretrained("sbiobertresolve_snomed_bodyStructure", "en", "clinical/models") 
.setInputCols(Array("ner_chunk", "sbert_embeddings")) 
.setOutputCol("snomed_code")

val snomed_pipelineModel= new PipelineModel().setStages(Array(document_assembler, sbert_embedder, snomed_resolver))

val snomed_lp = LightPipeline(snomed_pipelineModel)
val result = snomed_lp.fullAnnotate("Amputation stump")
import nlu
nlu.load("en.resolve.snomed_body_structure").predict("""sbiobertresolve_snomed_bodyStructure, """)

Results

|    | chunks           | code     | resolutions                                                                                                                                                                                                                                  | all_codes                                                                                       | all_distances                                                               |
|---:|:-----------------|:---------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------|
|  0 | amputation stump | 38033009 | [Amputation stump, Amputation stump of upper limb, Amputation stump of left upper limb, Amputation stump of lower limb, Amputation stump of left lower limb, Amputation stump of right upper limb, Amputation stump of right lower limb, ...]| ['38033009', '771359009', '771364008', '771358001', '771367001', '771365009', '771368006', ...] | ['0.0000', '0.0773', '0.0858', '0.0863', '0.0905', '0.0911', '0.0972', ...] |

Model Information

Model Name: sbiobertresolve_snomed_bodyStructure
Compatibility: Healthcare NLP 3.1.0+
License: Licensed
Edition: Official
Input Labels: [sentence_embeddings]
Output Labels: [snomed_code]
Language: en
Case sensitive: true

Data Source

https://www.snomed.org/