Counting Readmissions in SQL
I am trying to count the patient readmissions in my set of data but have
to do so using SQL. I am having trouble and hoped someone could point me
in the right direction. My data appears like so
ID FirstDateofService LastDateofService PerformingProvider
etc.(more irrelevant rows)
2202 2012-09-18 2012-09-21 St. Luke's
2202 2012-09-29 2012-10-04 St. Luke's
4280 2012-09-19 2012-09-20 Seton
4280 2012-09-19 2012-10-18 Seton
4280 2012-09-21 2012-10-09 Seton
4280 2012-10-10 2012-10-17 Seton
8980 2013-06-20 2013-06-24 Denton Regional
8980 2013-07-06 2013-07-06 Denton Regional
And the data goes on and on. I am trying to write a query to count the
number of re-admissions (would like to do it per ID) where a re-admission
is constituted by being admitted after 30 days or less from being released
from the same hospital. I have tried many ways but cannot come up with
accurate results. Any suggestions would be appreciated. Thank you.
No comments:
Post a Comment