I would like to calculate the interval between hospitalizations for unique individuals. My data is set up as follows:
pat_id admit_dt disch_dt order
1 5/6/2002 5/9/2002 1
1 7/1/2002 7/7/2002 2
2 3/21/2002 3/31/2002 1
2 4/9/2002 4/12/2002 2
3 10/16/2002 10/25/2002 1
4 11/1/2002 11/4/2002 1
4 12/15/2002 12/23/2002 2
:
:
The field pat_id represents unique individuals. I successfully ranked admissions using by pat_id: egen order = rank(disch_dt) but now want to calculate the day interval between admissions for each pat_id (admit_dt [visit 2] - disch_dt [visit 1]).
First hospitalizations will have no interval and cases where there is only a single admission like pat_id #3 will also have no interval because they had no readmission.
I am sure this is an easy fix but am stumped. Any help is greatly appreciated.
Eric D. Hixson, MBA, PhD-Cand
Manager, Measurement Services
The Quality Institute
Cleveland Clinic Health System
9500 Euclid Ave. Area W-15
Cleveland, OH 44195
Phone: (216) 445-0083
Fax: (216) 445-0082
Email: [email protected]
------------------------------------------------------------------------------
Confidentiality Note: This message is intended for use only by the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. Thank you.
==============================================================================
*
* 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/