-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2023-05-11-icd10cm_cause_claim_mapper_en #210
Changes from 1 commit
aa1317b
6fa4a61
d281386
0f953cb
b0a8a65
2fdd9bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
layout: model | ||
title: Mapping ICD10CM Codes with Corresponding Causes and Claim Analysis Codes | ||
author: John Snow Labs | ||
name: icd10cm_cause_claim_mapper | ||
date: 2023-05-11 | ||
tags: [en, licensed, chunk_mapping, icd10cm, cause, claim] | ||
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 ICD10CM codes, subsequently providing corresponding causes and generating claim analysis codes for each respective ICD10CM code. | ||
|
||
## Predicted Entities | ||
|
||
`icd10cm_cause`, `icd10cm_claim_analysis_code` | ||
|
||
{:.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/icd10cm_cause_claim_mapper_en_4.4.0_3.0_1683819210044.zip){:.button.button-orange} | ||
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/clinical/models/icd10cm_cause_claim_mapper_en_4.4.0_3.0_1683819210044.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("document") | ||
|
||
chunk_assembler = Doc2Chunk()\ | ||
.setInputCols("document")\ | ||
.setOutputCol("icd_chunk") | ||
|
||
chunkerMapper = ChunkMapperModel.pretrained("icd10cm_cause_claim_mapper", "en", "clinical/models")\ | ||
.setInputCols(["icd_chunk"])\ | ||
.setOutputCol("mappings")\ | ||
.setRels(["icd10cm_cause", "icd10cm_claim_analysis_code"]) | ||
|
||
pipeline = Pipeline().setStages([document_assembler, | ||
chunk_assembler, | ||
chunkerMapper]) | ||
|
||
model = pipeline.fit(spark.createDataFrame([['']]).toDF('text')) | ||
|
||
lp = LightPipeline(model) | ||
|
||
res = lp.fullAnnotate(["D69.51", "G43.83", "Z83.51"]) | ||
``` | ||
```scala | ||
val document_assembler = new DocumentAssembler() | ||
.setInputCol("text") | ||
.setOutputCol("document") | ||
|
||
val chunk_assembler = new Doc2Chunk() | ||
.setInputCols("document") | ||
.setOutputCol("icd_chunk") | ||
|
||
val chunkerMapper = ChunkMapperModel | ||
.pretrained("icd10cm_cause_claim_mapper", "en", "clinical/models") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please move this line to the end of ChunkMapperModel There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
.setInputCols(Array("icd_chunk")) | ||
.setOutputCol("mappings") | ||
.setRels(Array("icd10cm_cause", "icd10cm_claim_analysis_code")) | ||
|
||
val mapper_pipeline = new Pipeline().setStages(Array(document_assembler, chunk_assembler, chunkerMapper)) | ||
|
||
val data = Seq(Array("D69.51", "G43.83", "Z83.51")).toDS.toDF("text") | ||
|
||
val result = pipeline.fit(data).transform(data) | ||
``` | ||
</div> | ||
|
||
## Results | ||
|
||
```bash | ||
+------+------------------------------------+---------------------------+ | ||
|icd10 |mappings |relation | | ||
+------+------------------------------------+---------------------------+ | ||
|D69.51|Unintentional injuries |icd10cm_cause | | ||
|D69.51|Adverse effects of medical treatment|icd10cm_cause | | ||
|D69.51|D69.51 |icd10cm_claim_analysis_code| | ||
|D69.51|D69.51 |icd10cm_claim_analysis_code| | ||
|G43.83|Headache disorders |icd10cm_cause | | ||
|G43.83|Migraine |icd10cm_cause | | ||
|G43.83|Tension-type headache |icd10cm_cause | | ||
|G43.83|G43.83 |icd10cm_claim_analysis_code| | ||
|G43.83|G43.83 |icd10cm_claim_analysis_code| | ||
|G43.83|G43.83 |icd10cm_claim_analysis_code| | ||
|Z83.51|NONE |null | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change here. And also try to find some examples that icd10cm codes are not the same icd10cm claim analysis code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
+------+------------------------------------+---------------------------+ | ||
|
||
``` | ||
|
||
{:.model-param} | ||
## Model Information | ||
|
||
{:.table-model} | ||
|---|---| | ||
|Model Name:|icd10cm_cause_claim_mapper| | ||
|Compatibility:|Healthcare NLP 4.4.0+| | ||
|License:|Licensed| | ||
|Edition:|Official| | ||
|Input Labels:|[ner_chunk]| | ||
|Output Labels:|[mappings]| | ||
|Language:|en| | ||
|Size:|600.2 KB| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICD10CM should be ICD-10-CM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add as a new sentence what if there is no claim code of an icd10cm code. (It returns None)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.