Description
This pretrained model maps ICD-9-CM codes to corresponding ICD-10-CM codes.
Important Note
: Mappers extract additional information such as extended descriptions and categories related to Concept codes (such as RxNorm, ICD10, CPT, MESH, NDC, UMLS, etc.). They generally take Concept Codes, which are the outputs of EntityResolvers, as input. When creating a pipeline that contains ‘Mapper’, it is necessary to use the ChunkMapperModel after an EntityResolverModel.
Predicted Entities
icd10_code
How to use
document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("doc")
chunk_assembler = Doc2Chunk()\
.setInputCols(["doc"])\
.setOutputCol("ner_chunk")
chunkerMapper = ChunkMapperModel\
.pretrained("icd9_icd10_mapper", "en", "clinical/models")\
.setInputCols(["ner_chunk"])\
.setOutputCol("mappings")\
.setRels(["icd10_code"])
mapper_pipeline = Pipeline(stages=[
document_assembler,
chunk_assembler,
chunkerMapper
])
model = mapper_pipeline.fit(spark.createDataFrame([[""]]).toDF("text"))
light_pipeline= LightPipeline(model)
result = light_pipeline.fullAnnotate("00322")
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("ner_chunk")
val chunk_assembler = new Doc2Chunk()
.setInputCols(Array("doc"))
.setOutputCol("ner_chunk")
val chunkerMapper = ChunkMapperModel.pretrained("icd9_icd10_mapper", "en","clinical/models")
.setInputCols(Array("ner_chunk"))
.setOutputCol("mappings")
.setRels(Array("icd10_code"))
val pipeline = new Pipeline(stages = Array(
documentAssembler,
chunk_assembler,
chunkerMapper))
val data = Seq("00322").toDS.toDF("text")
val result= pipeline.fit(data).transform(data)
import nlu
nlu.load("en.map_entity.icd9_icd10").predict("""Put your text here.""")
Results
+---------+-------------+
|icd9_code|icd10_mapping|
+---------+-------------+
|00322 |A0222 |
+---------+-------------+
Model Information
Model Name: | icd9_icd10_mapper |
Compatibility: | Healthcare NLP 4.1.0+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [ner_chunk] |
Output Labels: | [mappings] |
Language: | en |
Size: | 323.6 KB |