Thanks,
Charles
Eventually, you may come to questions of whether there are
two or more tests of one kind within a narrow time from - Do
two tests match the same XX test, before and after?
But for starters, you could use LAG to create a file that
has all three tests in each record.
Start with a sorted file, by ID and date/time.
On a "new ID", create LastHTC, LastSER, LastPOC.
Set one of them to its current-record value and the other
two to Missing, along with the Times.
On each latter record for the same ID, pick up LastXX
and its time.
Then shorten the file dramatically by dropping every
record that does not have 3 times. And drop every
record where the times are not within 30 minutes (3 tests).
Then there may be a problem of partial duplicates -- I would
consider it necessary to know about it, whether it is considered
a problem or not.
If tests are not taken around midnight (to be checked), it
would be safe to look for whether aggregation ever finds
two records with the same ID and Date (Day only).
What to do in cases of duplication depends on how often it
happens and what the designn protocol said (or what someone
decides it needs to say now).
--
Rich Ulrich
Rich
Thanks for the suggestion, i'll start with the LAG and go from there.
Thanks,
Charles