Pipeline for Hierarchical Condition Categories (HCC) Sentence Entity Resolver

Description

This advanced pipeline extracts clinical conditions from clinical texts and utilizes the sbiobert_base_cased_mli Sentence Bert Embeddings to map these entities to their corresponding Hierarchical Condition Categories (HCC) codes.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

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

result = ner_pipeline.annotate("""The patient's medical record indicates a diagnosis of Diabetes and Chronic Obstructive Pulmonary Disease, requiring comprehensive care and management.""")


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

val result = ner_pipeline.annotate("""The patient's medical record indicates a diagnosis of Diabetes and Chronic Obstructive Pulmonary Disease, requiring comprehensive care and management.""")

Results

|    | chunks                                |   begin |   end | entities   |   hcc_code | resolutions                                                                                                                                                                                                                                                                                                                                 | all_codes          |
|---:|:--------------------------------------|--------:|------:|:-----------|-----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------|
|  0 | Diabetes                              |      54 |    61 | PROBLEM    |         19 | diabetes monitored [type 2 diabetes mellitus without complications]:::anaemia of diabetes [anemia, unspecified]:::anemia of diabetes (disorder) [type 2 diabetes mellitus with other specified complication]                                                                                                                                | 19:::0:::18        |
|  1 | Chronic Obstructive Pulmonary Disease |      67 |   103 | PROBLEM    |        111 | chronic obstructive pulmonary disease [chronic obstructive pulmonary disease, unspecified]:::chronic lung disease [pneumoconiosis due to other dust containing silica]:::chronic pulmonary heart disease [pulmonary heart disease, unspecified]:::other chronic obstructive pulmonary disease [other chronic obstructive pulmonary disease] | 111:::112:::85:::0 |

Model Information

Model Name: hcc_resolver_pipeline
Type: pipeline
Compatibility: Healthcare NLP 5.2.1+
License: Licensed
Edition: Official
Language: en
Size: 3.5 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel
  • Chunk2Doc
  • BertSentenceEmbeddings
  • SentenceEntityResolverModel