Laboratory data programming

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.

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)


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.

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
  • 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.




Consultant clinical statistical programmer

Love podcasts or audiobooks? Learn on the go with our new app.

Visualizing the Progression of the Coronavirus Outbreak

Generate a static choropleth India map using corona virus pandemic data

Battle of the ‘hoods! Which neighborhood has the potential to become a rare collection?


The Boeing Company (BA) — NYSE Single Factor and Multi Factor Stock Analysis

Getting Started with Data Lakes

20+ Must-Subscribe Data and AI Newsletters in 2021

Now Available: World Cup 2018 Graph

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christian Baghai

Christian Baghai

Consultant clinical statistical programmer

More from Medium

Take Beautiful Screenshots of your code in VS Code - CodeSnap

I Decided To Pay For DataCamp

Basic Python: 7 Syntax Rules

Python Design Patterns