Hello,
I am trying to calculate a person's total hospital stay but there are multiple encounters (claims) that take place within the same date window.

claim person date1 date2
1 789 2012-02-05 2012-02-08
2 789 2012-02-06 2012-02-07
3 789 2012-02-27 2012-02-29

Person 789 has an encounter that takes place from 2.5.2012 to 2.8.2012 = 4 days. However there is an additional claim that takes place during that time period. I don't want to count Claim 2, as those dates are already captured in Claim 1.

Person 789 has a hospital stay during Claim 3, from 2.27.12 - 2.29.12 = 3 days.

My goal is to calculate a total number of days -- therefore I do not want to count Claim 2 (2 days).

Thanks for any advice.