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

[ENH] Allow Levels field of column descriptions to be objects with TermURLs for each level #1603

Merged
merged 7 commits into from
Sep 11, 2023
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
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