Skip to content

Commit

Permalink
[ENH] allow Levels values to be objects (#1603)
Browse files Browse the repository at this point in the history
* update level description

* Apply suggestions from code review

Co-authored-by: Sebastian Urchs <[email protected]>

* add link to glossary

* rm weird file

* fix path

---------

Co-authored-by: Sebastian Urchs <[email protected]>
  • Loading branch information
Remi-Gau and surchs authored Sep 11, 2023
1 parent 76db9aa commit 36e2e3c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
23 changes: 23 additions & 0 deletions src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,29 @@ Example:
}
```

Each level can be described with a string as in the example above,
or with an object containing the fields [`Description`](./glossary.md#description-metadata)
and [`TermURL`](./glossary.md#termurl-metadata)
like in the example below.

```JSON
{
"sex": {
"Description": "sex of the participant as reported by the participant",
"Levels": {
"M": {
"Description": "Male",
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68008297"
},
"F": {
"Description": "Female",
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68005260"
},
}
}
}
```

### Key-value files (dictionaries)

JavaScript Object Notation (JSON) files MUST be used for storing key-value
Expand Down
5 changes: 3 additions & 2 deletions src/schema/objects/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3371,9 +3371,10 @@ TermURL:
name: TermURL
display_name: TermURL
description: |
URL pointing to a formal definition of this type of data in an ontology
available on the web.
URL pointing to a formal definition of this type of data in an ontology available on the web.
For example: https://www.ncbi.nlm.nih.gov/mesh/68008297 for "male".
type: string
format: uri
TimeZero:
name: TimeZero
display_name: Time Zero
Expand Down

0 comments on commit 36e2e3c

Please sign in to comment.