myCSG © |Area: SDTM| Concept: DM : Demographics | Lesson: LCSG001 : Demographics dataset programming |




Lesson description will be added soon
variable_namevariable_labelderivation
STUDYID Study Identifier Equals to the value from raw.demog.STUDY
DOMAIN Domain Abbreviation Assign as 'DM'
USUBJID Unique Subject Identifier Derive by concatenating raw.demog.STUDY and raw.demog.PT variable values, separated with a hyphen in between.
SUBJID Subject Identifier for the Study Equals to the value from raw.demog.PT
RFSTDTC Subject Reference Start Date/Time For the subjects with non-missing sdtm.dm.RFXSTDTC, Equals to the date component of sdtm.dm.RFXSTDTC. Else if a subject is randomized, then assign the value of raw.enrlment.RANDDT_RAW after converting to ISO 8601 format. Else assign the value of sdtm.dm.RFICDTC
RFENDTC Subject Reference End Date/Time Derive the date value in ISO 8601 format by obtaining the value from raw.eos.EOSTDT_RAW where raw.eos.EOSCAT="End of Study"
RFXSTDTC Date/Time of First Study Treatment Derive the datetime value in ISO 8601 format by obtaining the earliest non-missing raw.ipadmin.IPSTDT_RAW and raw.ipadmin.IPSTTM_RAW for each subject where raw.ipadmin.IPQTY_RAW is greater than 0.
RFXENDTC Date/Time of Last Study Treatment Derive the datetime value in ISO 8601 format by obtaining the latest non-missing raw.ipadmin.IPSTDT_RAW and raw.ipadmin.IPSTTM_RAW for each subject where raw.ipadmin.IPQTY_RAW is greater than 0.
RFICDTC Date/Time of Informed Consent Derive the date value in ISO 8601 format by obtaining the value from raw.enrlment.ICDT_RAW.
RFPENDTC Date/Time of End of Participation Derive the date value in ISO 8601 format by obtaining the latest date value from all raw datasets. Date variables in a dataset can be identified with the suffix of 'DT_RAW'.
DTHDTC Date/Time of Death Derive the date value in ISO 8601 format by obtaining the value from raw.eos.EOSDT_RAW where raw.eos.EOSCAT="End of Study" and raw.eos.EOSTERM="Death"
DTHFL Subject Death Flag Assign as "Y" on the records where sdtm.dm.DTHDTC is not null.
SITEID Study Site Identifier Equals to the first 2 characters from raw.demog.PT
AGE Age Equals to the value from raw.demog.AGE_RAW
AGEU Age Units Equals to the value from raw.demog.AGE_RAWU
SEX Sex Equals to the value from raw.demog.SEX after converting to standard controlled terminology.
RACE Race Derive sdtm.dm.RACE based on the values from raw.demog.RACE, raw.demog.RACE2, raw.demog.RACE3 and raw.demog.RACE4.
If more than one of the above 4 variables is populated then assign a value of 'MULTIPLE', else assign the value from the populated variable after converting to standard controlled terminology.
ETHNIC Ethnicity Equals to the value from raw.demog.ETHNIC after converting to standard controlled terminology.
ARMCD Planned Arm Code Derive sdtm.dm.ARMCD based on the information present in raw.enrlment and raw.rand datasets.
Part A)
1) Fetch the randomization number for each subject from raw.enrlment.RANDNO.
2) Fetch the raw.rand.TX_CD as ARMCD by joining the datasets based on RANDNO and raw.rand.RAND_ID.
Part B)
For the subjects with raw.enrlment.ICDT_RAW not null and raw.enrlment.ENRLDT_RAW is null, assign as 'SCRNFAIL'.
Part C)
For the subjects with raw.enrlment.ENRLDT_RAW not null and raw.enrlment.RANDDT_RAW is null, assign as 'NOTASSGN'.
ARM Description of Planned Arm Assign as 'Active' when sdtm.dm.ARMCD is equal to 'ACTIVE'.
Else assign as 'Placebo' when sdtm.dm.ARMCD is equal to 'PBO'.
Else assign as 'Screen Failure' when sdtm.dm.ARMCD="SCRNFAIL".
Else assign as 'Not Assigned' when sdtm.dm.ARMCD="NOTASSGN"
ACTARMCD Actual Arm Code Derive sdtm.dm.ACTARMCD based on the information present in raw.ipadmin and raw.box datasets.
Part A)
1) Fetch the raw.ipadmin.IPBOXID from the earliest record with non-missing IPQTY_RAW for each subject.
2) Fetch the raw.box.CONTENT as ACTARMCD by joining the datasets based on IPBOXID and raw.box.KITID.
Part B)
For subjects with sdtm.dm.ARMCD in ("SCRNFAIL" "NOTASSGN") assign the value of sdtm.dm.ARMCD.
Part C)
For the subjects with raw.rand.RANDDT_RAW not null and sdtm.dm.RFXSTDTC is null, assign as 'NOTTRT'.
ACTARM Description of Actual Arm Assign as 'Active' when sdtm.dm.ACTARMCD is equal to 'ACTIVE'.
Else assign as 'Placebo' when sdtm.dm.ACTARMCD is equal to 'PBO'.
Else assign as 'Screen Failure' when sdtm.dm.ACTARMCD="SCRNFAIL".
Else assign as 'Not Assigned' when sdtm.dm.ACTARMCD="NOTASSGN".
Else assign as 'Not Treated' when sdtm.dm.ACTARMCD="NOTTRT".
COUNTRY Country Equals to the value from raw.demog.COUNTRY
RACE1 Race 1 Equals to the value from raw.demog.RACE when sdtm.dm.RACE is 'MULTIPLE' after converting to standard controlled terminology.
RACE2 Race 2 Equals to the value from raw.demog.RACE2 when sdtm.dm.RACE is 'MULTIPLE' after converting to standard controlled terminology.
RACE3 Race 3 Equals to the value from raw.demog.RACE3 when sdtm.dm.RACE is 'MULTIPLE' after converting to standard controlled terminology.
RACE4 Race 4 Equals to the value from raw.demog.RACE4 when sdtm.dm.RACE is 'MULTIPLE' after converting to standard controlled terminology.
RACESP Race Other Specify Equals to the value form raw.demog.RACESP.
Complete SAS code to generate the output is available for registered users!

Already registered! Login
Not registered, you can signup here! Signup

Dont want to register?
You can directly purchase this lesson (code+input data) here


You can purchase this lesson (code+input data) here

If you are looking to purchase subscription for full access to data and programs for all lessons (TASKS+SDTM+ADaM+TFLs), you can send us a message on +91-7330--77--66--49-- on Whatsapp.
R data is available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data
R codes are available only for R subscribers.
You can contact us on +91-7330--77--66---49 for purchasing subscription to R programs and data