**************************************************************************************************** * PROGRAM OVERVIEW **************************************************************************************************** * * PROGRAM: ms_createpov2.sas * * Created (mm/dd/yyyy): 02/02/2017 * Last modified: 03/23/2017 * Version: 1.0 * *-------------------------------------------------------------------------------------------------- * PURPOSE: * This program will identify all index dates with incidence claims in the washout period * * Program inputs: * -Dataset with potential index dates (POV1) * -Dataset with incidence claims that should be outside the washout period * * Program outputs: * -Dataset with index dates that have an incidence claim in the washout period (POV2) * * PARAMETERS: * -CohortId = Identifier for the cohort being processed (primary, secondary) * * Programming Notes: * * * *-------------------------------------------------------------------------------------------------- * CONTACT INFO: * Mini-Sentinel Coordinating Center * info@mini-sentinel.org * *-------------------------------------------------------------------------------------------------- * CHANGE LOG: * * Version Date Initials Comment (reference external documentation when available) * ------- -------- -------- --------------------------------------------------------------- * mm/dd/yy * ***************************************************************************************************; %macro ms_createpov2(CohortId=); %put =====> MACRO CALLED: ms_createpov2 v1.0; %let paramsuffix=; %if %str("&CohortId.") ne %str("") %then %do; %let paramsuffix=2; %end; proc sql noprint; create table _POV2&CohortId.(where=(InGap=1)) as select distinct index.Patid, index.Adate, %MS_PeriodsOverlap(period1=index.Adate-min(Washper¶msuffix.,99999) index.Adate-1, period2=Inc.ADate Inc.ExpireDt) as InGap from _POV1&CohortId. as index, _GroupWash&CohortId. as Inc where index.Patid = Inc.Patid order by index.Patid, index.Adate; quit; %put NOTE: ********END OF MACRO: ms_createpov2 v1.0********; %mend ms_createpov2;