Sentence Entity Resolver for CPT codes (procedures and measurements) - Augmented

Description

This model maps medical entities to CPT codes using Sentence Bert Embeddings. The corpus of this model has been extented to measurements, and this model is capable of mapping both procedures and measurement concepts/entities to CPT codes. Measurement codes are helpful in codifying medical entities related to tests and their results.

Predicted Entities

CPT codes and their descriptions.

Open in Colab

How to use

sbiobertresolve_cpt_procedures_measurements_augmented resolver model must be used with sbiobert_base_cased_mli as embeddings ner_jsl as NER model. Procedure set in .setWhiteList(). sbiobertresolve_cpt_procedures_measurements_augmented resolver model must be used with sbiobert_base_cased_mli as embeddings ner_measurements_clinical as NER model. Measurements set in .setWhiteList(). Merge ner_jsl and ner_measurements_clinical 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")

cpt_resolver = SentenceEntityResolverModel\
    .load("sbiobertresolve_cpt_procedures_measurements_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(['calcium score', '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_measurements_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(['calcium score', 'heart surgery'])
import nlu
nlu.load("en.resolve.cpt.procedures_measurements").predict("""calcium score""")

Results

|    | chunks        | code  | resolutions                                                                                                                                                                                                                               |
|---:|:--------------|:----- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|  0 | calcium score | 82310 | Calcium measurement [Calcium; total]                                                                                                                                                                                                      |
|  1 | heart surgery | 33257 | Cardiac surgery procedure [Operative tissue ablation and reconstruction of atria, performed at the time of other cardiac procedure(s), limited (eg, modified maze procedure) (List separately in addition to code for primary procedure)] |

Model Information

Model Name: sbiobertresolve_cpt_procedures_measurements_augmented
Compatibility: Healthcare NLP 3.1.0+
License: Licensed
Edition: Official
Input Labels: [sbert_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.