Sapling SAP
Guides

For programmers, the specifications

The SAP says what; the specifications say how. The ADaM and TLF specifications are made from the plan, edited by the programmer and checked against the plan.

If you are a statistical programmer, this is where you work. The statistician's plan says what: which populations, which analyses, which methods. The specifications say how, and they are yours.

The idea#

  1. sap.qmd is the statistician's plan.
  2. adam-spec.qmd and tlf-spec.qmd are made from the plan. You edit them: a variable's label or length, a derivation rule, the order of a table's rows.
  3. The programs are made from the specifications and are never edited.

A rule you write into a specification that the SAP does not have is reported by sapling check until sapling sap sync writes it into the SAP for a person to accept. A change of the SAP is merged into your specification three ways, so your edits are kept.

The ADaM specification page in the Sapling editor: the ADSL variables with their labels, types, lengths and rules, each marked against the SAP, with Sync to the SAP and Open the grid.
The ADaM specification as a page: each variable with its rule, and whether it comes from the SAP or is the programmer's own. Sync to the SAP writes a rule into the plan for a person to accept.

One fact in one place#

The SAP derives each ADaM variable once, from SDTM, with the ADaM IG's names. From that single statement Sapling makes the ADaM specification, the define table, one R program per ADaM data set and the build order. The decision (who is in the efficacy population, which record is the Week 24 value) is no longer written three times, in the SAP, the specification and the program. A variable an analysis needs, and that no derivation makes, is an error whose fix is the derivation to write.

When the template is not enough#

The generated programs are a template: close, not always complete. Programmers add what the template cannot say in files the generator never writes:

Every hook carries # drafted by: agent (...) if an agent wrote it. Nobody but a person writes # approved by:. A hook is named, bound to its SAP block, measured against the generated result, and shown to the reviewer; after an SAP amendment the drift report says which hooks to review. The first choice is still the specification, not a hook.

Check the data#

sapling adam conform checks the ADaM data sets against rules of the ADaM Implementation Guide v1.2. It is Sapling's own reading of those rules, not CDISC CORE.

Read on#

The ADaM from the SAP, Customize, Omakase: the study folder and ADaM conformance.