import pointblank as pb
adsl = pb.get_adam_dataset("adsl")
print(adsl.label)
print(adsl.natural_keys)
print(adsl.required_variables)Subject Level Analysis Dataset
['STUDYID', 'USUBJID']
['STUDYID', 'USUBJID', 'SUBJID', 'SITEID', 'TRT01P']
Get the template for a type of ADaM dataset.
Usage
Pointblank has templates for four types of CDISC Analysis Data Model (ADaM) dataset: ADSL (the subject-level analysis dataset), BDS (the Basic Data Structure, used by datasets such as ADVS and ADLB), ADAE (adverse events) and ADTTE (time to event). Each template is an ADaMDatasetTemplate: the dataset’s label and class, the variables that form its natural key, and an ADaMVariableSpec for each of its variables. The templates are what validate_adam(), validate_adam_structure() and adam_to_metadata() work from.
The templates cover the common variables of each type of dataset rather than every variable that the ADaM Implementation Guide describes. Each call returns a new template object, so changing one doesn’t affect later calls.
name: str"ADSL", "BDS", "ADAE" or "ADTTE". This is case-insensitive.
ADaMDatasetTemplate KeyErrorlist_adam_datasets().
Let’s get the template for the subject-level analysis dataset:
import pointblank as pb
adsl = pb.get_adam_dataset("adsl")
print(adsl.label)
print(adsl.natural_keys)
print(adsl.required_variables)Subject Level Analysis Dataset
['STUDYID', 'USUBJID']
['STUDYID', 'USUBJID', 'SUBJID', 'SITEID', 'TRT01P']
ADSL has one record per subject, so the study and subject identifiers are its natural key. Besides the identifiers, the planned treatment TRT01P is required. The template also lists the population flags:
These flags (safety, intent-to-treat, efficacy and so on) are conditionally required or permissible, and validate_adam() checks that the ones in a dataset hold only "Y" and "N".
List the dataset templates.
The template that is returned.
Build a validation plan from an ADaM dataset template.
The equivalent for SDTM domains.