A Python-based analysis of adverse event data from a simulated Phase II cardiovascular clinical trial, structured according to CDISC SDTM standards. This project demonstrates the application of CRA domain knowledge to automate data quality checks, classify AE severity, and flag patients requiring clinical review.
Generated with Python (Matplotlib) · Data structured per CDISC SDTM AESEV variable
# AE Analysis — CARDIO-2024 Clinical Trial # Author: Judith Lavric | CRA & Clinical Data Specialist # Tools: Python · Pandas · Matplotlib · CDISC SDTM import pandas as pd import matplotlib.pyplot as plt # Load CDISC SDTM-structured dataset df = pd.read_csv("ae_dataset.csv") print("=== CARDIO-2024 STUDY - AE REPORT ===") print("Total AEs:", len(df)) # AE severity distribution print("=== AEs BY SEVERITY ===") print(df["AESEV"].value_counts()) # Flag serious adverse events (AESER == "Y") serious = df[df["AESER"] == "Y"] print(serious[["USUBJID", "AETERM", "AESEV"]]) # Identify patients with >2 AEs — flag for clinical review ae_count = df.groupby("USUBJID").size() for patient, count in ae_count.items(): if count > 2: print("ACHTUNG:", patient, "hat", count, "AEs - Review needed!") # Generate severity distribution chart severity = df["AESEV"].value_counts() plt.figure(figsize=(8,5)) plt.bar(severity.index, severity.values, color=["#94d2bd", "#0a9396", "#0d1b2a"]) plt.title("AE Severity Distribution - CARDIO-2024") plt.savefig("ae_chart.png")