More Complicated Multi-File Rules

Every data collection project will have its own set of rules. The programs in this section are intended to demonstrate techniques rather than be exact models for multiple file data validation rules.

In this first example, you want to be sure an observation has been added to the laboratory test data set (LAB_TEST) if there was an adverse event of ’X’ entered for any patient ID in the adverse event data set (AE). The AE and the LAB_TEST data sets can be created by running the programs given in the Appendix.

Here are the listings of the AE and LAB_TEST data sets.

Listing of Data Set AE PATNO DATE_AE A_EVENT 001 11/21/1998 W 001 12/13/1998 Y 003 11/18/1998 X 004 09/18/1998 O 004 09/19/1998 P 011 10/10/1998 X 013 ...

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.