I have a hospital application where I want to report on demographics of residents (male, female, black, white, etc), the average daily population of the facility, and the average length of stay. I have a person table with the demographics and a movement table which gives me the dates and times of entry and release. Can I construct a sql statement that would give me the stats for a particular date or date range? I can do something like this with an employee application because you have few employees that work only a part of a day where in the hospital you will have numerous patients who are only in the facility for a few hours. <br>
<br>
In the past we used to take a "snapshot" of the facility population at the same time every day and store this in a stats table then report off of that. Of course this is not very accurate and your results depend on the time of day the snapshot is taken. <br>
<br>
Any suggestions on the appropriate way to handle this problem would be appreciated. Can I do it in sql or do I need to maintain the snapshot process? <br>
<br>
Im working with an Oracle8 database.<br>
<br>
any information would be appreciated<br>
<br>
<br>
<br>
<br>
In the past we used to take a "snapshot" of the facility population at the same time every day and store this in a stats table then report off of that. Of course this is not very accurate and your results depend on the time of day the snapshot is taken. <br>
<br>
Any suggestions on the appropriate way to handle this problem would be appreciated. Can I do it in sql or do I need to maintain the snapshot process? <br>
<br>
Im working with an Oracle8 database.<br>
<br>
any information would be appreciated<br>
<br>
<br>
<br>