Blog detail

Implementing SDTM with SAS (Base SAS, SAS Enterprise Guide & Clinical Data Integration)

For many years, the first instinct of most clinical programmers has always been to inscribe SAS® code by hand, because that was the best approach available. Writing code designated kenning a great deal of syntax and always having the manuals handy. It withal designated pages and pages of code that were arduous to veridical, arduous to maintain, and hard to reuse for different compounds or contrivances. The first level of progression came when SAS introduced sundry windows and wizards such as Import/Export Wizard, Report Window, or Graph-n-Go that gave programmers the competency to commence utilizing the wizard and then prehend the SAS code and transmute it as obligatory.

The next innovations from SAS were implements like SAS® Enterprise Guide® and SAS Clinical Data Integration with their graphical utilizer interfaces (GUI) that made programming a great deal more facile, more expeditious, and more efficient. You can still access all the different data sources from SAS data sets, spreadsheets, and/or relational databases, but in a much more facile way. You can still transform raw data into SDTM domains utilizing standard or custom transformations where mapping can be automatic or manual depending on what your input and output data requires. Data validation and compliance checks are much simpler because all the implements are available for you to reiterate the tasks for each protocol, compound, or therapeutic area. Determinately, if you do require to utilize legacy code or inscribe your own routines, you can do that as well. Perpetuate reading to learn how experienced programmers can learn novel tricks and techniques with incipient implements, solutions, and technology.

Implementing SDTM with Base SAS Approach:

One possible approach is to implement the SDTM data standard with Base SAS as the primary implement. In the simplest form, this involves importing the source data into Base SAS, transforming that data with DATA steps, SQL and SAS PROCS, and then preserving SDTM domains as aeonian data sets. For this instance of engendering the DM file, sort the three source data sets by patient identifier, and then merge them together. The remaining activity is to define each of the SDTM DM variables in a DATA step and preserve that DM file to the target LIBREF. As is the case with all legacy SAS work, we have at our disposal a code editor window and SAS documentation perhaps in hard copy as well as online.

Base SAS Approach – Challenges and Benefits:

There are a number of challenges with the reliance on Base SAS alone to perform SDTM domain data engendered. A primary issue is the management of metadata, as there is no metadata provided with Base SAS alone. One thing to note about this program is that you require to inscribe in all the LENGTH and LABEL verbal expressions to define the SDTM metadata for the final domain data sets. This inscribing of metadata is tedious, prone to error, and liable to result in inconsistencies across SDTM domain metadata for a tribulation. You additionally have no authentic regulation of the target metadata and no genuine-time validation that your resulting domain is valid SDTM data. When utilizing this Base SAS approach, you additionally run into logistical and strategic issues with code maintenance and reusability of the SAS code. The Base SAS code itself can become arduous to read, which makes maintenance arduous. This kind of coding inclines to be “one-off” in nature – resulting in inhibited reusability.

Implementing SDTM with SAS Enterprise Guide

A second approach to SDTM domain engendered uses SAS Enterprise Guide, which features a graphical utilizer interface and some additional implements that facilitate SDTM file engendered. The first step in this effort was to define a LIBREF called LIBRARY that would point to the aeonian format catalog associated with the source legacy data sets. Next, simply drag and drop the source data sets into the SAS Enterprise Guide Process Flow window. With the data in the process flow, it’s picayune to apply PROC SORT SAS Enterprise Guide tasks to sort the data by patient identifier. At this point, the task of SDTM conversion joins the same process utilized with the Base SAS solution, where the data is merged, SDTM variables defined, and the aeonian DM data set is preserved just as shown in the Base SAS solution.

SAS Enterprise Guide Approach – Challenges and Benefits

