Information Technology Reference
In-Depth Information
claIms data
We also have data from a claims dataset to examine repeat procedures for cardiovascular surgery. In this
example, we want to work with dates, costs, and codes to define an episode. We first look at the number
of claims for each patient, and examine the number of days between claims. Clearly, claims that have
the same ICD9 codes and occur within a certain amount of time after an inpatient visit will define follow
up visits for that inpatient episode. We use the following code:
Proc sort data=sasuser.claims;
By identifier date;
Run;
Data sasuser.countbyday;
Set sasuser.claims;
By identifier;
If first.identifier then numdays=1;
Else numdays+1;
Run;
Then we define a variable as the difference in time between claims by using the following code:
Data sasuser.differencebyclaims;
Set sasuser.countbyday;
By identifier date;
Differenceindays=dif(date);
If first.identifier then differenceindays=0;
Run;
If the difference in days is zero, then the claim is related to the first day of treatment for the patient;
otherwise, it is the difference in days from the time of the specific treatment claim to the time of the first
day of treatment. We next filter the patients who have just one date of treatment, and the patients who
have multiple dates of treatment.
Data sasuser.onetreatment;
Set sasuser.differencebyclaims;
By identifier date;
If (last.identifier and numdays=1);
Run;
For multiple treatments:
Data sasuser.multipletreatments;
Set sasuser.differencebyclaims;
By identifier date;
Search WWH ::




Custom Search