-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Models hub internal to Master (#183)
- Loading branch information
Showing
32 changed files
with
5,219 additions
and
0 deletions.
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
docs/_posts/Ahmetemintek/2023-04-13-hcpcs_ndc_mapper_en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
layout: model | ||
title: Mapping HCPCS Codes with Corresponding National Drug Codes (NDC) and Drug Brand Names | ||
author: John Snow Labs | ||
name: hcpcs_ndc_mapper | ||
date: 2023-04-13 | ||
tags: [en, licensed, chunk_mappig, hcpcs, ndc, brand_name] | ||
task: Chunk Mapping | ||
language: en | ||
edition: Healthcare NLP 4.4.0 | ||
spark_version: 3.0 | ||
supported: true | ||
annotator: ChunkMapperModel | ||
article_header: | ||
type: cover | ||
use_language_switcher: "Python-Scala-Java" | ||
--- | ||
|
||
## Description | ||
|
||
This pretrained model maps HCPCS codes with their corresponding National Drug Codes (NDC) and their drug brand names. | ||
|
||
## Predicted Entities | ||
|
||
`ndc_code`, `brand_name` | ||
|
||
{:.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/26.Chunk_Mapping.ipynb){:.button.button-orange.button-orange-trans.co.button-icon} | ||
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/hcpcs_ndc_mapper_en_4.4.0_3.0_1681405950608.zip){:.button.button-orange} | ||
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/hcpcs_ndc_mapper_en_4.4.0_3.0_1681405950608.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 | ||
document_assembler = DocumentAssembler()\ | ||
.setInputCol("text")\ | ||
.setOutputCol("hcpcs_chunk") | ||
|
||
chunkerMapper = DocMapperModel.pretrained("hcpcs_ndc_mapper", "en", "clinical/models")\ | ||
.setInputCols(["hcpcs_chunk"])\ | ||
.setOutputCol("mappings")\ | ||
.setRels(["ndc_code", "brand_name"]) | ||
|
||
pipeline = Pipeline().setStages([document_assembler, | ||
chunkerMapper]) | ||
|
||
model = pipeline.fit(spark.createDataFrame([['']]).toDF('text')) | ||
|
||
lp = LightPipeline(model) | ||
|
||
res = lp.fullAnnotate(["Q5106", "J9211", "J7508"]) | ||
``` | ||
```scala | ||
val document_assembler = new DocumentAssembler() | ||
.setInputCol("text")\ | ||
.setOutputCol("hcpcs_chunk") | ||
|
||
val chunkerMapper = DocMapperModel | ||
.pretrained("hcpcs_ndc_mapper", "en", "clinical/models") | ||
.setInputCols(Array("hcpcs_chunk")) | ||
.setOutputCol("mappings") | ||
.setRels(Array("ndc_code", "brand_name")) | ||
|
||
val mapper_pipeline = new Pipeline().setStages(Array( | ||
document_assembler, | ||
chunkerMapper)) | ||
|
||
|
||
val data = Seq(Array(["Q5106", "J9211", "J7508"])).toDS.toDF("text") | ||
val result = pipeline.fit(data).transform(data) | ||
``` | ||
</div> | ||
|
||
## Results | ||
|
||
```bash | ||
+-----------+-------------------------------------+----------+ | ||
|hcpcs_chunk|mappings |relation | | ||
+-----------+-------------------------------------+----------+ | ||
|Q5106 |59353-0003-10 |ndc_code | | ||
|Q5106 |RETACRIT (PF) 3000 U/1 ML |brand_name| | ||
|J9211 |59762-2596-01 |ndc_code | | ||
|J9211 |IDARUBICIN HYDROCHLORIDE (PF) 1 MG/ML|brand_name| | ||
|J7508 |00469-0687-73 |ndc_code | | ||
|J7508 |ASTAGRAF XL 5 MG |brand_name| | ||
+-----------+-------------------------------------+----------+ | ||
``` | ||
|
||
{:.model-param} | ||
## Model Information | ||
|
||
{:.table-model} | ||
|---|---| | ||
|Model Name:|hcpcs_ndc_mapper| | ||
|Compatibility:|Healthcare NLP 4.4.0+| | ||
|License:|Licensed| | ||
|Edition:|Official| | ||
|Input Labels:|[ner_chunk]| | ||
|Output Labels:|[mappings]| | ||
|Language:|en| | ||
|Size:|20.7 KB| |
106 changes: 106 additions & 0 deletions
106
docs/_posts/Ahmetemintek/2023-04-13-ndc_hcpcs_mapper_en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
layout: model | ||
title: Mapping National Drug Codes (NDC) with Corresponding HCPCS Codes and Descriptions | ||
author: John Snow Labs | ||
name: ndc_hcpcs_mapper | ||
date: 2023-04-13 | ||
tags: [en, licensed, clinical, chunk_mapping, ndc, hcpcs, brand_name] | ||
task: Chunk Mapping | ||
language: en | ||
edition: Healthcare NLP 4.4.0 | ||
spark_version: 3.0 | ||
supported: true | ||
annotator: ChunkMapperModel | ||
article_header: | ||
type: cover | ||
use_language_switcher: "Python-Scala-Java" | ||
--- | ||
|
||
## Description | ||
|
||
This pretrained model maps National Drug Codes (NDC) with their corresponding HCPCS codes and their descriptions. | ||
|
||
## Predicted Entities | ||
|
||
`hcpcs_code`, `hcpcs_description` | ||
|
||
{:.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/26.Chunk_Mapping.ipynb){:.button.button-orange.button-orange-trans.co.button-icon} | ||
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/ndc_hcpcs_mapper_en_4.4.0_3.0_1681405091593.zip){:.button.button-orange} | ||
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/ndc_hcpcs_mapper_en_4.4.0_3.0_1681405091593.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 | ||
document_assembler = DocumentAssembler()\ | ||
.setInputCol("text")\ | ||
.setOutputCol("ndc_chunk") | ||
|
||
chunkerMapper = DocMapperModel.pretrained("ndc_hcpcs_mapper", "en", "clinical/models")\ | ||
.setInputCols(["ndc_chunk"])\ | ||
.setOutputCol("hcpcs")\ | ||
.setRels(["hcpcs_code", "hcpcs_description"]) | ||
|
||
pipeline = Pipeline().setStages([document_assembler, | ||
chunkerMapper]) | ||
|
||
model = pipeline.fit(spark.createDataFrame([['']]).toDF('text')) | ||
|
||
lp = LightPipeline(model) | ||
|
||
res = lp.fullAnnotate(["16714-0892-01", "00990-6138-03", "43598-0650-11"]) | ||
``` | ||
```scala | ||
val document_assembler = new DocumentAssembler() | ||
.setInputCol("text")\ | ||
.setOutputCol("ndc_chunk") | ||
|
||
val chunkerMapper = DocMapperModel | ||
.pretrained("ndc_hcpcs_mapper", "en", "clinical/models") | ||
.setInputCols(Array("ndc_chunk")) | ||
.setOutputCol("mappings") | ||
.setRels(Array("hcpcs_code", "hcpcs_description")) | ||
|
||
val mapper_pipeline = new Pipeline().setStages(Array( | ||
document_assembler, | ||
chunkerMapper)) | ||
|
||
|
||
val data = Seq(Array("16714-0892-01", "00990-6138-03", "43598-0650-11")).toDS.toDF("text") | ||
val result = pipeline.fit(data).transform(data) | ||
``` | ||
</div> | ||
|
||
## Results | ||
|
||
```bash | ||
+-------------+----------------------------+-----------------+ | ||
|ndc_chunk |mappings |relation | | ||
+-------------+----------------------------+-----------------+ | ||
|16714-0892-01|J0878 |hcpcs_code | | ||
|16714-0892-01|INJECTION, DAPTOMYCIN, 1 MG |hcpcs_description| | ||
|00990-6138-03|A4217 |hcpcs_code | | ||
|00990-6138-03|STERILE WATER/SALINE, 500 ML|hcpcs_description| | ||
|43598-0650-11|J9340 |hcpcs_code | | ||
|43598-0650-11|INJECTION, THIOTEPA, 15 MG |hcpcs_description| | ||
+-------------+----------------------------+-----------------+ | ||
``` | ||
|
||
{:.model-param} | ||
## Model Information | ||
|
||
{:.table-model} | ||
|---|---| | ||
|Model Name:|ndc_hcpcs_mapper| | ||
|Compatibility:|Healthcare NLP 4.4.0+| | ||
|License:|Licensed| | ||
|Edition:|Official| | ||
|Input Labels:|[ner_chunk]| | ||
|Output Labels:|[mappings]| | ||
|Language:|en| | ||
|Size:|203.1 KB| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
docs/_posts/Cabir40/2023-04-13-medication_resolver_pipeline_en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
layout: model | ||
title: Pipeline to Resolve Medication Codes | ||
author: John Snow Labs | ||
name: medication_resolver_pipeline | ||
date: 2023-04-13 | ||
tags: [licensed, clinical, en, resolver, snomed, umls, rxnorm, ndc, ade, pipeline] | ||
task: Chunk Mapping | ||
language: en | ||
edition: Healthcare NLP 4.3.2 | ||
spark_version: 3.0 | ||
supported: true | ||
annotator: PipelineModel | ||
article_header: | ||
type: cover | ||
use_language_switcher: "Python-Scala-Java" | ||
--- | ||
|
||
## Description | ||
|
||
A pretrained resolver pipeline to extract medications and resolve their adverse reactions (ADE), RxNorm, UMLS, NDC, SNOMED CT codes, and action/treatments in clinical text. | ||
|
||
Action/treatments are available for branded medication, and SNOMED codes are available for non-branded medication. | ||
|
||
This pipeline can be used as Lightpipeline (with `annotate/fullAnnotate`). You can use `medication_resolver_transform_pipeline` for Spark transform. | ||
|
||
{:.btn-box} | ||
<button class="button button-orange" disabled>Live Demo</button> | ||
<button class="button button-orange" disabled>Open in Colab</button> | ||
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/medication_resolver_pipeline_en_4.3.2_3.0_1681388823359.zip){:.button.button-orange} | ||
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/medication_resolver_pipeline_en_4.3.2_3.0_1681388823359.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 | ||
|
||
med_resolver_pipeline = PretrainedPipeline("medication_resolver_pipeline", "en", "clinical/models") | ||
|
||
text = """The patient was prescribed Amlodopine Vallarta 10-320mg, Eviplera. The other patient is given Lescol 40 MG and Everolimus 1.5 mg tablet.""" | ||
|
||
result = med_resolver_pipeline.fullAnnotate(text) | ||
``` | ||
```scala | ||
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline | ||
|
||
val med_resolver_pipeline = new PretrainedPipeline("medication_resolver_pipeline", "en", "clinical/models") | ||
|
||
val result = med_resolver_pipeline.fullAnnotate("""The patient was prescribed Amlodopine Vallarta 10-320mg, Eviplera. The other patient is given Lescol 40 MG and Everolimus 1.5 mg tablet.""") | ||
``` | ||
</div> | ||
|
||
## Results | ||
|
||
```bash | ||
| | chunks | entities | ADE | RxNorm | Action | Treatment | UMLS | SNOMED_CT | NDC_Product | NDC_Package | | ||
|---:|:-----------------------------|:-----------|:----------------------------|---------:|:---------------------------|:-------------------------------------------|:---------|:------------|:--------------|:--------------| | ||
| 0 | Amlodopine Vallarta 10-320mg | DRUG | Gynaecomastia | 722131 | NONE | NONE | C1949334 | 425838008 | 00093-7693 | 00093-7693-56 | | ||
| 1 | Eviplera | DRUG | Anxiety | 217010 | Inhibitory Bone Resorption | Osteoporosis | C0720318 | NONE | NONE | NONE | | ||
| 2 | Lescol 40 MG | DRUG | NONE | 103919 | Hypocholesterolemic | Heterozygous Familial Hypercholesterolemia | C0353573 | NONE | 00078-0234 | 00078-0234-05 | | ||
| 3 | Everolimus 1.5 mg tablet | DRUG | Acute myocardial infarction | 2056895 | NONE | NONE | C4723581 | NONE | 00054-0604 | 00054-0604-21 | | ||
``` | ||
|
||
{:.model-param} | ||
## Model Information | ||
|
||
{:.table-model} | ||
|---|---| | ||
|Model Name:|medication_resolver_pipeline| | ||
|Type:|pipeline| | ||
|Compatibility:|Healthcare NLP 4.3.2+| | ||
|License:|Licensed| | ||
|Edition:|Official| | ||
|Language:|en| | ||
|Size:|3.1 GB| | ||
|
||
## Included Models | ||
|
||
- DocumentAssembler | ||
- SentenceDetectorDLModel | ||
- TokenizerModel | ||
- WordEmbeddingsModel | ||
- MedicalNerModel | ||
- NerConverterInternalModel | ||
- TextMatcherModel | ||
- ChunkMergeModel | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- ChunkMapperFilterer | ||
- Chunk2Doc | ||
- BertSentenceEmbeddings | ||
- SentenceEntityResolverModel | ||
- ResolverMerger | ||
- ResolverMerger | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- ChunkMapperModel | ||
- Finisher |
Oops, something went wrong.