I've been away from statalist for a while. Hope you don't mind if I
return with a question.
I am trying to assess trends in the inpatient workload for our residency
physicians. I have a dataset covering about 3 years, with each record
representing one admission, and consisting of two variables: admitdate
and dischargedata. Calculating length of stay (los) is trivial.
What I really want to know is how many inpatients the physician saw on
each day of that 3 year period. (Every patient is seen each day they
are in the hospital.) Then I can see if the daily workload is rising,
falling, or whatever.
Any suggestions how to do this? The only vague plan I have thought up
so far would involve some sort of programming with foreach. Foreach
record, and then foreach day between that records's admitdate and
dischargedate, create a new record, with a single variable, countdate,
containing a date.
For example, a guy who is admitted on 1Jan2005 and discharcharged on
3Jan2005 would produce three new records:
I could then tabulate countdate, or collapse, or something like that to
create a new dataset looking like this:
DATE COUNT
1Jan2005 3
etc.
Am I on the right track? Is there an easier way to do this?
Thanks.
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
and Wilson Family Practice Residency, Johnson City, NY
cryanatbinghamtondotedu
GnuPG and PGP public keys available at http://pgp.mit.edu
"If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea." [Antoine de St. Exupery]