QRP
 
Loading...
Searching...
No Matches
ms_treeextraction.sas File Reference

Perform outcome extraction for signal identification analysis. More...

Detailed Description

Perform outcome extraction for signal identification analysis.

  • Determine if tree lookup file is the expanded tree file
  • Process expanded tree if provided and create expandedtree2 dataset for outcome processing
  • Otherwise:
    • Process ICD10ICD9MAP file if provided and create expandedtree2 dataset for outcome processing
    • Otherwise:
      • Determine startdate and treecodetype (09/10)
      • Create expandedtree2 dataset for outcome processing
  • Loop through partitions:
    • Extract diagnosis claims and process with envelope macro (optional)
    • If program uses the expanded tree:
      • Extract procedure claims and process with envelope macro (optional)
      • Stack with diagnoses extraction
  • If there is more than 1 partition, stack extracted claim datasets
  • Check which output are relevant for the analysis
  • If type is 2 or 4, create comparison table with required parameters
  • Loop through each TREEANALYSISGRP in TREEFILE:
    • Assign macro variables by reading input files
    • Create lookup file for this loop claims extraction
    • Convert CARESETTINGPRINCIPAL to ENCTYPE and PDX
    • Create list of relevant patients from &DATA parameter
    • If type4 analysis, add infants to the list of patients if OUTCOMEPOP = MI/I
    • Extract potential outcomes for this loop
    • Split potential extracted outcomes into DEF and IOC codes
    • For PSMATCH analysis:
      • Discard uninformative followup (i.e. censor at the end of followup of the matched set)
      • Find maximum followuptime in each arm for each matchid
      • For fixed ratio matching, only get minimum followuptime for each matchid
      • Set followuptime to the minimum followup time
    • Create list of defined outcomes (DEF)
    • Perform Tie breaker procedure if two outcomes or more occur on the same day in the same node:
      • Find overall occurence in exposure cohort over the course of the entire query period
      • Separate out hoidates with ties vs no ties
      • Incase of a tie in frequency, assign a random number
      • Keep only one hoi
    • Create list of incident outcomes (IOC)
    • Discard outcomes that do not meet incident criterion
    • Keep only the first HOI per node
    • Create final patient level dataset
    • If requested, create the [runid]_t::_treeanalysis_poisson_[periodid] dataset:
      • Create denominator dataset
      • Loop through requested strata:
        • Aggregrate denominator and square with HOI
        • Aggregate numerator
        • Join numerator with denominator and compute variables
      • Create final poisson dataset (stack stratified datasets)
    • If requested, create the [runid]_t::_tree_analysis_[periodid] dataset
    • If requested, create the [runid]_t3_tree_wkdays_[periodid] dataset
    • Update attrition table with number of patients with an outcome
  • Clean up
Program inputs
  • indata/freedir.&DIATABLE (Diagnosis table to extract observations from.)
  • indata/freedir.&ENCTABLE (Encounter table to extract observations from.)
  • indata/freedir.&PROCTABLE (Procedure table to extract observations from.)
  • infolder.&ICD10ICD9MAP (ICD-10-CM-ICD-9-CM Mapping lookup file for TreeScan analyses.)
  • infolder.&TREEFILE (Dataset with parameters required to execute multiple SI analyses from a basic QRP execution.)
  • infolder.&TREELOOKUP (Dataset with hierarchical tree of codes that are eligible to be HOI.)
  • infolder.&USERSTRATA (Dataset with ouput tables and stratifications specification.)
  • infolder.&PSESTIMATIONFILE (Dataset with the parameters for estimating a PS model and is required for PS-based analyses.)
  • infolder.&PSMATCHFILE (Dataset with parameters for a PS matching analysis.)
  • infolder.&STRATIFICATIONFILE (Dataset with parameters for a PS stratification analysis and required for PS-based analyses.)
  • infolder.&IPTWFILE (Dataset specifying the parameters for an IPTW analysis.)
  • infolder.&TYPE2FILE (Dataset required for an exposures and follow-up time cohort identification strategy.)
Program outputs
  • dplocal.&runid._mstr_tree (Dataset with patient level data containing 1 row per ascertained outcome)
  • msoc.&runid._attrition (Dataset containing the number of individuals or episodes excluded and remaining at each cohort creation criterion)
  • msoc.&runid._adjusted_attrition_&periodidstart (Dataset containing the number of individuals excluded and remaining during inferential analysis process)
  • msoc.&runid._t&type._treeanalysis_poisson_&periodidstart (Dataset containing information on health outcomes of interest and their accompanying weighting information)
  • msoc.&runid._t&type._tree_analysis_&periodidstart (Dataset containing information on health outcomes of interest and their accompanying time-to-event)
  • msoc.&runid._t3_tree_wkdays_&periodidstart (Dataset containing information for additional adjustment for day of the week effects)

Usage

%ms_treeextraction(DATA=dplocal.&runid._mstr,
                   GRP=group);
Parameters
[in]DATADataset that contains patient IDs, index dates, and outcome windows required to create tree analysis output.
[in]GRPName of variable that defines a reference group (group for type 3 or analysisgrp for types 2/4).

SAS Macros Dependencies

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