universalmemberid goes instead of the memberid. The entire year (2013) with only one gap of 45 days is required for continuous enrollment.
I had to change to universalmemberid, because some members have more than one member id and that is the overlapping you are seeing.
GK53,
The following cases are not being picked up and they should be picked up. You see that universalmemberid 78901ROBERTJOHNSON has overlapping dates but they are within 1/1/2013 and 12/31/2199, which in this case is correct:
UNIVERSALMEMBERID ENROLLMENT TERMINATION
12345LARRYSMITH...
Did you see my comment on using universalmemberid instead of the memberid and how some of the dates overlap?
I will test the above with the real data and get back to you asap.
Thank you so much for your help, GK53! [glasses]
ok, I see what the problem is now.
Because I had to change from using member id to use universal memberid which can have people with different member ids, there are overlapps on the dates like this:
memberid universalmemberid enrollment termination
1111 1111SMITHJOHN 9/13/2011...
hi again gk53!
I tested with the real data and there is an issue when the termination date is '12/31/2199', it picks it up regardless of the enrollment date being in 2013.
UNIVERSALMEMBERID ENROLLMENTDATE TERMINATIONDATE
7777 12/19/2011 10/31/2012
7777 1/1/2014...
Hi gk53!
Great explanation!!!! :-)
Now if I were to load this onto a temp table, where in your query do I put it?
Again this is great thank you so much for your time and help!!![glasses]
Tammy
Hi gk53!
I'm currently testing it with the actual data to see if it gives me all I need. With the test data it works great.
Can you please explain what each SELECT part is doing? I'm confused :-(
Thank you so much for your help [bigsmile] !!!!
Tammy
Hi gk53!
Thank you for that, but there is still something not quite right.
The result I get back is:
Memberid
2222
3333
The member 2222 shouldn't be included since he/she has more than a 45 days between the terminationdate '4/30/2013' and the next enrollmentdate of '8/1/2013'.
2222 ...
Hi Tamar!
I wish it was as easy as remove all the outliers that do not belong to 2013. Unfortunately, with the data I have I cannot do that.
e.g 3333 | 7/1/2010 | 12/31/2199
This member should be included since it has been enrolled since 7/1/2010 and it's still current throughout 2013...
Hi!
Thank you in advanced for helping me.
I have been searching and tried a few examples but none gave me what I am looking for.
I have the following scenario:
Memberid | enrollment date | termination date
1111 | 9/1/2009 | 9/7/2009
1111 | 9/8/2009...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.