Laboratory data programming

Christian Baghai
3 min readMar 13, 2021

Introduction

In oncology, the laboratory data plays a significant role in determining the safety of a drug compound. Therefore, it plays a big role in the process of approval of the drug. However, some issues can arise while performing ADaM programming for laboratory results. Therefore, it is very important for a statistical programmer to pay attention to some key points.

One to one relationship between PARAMCD and PARAM

When programming any ADaM, you have to make sure that there is a one-to-one correspondence between PARAMCD and PARAM. When programming ADaM laboratory dataset there could be some element which can create a problem regarding that.

In laboratory data, PARAMCD and PARAM are the concatenation of different variables

  • PARAMCD = 4-char of LBTESTCD || 3-char company code || 1-char for the system of units

For the system of units, “C” is for Conventional (CN) and “S” is for Standard International (SI)

  • PARAM = LBSPEC || LBTEST || LBMETHOD || (LBSTRESU)

Oftentimes the problem is that there are many PARAMCD for one PARAM. If such a problem happens then you have to determine if the two parameters can be analyzed together

For example, there could be different company code on two records for the same PRAMCD. There could be two company code because the two lab samples have been collected with different methods. In this case the appropriate person must advise you on whether you can analyze the two samples together.

If the two parameters cannot be analyzed together, you need to collaborate with other departments to be able to find a solution. For example, a SDTM update might be needed so that the coding for the variable LBMETHOD can be updated. This would create subdivision of LBMETHOD. In that case PARAM would have to be updated as well.

Unit conversion

There are two types of lab data: central and local. Oftentimes a problem can occur with the units because they are not the same between the central and the local laboratories. This disparity between central and local lab can be because the lab data have been collected in different countries and therefore different units have been used. Also, calibration might be an issue. The data may be collected by different persons using different equipment. In order to report the lab result you must convert the original unit to standard unit by using a conversion standard.

Some steps must be taken in order to convert the lab results.

  • Step 1 — Get a simple PROC FREQ output in order to show how the data was collected and if there were different lab units within a lab test
  • PROC FREQ DATA=LAB_DATA NOPRINT; TABLES LBSPEC*LBTEST* LBORRESU/OUT= LAB_UNITS ; RUN;
  • Step 2 — Output the dataset to a spreadsheet
  • Step 3 — Rename LBORRESU as “original unit”
  • Step 4 — Assign names for four empty columns (CONVENTIONAL UNIT, STANDARD UNIT, CFACTOR, SFACTOR).

Conventional units have been used for collected results and can be rescaled to standard units by multiplying by the conversion factors

  • Step 5 — Handling character strings in collected Result. The intent of the character string is context sensitive. In one context strings may be meant to convey that the data is categorical (for example: ‘high’ and ‘low’). Another context is that in which a string such as ‘<.01’ is meant to convey the notion that a small amount was detected, and therefore the result is inconclusive. Again, this problem should be resolved through input from the statistician and clinical group.
  • Step 6 — Finally, a numeric manipulation using the new variable, AVALC follows along with upper limits and lower limits for the conversion. Careful attention should be given to character strings in the AVALC variable. Please note that if you do not have character string attached to the “value,” it is not necessary to create the AVALC variable.

--

--