More Complicated Multi-File Rules

Let’s start the discussion of more complicated multi-file rules by redoing the example from Chapter 6. To review, there are two files: AE, which recorded adverse events for patients in the study, and LAB_TEST, which contained the laboratory tests for people with various adverse events (see the Appendix for the programs to create these data sets). The goal is to list any patient who had an adverse event of ‘X’ anywhere in the adverse event data set who either did not have any entry in the laboratory data set or where the date of the lab test was before the date of the adverse event. The following SQL query will produce the same information as the DATA step solution shown in Chapter 6 in Program 6-8.

Program 8-13. ...

Get Cody’s Data Cleaning Techniques Using SAS® Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.