Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #431

Merged
merged 1 commit into from
Jun 11, 2024
Merged
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
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,29 @@ For example, `specimenID` is required, and is included for assay data class defi
For that reason, it is not included at all in individual-level assay data (e.g. behavioral/psychological data).
Note: In situations where "the data meets the template", issues with a required slot might indicate that the template being used doesn't actually "fit" the type of data/entity, and an additional one needs to be defined.

##### Validation rules

Validation rules are used with slots/attributes.
We use schematic validation syntax exactly as documented in [this Confluence doc](https://sagebionetworks.jira.com/wiki/spaces/SCHEM/pages/2645262364/Data+Model+Validation+Rules).

Here is an example of a simple validation rule:

```
age:
annotations:
requiresDependency: ageUnit
validationRules: num
description: A numeric value representing age of the individual. Use with `ageUnit`.
required: false
```

Here is an example of a more complicated [combination rule](https://sagebionetworks.jira.com/wiki/spaces/SCHEM/pages/2645262364/Data+Model+Validation+Rules#Rule-Combinations):
```
readPair:
annotations:
validationRules: int::inRange 1 2
...
```

#### Enum

Expand All @@ -112,6 +135,7 @@ enums:
#...more below
```


##### Example: Boolean enumeration (commonly reused)

```
Expand Down