Pipeline for ICD-10-CM and RxNorm Sentence Entity Resolver

Description

This pipeline can extract clinical conditions and medication entities, map the clinical conditions to their respective ICD-10-CM codes, and medication entities to RxNorm codes using sbiobert_base_cased_mli Sentence Bert Embeddings. Users can refer to the following entity labels for pertinent concepts: ICD-10-CM entities: PROBLEM, CEREBROVASCULAR_DISEASE, COMMUNICABLE_DISEASE, DIABETES, DISEASE_SYNDROME_DISORDER, EKG_FINDINGS, HEART_DISEASE, HYPERLIPIDEMIA, HYPERTENSION, IMAGINGFINDINGS, INJURY_OR_POISONING, KIDNEY_DISEASE, OBESITY, ONCOLOGICAL, OVERWEIGHT, PREGNANCY, PSYCHOLOGICAL_CONDITION, SYMPTOM, VS_FINDING

RxNorm entities: DRUG

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

resolver_pipeline = PretrainedPipeline("icd10cm_rxnorm_resolver_pipeline", "en", "clinical/models")

result = resolver_pipeline.annotate("""The patient is a 41-year-old Vietnamese female with a cough that started last week.
She has had right upper quadrant pain radiating to her back starting yesterday.
She has a history of infective pericarditis and gestational diabetes mellitus in May 2006.
MEDICATIONS
1. Coumadin 1 mg daily. Last INR was on Tuesday, August 14, 2007, and her INR was 2.3.
2. Amiodarone 100 mg p.o. daily.""")



import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val result = resolver_pipeline.annotate("""The patient is a 41-year-old Vietnamese female with a cough that started last week.
She has had right upper quadrant pain radiating to her back starting yesterday.
She has a history of infective pericarditis and gestational diabetes mellitus in May 2006.
MEDICATIONS
1. Coumadin 1 mg daily. Last INR was on Tuesday, August 14, 2007, and her INR was 2.3.
2. Amiodarone 100 mg p.o. daily.""")


Results



# RXNORM RESULT

+-------+----------------------+------+-----------+-----------+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|sent_id|             ner_chunk|entity|rxnorm_code| resolution|                                              all_codes|                                                                                                      resolutions|
+-------+----------------------+------+-----------+-----------+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+
|      5|         Coumadin 1 mg|  DRUG|     855289|  coumadin | 855289:::438737:::208469:::205489:::447086:::205485...|         warfarin sodium 1 MG [Coumadin]:::coumarin 1 MG[coumarin 1 MG]:::terazosin 1 MG Oral Capsule [Hytrin]...|
|      6| Amiodarone 100 mg p.o|  DRUG|     835956|amiodarone | 835956:::835955:::876015:::565346:::875937:::440437...|amiodarone hydrochloride 100 MG Oral Tablet:::amiodarone hydrochloride 100 MG[amiodarone hydrochloride 100 MG]...|
+-------+----------------------+------+-----------+-----------+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+

# ICD-10-CM RESULT

+-------+-----------------------------+-------+------------+------------------------------+------------------------------------------------------------+------------------------------------------------------------+------------------------------------------------------------+
|sent_id|                    ner_chunk| entity|icd10cm_code|                    resolution|                                                   all_codes|                                                 resolutions|                                                    hcc_list|
+-------+-----------------------------+-------+------------+------------------------------+------------------------------------------------------------+------------------------------------------------------------+------------------------------------------------------------+
|      0|                      a cough|PROBLEM|         R05|                        cough |R05:::R05.3:::R05.1:::A37:::R05.2:::R06.01:::R06.7:::R06....|cough [cough]:::chronic cough [chronic cough]:::acute cou...|0||0||0:::1||0||0:::1||0||0:::0||0||0:::1||0||0:::1||0||0...|
|      1|    right upper quadrant pain|PROBLEM|      R10.11|    right upper quadrant pain |R10.11:::M79.621:::R10.31:::M79.651:::M79.631:::M79.601::...|right upper quadrant pain [right upper quadrant pain]:::p...|1||0||0:::1||0||0:::1||0||0:::1||0||0:::1||0||0:::1||0||0...|
|      2|       infective pericarditis|PROBLEM|       I30.1|       infective pericarditis |I30.1:::I30:::I31.0:::B33.23:::I01.0:::I30.0:::I31.1:::A3...|infective pericarditis [infective pericarditis]:::acute p...|1||0||0:::0||0||0:::1||0||0:::1||0||0:::1||0||0:::1||0||0...|
|      2|gestational diabetes mellitus|PROBLEM|       O24.4|gestational diabetes mellitus |O24.4:::O24.41:::Z86.32:::O24.11:::O24.81:::P70.2:::O24.0...|gestational diabetes mellitus [gestational diabetes melli...|0||0||0:::0||0||0:::1||0||0:::0||0||0:::0||0||0:::1||0||0...|
+-------+-----------------------------+-------+------------+------------------------------+------------------------------------------------------------+------------------------------------------------------------+------------------------------------------------------------+


Model Information

Model Name: icd10cm_rxnorm_resolver_pipeline
Type: pipeline
Compatibility: Healthcare NLP 5.4.0+
License: Licensed
Edition: Official
Language: en
Size: 3.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • TextMatcherInternalModel
  • MedicalNerModel
  • NerConverterInternalModel
  • ChunkMergeModel
  • ChunkMergeModel
  • ChunkMergeModel
  • Chunk2Doc
  • BertSentenceEmbeddings
  • Router
  • Router
  • SentenceEntityResolverModel
  • SentenceEntityResolverModel