Description
This pretrained model maps MedDRA-PT (Preferred Term) codes to their corresponding MedDRA-LLT (Lowest Level Term) codes. Some of the MedDRA PT codes map to more than MedDRA LLT codes. You can find all the mapped MedDRA LLT codes in the all_k_resolutions
column in the metadata.
Predicted Entities
How to use
document_assembler = DocumentAssembler()\
.setInputCol('text')\
.setOutputCol('doc')
chunk_assembler = Doc2Chunk()\
.setInputCols(['doc'])\
.setOutputCol('ner_chunk')
mapperModel = ChunkMapperModel.load('meddra_pt_llt_mapper')\
.setInputCols(["ner_chunk"])\
.setOutputCol("mappings")\
.setRels(["llt_code"])
mapper_pipeline = Pipeline(stages=[
document_assembler,
chunk_assembler,
mapperModel
])
data = spark.createDataFrame([["10008684"], ["10014472"], ["10019785"]]).toDF("text")
mapper_model = mapper_pipeline.fit(data)
result = mapper_model.transform(data)
val document_assembler = DocumentAssembler()
.setInputCol("text")
.setOutputCol("doc")
val chunk_assembler = Doc2Chunk()
.setInputCols(Array("doc"))
.setOutputCol("ner_chunk")
val mapperModel = ChunkMapperModel.load("meddra_pt_llt_mapper")
.setInputCols(Array("ner_chunk"))
.setOutputCol("mappings")
.setRels(Array("llt_code"))
val mapper_pipeline = new Pipeline().setStages(Array(
document_assembler,
chunk_assembler,
mapperModel
)
val data = Seq("10008684", "10014472", "10019785").toDF("text")
val mapper_model = mapper_pipeline.fit(data)
val result = mapper_model.transform(data)
Results
+--------+---------------------------+--------------------------------------------------------------+
|pt_code |llt_code |all_k_resolutions |
+--------+---------------------------+--------------------------------------------------------------+
|10008684|10004711:Biliuria |10004711:Biliuria:::10008684:Choluria:::10046617:Urine bilious|
|10014472|10014472:Elephantiasis |10014472:Elephantiasis:::10014473:Elephantiasis of eyelid |
|10019785|10019785:Hepatitis neonatal|10019785:Hepatitis neonatal::: |
+--------+---------------------------+--------------------------------------------------------------+
Model Information
Model Name: | meddra_pt_llt_mapper |
Compatibility: | Healthcare NLP 5.4.1+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [ner_chunk] |
Output Labels: | [mappings] |
Language: | en |
Size: | 1.3 MB |
References
This model is trained with the September 2024 (v27.1) release of 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.