This macro converts overlapping drug dispensings into non-overlapping dispensings. More...
This macro converts overlapping drug dispensings into non-overlapping dispensings.
Usage
%ms_stockpiling(INFILE=_ITDrugs(where=(stockgroup in (&stock_list))),
CLMDATE=RxDate,
CLMSUP=RxSup,
CLMAMT=RxAmt,
PROCFLAG=,
PERCENTDAYS=&PERCENTDAYS.,
%if &computedose. = Y %then %do; strength = strength, %end;
GROUPING=StockGroup indexcriteria dateonly
%if %eval(&type. = 2) %then %do; fupcriteria %end;
%else %if %eval(&type. = 3) %then %do; fupcriteria %end;
%else %if %eval(&type. = 4) %then %do; fupcriteria %end;
%if &excl_incl = Y %then %do;
&InclExclVars. %if &computepov3cumdose. = Y %then %do; mincumdose %end; %if &computepov3cfdd. = Y %then %do; mincfdd maxcfdd %end;
%end;,
SAMEDAY=&SAMEDAY.,
SUPRANGE=&SUPRANGE.,
AMTRANGE=&AMTRANGE.,
ID=CODECAT &t6vars.,
OUTFILE=_ITDrugs_&z,
OUTFILEEXCL=_ITDrugsExcl_&z);
| [in] | INFILE | Input file with drug claims data. |
| [in] | CLMDATE | Name of variable in INFILE used to identify the claim date. |
| [in] | CLMSUP | Name of variable in INFILE used to identify the claim days of supply. |
| [in] | CLMAMT | Name of variable in INFILE used to identify the claim amount dispensed. |
| [in] | PROCFLAG | Name of variable used to identify claims other than dispensing claims in INFILE. |
| [in] | PERCENTDAYS | Maximum percentage of overlap to push claim date forward. |
| [in] | STRENGTH | Name of variable in INFILE used to identify the claim strength. |
| [in] | GROUPING | Variables in INFILE used to group claims. |
| [in] | SAMEDAY | Specify how the final RxSup and RxAmt values will be determined in INFILE. |
| [in] | SUPRANGE | Range of RxSup values that are allowed in INFILE. |
| [in] | AMTRANGE | Range of RxAmt values that are allowed in INFILE. |
| [in] | ID | Variables from INFILE to keep that are not listed in the GROUPING parameter. |
| [out] | OUTFILE | Output file with stockpiled claims. |
| [out] | OUTFILEEXCL | Output file with excluded claims information. |
None.