Skip to content

Commit

Permalink
2023-03-29-icd10cm_resolver_pipeline_en (#45)
Browse files Browse the repository at this point in the history
* Add model 2023-03-29-icd10cm_resolver_pipeline_en

* Add model 2023-03-29-umls_drug_resolver_pipeline_en

---------

Co-authored-by: Ahmetemintek <ahmetemin.tek.66@gmail.com>
  • Loading branch information
jsl-models and Ahmetemintek committed Mar 30, 2023
1 parent 9f49515 commit 47b53e5
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ This pretrained pipeline maps entities with their corresponding ICD-10-CM codes.
{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/3.Clinical_Entity_Resolvers.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/icd10cm_resolver_pipeline_en_4.3.2_3.2_1680102556141.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/icd10cm_resolver_pipeline_en_4.3.2_3.2_1680102556141.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/icd10cm_resolver_pipeline_en_4.3.2_3.2_1680105059178.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/icd10cm_resolver_pipeline_en_4.3.2_3.2_1680105059178.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use

Expand All @@ -40,15 +40,13 @@ resolver_pipeline = PretrainedPipeline("icd10cm_resolver_pipeline", "en", "clini
text = """A 28-year-old female with a history of gestational diabetes mellitus diagnosed eight years and anisakiasis. Also, it was reported that fetal and neonatal hemorrhage"""

result = resolver_pipeline.fullAnnotate(text)

```
```scala
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val resolver_pipeline = new PretrainedPipeline("icd10cm_resolver_pipeline", "en", "clinical/models")

val result = resolver_pipeline.fullAnnotate("""A 28-year-old female with a history of gestational diabetes mellitus diagnosed eight years and anisakiasis. Also, it was reported that fetal and neonatal hemorrhage""")

```
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
layout: model
title: Clinical Drugs to UMLS Code Mapping
author: John Snow Labs
name: umls_drug_resolver_pipeline
date: 2023-03-29
tags: [en, licensed, umls, pipeline]
task: Pipeline Healthcare
language: en
edition: Healthcare NLP 4.3.2
spark_version: 3.2
supported: true
annotator: PipelineModel
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

This pretrained pipeline maps entities (Clinical Drugs) with their corresponding UMLS CUI codes. You’ll just feed your text and it will return the corresponding UMLS codes.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/3.Clinical_Entity_Resolvers.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/umls_drug_resolver_pipeline_en_4.3.2_3.2_1680127003093.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/umls_drug_resolver_pipeline_en_4.3.2_3.2_1680127003093.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
from sparknlp.pretrained import PretrainedPipeline

pipeline= PretrainedPipeline("umls_drug_resolver_pipeline", "en", "clinical/models")
pipeline.annotate("The patient was given Adapin 10 MG, coumadn 5 mg")
```
```scala
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline= PretrainedPipeline("umls_drug_resolver_pipeline", "en", "clinical/models")
val pipeline.annotate("The patient was given Adapin 10 MG, coumadn 5 mg")
```
</div>

## Results

```bash
+------------+---------+---------+
|chunk |ner_label|umls_code|
+------------+---------+---------+
|Adapin 10 MG|DRUG |C2930083 |
|coumadn 5 mg|DRUG |C2723075 |
+------------+---------+---------+
```

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|umls_drug_resolver_pipeline|
|Type:|pipeline|
|Compatibility:|Healthcare NLP 4.3.2+|
|License:|Licensed|
|Edition:|Official|
|Language:|en|
|Size:|4.6 GB|

## Included Models

- DocumentAssembler
- SentenceDetector
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMapperModel
- ChunkMapperModel
- ChunkMapperFilterer
- Chunk2Doc
- BertSentenceEmbeddings
- SentenceEntityResolverModel
- ResolverMerger

0 comments on commit 47b53e5

Please sign in to comment.