fromalx_heor.configimportget_source_config# Get all column mappingsconfig=get_source_config("iqvia")# Access specific columnpatient_col=config["columns"]["patient_id"]# 'pat_id'date_col=config["columns"]["service_date"]# 'from_dt'# Access table patternclaims_pattern=config["claims_table_pattern"]# 'claims_{year}'table_2024=claims_pattern.format(year=2024)# 'claims_2024'
Uses der_yob (derived year of birth) - already cleaned
der_sex is validated (M/F/U only)
Claims tables partitioned by year
Enrollment in enroll2_{year} (not enroll_{year})
IQVIA Patient ID Pitfall
IQVIA has two patient ID columns that can cause confusion:
pat_id: Primary identifier in claims tables (claims_YYYY) and enrollment tables (enroll2_YYYY). Always use this for joins.
iq_patient_id: Secondary identifier found only in the enroll table (not enroll2_YYYY). Legacy code sometimes joins claims to enroll via pat_id to get demographics, then groups by iq_patient_id for patient-level analysis.
When joining claims to enrollment data, always use pat_id. The iq_patient_id column does not exist in claims tables.