Discover More Tips and Techniques on This Blog

Showing posts with label RFSTDTC. Show all posts
Showing posts with label RFSTDTC. Show all posts
Understanding RFXSTDTC and RFSTDTC in the Demographics (DM) Domain

Understanding RFXSTDTC and RFSTDTC in the Demographics (DM) Domain

Introduction

In the context of clinical trials, accurately capturing key dates related to subject participation is critical for understanding the timeline of the study. The SDTM (Study Data Tabulation Model) Demographics (DM) domain includes several variables that record these key dates, two of the most important being RFXSTDTC and RFSTDTC. Although they may seem similar, these variables have distinct meanings and uses. This article explains the difference between RFXSTDTC and RFSTDTC, with detailed examples to illustrate their appropriate use.

Definitions

RFSTDTC (Reference Start Date/Time of Study Participation)

RFSTDTC refers to the date and time when the subject officially started participating in the study. This is usually the date of randomization, the first study-specific procedure, or the date when the subject provided informed consent, depending on the study design.

RFXSTDTC (Date/Time of First Study Treatment)

RFXSTDTC captures the date and time when the subject received their first dose of the study treatment. This date is specifically linked to the intervention being tested in the study and marks the beginning of the subject’s exposure to the treatment.

Detailed Example

Let’s consider a clinical trial where subjects are required to give informed consent, undergo randomization, and then receive the study treatment. The timeline for each subject might look like this:

Subject ID Informed Consent Date Randomization Date First Study Drug Dose Date RFSTDTC RFXSTDTC
001 2024-01-01 2024-01-05 2024-01-10 2024-01-05 2024-01-10
002 2024-01-02 2024-01-06 2024-01-08 2024-01-06 2024-01-08
003 2024-01-03 2024-01-07 2024-01-12 2024-01-07 2024-01-12

Explanation

  • Subject 001:
    • RFSTDTC = 2024-01-05: This date represents when the subject was randomized, marking the official start of their participation in the study.
    • RFXSTDTC = 2024-01-10: This date indicates when the subject received their first dose of the study drug.
  • Subject 002:
    • RFSTDTC = 2024-01-06: The date of randomization, indicating the start of study participation.
    • RFXSTDTC = 2024-01-08: The date when the subject first received the study drug.
  • Subject 003:
    • RFSTDTC = 2024-01-07: The randomization date, marking the start of the subject’s participation.
    • RFXSTDTC = 2024-01-12: The date when the subject received the first dose of the study drug.

Key Differences

The key difference between RFSTDTC and RFXSTDTC lies in what they represent:

  • RFSTDTC is focused on the start of the subject’s participation in the study, often marked by randomization or the first study-specific procedure.
  • RFXSTDTC specifically tracks when the subject first receives the study treatment, marking the start of their exposure to the intervention being tested.

Why This Distinction Matters

Accurately capturing these dates is crucial for the integrity of the study data. The distinction between RFSTDTC and RFXSTDTC helps in:

  • Analyzing Study Timelines: Researchers can distinguish between when a subject officially became part of the study and when they actually started receiving treatment.
  • Regulatory Compliance: Accurate records of participation and treatment initiation are critical for meeting regulatory requirements and ensuring the study's validity.
  • Study Integrity: Differentiating between these dates allows for precise tracking of subject progress and adherence to the study protocol.

Conclusion

Understanding the difference between RFSTDTC and RFXSTDTC is essential for correctly managing and analyzing clinical trial data. While both variables are related to key dates in a subject’s journey through the trial, they capture different aspects of participation and treatment. Proper use of these variables ensures that the study’s timeline is accurately documented, contributing to the overall integrity and reliability of the clinical trial data.

If you have any further questions or need additional examples, feel free to ask!

Studyday calculation ( --DY Variable in SDTM)




USE OF THE “STUDY DAY” VARIABLES

The permissible Study Day variables (--DY, --STDY, and --ENDY) describe the relative day of the observation starting with the reference date as Day 1. They are determined by comparing the date portion of the respective date/time variables (--DTC, --STDTC, and --ENDTC) to the date portion of the Subject Reference Start Date (RFSTDTC from the Demographics domain).

The Subject Reference Start Date (RFSTDTC) is designated as Study Day 1. The Study Day value is incremented by 1 for each date following RFSTDTC. Dates prior to RFSTDTC are decremented by 1, with the date preceding RFSTDTC designated as Study Day -1 (there is no Study Day 0). This algorithm for determining Study Day is consistent with how people typically describe sequential days relative to a fixed reference point, but creates problems if used for mathematical calculations because it does not allow for a Day 0. As such, Study Day is not suited for use in subsequent numerical computations, such as calculating duration. The raw date values should be used rather than Study Day in those calculations.

Reference: Study Data Tabulation Model Implementation Guide v3.1.2 (Page No 40).

You will find that  you need to create --DY and or --STDY /--ENDY varianles in almost all the SDTM domains. Because the process of the derivation is same, it makes sense to create a macro code and use it across all the domains...

/****************************************************************

*Study Number              :ABCD_0123
*Sponsor Protocol Number   : ABC1004
*Program Name              : studyday.sas
*Program Location          : X:\PROJECT\DEPT\ABC1004\Progs\macros
*Description               : StudyDAY Macro 
*Program Author            : Sarath Annapareddy
*Creation Date             : 13-Jul-2012
*Macro Parameters: 
  rfdate: --DTC variable used to calculate  Study day variable.
  var   : --DTC variable used to calculate the  Study day  to.
  dy    : Prefix of the Study day variable
 dsn    : Dataset in which the --DTC variable used to calculate the  Study day  to exists.

*Notes: Macro must be used outside the datastep.

****************************************************************;
/*************            Setup Section            ************/
/**************************************************************/




%macro make_studyday(dsn,var,dy,rfdate);

*Getting the Baseline or Reference start date from DM dataset;
proc sort data=interim.dm out=dm(keep=usubjid rfstdtc);  
by usubjid;
run;

proc sort data=&dsn;
      by usubjid;
run;

data &dsn;
        merge &dsn (in=a) dm;
    by usubjid;
    if a;
/*Numeric date variable;*/
       &rfdate._n=input(substr(&rfdate,1,10),anydtdte10.);
       &var._n=input(substr(&var,1,10),anydtdte10.);

/*Study day derivation;*/
if nmiss(&var._n,&rfdate._n)=0 then &dy=&var._n-&rfdate._n+(&var._n>=&rfdate._n); 
run;
%mend;



A sample macro call of this SAS macro for the Adverse Events (AE) domain might look like this:

%make_studyday(ae,aestdtc,aestdy,rfstdtc);
%make_studyday(ae,aeendtc,aeendy,rfstdtc);
%make_Gstudyday(ae,aedtc,aedy,rfstdtc);





For pre-dose:
         studyday= the event/visit date – first dose date
For post-dose:
           studyday= the event/visit date – first dose date + 1







Disclosure:

In the spirit of transparency and innovation, I want to share that some of the content on this blog is generated with the assistance of ChatGPT, an AI language model developed by OpenAI. While I use this tool to help brainstorm ideas and draft content, every post is carefully reviewed, edited, and personalized by me to ensure it aligns with my voice, values, and the needs of my readers. My goal is to provide you with accurate, valuable, and engaging content, and I believe that using AI as a creative aid helps achieve that. If you have any questions or feedback about this approach, feel free to reach out. Your trust and satisfaction are my top priorities.