SDTM Day 1:
SDTM stands for Study Data Tabulation Model.
It is a standard structure for human clinical trial data submitted as a part of CDISC for FDA reviews.
LB: Laboratory Test Results is one of Findings General Observation Classes.
LB includes information such as, Laboratory Test Category(LBCAT), Laboratory Test Code(LBTESTCD), Lab Test Name (LBTEST), Unit, Lab Test Result, VISIT, Laboratory Test Date (LBDTC).
Problem:
How to assign a VISIT to Lab records if the CPEVENT is “Unscheduled” ?
CPEVENT | VISIT | LBDTC | USUBJID |
---|---|---|---|
FUP 1 | Follow-up 1 | 2103-11-27 | TF-001 |
FUP14_33D | Follow-up 14_33D | 2013-11-28 | TF-001 |
UNSCHEDULED | 2013-10-31 | TF-001 | |
SCREENING | SCREENING | 2012-04-30 | TF-002 |
Solution:
For the unscheduled visits, we merge with SV (Subject Visits) by Unique Subject ID(USUBJID) and Laboratory Test Date(LBDTC).

PublicDomainPictures / Pixabay
Code:
proc sql; create table lb99_ as select a.*, b.visitnum , b.visit from lb99 as a left join sv99 as b on a.usubjid = b.usubjid and b.svstdtc <= a.lbdtc <= b.svendtc; quit;
Output:
CPEVENT | VISIT | LBDTC | USUBJID |
---|---|---|---|
FUP 1 | Follow-up 1 | 2103-11-27 | TF-001 |
FUP14_33D | Follow-up 14_33D | 2013-11-28 | TF-001 |
UNSCHEDULED | Unscheduled Visit 31 | 2013-10-31 | TF-001 |
SCREENING | SCREENING | 2012-04-30 | TF-002 |
Additional info:
Depends on the category of drugs, LBCAT usual includes:
Biochemistry, Blood Smear, Coagulation, Haematology, Urinalysis, and Other.
One thought on “SDTM LAB1”