Posts

Showing posts from 2024

Learn how to view SAS dataset labels without opening the dataset directly in a SAS session. Easy methods and examples included!

Quick Tip: See SAS Dataset Labels Without Opening the Data Quick Tip: See SAS Dataset Labels Without Opening the Data When working with SAS datasets, checking the dataset label without actually opening the data can be very useful. Whether you're debugging or documenting, this small trick can save you time and effort! 1. Use PROC CONTENTS PROC CONTENTS is the most common and straightforward way to view the dataset label. proc contents data=yourlib.yourdataset; run; The dataset label will appear in the output as the field: Data Set Label . 2. Query DICTIONARY.TABLES or SASHELP.VTABLE For a programmatic approach, use the DICTIONARY.TABLES table or SASHELP.VTABLE view to query dataset metadata. Example Using PROC SQL proc sql; select memname, memlabel from dictionary.tables where libname='YOURLIB' and memname='YOURDATASET'; quit; ...

Leveraging a SAS Macro to Generate a Report on Non-Printable Characters in SDTM Datasets

Detecting Non-Printable Characters in SDTM Datasets Using SAS Non-printable characters in datasets can lead to errors and inconsistencies, especially in the highly regulated environment of clinical trials. This blog post demonstrates how to create a SAS program that identifies non-printable characters in all SDTM datasets within a library and generates a comprehensive report. Why Detect Non-Printable Characters? Non-printable characters, such as ASCII values below 32 or above 126, can cause issues during data validation, regulatory submissions, and downstream processing. Detecting them early ensures the quality and compliance of your SDTM datasets. The SAS Program The following SAS program processes all SDTM datasets in a library and generates a combined report of non-printable characters, including: Dataset name : The dataset where the issue exists. V...

SDTM aCRF Annotation Checklist

SDTM aCRF Annotation Checklist SDTM aCRF Annotation Checklist By Sarath Annapareddy Introduction Creating an SDTM Annotated Case Report Form (aCRF) is a critical step in clinical trial data submission. It ensures that data collected in the CRF maps correctly to SDTM domains, adhering to regulatory and CDISC standards. This checklist serves as a guide to creating a high-quality SDTM aCRF ready for regulatory submission. 1. General Formatting Ensure the aCRF uses the latest SDTM IG version relevant to the study. The document should be clean, legible, and free of overlapping annotations. Page numbers in the aCRF should align with the actual CRF pages. Annotations must be in English, clear, and consistently for...

Common P21 SDTM Compliance Issues and How to Resolve Them

Common P21 SDTM Compliance Issues and How to Resolve Them Common P21 SDTM Compliance Issues and How to Resolve Them By Sarath Annapareddy Introduction Pinnacle 21 (P21) is a cornerstone for validating SDTM datasets against CDISC standards. Its checks ensure compliance with regulatory requirements set by the FDA, PMDA, and other authorities. However, resolving the issues flagged by P21 can be challenging, especially for beginners. This post dives into common P21 compliance issues and provides actionable solutions with examples. 1. Missing or Invalid Controlled Terminology Issue: P21 flags variables like LBTESTCD or SEX as non-compliant with CDISC Controlled Terminology (CT). This happens when values in your datasets are o...

Comprehensive QC Checklist for Define.xml and cSDRG: Ensuring Quality and Compliance for FDA and PMDA SDTM Submissions

Define.xml and cSDRG QC Checklist for FDA and PMDA Submissions Comprehensive QC Checklist for Define.xml and cSDRG Ensuring Quality and Compliance for FDA and PMDA SDTM Submissions Introduction The Define.xml and Clinical Study Data Reviewer’s Guide (cSDRG) are critical components of SDTM submissions to regulatory agencies like the FDA and PMDA. These documents help reviewers understand the structure, content, and traceability of the datasets submitted. A robust QC process ensures compliance with agency requirements, minimizes errors, and enhances submission success. This blog outlines a detailed manual QC checklist for both Define.xml and cSDRG, emphasizing key differences between FDA and PMDA requirements. Define.xml QC Checklist 1. Metadata Verification Verify all datas...

Data Quality Checks for SDTM Datasets: FDA vs. PMDA: Understanding Regulatory Requirements for Submission Success

