Skip to content

Commit

Permalink
Update README.md (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
anngvu authored Jun 11, 2024
1 parent fc91cdc commit e1d809a
Showing 1 changed file with 24 additions and 0 deletions.
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

0 comments on commit e1d809a

Please sign in to comment.