H/ICH/MedDRA/SMQs by ICH
The Medical Dictionary for Regulatory Activities (MedDRA) is a set of standardized terminologies commonly used in clinical safety recording, communicating, and reporting activities. MedDRA is developed and maintained by the International Council for Harmonisation of Technical Requirements for Pharmaceuticals for Human Use (ICH)[1],[2].
The Standardized MedDRA Queries (SMQs) are groups of MedDRA terms used to describe conditions of interest[3]. A detailed demonstration of using SMQ can be found in JMP reporting documentation [4].
The module emt
also includes basic functions for working with MedDRA SMQs.
Assign MedDRA Distribution Folder
Please see more details here.
from mtbp3.health.emt import Emt
emt = Emt(folder_name='')
print(emt.find_files())
([], 'All files found. Version: 26.1; Year: 2023; Month: September; Language: English. N_SOC: 17.')
Find SMQ Terms
To find a list of SMQ terms:
smq_names = emt.find_smq()
To find a list of id from SMQ names:
print(emt.find_smq(smq_names[:3]))
[69912916, 69949049, 69909345]
To find more details about a specific SMQ by name or id:
print(emt.find_smq(smq_names[0], with_detail=True).T)
0
smq_id 69912916
smq smq916fXwGunhqIHpu
smq_level 1
smq_description smq_description657TlCpxPwEHstW
smq_source smq_source174dDcFdqHEbXRmoojiGRqaWetdKqJD
smq_note smq_note619XVQSmaLebToHGxnTMZPjq
MedDRA_version 26.1
smq_status A
smq_algorithm N
Find MedDRA Terms Given a SMQ
There are 230 active SMQs included in MedDRA v26.1 (Sep, 2023). A total of 10 out of these 230 SMQs are algorithm based. SMQs may also have up to 5 hierarchical relationships. There are 39 SMQs related to at least one other more general SMQs in v26.1.
Functions in this section accept only one SMQ each time, and return a dataframe that includes information necessary for further processing.
For algorithm based SMQ, term_category
will be included in output.
To find MedDRA terms given a SMQ and count by level:
terms = emt.find_terms_given_smq(smq_names[0])
print(terms['term_level'].value_counts())
term_level
llt 1
pt 1
Name: count, dtype: int64
Note that if the SMQ has hierarchical definition, the structure will be flattened in output, and the output will keep the level of child SMQs.
If the SMQ is algorithm based, the terms will keep category and weight information to be used for for downstream analyses.
Use the function find_smq
with option with_detail=True
to see the algorithm definition.