I ran it, i still have same day records
please see table below, here only patient id 4, these two records are what i need, because these two visists are on two different dates, for id2 , because they have same icd code, same date, same patient id, i need to remove
by looking at the data, i notice, i also need to remove id 3, the billing date is 2 day difference, id5, one day difference, it might still be about the same visit, this is NOT i am interested in, so i need to remove those records with same id, same icd, same date or two billing date difference less than one week
thanks.
id
icd
freq
amount
billingdate
2
v234
2
78.91
1/1/2015
2
v234
2
96.05
1/1/2015
3
v44
2
43.74
2/3/2015
3
v44
2
22.04
2/5/2015
4
e34
2
52.26
3/6/2015
4
e34
2
11.27
9/5/2015
5
j23
2
379.08
4/1/2015
5
j23
2
217.12
4/2/2015
... View more