FDA vs PMDA Data Quality Checks Differences in Data Quality Checks Between FDA and PMDA Introduction Submitting SDTM datasets to regulatory authorities like the FDA (U.S. Food and Drug Administration) and PMDA (Japan's Pharmaceuticals and Medical Devices Agency) involves rigorous data quality checks. While both agencies adhere to CDISC standards, their submission guidelines and expectations differ in certain aspects. This blog explores the key differences in data quality checks for FDA and PMDA submissions. Similarities in Data Quality Checks Both FDA and PMDA share several common expectations for SDTM datasets: Adherence to CDISC Standards: Both agencies require compliance with the SDTM Implementation Guide (SDTM-IG). Controlled Terminology (CT): Variables such as AEDECOD and LBTESTCD must align with CDISC CT. Traceability: Ensures that derived datasets and analysis results can be traced back to ...

Advanced SDTM Programming Tips: Streamline Your SDTM Development with Expert Techniques

Advanced SDTM Programming Tips Advanced SDTM Programming Tips Streamline Your SDTM Development with Expert Techniques Tip 1: Automating SUPPQUAL Domain Creation The SUPPQUAL (Supplemental Qualifiers) domain can be automated using SAS macros to handle additional variables in a systematic way. Refer to the macro example provided earlier to simplify your SUPPQUAL generation process. Tip 2: Handling Date Imputation Many SDTM domains require complete dates, but raw data often contains partial or missing dates. Use the following code snippet for date imputation: data imputed_dates; set raw_data; /* Impute missing day to the first day of the month */ if length(strip(date)) = 7 then date = cats(date, '-01'); /* Impute missing...

Advanced SDTM Programming Tips: Automating SUPPQUAL Domain Creation

Advanced SDTM Programming Tip: Automating SUPPQUAL Domain Creation Advanced SDTM Programming Tip: Automating SUPPQUAL Domain Creation Optimize Your SDTM Workflows with Efficient Automation Techniques Introduction to SUPPQUAL Automation The SUPPQUAL (Supplemental Qualifiers) domain is used to store additional information that cannot fit within a standard SDTM domain. Manually creating the SUPPQUAL domain can be time-consuming and error-prone, especially for large datasets. In this article, we’ll explore an advanced tip to automate its creation using SAS macros. Use Case: Adding Supplemental Qualifiers to a Domain Imagine you have an SDTM AE domain (Adverse Events) and need to capture additional details like the investigator’s comments or assessment methods that are not part of the stan...

Hash Objects

Advanced SAS Programming Tip: Using HASH Objects Advanced SAS Programming Tip: Using HASH Objects Unlock the Power of SAS for Efficient Data Manipulation Introduction to HASH Objects In SAS, HASH objects provide an efficient way to perform in-memory data lookups and merge operations, especially when dealing with large datasets. Unlike traditional joins using PROC SQL or the MERGE statement, HASH objects can significantly reduce computational overhead. Use Case: Matching and Merging Large Datasets Suppose you have two datasets: a master dataset containing millions of records and a lookup dataset with unique key-value pairs. The goal is to merge these datasets without compromising performance. Code Example: Using HASH...

Advanced SAS Programming Tip: Mastering Macro Variables

Advanced SAS Programming Tip: Mastering Macro Variables Advanced SAS Programming Tip: Mastering Macro Variables Unleash the power of SAS with this advanced technique. Introduction Macro variables are a powerful tool in SAS that allow you to dynamically generate code. By understanding and effectively using macro variables, you can write more efficient and flexible SAS programs. The Basics of Macro Variables A macro variable is a placeholder that is replaced with its value during macro processing. You define a macro variable using the %LET statement and reference it using the %SYSFUNC or %SYSEVALF functions. Advanced Techniques 1. Conditional Logic You can use the %IF-%THEN-%ELSE statements to create conditional logic within your macro code. This allows you to dynamically generate code based on specific conditions. 2...

CMENRTPT vs CMENRF in SDTM

CMENRTPT vs CMENRF in SDTM Understanding CMENRTPT vs CMENRF in SDTM By Sarath Introduction When working with the Concomitant Medication (CM) domain in SDTM, it's crucial to understand how timing variables like CMENRTPT (End Relative to Reference Time Point) and CMENRF (End Relative to Reference Period) differ and when to use each. What is CMENRTPT? CMENRTPT indicates the relationship between the end of the medication and a specific time point , such as the start of treatment or a significant event (e.g., surgery). Controlled Terminology: BEFORE, AFTER, ONGOING, CONCURRENT Example: If a medication was stopped before surgery, CMENRTPT = "BEFORE" . What is CMENRF? CMENRF describes whether the medication ended ...

Resolving the SAS EG Transcoding Error

Resolving the SAS EG Transcoding Error Addressing the "Character Data Lost During Transcoding" Issue in SAS EG Author: Sarath Date: November 19, 2024 Introduction While working in SAS Enterprise Guide (SAS EG), you may encounter the error: "Some character data was lost during transcoding in the dataset." This issue typically arises when character data contains unsupported characters or is truncated due to insufficient column lengths. In this blog post, we'll explore the root causes and provide step-by-step solutions. Common Causes Unsupported Characters: The data contains special or non-ASCII characters not representable in the session encoding. Truncation: Character variables are too short to store the full data, leading to loss of information. ...

Advanced SAS programming Techniques for SDTM implementation

Advanced SAS Programming Techniques for SDTM Implementation Date: November 3, 2024 In the realm of clinical trials data management, SDTM (Study Data Tabulation Model) implementation requires sophisticated programming techniques to ensure data accuracy and compliance. This article explores advanced SAS programming methods that can streamline SDTM dataset creation and validation. 1. Efficient Variable Derivation Using Hash Objects Hash objects in SAS provide a powerful way to perform quick lookups and merges, especially useful when dealing with large SDTM datasets. data work.ae; if _n_ = 1 then do; declare hash h_dm(dataset: "sdtm.dm"); h_dm.definekey("usubjid"); h_dm.definedata("age", "sex", "race"); h_dm.definedone(); end; set raw.ae; rc = h_dm.find(); /* Continue processing */ run; Pro Tip:  Hash objects remain in memory throughout the DATA step, making them more efficient than tr...

Harnessing the Power of CALL EXECUTE in SAS for Dynamic Code Execution

Harnessing the Power of CALL EXECUTE in SAS for Dynamic Code Execution Harnessing the Power of CALL EXECUTE in SAS for Dynamic Code Execution As SAS programmers, we often encounter situations where we need to execute a certain procedure or set of steps multiple times, typically based on different subsets of data. Manually writing out code for each instance can be time-consuming, but SAS offers a powerful tool to make this process more efficient: CALL EXECUTE . What is CALL EXECUTE? CALL EXECUTE is a SAS routine that allows you to dynamically generate and execute SAS code during a data step’s execution. Instead of hardcoding the logic for every individual case, CALL EXECUTE can generate the code on the fly and execute it as part of the same data step. This technique is invaluable when you have repetitive tasks across different datasets, procedures, or even report generation. Basic Example: Dynamic PROC PRINT Execution Let...

Finding Duplicate Records Across SAS Datasets in an Entire Library

Finding Duplicate Records Across SAS Datasets in an Entire Library Finding Duplicate Records Across SAS Datasets in an Entire Library Author: Sarath Date: October 10, 2024 Introduction In SAS programming, identifying and managing duplicate records within datasets is an essential part of data cleaning and quality control. However, when working with multiple datasets in an entire library, the task of finding duplicates becomes more complex. In this article, we will explore different ways to identify duplicate records in SAS datasets across an entire library using several approaches: PROC SORT , PROC SQL , and DATA STEP . Additionally, we will provide advanced techniques to streamline the process for multiple datasets in a library. Why Identify Duplicates? Duplicate records can cause significant issues in data analysis, leading to inaccurate results, inflated counts, or inco...

Comprehensive Guide to Define.xml Package Generation and QC Process

Comprehensive Guide to Define.xml Package Generation and QC Process Comprehensive Guide to Define.xml Package Generation and QC Process Author: Sarath Date: October 10, 2024 Introduction The Define.xml file, also known as the Case Report Tabulation Data Definition (CRT-DD), is a key component in regulatory submissions for clinical trials. It describes the metadata for the datasets submitted to regulatory agencies such as the FDA and EMA, providing transparency and traceability for clinical trial data. In this post, we’ll explore both the steps involved in generating the Define.xml package and the necessary Quality Control (QC) process to ensure its accuracy and compliance with regulatory requirements. What is Define.xml and Why Is It Important? The Define.xml file serves as the metadata backbone for clinical trial datasets submitted for regulatory review. It describes ...