raxtik-source-faers 0.1.0.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- raxtik_source_faers/__init__.py +75 -0
- raxtik_source_faers/_version.py +1 -0
- raxtik_source_faers/adapter.py +412 -0
- raxtik_source_faers/builder.py +51 -0
- raxtik_source_faers/client.py +134 -0
- raxtik_source_faers/constants.py +67 -0
- raxtik_source_faers/fetcher.py +141 -0
- raxtik_source_faers/mappings/common.py +99 -0
- raxtik_source_faers/mappings/s1_legacy.py +292 -0
- raxtik_source_faers/mappings/s2_migration.py +255 -0
- raxtik_source_faers/mappings/s3_modern.py +256 -0
- raxtik_source_faers/parser.py +69 -0
- raxtik_source_faers/reference/__init__.py +43 -0
- raxtik_source_faers/reference/age_groups.py +76 -0
- raxtik_source_faers/reference/age_units.py +76 -0
- raxtik_source_faers/reference/countries.py +2828 -0
- raxtik_source_faers/reference/cumulative_dose_units.py +716 -0
- raxtik_source_faers/reference/dechallenge.py +54 -0
- raxtik_source_faers/reference/dose_frequencies.py +263 -0
- raxtik_source_faers/reference/drug_name_sources.py +32 -0
- raxtik_source_faers/reference/duration_units.py +98 -0
- raxtik_source_faers/reference/occupations.py +65 -0
- raxtik_source_faers/reference/outcomes.py +87 -0
- raxtik_source_faers/reference/rechallenge.py +54 -0
- raxtik_source_faers/reference/report_sources.py +87 -0
- raxtik_source_faers/reference/report_types.py +65 -0
- raxtik_source_faers/reference/roles.py +99 -0
- raxtik_source_faers/reference/sex.py +46 -0
- raxtik_source_faers/reference/weight_units.py +43 -0
- raxtik_source_faers/signatures/resolver.py +101 -0
- raxtik_source_faers-0.1.0.dev1.dist-info/METADATA +214 -0
- raxtik_source_faers-0.1.0.dev1.dist-info/RECORD +35 -0
- raxtik_source_faers-0.1.0.dev1.dist-info/WHEEL +4 -0
- raxtik_source_faers-0.1.0.dev1.dist-info/entry_points.txt +5 -0
- raxtik_source_faers-0.1.0.dev1.dist-info/licenses/LICENSE +661 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"""Signature S2 (FAERS Migration: 2012Q4 - 2014Q2) Canonical Mapping.
|
|
2
|
+
|
|
3
|
+
Maps raw S2 migration text files to canonical schema:
|
|
4
|
+
- DEMO: primaryid, caseid, caseversion, i_f_code, gndr_cod (prior to SEX in S3), no auth_num/lit_ref
|
|
5
|
+
- DRUG: primaryid, caseid, drug_seq, role_cod, drugname, lot_nbr (vs lot_num), no prod_ai
|
|
6
|
+
- REAC: primaryid, caseid, pt (no drug_rec_act)
|
|
7
|
+
- OUTC: primaryid, caseid, outc_code (or outc_cod)
|
|
8
|
+
- INDI: primaryid, caseid, indi_drug_seq, indi_pt
|
|
9
|
+
- THER: primaryid, caseid, dsg_drug_seq, start_dt, end_dt, dur, dur_cod
|
|
10
|
+
- RPSR: primaryid, caseid, rpsr_cod
|
|
11
|
+
|
|
12
|
+
Critical S2 Historical Quirks Handled:
|
|
13
|
+
1. GNDR_COD instead of SEX in DEMO
|
|
14
|
+
2. Missing PROD_AI, AUTH_NUM, LIT_REF, DRUG_REC_ACT, AGE_GRP (introduced in S3 2014Q3)
|
|
15
|
+
3. LOT_NBR column naming in DRUG (instead of LOT_NUM)
|
|
16
|
+
4. OUTC_CODE column naming in OUTC (instead of OUTC_COD)
|
|
17
|
+
5. Centralized age/weight normalization using normalization.py
|
|
18
|
+
6. No premature drug normalization (derivation_status = 'NOT_ATTEMPTED')
|
|
19
|
+
7. Pure reported codes (no hard-coded role, occupation, or report source labels)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
import duckdb
|
|
27
|
+
from raxtik_etl.transformations.normalization import (
|
|
28
|
+
get_age_unit_label_sql,
|
|
29
|
+
get_cumulative_dose_unit_label_sql,
|
|
30
|
+
get_date_precision_sql,
|
|
31
|
+
get_dechallenge_label_sql,
|
|
32
|
+
get_dose_frequency_label_sql,
|
|
33
|
+
get_drug_name_source_label_sql,
|
|
34
|
+
get_drug_role_label_sql,
|
|
35
|
+
get_initial_or_followup_label_sql,
|
|
36
|
+
get_outcome_is_serious_sql,
|
|
37
|
+
get_outcome_label_sql,
|
|
38
|
+
get_rechallenge_label_sql,
|
|
39
|
+
get_report_type_label_sql,
|
|
40
|
+
get_reporter_occupation_label_sql,
|
|
41
|
+
get_standard_age_sql,
|
|
42
|
+
get_standard_date_sql,
|
|
43
|
+
get_standard_sex_label_sql,
|
|
44
|
+
get_standard_weight_sql,
|
|
45
|
+
get_weight_unit_label_sql,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
from raxtik_source_faers.mappings.common import (
|
|
49
|
+
load_standard_indi,
|
|
50
|
+
load_standard_rpsr,
|
|
51
|
+
load_standard_ther,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def load_s2_demo(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
56
|
+
"""Loads S2 DEMO file into canonical demo table."""
|
|
57
|
+
age_sql = get_standard_age_sql("age", "age_cod")
|
|
58
|
+
wt_sql = get_standard_weight_sql("wt", "wt_cod")
|
|
59
|
+
sex_label_sql = get_standard_sex_label_sql("gndr_cod")
|
|
60
|
+
if_label_sql = get_initial_or_followup_label_sql("i_f_code")
|
|
61
|
+
occp_label_sql = get_reporter_occupation_label_sql("occp_cod")
|
|
62
|
+
rept_label_sql = get_report_type_label_sql("rept_cod")
|
|
63
|
+
age_unit_lbl_sql = get_age_unit_label_sql("age_cod")
|
|
64
|
+
wt_unit_lbl_sql = get_weight_unit_label_sql("wt_cod")
|
|
65
|
+
|
|
66
|
+
std_event_dt_sql = get_standard_date_sql("event_dt")
|
|
67
|
+
event_dt_prec_sql = get_date_precision_sql("event_dt")
|
|
68
|
+
|
|
69
|
+
std_mfr_dt_sql = get_standard_date_sql("mfr_dt")
|
|
70
|
+
mfr_dt_prec_sql = get_date_precision_sql("mfr_dt")
|
|
71
|
+
|
|
72
|
+
std_init_fda_dt_sql = get_standard_date_sql("init_fda_dt")
|
|
73
|
+
init_fda_dt_prec_sql = get_date_precision_sql("init_fda_dt")
|
|
74
|
+
|
|
75
|
+
std_fda_dt_sql = get_standard_date_sql("fda_dt")
|
|
76
|
+
fda_dt_prec_sql = get_date_precision_sql("fda_dt")
|
|
77
|
+
|
|
78
|
+
std_rept_dt_sql = get_standard_date_sql("rept_dt")
|
|
79
|
+
rept_dt_prec_sql = get_date_precision_sql("rept_dt")
|
|
80
|
+
|
|
81
|
+
con.execute(f"""
|
|
82
|
+
CREATE OR REPLACE TABLE demo AS
|
|
83
|
+
SELECT
|
|
84
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
85
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
86
|
+
TRY_CAST(caseversion AS INTEGER) AS source_case_version,
|
|
87
|
+
COALESCE(TRY_CAST(caseversion AS INTEGER), 1) AS canonical_case_version,
|
|
88
|
+
'FDA_REPORTED' AS case_version_source,
|
|
89
|
+
CAST(NULL AS VARCHAR) AS foll_seq,
|
|
90
|
+
CAST(i_f_code AS VARCHAR) AS initial_or_followup_code,
|
|
91
|
+
{if_label_sql} AS initial_or_followup_label,
|
|
92
|
+
CAST(event_dt AS VARCHAR) AS event_date,
|
|
93
|
+
{std_event_dt_sql} AS standard_event_date,
|
|
94
|
+
{event_dt_prec_sql} AS event_date_precision,
|
|
95
|
+
CAST(mfr_dt AS VARCHAR) AS manufacturer_date,
|
|
96
|
+
{std_mfr_dt_sql} AS standard_manufacturer_date,
|
|
97
|
+
{mfr_dt_prec_sql} AS manufacturer_date_precision,
|
|
98
|
+
CAST(init_fda_dt AS VARCHAR) AS initial_regulatory_date,
|
|
99
|
+
{std_init_fda_dt_sql} AS standard_initial_regulatory_date,
|
|
100
|
+
{init_fda_dt_prec_sql} AS initial_regulatory_date_precision,
|
|
101
|
+
CAST(fda_dt AS VARCHAR) AS latest_regulatory_date,
|
|
102
|
+
{std_fda_dt_sql} AS standard_latest_regulatory_date,
|
|
103
|
+
{fda_dt_prec_sql} AS latest_regulatory_date_precision,
|
|
104
|
+
CAST(rept_dt AS VARCHAR) AS report_date,
|
|
105
|
+
{std_rept_dt_sql} AS standard_report_date,
|
|
106
|
+
{rept_dt_prec_sql} AS report_date_precision,
|
|
107
|
+
CAST(NULL AS VARCHAR) AS death_date,
|
|
108
|
+
CAST(NULL AS DATE) AS standard_death_date,
|
|
109
|
+
CAST(NULL AS VARCHAR) AS death_date_precision,
|
|
110
|
+
CAST(NULL AS VARCHAR) AS confidentiality_flag,
|
|
111
|
+
CAST(rept_cod AS VARCHAR) AS report_type_code,
|
|
112
|
+
{rept_label_sql} AS report_type_label,
|
|
113
|
+
CASE WHEN UPPER(TRIM(rept_cod)) = 'EXP' THEN 'Y' ELSE 'N' END AS expedited_flag,
|
|
114
|
+
CAST(e_sub AS VARCHAR) AS electronic_submission_flag,
|
|
115
|
+
CAST(mfr_num AS VARCHAR) AS manufacturer_control_number,
|
|
116
|
+
CAST(mfr_sndr AS VARCHAR) AS manufacturer_name,
|
|
117
|
+
CAST(NULL AS VARCHAR) AS auth_num,
|
|
118
|
+
CAST(NULL AS VARCHAR) AS lit_ref,
|
|
119
|
+
CAST(to_mfr AS VARCHAR) AS to_mfr,
|
|
120
|
+
CAST(NULL AS VARCHAR) AS sender_type_code,
|
|
121
|
+
CAST(NULL AS VARCHAR) AS sender_type_label,
|
|
122
|
+
TRY_CAST(age AS DOUBLE) AS reported_age,
|
|
123
|
+
CAST(age_cod AS VARCHAR) AS reported_age_code,
|
|
124
|
+
{age_unit_lbl_sql} AS reported_age_unit_label,
|
|
125
|
+
CAST(NULL AS VARCHAR) AS age_group_code,
|
|
126
|
+
CAST(NULL AS VARCHAR) AS age_group_label,
|
|
127
|
+
CAST(gndr_cod AS VARCHAR) AS reported_sex_code,
|
|
128
|
+
TRY_CAST(wt AS DOUBLE) AS reported_weight,
|
|
129
|
+
CAST(wt_cod AS VARCHAR) AS reported_weight_code,
|
|
130
|
+
{wt_unit_lbl_sql} AS reported_weight_unit_label,
|
|
131
|
+
CAST(occp_cod AS VARCHAR) AS reporter_occupation_code,
|
|
132
|
+
{occp_label_sql} AS reporter_occupation_label,
|
|
133
|
+
CAST(reporter_country AS VARCHAR) AS reporter_country,
|
|
134
|
+
CAST(occr_country AS VARCHAR) AS occurrence_country,
|
|
135
|
+
{age_sql} AS standard_age_years,
|
|
136
|
+
{sex_label_sql} AS standard_sex_label,
|
|
137
|
+
{wt_sql} AS standard_weight_kg,
|
|
138
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
139
|
+
'{data_period}' AS _data_period,
|
|
140
|
+
'{file_path.name}' AS _source_file,
|
|
141
|
+
'S2' AS _source_signature_id,
|
|
142
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
143
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
144
|
+
""")
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def load_s2_drug(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
148
|
+
"""Loads S2 DRUG file into canonical drug table."""
|
|
149
|
+
role_label_sql = get_drug_role_label_sql("role_cod")
|
|
150
|
+
val_vbm_lbl_sql = get_drug_name_source_label_sql("val_vbm")
|
|
151
|
+
dose_freq_lbl_sql = get_dose_frequency_label_sql("dose_freq")
|
|
152
|
+
cum_dose_unit_lbl_sql = get_cumulative_dose_unit_label_sql("cum_dose_unit")
|
|
153
|
+
dechal_lbl_sql = get_dechallenge_label_sql("dechal")
|
|
154
|
+
rechal_lbl_sql = get_rechallenge_label_sql("rechal")
|
|
155
|
+
std_exp_dt_sql = get_standard_date_sql("exp_dt")
|
|
156
|
+
exp_dt_prec_sql = get_date_precision_sql("exp_dt")
|
|
157
|
+
con.execute(f"""
|
|
158
|
+
CREATE OR REPLACE TABLE drug AS
|
|
159
|
+
SELECT
|
|
160
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
161
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
162
|
+
COALESCE(NULLIF(TRIM(CAST(drug_seq AS VARCHAR)), ''), '1') AS drug_seq,
|
|
163
|
+
CAST(drugname AS VARCHAR) AS reported_drug_name,
|
|
164
|
+
CAST(NULL AS VARCHAR) AS reported_active_ingredient,
|
|
165
|
+
CAST(val_vbm AS VARCHAR) AS reported_validation_code,
|
|
166
|
+
{val_vbm_lbl_sql} AS reported_validation_label,
|
|
167
|
+
CAST(role_cod AS VARCHAR) AS role_code,
|
|
168
|
+
{role_label_sql} AS role_label,
|
|
169
|
+
CAST(route AS VARCHAR) AS route,
|
|
170
|
+
CAST(dose_vbm AS VARCHAR) AS reported_dose_verbatim,
|
|
171
|
+
TRY_CAST(dose_amt AS DOUBLE) AS dose_amount,
|
|
172
|
+
CAST(dose_unit AS VARCHAR) AS dose_unit,
|
|
173
|
+
CAST(dose_form AS VARCHAR) AS dose_form,
|
|
174
|
+
CAST(dose_freq AS VARCHAR) AS dose_frequency,
|
|
175
|
+
{dose_freq_lbl_sql} AS dose_frequency_label,
|
|
176
|
+
CAST(cum_dose_chr AS VARCHAR) AS cumulative_dose_amount,
|
|
177
|
+
CAST(cum_dose_unit AS VARCHAR) AS cumulative_dose_unit,
|
|
178
|
+
{cum_dose_unit_lbl_sql} AS cumulative_dose_unit_label,
|
|
179
|
+
CAST(dechal AS VARCHAR) AS dechallenge_code,
|
|
180
|
+
{dechal_lbl_sql} AS dechallenge_label,
|
|
181
|
+
CAST(rechal AS VARCHAR) AS rechallenge_code,
|
|
182
|
+
{rechal_lbl_sql} AS rechallenge_label,
|
|
183
|
+
-- Regex column selector dynamically handles FDA schema fluctuation between 'lot_nbr' and 'lot_num'
|
|
184
|
+
CAST(COALESCE(COLUMNS('^lot_nbr$|^lot_num$'), NULL) AS VARCHAR) AS lot_number,
|
|
185
|
+
CAST(exp_dt AS VARCHAR) AS expiration_date,
|
|
186
|
+
{std_exp_dt_sql} AS standard_expiration_date,
|
|
187
|
+
{exp_dt_prec_sql} AS expiration_date_precision,
|
|
188
|
+
CAST(nda_num AS VARCHAR) AS regulatory_auth_num,
|
|
189
|
+
TRIM(UPPER(CAST(drugname AS VARCHAR))) AS structural_clean_drug_name,
|
|
190
|
+
CAST(NULL AS VARCHAR) AS standard_concept_name,
|
|
191
|
+
CAST(NULL AS VARCHAR) AS standard_concept_source,
|
|
192
|
+
CAST(NULL AS VARCHAR) AS rxcui,
|
|
193
|
+
'NOT_ATTEMPTED' AS derivation_status,
|
|
194
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
195
|
+
'{data_period}' AS _data_period,
|
|
196
|
+
'{file_path.name}' AS _source_file,
|
|
197
|
+
'S2' AS _source_signature_id,
|
|
198
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
199
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
200
|
+
""")
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def load_s2_reac(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
204
|
+
"""Loads S2 REAC file into canonical reac table."""
|
|
205
|
+
con.execute(f"""
|
|
206
|
+
CREATE OR REPLACE TABLE reac AS
|
|
207
|
+
SELECT
|
|
208
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
209
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
210
|
+
CAST(pt AS VARCHAR) AS reported_reaction_term,
|
|
211
|
+
ROW_NUMBER() OVER (PARTITION BY primaryid) AS reaction_seq,
|
|
212
|
+
CAST(NULL AS VARCHAR) AS drug_reaction_action,
|
|
213
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
214
|
+
'{data_period}' AS _data_period,
|
|
215
|
+
'{file_path.name}' AS _source_file,
|
|
216
|
+
'S2' AS _source_signature_id,
|
|
217
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
218
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
219
|
+
""")
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def load_s2_outc(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
223
|
+
"""Loads S2 OUTC file into canonical outc table."""
|
|
224
|
+
outc_lbl_sql = get_outcome_label_sql("COALESCE(COLUMNS('^outc_code$|^outc_cod$'), NULL)")
|
|
225
|
+
serious_sql = get_outcome_is_serious_sql("COALESCE(COLUMNS('^outc_code$|^outc_cod$'), NULL)")
|
|
226
|
+
con.execute(f"""
|
|
227
|
+
CREATE OR REPLACE TABLE outc AS
|
|
228
|
+
SELECT
|
|
229
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
230
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
231
|
+
CAST(COALESCE(COLUMNS('^outc_code$|^outc_cod$'), NULL) AS VARCHAR) AS outcome_code,
|
|
232
|
+
{outc_lbl_sql} AS outcome_label,
|
|
233
|
+
{serious_sql} AS is_serious,
|
|
234
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
235
|
+
'{data_period}' AS _data_period,
|
|
236
|
+
'{file_path.name}' AS _source_file,
|
|
237
|
+
'S2' AS _source_signature_id,
|
|
238
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
239
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
240
|
+
""")
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def load_s2_indi(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
244
|
+
"""Loads S2 INDI file into canonical indi table."""
|
|
245
|
+
load_standard_indi(con, file_path, data_period, signature_id="S2")
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def load_s2_ther(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
249
|
+
"""Loads S2 THER file into canonical ther table."""
|
|
250
|
+
load_standard_ther(con, file_path, data_period, signature_id="S2")
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def load_s2_rpsr(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
254
|
+
"""Loads S2 RPSR file into canonical rpsr table."""
|
|
255
|
+
load_standard_rpsr(con, file_path, data_period, signature_id="S2")
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"""Signature S3 (Modern FAERS & AEMS: 2014Q3 - 2026Q2+) Canonical Mapping.
|
|
2
|
+
|
|
3
|
+
Maps raw S3 modern text files to canonical schema:
|
|
4
|
+
- DEMO: primaryid, caseid, caseversion, i_f_code, event_dt, mfr_dt, init_fda_dt, fda_dt,
|
|
5
|
+
rept_cod, auth_num, mfr_num, mfr_sndr, lit_ref, age, age_cod, age_grp, sex, e_sub,
|
|
6
|
+
wt, wt_cod, rept_dt, to_mfr, occp_cod, reporter_country, occr_country
|
|
7
|
+
- DRUG: primaryid, caseid, drug_seq, role_cod, drugname, prod_ai, val_vbm, route, dose_vbm,
|
|
8
|
+
cum_dose_chr, cum_dose_unit, dechal, rechal, lot_num, exp_dt, nda_num, dose_amt,
|
|
9
|
+
dose_unit, dose_form, dose_freq
|
|
10
|
+
- REAC: primaryid, caseid, pt, drug_rec_act
|
|
11
|
+
- OUTC: primaryid, caseid, outc_cod
|
|
12
|
+
- INDI: primaryid, caseid, indi_drug_seq, indi_pt
|
|
13
|
+
- THER: primaryid, caseid, dsg_drug_seq, start_dt, end_dt, dur, dur_cod
|
|
14
|
+
- RPSR: primaryid, caseid, rpsr_cod
|
|
15
|
+
|
|
16
|
+
Critical S3 Normalization Rules:
|
|
17
|
+
1. Centralized age/weight normalization using normalization.py (converting MON/WK/DY/HR and LBS/GMS)
|
|
18
|
+
2. No premature drug normalization: standard_concept_name = NULL, derivation_status = 'NOT_ATTEMPTED'
|
|
19
|
+
3. Preserves raw reported codes without hard-coding labels (labels resolved in _code_* dimensions)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
import duckdb
|
|
27
|
+
from raxtik_etl.transformations.normalization import (
|
|
28
|
+
get_age_group_label_sql,
|
|
29
|
+
get_age_unit_label_sql,
|
|
30
|
+
get_cumulative_dose_unit_label_sql,
|
|
31
|
+
get_date_precision_sql,
|
|
32
|
+
get_dechallenge_label_sql,
|
|
33
|
+
get_dose_frequency_label_sql,
|
|
34
|
+
get_drug_name_source_label_sql,
|
|
35
|
+
get_drug_role_label_sql,
|
|
36
|
+
get_initial_or_followup_label_sql,
|
|
37
|
+
get_outcome_is_serious_sql,
|
|
38
|
+
get_outcome_label_sql,
|
|
39
|
+
get_rechallenge_label_sql,
|
|
40
|
+
get_report_type_label_sql,
|
|
41
|
+
get_reporter_occupation_label_sql,
|
|
42
|
+
get_standard_age_sql,
|
|
43
|
+
get_standard_date_sql,
|
|
44
|
+
get_standard_sex_label_sql,
|
|
45
|
+
get_standard_weight_sql,
|
|
46
|
+
get_weight_unit_label_sql,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
from raxtik_source_faers.mappings.common import (
|
|
50
|
+
load_standard_indi,
|
|
51
|
+
load_standard_rpsr,
|
|
52
|
+
load_standard_ther,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def load_s3_demo(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
57
|
+
"""Loads S3 DEMO file into canonical demo table."""
|
|
58
|
+
age_sql = get_standard_age_sql("age", "age_cod")
|
|
59
|
+
wt_sql = get_standard_weight_sql("wt", "wt_cod")
|
|
60
|
+
sex_label_sql = get_standard_sex_label_sql("sex")
|
|
61
|
+
if_label_sql = get_initial_or_followup_label_sql("i_f_code")
|
|
62
|
+
occp_label_sql = get_reporter_occupation_label_sql("occp_cod")
|
|
63
|
+
age_grp_lbl_sql = get_age_group_label_sql("age_grp")
|
|
64
|
+
rept_label_sql = get_report_type_label_sql("rept_cod")
|
|
65
|
+
age_unit_lbl_sql = get_age_unit_label_sql("age_cod")
|
|
66
|
+
wt_unit_lbl_sql = get_weight_unit_label_sql("wt_cod")
|
|
67
|
+
|
|
68
|
+
std_event_dt_sql = get_standard_date_sql("event_dt")
|
|
69
|
+
event_dt_prec_sql = get_date_precision_sql("event_dt")
|
|
70
|
+
|
|
71
|
+
std_mfr_dt_sql = get_standard_date_sql("mfr_dt")
|
|
72
|
+
mfr_dt_prec_sql = get_date_precision_sql("mfr_dt")
|
|
73
|
+
|
|
74
|
+
std_init_fda_dt_sql = get_standard_date_sql("init_fda_dt")
|
|
75
|
+
init_fda_dt_prec_sql = get_date_precision_sql("init_fda_dt")
|
|
76
|
+
|
|
77
|
+
std_fda_dt_sql = get_standard_date_sql("fda_dt")
|
|
78
|
+
fda_dt_prec_sql = get_date_precision_sql("fda_dt")
|
|
79
|
+
|
|
80
|
+
std_rept_dt_sql = get_standard_date_sql("rept_dt")
|
|
81
|
+
rept_dt_prec_sql = get_date_precision_sql("rept_dt")
|
|
82
|
+
|
|
83
|
+
con.execute(f"""
|
|
84
|
+
CREATE OR REPLACE TABLE demo AS
|
|
85
|
+
SELECT
|
|
86
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
87
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
88
|
+
TRY_CAST(caseversion AS INTEGER) AS source_case_version,
|
|
89
|
+
COALESCE(TRY_CAST(caseversion AS INTEGER), 1) AS canonical_case_version,
|
|
90
|
+
'FDA_REPORTED' AS case_version_source,
|
|
91
|
+
CAST(NULL AS VARCHAR) AS foll_seq,
|
|
92
|
+
CAST(i_f_code AS VARCHAR) AS initial_or_followup_code,
|
|
93
|
+
{if_label_sql} AS initial_or_followup_label,
|
|
94
|
+
CAST(event_dt AS VARCHAR) AS event_date,
|
|
95
|
+
{std_event_dt_sql} AS standard_event_date,
|
|
96
|
+
{event_dt_prec_sql} AS event_date_precision,
|
|
97
|
+
CAST(mfr_dt AS VARCHAR) AS manufacturer_date,
|
|
98
|
+
{std_mfr_dt_sql} AS standard_manufacturer_date,
|
|
99
|
+
{mfr_dt_prec_sql} AS manufacturer_date_precision,
|
|
100
|
+
CAST(init_fda_dt AS VARCHAR) AS initial_regulatory_date,
|
|
101
|
+
{std_init_fda_dt_sql} AS standard_initial_regulatory_date,
|
|
102
|
+
{init_fda_dt_prec_sql} AS initial_regulatory_date_precision,
|
|
103
|
+
CAST(fda_dt AS VARCHAR) AS latest_regulatory_date,
|
|
104
|
+
{std_fda_dt_sql} AS standard_latest_regulatory_date,
|
|
105
|
+
{fda_dt_prec_sql} AS latest_regulatory_date_precision,
|
|
106
|
+
CAST(rept_dt AS VARCHAR) AS report_date,
|
|
107
|
+
{std_rept_dt_sql} AS standard_report_date,
|
|
108
|
+
{rept_dt_prec_sql} AS report_date_precision,
|
|
109
|
+
CAST(NULL AS VARCHAR) AS death_date,
|
|
110
|
+
CAST(NULL AS DATE) AS standard_death_date,
|
|
111
|
+
CAST(NULL AS VARCHAR) AS death_date_precision,
|
|
112
|
+
CAST(NULL AS VARCHAR) AS confidentiality_flag,
|
|
113
|
+
CAST(rept_cod AS VARCHAR) AS report_type_code,
|
|
114
|
+
{rept_label_sql} AS report_type_label,
|
|
115
|
+
CASE WHEN UPPER(TRIM(rept_cod)) = 'EXP' THEN 'Y' ELSE 'N' END AS expedited_flag,
|
|
116
|
+
CAST(e_sub AS VARCHAR) AS electronic_submission_flag,
|
|
117
|
+
CAST(mfr_num AS VARCHAR) AS manufacturer_control_number,
|
|
118
|
+
CAST(mfr_sndr AS VARCHAR) AS manufacturer_name,
|
|
119
|
+
CAST(auth_num AS VARCHAR) AS auth_num,
|
|
120
|
+
CAST(lit_ref AS VARCHAR) AS lit_ref,
|
|
121
|
+
CAST(to_mfr AS VARCHAR) AS to_mfr,
|
|
122
|
+
CAST(NULL AS VARCHAR) AS sender_type_code,
|
|
123
|
+
CAST(NULL AS VARCHAR) AS sender_type_label,
|
|
124
|
+
TRY_CAST(age AS DOUBLE) AS reported_age,
|
|
125
|
+
CAST(age_cod AS VARCHAR) AS reported_age_code,
|
|
126
|
+
{age_unit_lbl_sql} AS reported_age_unit_label,
|
|
127
|
+
CAST(age_grp AS VARCHAR) AS age_group_code,
|
|
128
|
+
{age_grp_lbl_sql} AS age_group_label,
|
|
129
|
+
CAST(sex AS VARCHAR) AS reported_sex_code,
|
|
130
|
+
TRY_CAST(wt AS DOUBLE) AS reported_weight,
|
|
131
|
+
CAST(wt_cod AS VARCHAR) AS reported_weight_code,
|
|
132
|
+
{wt_unit_lbl_sql} AS reported_weight_unit_label,
|
|
133
|
+
CAST(occp_cod AS VARCHAR) AS reporter_occupation_code,
|
|
134
|
+
{occp_label_sql} AS reporter_occupation_label,
|
|
135
|
+
CAST(reporter_country AS VARCHAR) AS reporter_country,
|
|
136
|
+
CAST(occr_country AS VARCHAR) AS occurrence_country,
|
|
137
|
+
{age_sql} AS standard_age_years,
|
|
138
|
+
{sex_label_sql} AS standard_sex_label,
|
|
139
|
+
{wt_sql} AS standard_weight_kg,
|
|
140
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
141
|
+
'{data_period}' AS _data_period,
|
|
142
|
+
'{file_path.name}' AS _source_file,
|
|
143
|
+
'S3' AS _source_signature_id,
|
|
144
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
145
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
146
|
+
""")
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def load_s3_drug(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
150
|
+
"""Loads S3 DRUG file into canonical drug table."""
|
|
151
|
+
role_label_sql = get_drug_role_label_sql("role_cod")
|
|
152
|
+
val_vbm_lbl_sql = get_drug_name_source_label_sql("val_vbm")
|
|
153
|
+
dose_freq_lbl_sql = get_dose_frequency_label_sql("dose_freq")
|
|
154
|
+
cum_dose_unit_lbl_sql = get_cumulative_dose_unit_label_sql("cum_dose_unit")
|
|
155
|
+
dechal_lbl_sql = get_dechallenge_label_sql("dechal")
|
|
156
|
+
rechal_lbl_sql = get_rechallenge_label_sql("rechal")
|
|
157
|
+
std_exp_dt_sql = get_standard_date_sql("exp_dt")
|
|
158
|
+
exp_dt_prec_sql = get_date_precision_sql("exp_dt")
|
|
159
|
+
con.execute(f"""
|
|
160
|
+
CREATE OR REPLACE TABLE drug AS
|
|
161
|
+
SELECT
|
|
162
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
163
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
164
|
+
COALESCE(NULLIF(TRIM(CAST(drug_seq AS VARCHAR)), ''), '1') AS drug_seq,
|
|
165
|
+
CAST(drugname AS VARCHAR) AS reported_drug_name,
|
|
166
|
+
CAST(prod_ai AS VARCHAR) AS reported_active_ingredient,
|
|
167
|
+
CAST(val_vbm AS VARCHAR) AS reported_validation_code,
|
|
168
|
+
{val_vbm_lbl_sql} AS reported_validation_label,
|
|
169
|
+
CAST(role_cod AS VARCHAR) AS role_code,
|
|
170
|
+
{role_label_sql} AS role_label,
|
|
171
|
+
CAST(route AS VARCHAR) AS route,
|
|
172
|
+
CAST(dose_vbm AS VARCHAR) AS reported_dose_verbatim,
|
|
173
|
+
TRY_CAST(dose_amt AS DOUBLE) AS dose_amount,
|
|
174
|
+
CAST(dose_unit AS VARCHAR) AS dose_unit,
|
|
175
|
+
CAST(dose_form AS VARCHAR) AS dose_form,
|
|
176
|
+
CAST(dose_freq AS VARCHAR) AS dose_frequency,
|
|
177
|
+
{dose_freq_lbl_sql} AS dose_frequency_label,
|
|
178
|
+
CAST(cum_dose_chr AS VARCHAR) AS cumulative_dose_amount,
|
|
179
|
+
CAST(cum_dose_unit AS VARCHAR) AS cumulative_dose_unit,
|
|
180
|
+
{cum_dose_unit_lbl_sql} AS cumulative_dose_unit_label,
|
|
181
|
+
CAST(dechal AS VARCHAR) AS dechallenge_code,
|
|
182
|
+
{dechal_lbl_sql} AS dechallenge_label,
|
|
183
|
+
CAST(rechal AS VARCHAR) AS rechallenge_code,
|
|
184
|
+
{rechal_lbl_sql} AS rechallenge_label,
|
|
185
|
+
CAST(lot_num AS VARCHAR) AS lot_number,
|
|
186
|
+
CAST(exp_dt AS VARCHAR) AS expiration_date,
|
|
187
|
+
{std_exp_dt_sql} AS standard_expiration_date,
|
|
188
|
+
{exp_dt_prec_sql} AS expiration_date_precision,
|
|
189
|
+
CAST(nda_num AS VARCHAR) AS regulatory_auth_num,
|
|
190
|
+
TRIM(UPPER(CAST(drugname AS VARCHAR))) AS structural_clean_drug_name,
|
|
191
|
+
CAST(NULL AS VARCHAR) AS standard_concept_name,
|
|
192
|
+
CAST(NULL AS VARCHAR) AS standard_concept_source,
|
|
193
|
+
CAST(NULL AS VARCHAR) AS rxcui,
|
|
194
|
+
'NOT_ATTEMPTED' AS derivation_status,
|
|
195
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
196
|
+
'{data_period}' AS _data_period,
|
|
197
|
+
'{file_path.name}' AS _source_file,
|
|
198
|
+
'S3' AS _source_signature_id,
|
|
199
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
200
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
201
|
+
""")
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def load_s3_reac(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
205
|
+
"""Loads S3 REAC file into canonical reac table."""
|
|
206
|
+
con.execute(f"""
|
|
207
|
+
CREATE OR REPLACE TABLE reac AS
|
|
208
|
+
SELECT
|
|
209
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
210
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
211
|
+
CAST(pt AS VARCHAR) AS reported_reaction_term,
|
|
212
|
+
ROW_NUMBER() OVER (PARTITION BY primaryid) AS reaction_seq,
|
|
213
|
+
CAST(drug_rec_act AS VARCHAR) AS drug_reaction_action,
|
|
214
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
215
|
+
'{data_period}' AS _data_period,
|
|
216
|
+
'{file_path.name}' AS _source_file,
|
|
217
|
+
'S3' AS _source_signature_id,
|
|
218
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
219
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
220
|
+
""")
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def load_s3_outc(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
224
|
+
"""Loads S3 OUTC file into canonical outc table."""
|
|
225
|
+
outc_lbl_sql = get_outcome_label_sql("outc_cod")
|
|
226
|
+
serious_sql = get_outcome_is_serious_sql("outc_cod")
|
|
227
|
+
con.execute(f"""
|
|
228
|
+
CREATE OR REPLACE TABLE outc AS
|
|
229
|
+
SELECT
|
|
230
|
+
CAST(primaryid AS VARCHAR) AS primary_id,
|
|
231
|
+
CAST(caseid AS VARCHAR) AS case_id,
|
|
232
|
+
CAST(outc_cod AS VARCHAR) AS outcome_code,
|
|
233
|
+
{outc_lbl_sql} AS outcome_label,
|
|
234
|
+
{serious_sql} AS is_serious,
|
|
235
|
+
'FDA_FAERS_ASCII' AS _source_system,
|
|
236
|
+
'{data_period}' AS _data_period,
|
|
237
|
+
'{file_path.name}' AS _source_file,
|
|
238
|
+
'S3' AS _source_signature_id,
|
|
239
|
+
CURRENT_TIMESTAMP AS _ingested_at
|
|
240
|
+
FROM read_csv('{file_path.as_posix()}', delim='$', header=True, all_varchar=True, quote='', escape='', ignore_errors=true, null_padding=true);
|
|
241
|
+
""")
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def load_s3_indi(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
245
|
+
"""Loads S3 INDI file into canonical indi table."""
|
|
246
|
+
load_standard_indi(con, file_path, data_period, signature_id="S3")
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def load_s3_ther(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
250
|
+
"""Loads S3 THER file into canonical ther table."""
|
|
251
|
+
load_standard_ther(con, file_path, data_period, signature_id="S3")
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def load_s3_rpsr(con: duckdb.DuckDBPyConnection, file_path: Path, data_period: str):
|
|
255
|
+
"""Loads S3 RPSR file into canonical rpsr table."""
|
|
256
|
+
load_standard_rpsr(con, file_path, data_period, signature_id="S3")
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Streaming dollar-delimited parser for FDA FAERS/AERS ASCII raw data files."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Generator, Mapping
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from raxtik_etl.sources import (
|
|
10
|
+
clean_field_name,
|
|
11
|
+
detect_file_entity,
|
|
12
|
+
parse_delimited_file,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
from raxtik_source_faers.constants import TABLE_PREFIX_TO_ENTITY
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def detect_table_type(
|
|
19
|
+
filename_or_path: str | Path,
|
|
20
|
+
prefix_mapping: Mapping[str, str] | None = None,
|
|
21
|
+
) -> str | None:
|
|
22
|
+
"""Detect canonical table type from a FAERS/AERS filename or custom mapping.
|
|
23
|
+
|
|
24
|
+
Supports:
|
|
25
|
+
- DEMO / demo -> demo
|
|
26
|
+
- DRUG / drug -> drug
|
|
27
|
+
- REAC / reac -> reac
|
|
28
|
+
- OUTC / outc -> outc
|
|
29
|
+
- INDI / indi -> indi
|
|
30
|
+
- THER / ther -> ther
|
|
31
|
+
- RPSR / rpsr -> rpsr
|
|
32
|
+
"""
|
|
33
|
+
mapping = prefix_mapping if prefix_mapping is not None else TABLE_PREFIX_TO_ENTITY
|
|
34
|
+
return detect_file_entity(filename_or_path, prefix_mapping=mapping)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def parse_faers_ascii_file(
|
|
38
|
+
file_path: Path | str,
|
|
39
|
+
table_type: str | None = None,
|
|
40
|
+
chunk_size: int = 10000,
|
|
41
|
+
) -> Generator[dict[str, Any], None, None]:
|
|
42
|
+
"""Stream and parse a dollar-delimited FAERS ASCII file into dictionary records.
|
|
43
|
+
|
|
44
|
+
Handles encoding fallbacks (utf-8, iso-8859-1, latin-1, cp1252) and standardizes
|
|
45
|
+
field names.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
file_path: Path to the .txt ASCII file.
|
|
49
|
+
table_type: Optional canonical table name hint.
|
|
50
|
+
chunk_size: Processing batch size.
|
|
51
|
+
|
|
52
|
+
Yields:
|
|
53
|
+
Standardized record dictionary.
|
|
54
|
+
"""
|
|
55
|
+
yield from parse_delimited_file(
|
|
56
|
+
file_path=file_path,
|
|
57
|
+
delimiter="$",
|
|
58
|
+
table_type=table_type,
|
|
59
|
+
prefix_mapping=TABLE_PREFIX_TO_ENTITY,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
__all__ = [
|
|
64
|
+
"clean_field_name",
|
|
65
|
+
"detect_file_entity",
|
|
66
|
+
"detect_table_type",
|
|
67
|
+
"parse_delimited_file",
|
|
68
|
+
"parse_faers_ascii_file",
|
|
69
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Official FDA, ICH, and ISO Reference Code-Sets for FAERS."""
|
|
2
|
+
|
|
3
|
+
from raxtik_source_faers.reference.age_groups import FDA_AGE_GROUPS_REFERENCE
|
|
4
|
+
from raxtik_source_faers.reference.age_units import FDA_AGE_UNITS_REFERENCE
|
|
5
|
+
from raxtik_source_faers.reference.countries import ICH_ISO_COUNTRIES_REFERENCE
|
|
6
|
+
from raxtik_source_faers.reference.cumulative_dose_units import (
|
|
7
|
+
FDA_CUMULATIVE_DOSE_UNITS_REFERENCE,
|
|
8
|
+
)
|
|
9
|
+
from raxtik_source_faers.reference.dechallenge import FDA_DECHALLENGE_REFERENCE
|
|
10
|
+
from raxtik_source_faers.reference.dose_frequencies import (
|
|
11
|
+
FDA_DOSE_FREQUENCIES_REFERENCE,
|
|
12
|
+
)
|
|
13
|
+
from raxtik_source_faers.reference.drug_name_sources import (
|
|
14
|
+
FDA_DRUG_NAME_SOURCES_REFERENCE,
|
|
15
|
+
)
|
|
16
|
+
from raxtik_source_faers.reference.duration_units import FDA_DURATION_UNITS_REFERENCE
|
|
17
|
+
from raxtik_source_faers.reference.occupations import FDA_OCCUPATIONS_REFERENCE
|
|
18
|
+
from raxtik_source_faers.reference.outcomes import FDA_OUTCOMES_REFERENCE
|
|
19
|
+
from raxtik_source_faers.reference.rechallenge import FDA_RECHALLENGE_REFERENCE
|
|
20
|
+
from raxtik_source_faers.reference.report_sources import FDA_REPORT_SOURCES_REFERENCE
|
|
21
|
+
from raxtik_source_faers.reference.report_types import FDA_REPORT_TYPES_REFERENCE
|
|
22
|
+
from raxtik_source_faers.reference.roles import FDA_ROLES_REFERENCE
|
|
23
|
+
from raxtik_source_faers.reference.sex import FDA_SEX_REFERENCE
|
|
24
|
+
from raxtik_source_faers.reference.weight_units import FDA_WEIGHT_UNITS_REFERENCE
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"FDA_AGE_GROUPS_REFERENCE",
|
|
28
|
+
"FDA_AGE_UNITS_REFERENCE",
|
|
29
|
+
"FDA_CUMULATIVE_DOSE_UNITS_REFERENCE",
|
|
30
|
+
"FDA_DECHALLENGE_REFERENCE",
|
|
31
|
+
"FDA_DOSE_FREQUENCIES_REFERENCE",
|
|
32
|
+
"FDA_DRUG_NAME_SOURCES_REFERENCE",
|
|
33
|
+
"FDA_DURATION_UNITS_REFERENCE",
|
|
34
|
+
"FDA_OCCUPATIONS_REFERENCE",
|
|
35
|
+
"FDA_OUTCOMES_REFERENCE",
|
|
36
|
+
"FDA_RECHALLENGE_REFERENCE",
|
|
37
|
+
"FDA_REPORT_SOURCES_REFERENCE",
|
|
38
|
+
"FDA_REPORT_TYPES_REFERENCE",
|
|
39
|
+
"FDA_ROLES_REFERENCE",
|
|
40
|
+
"FDA_SEX_REFERENCE",
|
|
41
|
+
"FDA_WEIGHT_UNITS_REFERENCE",
|
|
42
|
+
"ICH_ISO_COUNTRIES_REFERENCE",
|
|
43
|
+
]
|