input: VACCINES, EVENTS, MEDICINES
parameters : concept_sets_of_our_study, ECVM_CDM_tables, ECVM_CDM_codvar, ECVM_CDM_datevar, concept_set_domains, concept_set_domains, concept_set_codes_our_study.
output: concept set datasets, one per concept set, named after the concept set itself (data model: it is a sequence of records from multiple tables of the Common Data Model)
In this step the function CreateConceptSetDatasets is used. The set of input tables are inspected and a group of datasets is created, each corresponding to a concept set. Each dataset contains the records of the input tables that match the corresponding concept set codes.
input: OBSERVATION_PERIODS
parameters: study_end, this_datasource_has_subpopulations, op_meanings_list_per_set, op_meaning_sets, subpopulations, op_meaning_sets_in_subpopulations
output: D3_output_spells_category , output_spells_category_meaning_set (only if the datasource has subpopulations)
In this step the function CreateSpells is used. It takes as input a dataset with multiple time windows per unit of observation (OBSERVATION_PERIODS). The output is a datasetof spells, i.e., disjoint periods of time.
input: PERSONS , OBSERVATION_PERIODS
output: D3_PERSONS, D3_events_DEATH
In this step birth date and date of death from PERSONS are fixed in case days or months are missing (they are not mandatory variables). Once PERSONS is corrected it is saved as D3_PERSONS. D3_events_DEATH is also created containing date of death
input: SURVEY_ID, SURVEY_OBSERVATIONS
parameters: ECVM_CDM_EAV_tables_retrieve, ECVM_CDM_datevar_retrieve, dateformat, study_variable_names, itemset_AVpair_our_study_this_datasource
output: covid_registry
In this step, the set of input tables are inspected and a group of datasets is created, each corresponding to a prompt or to a itemset. Each dataset contains the records of the input tables that match the corresponding prompt or itemset.
input: concept set datasets
parameters : concept_set_domains, study_years
output: D3_concepts_QC_criteria
Creation of quality check criteria for vaccine doses and recoding of missing manufacturer
input: D3_concepts_QC_criteria,
parameters : concept_set_domains, study_years, thisdatasource
output: Flowchart_QC_criteria, selected_doses
Application of the vaccine doses QC criteria. Creation of final dataset for the dosses and flowchart including the number of doses excluded by criteria
input: PERSONS, OBSERVATION_PERIODS, D3_output_spells_category
parameters : study_start, study_end, this_datasource_has_subpopulations
output: D3_selection_criteria_doses
Creation of quality check criteria for D3_PERSONS, based on personal data and spells.
input: D3_selection_criteria_doses, D3_concepts_QC_criteria, output_spells_category
parameters : study_end
output: persons_doses
Merge vaccine doses information with persons. (with exclusion criteria variables)
input: D3_selection_criteria_doses
parameters : this_datasource_has_subpopulations, subpopulations,
output: Flowchart_exclusion_criteria, Flowchart_basic_exclusion_criteria, D4_study_population (data model), D4_study_source_population
output parameters: subpopulations_non_empty
In this step the function CreateFlowchart is used: the selection criteria are applied and the study population is selected. A flowchart is created as a byproduct.
input: persons_doses
parameters : this_datasource_has_subpopulations, subpopulations
output: Flowchart_doses, HTML_flowchart_doses
In this step the function CreateFlowchart is used: the selection criteria are applied and the study population is selected. A flowchart is created as a byproduct.
input: output_spells_category, D3_selection_criteria
output: number_criteria_excluded, Plots: Last spells end date, Density_plot_distance_spells, pop_excluded
In this step some plots and count about the exclusion criteria are created. They are used to set some parameter in the next run of the script or to check if everything work correctly.
input: concept set datasets of outcomes (narrow and possible), D4_study_population, subpopulations_non_empty
parameters: firstYearComponentAnalysis, secondYearComponentAnalysis, OUTCOME_events, this_datasource_has_subpopulations, date_format, datasources_with_specific_algorithms, exclude_meanings_from_OUTCOME
output: for each outcome OUTCOME, D3_events_OUTCOME_ TYPE and D3_components_OUTCOME
In this step the function MergeFilterAndCollapse is used. All outcomes that occurred to the persons in the study population during the study period or during lookback are listed. Moreover, components are created for narrow and possible concept sets, for HOSP and PC meanings. Finally, datasource-tailored algorithms are implemented.
input: concept set datasets involved in secondary components, D4_study_population
parameters: this_datasource_has_subpopulations, SECCOMPONENTS, concept_set_seccomp, rule_seccomp, distance_seccomp, direction_seccomp
output: for each secondary component SECCOMP, D3_eventsSecondary_SECCOMP.RData
input: D4_study_population, subpopulations_non_empty, D3_events_OUTCOME_narrow, D3_events_OUTCOME_possible, for all outcomes OUTCOME; conceptsets for CONTROL_events
parameters : OUTCOMEnoCOVID, CONTROL_events, this_datasource_has_subpopulations
output: list_outcomes_observed, D3_events_ALL_OUTCOMES
In this step a list containing all observed outcomes including control outcomes and excluding COVID, and a dataset is created, containing the first occurrence recorded during lookback or during study period of each outcome.
input: D4_study_population, D3_events_ALL_OUTCOMES
parameters : this_datasource_has_subpopulations, list_outcomes_observed_only_diagnosis
output: QC_code_counts_in_study_population_OUTCOME_YYYY (exported to csv)
This step counts the codes occurring during each year of the study period of each outcome. Only the first occurrence of each person is included
input: D4_study_population, D3_events_OUTCOME_TYPE
parameters : this_datasource_has_subpopulations, firstYearComponentAnalysis, secondYearComponentAnalysis, OUTCOME_events, date_format, subpopulations_non_empty
output: QC_all_components_OUTCOME
In this step outcomes are split in all possible components
input: D4_study_population, concept set datasets corresponding to COV_conceptssets, plus the six datasets corresponding to the concept sets of the three outcomes CAD, MYOCARD and HF, which are to be used in the covariate CV: “CV”,“COVCANCER”,“COVCOPD”,“COVCKD”,“COVDIAB”,“COVOBES”,“COVSICKLE”
parameters : this_datasource_has_subpopulations, exclude_meaning_of_event, subpopulations_non_empty
output: D3_study_population_covariates
In this step the diagnostic components of the risk factors are created as presence of a diagnostic code during lookback, and added to the study population
input: D4_study_population, concept set datasets in DRUGS_conceptssets (“CV”, “COVCOPD”, “COVCKD”, “COVDIAB”)
parameters : this_datasource_has_subpopulations, DRUGS_conceptssets, subpopulations_non_empty, output: D3_study_population_DP
In this step for each subject in the study population a the drug proxy component of each risk factor is created: there must be at least 2 records during 365 days of lookback.
input: D4_study_population, D3_study_population_covariates, subpopulations_non_empty
parameters : this_datasource_has_subpopulations
output: D4_study_population_cov
In this step few simple covariates (age etc) are added to the study population.
input: subpopulations_non_empty, D4_study_population, D4_study_population_cov, D3_study_population_DP
parameters : this_datasource_has_subpopulations
output: D3_study_population_cov_ALL
In this step the diagnostic and the drug proxy component of each risk factor are merged into a composite OR, and added to the study population.
input: D4_study_population.RData, D3_events_COVID_narrow, D3_events_DEATH.RData, covid_registry, COVID_symptoms parameters: this_datasource_has_subpopulations, subpopulations_non_empty output: D3_components_covid_severity
In this step, components to identify occurrence of covid and of its level of severity are computed based on the concept sets COVID_narrow, “COVIDSYMPTOM”,“ARD_narrow”,“ARD_possible”, and ‘MechanicalVent’, and possibly on the records of covid registry, if available in the data source
input: # input: D3_components_covid_severity.RData, D4_study_population.RData
parameters: this_datasource_has_subpopulations, subpopulations_non_empty
output: D3_algorithm_covid, D3_outcomes_covid
In this step, the components created in the previous step are combined to obtain levels of covid severity
input: D4_study_population, selected_doses, D3_outcomes_covid
output: D3_study_population_no_risk, D3_Vaccin_cohort_no_risk
Creation of D3 datasets present in the SAP document but without risks.
input: D3_Vaccin_cohort_no_risk, concept set datasets of covariates
output: D3_Vaccin_cohort_covariates
In this step the diagnostic components of the risk factors are created as presence of a diagnostic code during lookback, and added to the study population
input: D3_Vaccin_cohort_no_risk, concept set datasets in DRUGS_conceptssets
output: D3_Vaccin_cohort_DP
In this step for each subject in the study population a the drug proxy component of each risk factor is created: there must be at least 2 records during 365 days of lookback.
input: D3_Vaccin_cohort_no_risk, D3_Vaccin_cohort_covariates
output: D4_Vaccin_cohort_cov
In this step few simple covariates (age etc) are added to the study population.
input: D3_Vaccin_cohort_no_risk, D4_Vaccin_cohort_cov , D3_Vaccin_cohort_DP
output: D3_Vaccin_cohort_cov_ALL
In this step the diagnostic and the drug proxy component of each risk factor are merged into a composite OR, and added to the study population.
input: D3_study_population_no_risk, D3_study_population_cov_ALL , D3_Vaccin_cohort_cov_ALL
output: D3_study_population, D3_Vaccin_cohort, D3_vaxweeks_vaccin_cohort, D3_studyweeks, D3_vaxweeks, D3_vaxweeks_including_not_vaccinated
Creation of all D3 datasets present in the SAP document.
input: D3_events_ALL_OUTCOMES, D3_outcomes_covid , D3_study_population
output: D3_study_variables_for_MIS, D4_population_b, D3_selection_criteria_c, D4_population_c_no_risk, D3_selection_criteria_d, D4_population_d
Creation of D3 datasets for MIS/myocard present in the SAP document but without risks.
input: D4_population_c_no_risk, concept set datasets of covariates
output: D3_population_c_covariates
In this step the diagnostic components of the risk factors are created as presence of a diagnostic code during lookback, and added to the study population
input: D4_population_c_no_risk, concept set datasets in DRUGS_conceptssets
output: D3_population_c_DP
In this step for each subject in the study population a the drug proxy component of each risk factor is created: there must be at least 2 records during 365 days of lookback.
input: D4_population_c_no_risk, D3_population_c_covariates
output: D4_population_c_cov
In this step few simple covariates (age etc) are added to the study population.
input: D4_population_c_no_risk, D4_population_c_cov, D3_population_c_DP
output: D3_population_c_cov_ALL
In this step the diagnostic and the drug proxy component of each risk factor are merged into a composite OR, and added to the study population.
input: D4_population_c_no_risk, D3_population_c_cov_ALL
output: D4_population_c
In this step risks are added to the population of cohort c.
input: D3_vaxweeks_including_not_vaccinated, D3_Vaccin_cohort_cov_ALL, D3_outcomes_covid
output: D3_vaxweeks_poisson
In this step the dataset containing the subjects and time varying covariate (COVID) for poisson analysis
input: D3_vaxweeks_including_not_vaccinated, D3_events_ALL_OUTCOMES
parameters : this_datasource_has_subpopulations, subpopulations_non_empty, list_outcomes_observed
output: D4_persontime_risk_week
In this step the function CountPersonTime is used. The output contains persontime and counts of all outcomes, measured both as narrow and as broad.
input: D3_vaxweeks_including_not_vaccinated, D3_events_ALL_OUTCOMES
parameters : this_datasource_has_subpopulations, subpopulations_non_empty, list_outcomes_observed
output: D4_persontime_risk_year
In this step the function CountPersonTime is used. The output contains persontime and counts of all outcomes, measured both as narrow and as broad.
input: D3_vaxweeks_including_not_vaccinated, D3_outcomes_covid
parameters : this_datasource_has_subpopulations, subpopulations_non_empty, list_outcomes_observed_COVID
output: D4_persontime_benefit_week
In this step the function CountPersonTime is used. The output contains persontime and counts of the levels of covid.
input: D3_vaxweeks_including_not_vaccinated, D3_outcomes_covid
parameters : this_datasource_has_subpopulations, subpopulations_non_empty, list_outcomes_observed_COVID
output: D4_persontime_benefit_year
In this step the function CountPersonTime is used. The output contains persontime and counts of the levels of covid.
input: D4_persontime_risk_week, D4_persontime_benefit_week, D4_persontime_risk_year, D4_persontime_benefit_year
output: D4_persontime_risk_week_BC, D4_persontime_benefit_week_BC, D4_persontime_risk_year_BC, D4_persontime_benefit_year_BC
Aggregating the data for birth_coohort and sex
input: D4_persontime_risk_week, D4_persontime_benefit_week, D4_persontime_risk_year, D4_persontime_benefit_year
output: D4_persontime_risk_week_RF, D4_persontime_benefit_week_RF, D4_persontime_risk_year_RF, D4_persontime_benefit_year_RF
Aggregating the data for risk_factors
input: D3_events_ALL_OUTCOMES, D3_vaxweeks_vaccin_cohort
parameters : this_datasource_has_subpopulations, subpopulations_non_empty, list_outcomes_observed
output: D4_persontime_risk_month
In this step the function CountPersonTime is used. The output contains monthly persontime and counts of the levels of covid for the vaccinated cohort.
input: D4_persontime_risk_month
output: D4_persontime_risk_month_RFBC
Aggregating the monthly data for risk_factors and birth cohort.
input: D3_events_ALL_OUTCOMES, D4_population_b, D4_population_c, D4_population_d
output: D4_persontime_b, D4_persontime_monthly_b, D4_persontime_c, D4_persontime_monthly_c, D4_persontime_d, D4_persontime_monthly_d
In this step the function CountPersonTime is used. The output contains persontime and counts for MIS/myocard cohorts.
input: D4_persontime_monthly_b, D4_persontime_monthly_c, D4_persontime_monthly_d
output: D4_persontime_monthly_b_BC, D4_persontime_monthly_c_BC, D4_persontime_monthly_d_BC
Aggregating the monthly data for MIS/myocard cohorts.
input: D3_events_ALL_OUTCOMES, D3_vaxweeks_poisson
output: D4_persontime_risk_month_poisson
In this step the function CountPersonTime is used. The output contains persontime and counts for poisson.
input: D4_persontime_risk_month_poisson
output: D4_persontime_monthly_poisson_RF
Aggregating the monthly data for the poisson.
input: D4_persontime_risk_week_BC, D4_persontime_benefit_week_BC, D4_persontime_risk_year_BC, D4_persontime_benefit_year_BC, D4_persontime_risk_week_RF, D4_persontime_benefit_week_RF, D4_persontime_risk_year_RF, D4_persontime_benefit_year_RF, D4_persontime_risk_month_RFBC
parameters : list_outcomes_observed
output: D4_IR_benefit_week_BC, D4_IR_benefit_fup_BC, D4_IR_risk_week_BC, D4_IR_risk_fup_BC, D4_IR_benefit_week_RF, D4_IR_benefit_fup_RF, D4_IR_risk_week_RF, D4_IR_risk_fup_RF, D4_persontime_ALL_OUTCOMES
Calculate the incidence rates for birth cohorts and risk factors datasets for both risk and benefit
input: D4_persontime_b, D4_persontime_monthly_b_BC, D4_persontime_c, D4_persontime_monthly_c_BC, D4_persontime_d, D4_persontime_monthly_d_BC
parameters : list_outcomes_observed
output: RES_IR_MIS_b, RES_IR_monthly_MIS_b, RES_IR_MIS_c, RES_IR_monthly_MIS_c, RES_IR_MIS_d, RES_IR_monthly_MIS_d
Calculate the incidence rates for birth cohorts and risk factors datasets for MIS/myocard cohorts
input: D3_studyweeks
parameters : study_start, study_end
output: D4_doses_weeks
Creation of D4_doses_weeks dataset starting from D3_studyweeks
input: D3_study_population, D3_Vaccin_cohort, D3_study_population_cov_ALL
output: D4_descriptive_dataset_age_studystart, D4_descriptive_dataset_ageband_studystart, D4_descriptive_dataset_sex_studystart, D4_descriptive_dataset_covariate_studystart, D4_followup_fromstudystart, D4_descriptive_dataset_age_vax1, D4_descriptive_dataset_ageband_vax, D4_descriptive_dataset_sex_vaccination, D4_followup_from_vax, Density_plot_distance_doses, Histogram_distance_doses, D4_distance_doses
Create the remaining D4 datasets and tables described in the SAP.
input: D3_vaxweeks, D3_Vaccin_cohort, D3_study_population, D3_study_population_cov_ALL, D4_IR_benefit_week_BC, D4_IR_benefit_fup_BC, D4_IR_benefit_week_RF, D4_IR_benefit_fup_RF, D4_IR_risk_week_BC, D4_IR_risk_fup_BC, D4_IR_risk_week_RF, D4_IR_risk_fup_RF
parameters : list_outcomes_observed
output: DOSES_BIRTHCOHORTS, COVERAGE_BIRTHCOHORTS, DOSES_RISKFACTORS, COVERAGE_RISKFACTORS, BENEFIT_BIRTHCOHORTS_CALENDARTIME, BENEFIT_BIRTHCOHORTS_TIMESINCEVACCINATION, BENEFIT_RISKFACTORS_CALENDARTIME, BENEFIT_RISKFACTORS_TIMESINCEVACCINATION, RISK_BIRTHCOHORTS_CALENDARTIME, RISK_BIRTHCOHORTS_TIMESINCEVACCINATION, RISK_RISKFACTORS_CALENDARTIME, RISK_RISKFACTORS_TIMESINCEVACCINATION
Creation of all dashboard tables (excluding dummy tables)
input: D3_Vaccin_cohort, D3_study_population, D3_study_population_cov_ALL, D4_population_b, D4_population_c, D4_population_d, D3_Vaccin_cohort_cov_ALL
output: escriptive_dataset_age_studystart_MIS, D4_descriptive_dataset_ageband_studystart_MIS, D4_descriptive_dataset_sex_studystart_MIS, D4_descriptive_dataset_covariate_studystart_MIS, D4_followup_fromstudystart_MIS_c, D4_followup_fromstudystart_MIS, D4_descriptive_dataset_age_vax1_MIS, D4_descriptive_dataset_ageband_vax_MIS, D4_followup_from_vax_MIS_d, D4_descriptive_dataset_covid_studystart_c_MIS, D4_descriptive_dataset_age_studystart_c_MIS, D4_descriptive_dataset_ageband_studystart_c_MIS, D4_descriptive_dataset_covariate_covid_c_MIS, D4_followup_fromstudystart_MIS_c_total, D4_descriptive_dataset_sex_vaccination_MIS
Create the remaining D4 datasets and tables described in the SAP for MIS/myocard cohorts.
input: Flowchart_doses
output: HTML_Flowchart_doses_description
input: COVERAGE_BIRTHCOHORTS
output: HTML_COVERAGE_BIRTHCOHORTS_description
input: DOSES_BIRTHCOHORTS
output: HTML_DOSES_BIRTHCOHORTS_description
input: BENEFIT_BIRTHCOHORTS_CALENDARTIME, BENEFIT_BIRTHCOHORTS_TIMESINCEVACCINATION
output: HTML_benefit_description
input: RISK_BIRTHCOHORTS_CALENDARTIME, RISK_BIRTHCOHORTS_TIMESINCEVACCINATION
output: HTML_risk_description
input: Flowchart_basic_exclusion_criteria, Flowchart_exclusion_criteria, D4_descriptive_dataset_ageband_studystart, D4_descriptive_dataset_age_studystart, D4_followup_fromstudystart, D4_descriptive_dataset_sex_studystart, D4_descriptive_dataset_covariate_studystart
output: Attrition diagram 1, Attrition diagram 2, Cohort characteristics at start of study (1-1-2020), Cohort characteristics at first COVID-19 vaccination, Doses of COVID-19 vaccines and distance between first and second dose, Number of incident cases entire study period, Code counts for narrow definitions (for each event) separately, Incidence of AESI (narrow) per 100,000 PY by calendar month in 2020, Incidence of AESI (narrow) per 100,000 PY by age in 2020, Incidence of AESI (narrow) per 100,000 PY by age & sex in 2020, Incidence of AESI (narrow) per 100,000 PY by age & sex in 2020, Incidence of AESI (narrow) per 100,000 PY by month in 2021 (non-vaccinated), Incidence of AESI (narrow) per 100,000 PY by week since vaccination
Creation of dummy tables present in SAP.
input: Flowchart_basic_exclusion_criteria, Flowchart_exclusion_criteria, D4_descriptive_dataset_ageband_studystart_MIS, D4_descriptive_dataset_age_studystart_MIS, D4_followup_fromstudystart_MIS, D4_descriptive_dataset_covariate_studystart_MIS, D4_population_d, D4_descriptive_dataset_ageband_studystart_c_MIS, D4_descriptive_dataset_age_studystart_c_MIS, D4_followup_fromstudystart_MIS_c, D4_descriptive_dataset_covid_studystart_c_MIS, D4_descriptive_dataset_covariate_covid_c_MIS, D3_Vaccin_cohort, QC_code_counts_in_study_population_OUTCOME_YEAR, RES_IR_monthly_MIS_b, RES_IR_monthly_MIS_c, RES_IR_monthly_MIS_d
output: Attrition diagram 1, Attrition diagram 2, Cohort characteristics at start of study (1-1-2020), Cohort characteristics at first COVID-19 vaccination, Cohort characteristics at first occurrence of COVID-19 prior to vaccination (cohort c), COVID-19 vaccination by dose and time period between first and second dose (days), Code counts for narrow definitions (for each event) separately, Incidence of AESI (narrow) per 100,000 PY by calendar month in 2020, Incidence of each concept (narrow) per 100,000 PY prior to vaccination and COVID-19, Incidence of each concept (narrow) per 100,000 PY after COVID-19 and prior to vaccination, Incidence of each concept (narrow) per 100,000 PY after vaccination (BRAND)
Creation of dummy tables present in SAP.
input: Flowchart_basic_exclusion_criteria, Flowchart_exclusion_criteria, D4_descriptive_dataset_ageband_studystart, D4_descriptive_dataset_age_studystart, D4_followup_fromstudystart, D4_descriptive_dataset_covariate_studystart, D3_Vaccin_cohort, D4_study_population, D3_events_ALL_OUTCOMES, D3_outcomes_covid, RES_IR_risk_fup_BC
output: # output: Attrition diagram 1, Cohort characteristics at start of study (1-1-2020), Cohort characteristics at first dose of COVID-19 vaccine, Cohort characteristics at second dose of COVID-19 vaccine, COVID-19 vaccination by dose and time period between first and second dose (days), Number of incident cases entire study period, Incidence rates of AESI by vaccine and datasource
Creation of dummy tables present in SAP.