Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: identifying re-operations from a list of operation codes and dates


From   Stephen Martin <stephen.martin@york.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: identifying re-operations from a list of operation codes and dates
Date   Fri, 6 Jul 2012 15:22:45 +0100

I have a dataset for patients admitted to hospital.  Each record includes:

a) a patient identifer;
b) 24 four digit operation procedure variables (oper_1 - oper_24;
these are four digit strings such as A148, C169, etc); and
c) 24 date of operation variables (operdate_1 - operdate24).

Many of the operation procedure code and date variables are empty.
The operation procedure code variables are not necessarily in date
order.

I have a list (list A) of, say, 20 four digit operation codes that can
identify whether a patient received an operation for the condition in
which I am interested.

I also have a list (list B) of, say, 35 re-operation codes.

I would like to identify those patients who had both the operation and
the re-operation.

However, I cannot solely use lists A and B because some of the same
codes appear in both lists, and a re-operation must occur at least one
day later than the initial operation.

Thus I would like to identify patients who:
(a) have an operation code from list A
and
(b) have an re-operation code from list B
and
(c) where the date of the re-operation is later than the initial operation.

Suggestions on how to do this would be very welcome!

Steve
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index