This macro uses data from the SDD to recode non-inpatient encounters to inpatient if they were determined to have occurred during an inpatient stay.
More...
This macro uses data from the SDD to recode non-inpatient encounters to inpatient if they were determined to have occurred during an inpatient stay.
- Extract IP encounters (occuring after &mindate. when specified)
- Remove encounter ids to delete if required
- Collapse IP encounters into IP episodes to reduce number of observations involved in joining datasets.
- For each record in INFILE within an inpatient stay, recode encounter type as inpatient if not already coded as such.
- Program inputs
- &ENCOUNTERINFILE. (Dataset with encounter data.)
- &INFILE. (Dataset with diagnosis/procedure claims data.)
- Program outputs
- &OUTFILE. (Dataset with reclassified claims.)
Usage
%ms_envelope(INFILE=worktemp.meds,
ENCOUNTERINFILE=indata.&ENCTABLE.,
MINDATE=&studystartdate,
OUTFILE=worktemp.meds);
- Parameters
-
[in] | INFILE | Name of SAS dataset with diagnosis and/or procedure claims data.
|
[in] | ENCOUNTERINFILE | Name of SAS dataset with encounter data. |
[in] | MINDATE | Extract all claims occuring on or after this date. |
[out] | OUTFILE | Name of output file with reclassified claims. |
SAS Macros Dependencies
- Note
- This operation is done without using the ENCOUNTERID variable, as this variable can be inconsistent across data partner datasets.
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)