The selection of SAS Enterprise Guide as the primary implement to engender SDTM data results in homogeneous challenges to utilizing Base SAS alone. Metadata management is still destitute of in this approach and all the variable lengths and labels are still manually indited into the program code. Again, there is no genuine regulation of the target metadata and no genuine-time validation that your resulting domain is valid SDTM data. Albeit SAS Enterprise Guide provides the auxiliary Process Flow GUI, the “Tasks” available that you can drop into your Process Flow are inhibited to sorting, appending, and transposing the data. The next section shows how the SAS Clinical Data Integration solution distributes more available data management tasks in the form of what it calls “Transformations” in lieu of “Tasks.”

There are some advantages to utilizing SAS Enterprise Guide to engender SDTM data over Base SAS alone. As with the Base SAS approach, there is always the full arsenal of Base SAS, and you can utilize any Base SAS PROC, SAS MACRO, or SAS SQL code to solve the quandary of data conversion. However, with SAS Enterprise Guide you get some adscititious assistance in the form of automated “Tasks” that you can drag and drop into your project. You can visually perceive the PROC SORT-driven “Sort” task utilized in Exhibit 1 above, but there are other subsidiary tasks for SDTM engendered such as the data splitter, data appended, and data transposing (rows to columns and columns to rows) tasks that can be very subsidiary here. If we had a more arduous domain to engender, then these supplemental prepackaged “Tasks” could be included in the process flow and programming. Withal, it is worth mentioning that with SAS Enterprise Guide 4.3, you get more of a true development environment in SAS than ever afore. SAS Enterprise Guide 4.3 includes code completion facilities and interactive syntax guides found in other software development environments that you will dote as a SAS programmer. Because of the process flow view, the SDTM work lends itself to being more manageable and reusable long-term because the programming itself inclines to be less spaghetti code. Determinately, just as with the Base SAS approach, the SAS Enterprise Guide approach could be utilized in conjunction with implements such as Microsoft Access or Excel to give you a minimal way of managing your SDTM metadata.

Implementing SDTM with SAS Clinical Data Integration

After exploring the engendered of SDTM files with Base SAS and SAS Enterprise Guide, it is now a good conception to visually examine the “full monty” SAS approach to SDTM data engendered work utilizing SAS Clinical Data Integration. SAS Clinical Data Integration is an ETL implement built on top of SAS Data Management that includes concrete functionality to fortify clinical tribulations. To commence the same process in SAS Clinical Data Integration, drag and drop the SDTM DM domain from our metadata repository (depicted in Exhibit 2 below as a beige box called “DM” to the far right). That target domain already has defined the table and variable level metadata, and it additionally includes congruous integrity constraints on the data. Now that the target is defined, drag and drop the source data sets (the three beige boxes to the far left in Exhibit 2). The next step is to join the three source data sets via an SQL join, which is done by dragging and dropping the predefined “SQL Join” transform. The “Extract” transformation step you optically discern in Exhibit 2 is where the SDTM DM variables get defined in a process analogous to the Base SAS and SAS Enterprise Guide DATA step code in prior sections. Within SAS Clinical Data Integration, this is done within point-and-click driven PROC SQL code building steps. The final step is to insert the “Table Loader” transformation, which takes the SAS data set from the “Extract” step and preserves the perpetual DM data set.

SAS Clinical Data Integration Approach – Challenges and Benefits

Because SAS Clinical Data Integration handles many facets of SDTM data engendered, the challenges are minimal. Probably the most astronomically immense challenge for a SAS programmer is learning to give up slinging Base SAS code and learning to rely on the implement to do the work. Additionally, SAS Clinical Data Integration relies on SAS SQL under the hood quite remotely, so “old-school” Base SAS programmers may need to enhance their SQL skills. As with the Base SAS and SAS Enterprise Guide solutions, you can utilize any Base SAS procedures you require, but the key advantage to utilizing SAS Clinical Data Integration is in its faculty to manage your metadata. Ergo, eschew inditing a bunch of custom SAS code, because that inhibits the tool’s faculty to control the work. It can be a marginal adjustment to learn to work and program largely within the confines of the transforms available within SAS Clinical Data Integration. Metadata management is consequential, so remotely setup is required to define your target data metadata upfront.

