Pipeline for Extracting Clinical Entities Related to HCPCS Codes

Description

This pipeline is designed to extract all entities mappable to HCPCS codes.

2 NER models are used to achieve those tasks.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

ner_pipeline = PretrainedPipeline("ner_hcpcs_pipeline", "en", "clinical/models")

result = ner_pipeline.annotate("""
Mary received a mechanical prosthetic heart valve in June 2020, and the results were successful. 
Diabetes screening test performed, revealing abnormal result. 
She  uses infusion pump for diabetes and a CPAP machine for sleep apnea. 
In 2021, She received a breast prosthesis implant.
""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val ner_pipeline = PretrainedPipeline("ner_hcpcs_pipeline", "en", "clinical/models")

val result = ner_pipeline.annotate("""
Mary received a mechanical prosthetic heart valve in June 2020, and the results were successful. 
Diabetes screening test performed, revealing abnormal result. 
She  uses infusion pump for diabetes and a CPAP machine for sleep apnea. 
In 2021, She received a breast prosthesis implant.
""")

Results

|    | chunks                              |   begin |   end | entities   |
|---:|:------------------------------------|--------:|------:|:-----------|
|  0 | a mechanical prosthetic heart valve |      15 |    49 | PROCEDURE  |
|  1 | infusion pump                       |     172 |   184 | PROCEDURE  |
|  2 | a CPAP machine                      |     203 |   216 | PROCEDURE  |
|  3 | a breast prosthesis implant         |     258 |   284 | PROCEDURE  |

Model Information

Model Name: ner_hcpcs_pipeline
Type: pipeline
Compatibility: Healthcare NLP 6.0.2+
License: Licensed
Edition: Official
Language: en
Size: 1.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • ChunkMergeModel