CRXI with SQL
I have a report that is grouped by ConsumerID and EpisodeEndDate that shows the number of times a person was discharge within a Fiscal Year and some detail about types and number of services provided. I have a formula for the LOS (length of stay) for each episode of care for each consumer but now I would like to find out the length of time between each episode of care of each consumer. That is the number of days from a discharge to the next admission date.
There will be at least 2 episodes of care for each consumer and maybe more.
The formula to figure the LOS is:
({Episode.end_date}-{Episode.begin_date})
How would I write the formula for the number of days from a discharge to the next admission date?
Thanks in advance for any assistance.
I have a report that is grouped by ConsumerID and EpisodeEndDate that shows the number of times a person was discharge within a Fiscal Year and some detail about types and number of services provided. I have a formula for the LOS (length of stay) for each episode of care for each consumer but now I would like to find out the length of time between each episode of care of each consumer. That is the number of days from a discharge to the next admission date.
There will be at least 2 episodes of care for each consumer and maybe more.
The formula to figure the LOS is:
({Episode.end_date}-{Episode.begin_date})
How would I write the formula for the number of days from a discharge to the next admission date?
Thanks in advance for any assistance.