SAS Clinical Data Integration provides the same kind of process flow view and drag-and-drop tasks/transforms that SAS Enterprise Guide provides. More importantly, SAS Clinical Data Integration manages the metadata for your SDTM work, a benefit that neither Base SAS nor SAS Enterprise Guide can provide alone. It controls the target SDTM metadata, so compliance with a defined SDTM standard is built into the workflow. It withal connects the metadata across SDTM data engendered so that you can analyze data for changes and updates and additionally propagate a vicissitude across your SDTM data engendered.

Utilizing SAS Clinical Data Integration as intended with standard transforms essentially enforces marginally of consistency of process in engendering SDTM domains. This consistency along with the process view sanctions for SDTM engendered jobs to be more facilely maintained and additionally sanctions for reuse of jobs. SAS Clinical Data Integration additionally sanctions for “typical” SDTM generation tasks, such as study day (--DY) or ISO date (--DTC) engendered, to be standardized into utilizer-inscribed transforms that can be dragged and dropped into future SDTM jobs.

Albeit SAS Enterprise Guide provides a number of prevalent “tasks” that can be dragged and dropped into your process flow, SAS Clinical Data Integration provides a much more expansive list of transformations to cull from. Several of those are profoundly handy in terms of engendering SDTM domains, including the sort, transpose, data joiner, lookup table, data extraction, and data loader transformations.

Finally, SAS Clinical Data Integration is integrated with the SAS Clinical Standards Toolkit associated with Base SAS software. There are pre-subsisting SAS Clinical Data Integration transformations that sanction you to validate SDTM data sets predicated on the SDTM metadata and additionally to automatically generate a define.xml file – which is a huge benefit.


There are multiple SAS approaches to the task of converting clinical tribulations data into the CDISC SDTM. This white paper presented a Base SAS approach, a SAS Enterprise Guide approach, and a SAS Clinical Data Integration approach. The main distinction between approaches involved peregrinating from little implement support to cumbersomely hefty context-categorical implement support to accomplish the SDTM DM engendered task. It used to be that when clinical SAS programmers were confronted by a data transformation task such as SDTM conversions, we had Base SAS. Now, there is a better GUI implement, SAS Enterprise Guide, that avails with SAS code development. More recently, SAS Clinical Data Integration has emerged as an exhilarating incipient clinical tribulation and CDISC-cordial, industry-concrete implement. SAS Clinical Data Integration gives us a way to manage our metadata and process in a way that was not available afore, while still sanctioning us to inscribe Base SAS code when needed. SAS Clinical Data Integration is critical in order to have largely metadata-driven transformation processes that can scale to perform numerous data conversions in a reliable and efficient manner.

View our Actual & Relative Time Assumptions (SDTM) webinar here:

View our Fundamentals of SDTM webinar here:

View our CDISC compliance using SAS: SDTM webinar here:

About SAS: SAS is the leader in analytics. SAS is the no.1 advanced skill to have in this data-driven world.

About Sankhyana: Sankhyana (Biggest SAS Authorized Training Partner in India) is a premium and the best Clinical SAS Training Institute in India that offers the best classroom & online/live-web training on Clinical SAS and Data Management tools.

#BestSASCourseinBangalore  #Analytics #DataAnalytics #ClinicalSASTraininginBangalore #SASTraininginBangalore #SASAnalyticsTraininginBangalore #PharmaTraininginBangalore #BestSASTrainingInstituteinBangalore #BestSASTrainingInstituteinIndia #BestPredictiveModelingTrainingInstituteinIndia #SASCertification #SASCertificationTraininginBangalore #SASProgrammingTraining #BiggestSASAuthorizedTrainingPartnerinIndia #BestOnlineSASTrainingInstituteinIndia #ClinicalSASTraininginBangalore #BestClinicalSASTrainingInstituteinBangalore #BestClinicalSASTrainingInstituteinIndia #SASCertificationTraininginBangalore #SASCertificationTraininginIndia #BestSASTrainingInstituteinIndia #SankhyanaEducation #SankhyanaConsultancyServices #SajalKumar #India