This macro creates the attrition table.
- In the attrition macro:
- Compute remaining patients or episodes.
- Compute excluded patients or episodes.
- Prepare Raw Eligibility-type data for waterfall (all types).
- Determine if patient level or Episode level data should be computed.
- Reset cumulative.
- Exclusion, members must have at least one QUERYGROUP claim within the query period.
- Re-shave _groupindex for enrollment now truncated at death.
- Calculate age at index date.
- For type 4:
- Add rows for MIL outcomes removed because they do not satisfy LINKAGESTATUS and BIRTHTYPES conditions.
- Prepare Episode/Claim-type data for waterfall (all types).
- For type 1, 2, and 5:
- All dummies are created from the "keep" perspective:
- IndexDate must overlap greater monitoring period.
- Adjust EpisodeEndDt if EpisodeEndDt > enddate.
- Adjust EpisodeEndDt if EpisodeEndDt > DeathDt.
- Trucate episode at OIT.
- ExpExtPer may have made the episode to go beyond elig.
- Minimum look back enrollment duration.
- Post index data availability and enrollment for Secondary episode observation window enrollment.
- Minimum Episode Duration.
- Patient must be enrolled throughout the at-risk period when minepisdur.
- Patients must have at least one day at risk post blackout (at least one day to observe and event).
- _keep doesn't contain invalid claims prior to death, need to remove from _masterepisode.
- For type 6:
- In looks 2+, when cohortdef = 01 or 03 and DATADRIVEN query periods, index dates after the initial valid index dates need to be dropped.
- IndexDate must overlap greater monitoring period.
- Adjust EpisodeEndDt if EpisodeEndDt > enddate.
- Adjust EpisodeEndDt if EpisodeEndDt > DeathDt.
- ExpExtPer may have made the episode to go beyond elig.
- Minimum look back enrollment duration.
- _keep doesn't contain invalid claims prior to death, need to remove from _masterepisode.
- For type 3:
- All dummies are created from the "keep" perspective:
- IndexDate must overlap look period.
- Minimum look back enrollment duration.
- Minimum enrollment duration after exposure.
- _keep doesn't contain invalid claims prior to death, need to remove from _masterepisode.
- In looks 2+, when cohortdef = 01 or 03, index dates after the initial valid index dates need to be dropped.
- For type 4:
- All dummies are created from the "keep" perspective:
- Apply the period dates criterion to episode end date (unlike other types it is not applied to IndexDt).
- Minimum look back enrollment duration.
- When Inclusions/Exclusions, Covariates or MFU codes are anchored to INDEXDT the patient must be enrolled during the evaluation window prior to the pregnancy outcome for each of them.
- When Inclusions/Exclusions, Covariates or MFU codes are anchored to EPISODEENDDT and the anchorfrom value is negative the patient must be enrolled during the pre pregnancy outcome window for each of them.
- Post-delivery enrollment.
- Define IndexDt as EpisodeEndDt (delivery) for the remaining steps below.
- Join with _AgeGroups (same processing as in ms_createptsmasterlist).
- For type 2:
- Recompute the TotRxSup for the mindaysupp criterion before applying all other criterion as it is done in CIDANUM.
- Summarize utilization that are overlapping selected episodes.
- Summarize RxSup during episode (only to apply mindaysupp criterion).
- For type 2 and 6:
- Identify all conditions on inclusioncodes file.
- For type 2:
- If cohortgrp is not equal to basecohort then use basecohort.
- Cumulative and current fill dose exclusion.
- Separate out types 3 and 4 to avoid inefficient processing.
- For type 6:
- When cohortdef = 01, consider the first claim only for a member to assess the remaining criteria.
- Save _keep file to determine number of exclusions per condition.
- Standard CIDA overall exclusions.
- Loop through each condition.
- For type 3:
- When cohortDef = 01, consider the first claim only for a member to assess the remaining criteria.
- Create dummies for stockpiled excluded records.
- For type 2:
- Surveillance mode: report members lost to follow-up and still at risk.
- Unique number of members in final cohort.
- For type 4:
- Number of non-pregnant matched comparator episodes.
- Calculate Exclusions variables and add extra variable.
- Store patient episodes to msoc.
- Program inputs
- work._agegroups (Dataset containing demographics at index date.)
- work._doseexcl&COHORTID. (Dataset containing cumulative dose exclusion.)
- work._events (Dataset containing all events.)
- work._firsteventdtinepisode (Dataset containing the first event in any episode.)
- work._fut (Dataset containing truncatured episodes.)
- work._groupindex (Dataset containing all potential outcomes.)
- work._itdrugsexcl (Dataset containing excluded claims information.)
- work._pov1 (Dataset with all potential index dates.)
- work._pov1&COHORTID. (Dataset with all potential index dates.)
- work._pov12 (Dataset with all potential index dates.)
- work._pov3incl_excl (Dataset with index dates not meeting the inclusion/exclusion criteria.)
- work._pov4 (Dataset with exposure episodes.)
- work._pov42 (Dataset with exposure episodes.)
- work._ptsmasterlist (Dataset with potential indexdates or valid episodes.)
- work._t&TYPE.priorlooks (Dataset containing episodes identified in prior look for attrition table.)
- worktemp._bdatesforattrition (Dataset containing one birth date per patient.)
- worktemp._keep (Dataset containing demographic and enrollment flags for attrition.)
- worktemp.dem_infant_enr_&RECONTYP.&ENROLGAP. (Dataset containing infant only enrollment spans.)
- worktemp.enr_group&GROUP. (Dataset containing truncated enrollment at death date (for denominators/attrition).)
- Program outputs
- msoc.&RUNID._attrition&DS_SUFFIX. (Dataset containing the number of individuals or episodes excluded and remaining at each cohort creation criterion.)
- work._eventsinblackout (Dataset with episodes with Events in Blackoutwindow.)
- work._eventsinfupwash (Dataset with episodes with Events in FupWashPer.)
- work._excluded (Dataset containing overall exclusions.)
- work._grouputilfile (Dataset containing summarized RxSup during episode (only to apply mindaysupp criterion).)
- work._linkedenr (Dataset containing linked infant.)
- work._masterepisode_linkenr (Dataset containing linked infant meeting post birth enrollment requirement.)
- work._washeventsinfupwash (Dataset with episodes with IOC in FupWashPer at IndexDt.)
Usage
%ms_attrition(DS_SUFFIX=_prev,
WHERE_CLAUSE=%str((where=(group in("&prevgroups.") and previnc_def in("Both","Prev")))),
COHORTID=);
- Parameters
-
[in] | DS_SUFFIX | Name of the suffix that will be used to produce the output files in MSOC. |
[in] | WHERE_CLAUSE | Clause to restrict the _ptsmasterlist dataset. |
[in] | COHORTID | Identifier for the cohort being processed (primary, secondary). |
SAS Macros Dependencies
- Note
- This program uses the attrition utility macro to compute a specific attrition level data.
This utility macro has the following parameters:
- attritiontype:
- excl_Member => compute an exclusion step at patient level.
- excl_Episode => compute an exclusion step at episode level.
- information => report remaining and excluded parameters.
- skip => report previous step data with empty descr.
- file: file used to compute excluded and remaining patients or episodes.
- toExcl: condition used as exclusion criterion.
- claim_level: claim level at which each criterion is assessed (Member or Episode).
- descr: description.
- remaining: number of remaining patients or episodes to output for information attritiontype.
- excluded: number of excluded patients or episodes to output for information attritiontype.
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)