Description
This pretrained model maps MedDRA LLT (Lowest Level Term) codes to their corresponding MedDRA PT (Preferred Term) codes.
Predicted Entities
How to use
document_assembler = DocumentAssembler()\
.setInputCol('text')\
.setOutputCol('doc')
chunk_assembler = Doc2Chunk()\
.setInputCols(['doc'])\
.setOutputCol('chunk')
mapperModel = ChunkMapperModel.load('meddra_llt_pt_mapper')\
.setInputCols(["chunk"])\
.setOutputCol("mappings")\
.setRels(["pt_code"])
pipeline = Pipeline(stages=[
document_assembler,
chunk_assembler,
mapperModel
])
data = spark.createDataFrame([["10002442"], ["10000007"], ["10003696"]]).toDF("text")
mapper_model = pipeline.fit(data)
result = mapper_model.transform(data)
val document_assembler = DocumentAssembler()
.setInputCol("text")
.setOutputCol("doc")
val chunk_assembler = Doc2Chunk()
.setInputCols(Array("doc"))
.setOutputCol("chunk")
val mapperModel = ChunkMapperModel.load("meddra_llt_pt_mapper")
.setInputCols(Array("chunk"))
.setOutputCol("mappings")
.setRels(["pt_code"])
val pipeline = new Pipeline().setStages(Array(
document_assembler,
chunk_assembler,
mapperModel))
val data = Seq("10002442", "10000007", "10003696").toDF("text")
val mapper_model = pipeline.fit(data)
val result = mapper_model.transform(data)
Results
+--------+----------------------------------------+
|llt_code|pt_code |
+--------+----------------------------------------+
|10002442|10002442:Angiogram pulmonary normal |
|10000007|10000007:17 ketosteroids urine decreased|
|10003696|10001324:Adrenal atrophy |
+--------+----------------------------------------+
Model Information
Model Name: | meddra_llt_pt_mapper |
Compatibility: | Healthcare NLP 5.3.0+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [ner_chunk] |
Output Labels: | [mappings] |
Language: | en |
Size: | 1.9 MB |
References
This model is trained with the v27 MedDRA dataset.
To utilize this model, possession of a valid MedDRA license is requisite. If you possess one and wish to use this model, kindly contact us at support@johnsnowlabs.com.