Your sample data does not show it, but can an ID have more than one
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Richard Van Dorn
Sent: Wednesday, July 30, 2008 7:33 AM
Subject: Help with excluding events between two dates
I have data that look like the following:
ID SERVICE DOS DOA DOD
1 Blood 08FEB1999 . .
1 Blood 09FEB1999 09FEB1999 11FEB1999
1 Blood 10FEB1999 . .
1 Blood 11FEB1999 . .
Service is the service provided, DOS is the date of that service, DOA is
date of admission to the hospital and DOD is the date of discharge from
I need to retain all services that took place out the hospital. For
in the data above, the only outpatient service was a blood draw on
8, 1999. All other blood draws took place in the hospital.