****************************************************************************************************
****************************************************************************************************
* PROGRAM: baseline_profile_createdata.sas
* Created (mm/dd/yyyy): 04/16/2021
*--------------------------------------------------------------------------------------------------
* Compute aggregate covariate profile table(s)
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
*--------------------------------------------------------------------------------------------------
* Version Date Initials Comment (reference external documentation when available)
* ------- -------- -------- ----------------------------------------------------------------
***************************************************************************************************;
%macro baseline_profile_createdata;
/* Aggregate all potential profile datasets */
%do periodid = %eval(&look_start.) %to %eval(&look_end.);
%do dps = 1 %to %eval(&num_dp.);
%let dpsiteid = %scan(&random_dplist., &dps.);
%let maskedID = %scan(&masked_dplist, &dps);
%if &reporttype = T6 %then %do;
proc sql noprint undo_policy=none;
create table baselinefile_profile_&dps._&periodid. as
inner join alldptable1_&periodid.(where=(metvar = 'PATIENT' and exp_mean&dps > 0)) b
on a.analysisgrp = b.analysisgrp;
data baselinefile_profile_&dps._&periodid;
data _temp_profile_tablenames;
set baselinefile_profile_&dps._&periodid;