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

  1. read sdtm.LB
  2. Extract chemistry + hematology info
  3. Merge with ADSL for demographic characteristics 
  4. Key Variable derivations

key variable:
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;


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';

data baseMergeB;
merge base(in=in1) lab(in=in2);
by SUBJID paramn;

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.



Sample Dummy ADLB dataset:


Note: There are many other variables in ADLB dataset, i just selected a couple of important variables as an example.

Happy SAS Coding!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social media & sharing icons powered by UltimatelySocial
%d bloggers like this: