Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: counting patient-days


From   "Christopher W. Ryan" <[email protected]>
To   [email protected]
Subject   st: counting patient-days
Date   Wed, 20 Jul 2005 09:15:14 -0400

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:

countdate
newrecord1 1Jan2005
newrecord2 2Jan2005
newrecord3 3Jan2005

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]

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index