style(header)=[%if %sysfunc(prxmatch(m/T2|T3|T4|T6/i,&table)) and &columnsuperscript_flag = Y %then %do; height=.5in %end; just=C borderbottomcolor=black backgroundcolor=bgr borderrightcolor=bgr borderleftcolor=bgr];
****************************************************************************************************
****************************************************************************************************
* PROGRAM: t4tables_output.sas
* Created (mm/dd/yyyy): 12/27/2021
*--------------------------------------------------------------------------------------------------
* PURPOSE: This macro drives the creation of T4 summary table proc report output
* - final_t4moi / final_t4gestwk
* - final_dps_t4moi / final_dps_t4gestwk
* - repdata.table&tablenum.&tableletter
* - table = table indicator from tablefile
* - dataset = input dataset
* - where = where clause to restrict &dataset
* - tabnum = table number and letter
* - nonpreg = Y/N indicator for inclusion of non-pregnant matched cohort
* - varlist = List of column names
* - varwidths = list of variable widths
* - varsmallcells = List of small cell count highlighting indicators for each column
* - varsuperscripts = Y/N indicator on whether columns will get superscript for footnote
* - columnstatementlabels = List of column headers to include in COLUMNS statement
* - definestatementlabels = List of column headers to include in DEFINE statement
* - spanningheader = Header that spans the top of entire table
* Tables T1 and T5 includes both N and # columns under a single column. For this reason, the parameter
* COLUMNLABELS contains a list of labels to include in the COLUMNS statement and COLUMNHEADERS
* contains a list of labels to include in the DEFINE statement
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
***************************************************************************************************;
%macro t4tables_output(table=,
set lookup.lookup_footnotes(where=( (type = "t4l1moi" and order in ( 0
%if &table.=T1 %then %do;