Skip to content

Commit 36e2e3c

Browse files
Remi-Gausurchs
andauthored
[ENH] allow Levels values to be objects (#1603)
* 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]>
1 parent 76db9aa commit 36e2e3c

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/common-principles.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,29 @@ Example:
513513
}
514514
```
515515

516+
Each level can be described with a string as in the example above,
517+
or with an object containing the fields [`Description`](./glossary.md#description-metadata)
518+
and [`TermURL`](./glossary.md#termurl-metadata)
519+
like in the example below.
520+
521+
```JSON
522+
{
523+
"sex": {
524+
"Description": "sex of the participant as reported by the participant",
525+
"Levels": {
526+
"M": {
527+
"Description": "Male",
528+
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68008297"
529+
},
530+
"F": {
531+
"Description": "Female",
532+
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68005260"
533+
},
534+
}
535+
}
536+
}
537+
```
538+
516539
### Key-value files (dictionaries)
517540

518541
JavaScript Object Notation (JSON) files MUST be used for storing key-value

src/schema/objects/metadata.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,9 +3371,10 @@ TermURL:
33713371
name: TermURL
33723372
display_name: TermURL
33733373
description: |
3374-
URL pointing to a formal definition of this type of data in an ontology
3375-
available on the web.
3374+
URL pointing to a formal definition of this type of data in an ontology available on the web.
3375+
For example: https://www.ncbi.nlm.nih.gov/mesh/68008297 for "male".
33763376
type: string
3377+
format: uri
33773378
TimeZero:
33783379
name: TimeZero
33793380
display_name: Time Zero

0 commit comments

Comments
 (0)