ADaM DAY 2 : ADLB
ADLB stands for Laboratory Test Result Analysis dataset is an important safety dataset, it captured all the Lab test results for each treatment cycle per patient. We can the Lab dataset to visualize the change of lab test results based on the time change for each patient (Spider Plot) or the overall lab-test distribution for the study (e-Dash Plot)
Majority of the Lab info are directly extracted from SDTM.LB, but we do need to derivate Baseline, Baseline Flag, Change and Percent Changes.
Basic Steps to construct ADaM.ADLB dataset
- read sdtm.LB
- Extract chemistry + hematology info
- Merge with ADSL for demographic characteristics
- Key Variable derivations
avalc, aval, param, paramn, paramu, base, pchg,chg, abflf, avisit
PARAM: derived from the variable LBTEST in SDTM.LB
PARAMU: lab test unit derived from LBORRESU
ANRIND (ANRHI, ANRLO): range indicator, derivation rule is differ from each lab test.
if lbtest = 'Total Bilirubin' then do; if . < lbstres <= ANRHI then toxgr_in=0; else if ANRHI < lbstres <= (1.5*ANRHI) then toxgr_in=1; else if ( 1.5*ANRHI) < lbstres <= (3.0*ANRHI) then toxgr_in=2; else if (3.0*ANRHI) < lbstres <= (10.0*ANRHI) then toxgr_in=3; else if lbstres > (10.0*ANRHI) then toxgr_in=4; end;
BASE, ABLFL: Baseline value and baseline flag derivation, last non-missing lab value before or on the non-missing treatment dose day, missing treatment dose day the use randomization date.(rules might vary depends on each study design)
data base; set base; by SUBJID paramn ADT; if last.paramn then do; ABLFL ='Y'; base=aval; end; run; data baseMergeB; merge base(in=in1) lab(in=in2); by SUBJID paramn; run;
AVAL, AVALC: lab values
AVALC =trim(left(put(lbstres, best.))); AVAL =lbstres;
CHG (change from baseline) and PCHG(percent change from baseline) for post-baseline records. set baseline and prior baseline records to be missing.
This info is great for Spider Plots.
CHG=AVAL - BASE; PCHG=chg*100.0/base;
Sample Dummy ADLB dataset:
Note: There are many other variables in ADLB dataset, i just selected a couple of important variables as an example.