A.3 ADaM Programming Section

ADaM.ADSL

/*Begin writing SAS program sdtm.dm.sas*/

/*Demographic Variables*/

data dm1;

   set sdtm.dm;

   length AETHNIC $40.;

   if missing(ETHNIC) then AETHNIC = "NOT COLLECTED";

   else AETHNIC = ETHNIC;

   If RACE = "WHITE" then ARACE = "W";

   else if RACE = "BLACK OR AFRICAN AMERICAN" then ARACE = "B";

   else if RACE = "NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDERS" then ARACE = "HP";

   else if RACE = "ASIAN" then ARACE = "A";

   else if RACE = "AMERICAN INDIAN OR ALASKA AMERICAN" then ARACE = "AA";

/*Derive TRTSDT, TRTSTM, TRTEDT, TRTETM */

  TRTSDT = input(substr(RFSTDTC,1,10),yymmdd10.);

  TRTSTM = input(substr(RFSTDTC,12),time5.);

  TRTEDT = input(substr(RFENDTC,1,10),yymmdd10.);

  TRTETM = input(substr(RFENDTC, ...

Get An Introduction to Creating Standardized Clinical Trial Data with SAS 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.