Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,16 @@ Describing dates and timestamps:
for more information.

- Age SHOULD be given as the number of years since birth at the time of
scanning (or first scan in case of multi session datasets). Using higher
accuracy (weeks) should in general be avoided due to privacy protection,
unless when appropriate given the study goals, for example, when scanning babies.
scanning (or first scan in case of multi session datasets).
The default unit is `"year"`, but it MAY be overridden in the JSON sidecar
(for example, `participants.json`) by setting `"Units"` to one of the
following values based on
[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) duration
designators: `"year"`, `"month"`, `"week"`, `"day"`, `"hour"`, `"minute"`,
or `"second"`.
Using higher accuracy (for example, weeks or days) should in general be
avoided due to privacy protection, unless when appropriate given the study
goals, for example, when scanning babies or animals.

## Directory structure

Expand Down
8 changes: 5 additions & 3 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ age:
name: age
display_name: Subject age
description: |
Numeric value in years (float or integer value).
Numeric value (float or integer value).
By default expressed using "year" as the unit. Other possible "Units" are described in
[Units](SPEC_ROOT/common-principles.md#units).

For privacy purposes, participant ages should be capped at 89.
For privacy purposes, participant ages should be capped at 89 years.
Using "89+" for ages above 88 is DEPRECATED.
definition: {
"LongName": "Subject age",
"Description": "Subject age in postnatal years",
"Description": "Subject postnatal age",
"Format": "number",
"Units": "year",
"Maximum": 89,
Expand Down
15 changes: 15 additions & 0 deletions src/schema/rules/checks/dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ ParticipantIDMismatch:
sorted(dataset.subjects.sub_dirs)
)

AgeUnits:
issue:
code: AGE_UNITS
message: |
The "Units" value for age in 'participants.json' is not a valid
ISO 8601-based duration unit.
Allowed values are "year", "month", "week", "day", "hour", "minute",
or "second".
level: warning
selectors:
- path == '/participants.tsv'
- '"Units" in sidecar.age'
Comment thread
effigies marked this conversation as resolved.
checks:
- intersects([sidecar.age.Units], ["year", "month", "week", "day", "hour", "minute", "second"])

# 214
SamplesTSVMissing:
issue:
Expand Down
Loading