| name | sdtmig-reference |
| description | Look up SDTMIG v3.4 domain/variable information (Core status, Role, Type, allowed values) from the authoritative CSV reference file. Use this whenever you need to verify whether a variable is Required, Expected, or Permissible in a domain — do NOT assume or guess. Trigger when authoring or reviewing rules and you need to confirm variable constraints.
|
SDTMIG v3.4 Reference Lookup
This skill looks up authoritative SDTMIG v3.4 variable information using a Python script that
reads from SDTMIG v3.4 Classes and Columns.csv alongside the script in this skill folder.
Never guess or assume a variable's Core status — always run the script.
Core status meanings
| Core | Meaning |
|---|
Req | Required — must be present and populated in every dataset |
Exp | Expected — should be present; omission requires justification |
Perm | Permissible — may or may not be present in the dataset |
Rule authoring implication: A Perm variable may be absent from the dataset entirely.
Any rule that checks a Perm variable for emptiness MUST use - any: with not_exists + empty.
The lookup script
lookup.py lives in this skill folder, alongside SKILL.md and the CSV.
Invoke it with whatever absolute path your runtime mounts the skill at.
The script locates the CSV via its own __file__, so it works regardless of
the current working directory.
python lookup.py --domains
python lookup.py --domain AG
python lookup.py --domain AG --var AGSTAT
python lookup.py --domain AG --core Perm
python lookup.py --domain DM --core Req
python lookup.py --var STAT
python lookup.py --var DTHFL
The --var flag does suffix matching: --var STAT matches AGSTAT, CMSTAT, MHSTAT, etc.
When to use this during rule authoring (Pre-flight checklist item D)
For every variable that the rule's Check section tests for empty or non_empty:
- Run:
python lookup.py --domain <DOMAIN> --var <VAR> (substitute the absolute path your runtime mounts the skill at — see above)
- Check the
Core field in the output.
- If
Core=Perm in any applicable domain:
- Replace
operator: empty with - any: [not_exists, empty] block in the YAML
- Create a separate negative test case for the absent-variable scenario (use
[ABSENT])
For rules that apply to multiple domains (e.g., the variable --STAT applies to AG, CM, EC, etc.),
run the cross-domain check: python lookup.py --var STAT
If any domain shows Perm, the rule needs the any block.
Reading the output
AGSTAT Core=Perm Role=Record Qualifier Type=Char Label=Completion Status
Note: Used to indicate that a question about a prespecified agent was
not answered. Should be null or have a value of "NOT DONE".
Key fields:
Core → Required / Expected / Permissible
Role → Identifier, Timing, Record Qualifier, Variable Qualifier, Grouping Qualifier, etc.
Val List → controlled allowed values (if any)
Note → CDISC definition and usage guidance (useful for Description/Message wording)