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

This macro computes and optionally categorizes requested risk scores. More...

Detailed Description

This macro computes and optionally categorizes requested risk scores.

  • Break out CaresettingPrincipal into Caresetting and Principal.
  • Process wildcards for diagnoses.
  • Break down meds file in procedures and diagnoses for efficiency.
  • Adjust RiskFromAnchor and RiskToAnchor values for computation.
  • Get list of index dates and keep variables required for anchoring.
  • Loop through the different requested risk scores.
    • In addition to the basic riskscores available in the lookup file, custom riskscores can also be computed:
      • CCI
      • ADSCI
      • FRAILTY
      • HASBLED
      • CHA2DS2VASC
      • OBSCOMORB
      • PEDCOMORB
    • Process risk scores definition inputfile.
    • Determine if PX, DX, RX, DM (sex and age groups) and IN (intercept) codes exist in the lookup table.
    • Assign intercept value (if applicable).
    • If diag, proc, and drug codes exist in lookup table pull all claims of with a code of interest for index patients.
    • If demographic sex codes exist in lookup table assign weight according to sex.
    • If demographic age group codes exist in lookup table assign weight according to age group.
    • Compute score for all patient/IndexDt combinations.
    • Assign risk score categories (if any).
    • Merge scores data.
  • Update master file with scores data.
  • Restore sorting as it was prior to scores computation.
Program inputs
  • dplocal.&RUNID._&DATA. (Dataset containing one record per individual per index date for every cohort specified in the CIDA module run.)
  • work.riskscorefile (Dataset containing unique risk scores.)
  • work.riskscorescodes (Dataset containing risk score codes for raw extraction.)
  • worktemp._riskscores_rx (Dataset containing drug claims for scores computation.)
  • worktemp.riskscoresmeds (Dataset with separated diagnosis and procedure claims for scores computation.)
Program outputs
  • dplocal.&RUNID._&DATA. (Dataset containing the requested risk scores and optional risk score category.)

Usage

%ms_computeriskscores();
Parameters
None.

SAS Macros Dependencies

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