Free Sample Clinical Data Management Project Case Study: Clinical Trial Safety Data Analysis Using Base SAS & Advanced SAS  Industry: Pharmaceuticals & Life Sciences
  • by Handson
  • November 6, 2025
Free Sample Clinical Data Management Project Case Study: Clinical Trial Safety Data Analysis Using Base SAS & Advanced SAS Industry: Pharmaceuticals & Life Sciences

 

Industry: Pharmaceuticals & Life Sciences
Domain: Clinical Data Management (CDM) & Clinical SAS Programming
Tools Used: Base SAS, SAS SQL, SAS Macros (Advanced SAS), PROC FREQ, PROC MEANS, PROC REPORT
Skill Level: Beginner to Intermediate Clinical SAS Analyst


Introduction

Clinical Data Management ensures that clinical trial data is accurate, consistent, validated, and audit-ready. SAS is widely used due to its reliability and regulatory acceptance by US FDA, EMA, CDSCO.

This project demonstrates how Base SAS and Advanced SAS are used to prepare and analyze clinical trial safety data.


Project Scenario

A Phase III clinical trial is being conducted for a new Type 2 Diabetes drug. Patients are monitored for adverse events, vital signs, lab results, and treatment effects.

You will clean, validate, analyze, and summarize patient safety data.


Project Objective

  • Standardize patient-level datasets

  • Identify missing and inconsistent data

  • Summarize adverse events by treatment group

  • Generate safety listings and summaries for CSR


Datasets Used

Dataset Purpose Key Variables
DM Demographics Subject_ID, Age, Sex, Treatment
AE Adverse Events AE_Term, Severity, Outcome, Dates
VS Vital Signs BP, Heart Rate, BMI
LB Lab Values Blood Glucose, Hemoglobin

SAS Workflow Summary

Step 1: Import Raw Data

proc import datafile="/path/AE.csv" out=AE_raw dbms=csv replace;
  guessingrows=max;
run;

Step 2: Clean and Standardize

data AE_clean;
  set AE_raw;
  Subject_ID = strip(upcase(Subject_ID));
  AE_Severity = propcase(AE_Severity);
  if AE_Severity="" then AE_Severity="Not Reported";
run;

Step 3: Validate Data

proc freq data=AE_clean;
  tables AE_Severity AE_Outcome / missing;
run;

Step 4: Summarize Adverse Events

proc sql;
  select Treatment_Group, AE_Severity, count(*) as Event_Count
  from AE_clean
  group by Treatment_Group, AE_Severity;
quit;

Step 5: Safety Summary Report

proc report data=AE_clean nowd;
  columns Subject_ID Treatment_Group AE_Term AE_Severity AE_Outcome;
run;

Step 6: Automate with Macro

%macro AE_summary(dataset);
  proc freq data=&dataset.;
    tables AE_Severity*Treatment_Group / nocol norow;
  run;
%mend;
%AE_summary(AE_clean);

 

This project reflects real CDM workflows used in Pharma & CRO environments and develops both Base SAS and Advanced SAS programming skills.