This macro pre extracts raw claims (diagnosis, dispensing, procedure) based solely on code/codetype match. More...
This macro pre extracts raw claims (diagnosis, dispensing, procedure) based solely on code/codetype match.
This macro supports both initial claim extraction (useful to use as a pre-extraction to avoid claim duplication) and subsequent extraction when the same claim can be associated with >1 row in the lookup file.
Usage
%ms_extractmeds(DATAFILE=indata.&proctable.,
DATACODE=PX,
DATACODETYPE=PX_codetype,
LOOKFILE=_proc,
LOOKNODUPVARS=code codetype,
WHERECLAUSE=adate>='01Jan2020'd,
OUTFILE=worktemp._procextract(keep=PatID ADate EncType PX PX_CodeType));
| [in] | DATAFILE | Name of the dataset to extract records from. |
| [in] | DATACODE | Name of the variable containing the codes. |
| [in] | DATACODETYPE | Name of the variable containing the CodeType. |
| [in] | LOOKFILE | Name of the sas dataset containing the list of codes to extract. The name of the variable containing the codes must be called "code" and the one containing the codetype must be called "codetype". |
| [in] | LOOKNODUPVARS | To define variables to dedup lookfile by. Default variables are key variables code and codetype |
| [in] | WHERECLAUSE | Optional restriction to apply to DATAFILE |
| [out] | OUTFILE | Name of the output dataset containing the extracted records. |