Sentence Entity Resolver for CPT codes (Augmented)

Description

This model maps extracted medical entities to CPT codes using Sentence Bert Embeddings.

Predicted Entities

CPT codes and their descriptions.

Open in Colab

How to use

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")

cpt_resolver = SentenceEntityResolverModel\
    .load("sbiobertresolve_cpt_procedures_augmented") \
    .setInputCols(["ner_chunk", "sbert_embeddings"]) \
    .setOutputCol("cpt_code")

cpt_pipelineModel = PipelineModel(
    stages = [
        documentAssembler,
        jsl_sbert_embedder,
        cpt_resolver])

cpt_lp = LightPipeline(cpt_pipelineModel)
result = cpt_lp.fullAnnotate("heart surgery")
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 cpt_resolver = SentenceEntityResolverModel
    .load("sbiobertresolve_cpt_procedures_augmented") 
    .setInputCols(Array("ner_chunk", "sbert_embeddings")) 
    .setOutputCol("cpt_code")

val cpt_pipelineModel= new PipelineModel().setStages(
    Array(
        document_assembler, 
        sbert_embedder, 
        cpt_resolver))

val cpt_lp = LightPipeline(cpt_pipelineModel)
val result = cpt_lp.fullAnnotate("heart surgery")
import nlu
nlu.load("en.resolve.cpt.procedures_augmented").predict("""heart surgery""")

Results

|    | chunks        | code  | resolutions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | all_codes                         | all_distances                         |
|---:|:--------------|:----- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------|:--------------------------------------|
|  0 | heart surgery | 33258 | [Cardiac surgery procedure [Operative tissue ablation and reconstruction of atria, performed at the time of other cardiac procedure(s), extensive (eg, maze procedure), without cardiopulmonary bypass (List separately in addition to code for primary procedure)], Cardiac surgery procedure [Unlisted procedure, cardiac surgery], Heart procedure [Interrogation device evaluation (in person) of intracardiac ischemia monitoring system with analysis, review, and report], Heart procedure [Insertion or removal and replacement of intracardiac ischemia monitoring system including imaging supervision and interpretation when performed and intra-operative interrogation and programming when performed; device only], ...]| [33258, 33999, 0306T, 0304T, ...] | [0.1031, 0.1031, 0.1377, 0.1377, ...] |

Model Information

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

Data Source

Trained on Current Procedural Terminology dataset with sbiobert_base_cased_mli sentence embeddings.

References

CPT resolver models are removed from the Models Hub due to license restrictions and can only be shared with the users who already have a valid CPT license. If you possess one and wish to use this model, kindly contact us at support@johnsnowlabs.com.