QRP
 
All Files Pages
Loading...
Searching...
No Matches
ms_createpov3.sas File Reference

This macro identifies all index dates meeting the inclusion/exclusion criteria. More...

Detailed Description

This macro identifies all index dates meeting the inclusion/exclusion criteria.

  • For inclusions/exclusions, the same algorithm applies to all types of analyses.
    • Initialize a list with all potential index dates.
    • Apply current filled daily dose criteria and remove unneeded rows from _inclexcl.
      • When cumulative/average filled daily dose are a criteria, retain stockgroup in order to allow >1 code to occur on the same adate-expiredt, otherwise all other criteria can dedeplicate codes that occur on same ADate-ExpireDt.
    • Determine how many conditions, if there are inclusions on the file, and if minrxdays is used.
    • Build dynamic where clause with requested CONDFROMANCHOR/CONDTOANCHOR combinations for efficiency purposes:
      • CONDFROMANCHOR = INDEXDT and CONDTOANCHOR = INDEXDT
      • CONDFROMANCHOR = INDEXDT and CONDTOANCHOR = EPISODEENDDT
      • CONDFROMANCHOR = EPISODEENDDT and CONDTOANCHOR = EPISODEENDDT
      • CONDFROMANCHOR = INDEXDT_EXP and CONDTOANCHOR = INDEXDT_EXP
      • CONDFROMANCHOR = INDEXDT_EXP and CONDTOANCHOR = INDEXDT
      • CONDFROMANCHOR = INDEXDT and CONDTOANCHOR = INDEXDT_EXP
      • CONDFROMANCHOR = INDEXDT_EXP and CONDTOANCHOR = EPISODEENDDT
    • Get all in INCL/EXCL period claims (both incl and excl) relative to each potential index dates.
      • Extract start and end date within CONDFROM-CONDTO window.
    • Extract cohort specific codes (mother and infant).
    • Determine how many levels of subconditions needed and whether the COND is an exclusion or inclusion.
      • Determine if SUBCOND is an exclusion or inclusion.
      • Only keep if mincumdose is satisfied (total cumdose in window>=mincumdose).
        • Remove dose occuring outside lookback window.
        • Only keep claims on _pov3claims if minrxdays satisfied (total days in window >= minrxdays).
      • Only keep if aFDD criteria is satisfied.
      • Only keep if minrxdays is satisfied (days in window >=minrxdays).
        • Determine number of stockgroups:
          • If >1, then consolidate potential overlapping dispensings.
          • If 1, then there are no overlapping dispensings after stockpiling.
      • Only keep claims on _pov3claims if minrxdays satisfied (total days in window >= minrxdays).
      • _pov3claims may contain duplicate ADATE codes.
        • MinRxDay variables kept same day codes with different expiredt values.
      • Only keep if codedays satisfied (number of ADates >= codedays).
      • Square:
        • If the subcondition is met but it is a subexclusion, then means that condition not satisfied.
    • If all subconditions are satisfied, then condition is satisfied.
    • If inclusions exist on the file:
      • Inclusions only on the file.
        • Output all episodes that have at least one inclusion, but no exclusions.
      • Inclusions and exclusions on the file.
        • Output all episodes that have at least one inclusion, but no exclusions.
    • Exclusions only on the file:
      • Output all episodes that do not have an exclusion.
    • Output all episodes that were excluded to the inclusion/exclusion dataset used for attrition.
Program inputs
  • &INDATASET. (Dataset with all potential index dates.)
  • work._inclexcl (Dataset with a list of control patients and demo data.)
Program outputs
  • work._it&INCLUSIONCODES. (Dataset with inclusion/exclusion definition.)
  • work._pov3 (Dataset with index dates meeting the inclusion/exclusion criteria.)
  • work._pov3incl_excl (Dataset with index dates not meeting the inclusion/exclusion criteria.)

Usage

%ms_createpov3(COHORTTYPE=&type., INDATASET=_POV4, DATEVAR=aDate, IDVAR=PatId, KEEPVARS=episodeenddt, COMPUTECFDD=&computepov3cfdd., COMPUTEAFDD=&computepov3afdd., COMPUTECUMDOSE=&computepov3cumdose.);
Parameters
[in]COHORTTYPECohort identification for which inclusions/exclusions are processed. Can be left blank or take the following values: mil,1,2,3,4,5,6,switching.
[in]INDATASETPotential index dates dataset used to assess inclusions/exclusions.
[in]DATEVARIndex date variable name in &inDataset.
[in]IDVARID variable name (PatID, MILID) in &inDataset. used to join datasets.
[in]KEEPVARSAdditional variables to keep in &inDataset.
[in]COMPUTECFDDIndicates whether the program should process current filled daily dose.
[in]COMPUTEAFDDIndicates whether the program should process average filled daily dose.
[in]COMPUTECUMDOSEIndicates whether the program should process minimum cumulative dose.

SAS Macros Dependencies

Author
Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)