-
Notifications
You must be signed in to change notification settings - Fork 10
Add /imaging-modalities route for getting available imaging modality term instances & labels #502
Copy link
Copy link
Closed
Enhancement
Copy link
Labels
releasedThis issue/pull request has been released.This issue/pull request has been released.
Description
Currently, the instances endpoint responses have this structure:
{
"nb:Diagnosis": [
{
"TermURL": "ncit:C94342",
"Label": "Healthy Control"
},
{
"TermURL": "snomed:58214004",
"Label": "Schizophrenia"
}
]
}To provide all the imaging modality metadata the query tool needs to display, we at minimum need to add:
abbreviation(BIDS suffix)data_type
We also want to make imaging terms configurable via a vocab file (similar to diagnoses/assessments) instead of hardcoding in CLI/query tool.
Implementation tasks
-
Communities
-
Add imaging modalities vocab toupdate communities README with a small hint on imaging modalities being differentneurobagel/communitiesconfigs (e.g.,Imagestandardized variable):- Include fields: term identifier (NIDM URI), label,
abbreviation(BIDS suffix), anddata_type. -
Ensureconfig.jsonreferences the new vocab file so it’s fetched at startup.
- Include fields: term identifier (NIDM URI), label,
-
-
API:
- Add
/imaging-modalitiesand/imaging-modalities/vocabroutes mirroring assessments/diagnoses. - Ensure instances SPARQL query targets objects of
nb:hasContrastTypeand matches eachTermURLreturned from the graph to the term's correspondingLabel,abbreviation, anddata_typefrom the vocab file fetched on startup - Extend startup vocab loading to include imaging vocab, add Imaging modality to configurable variables.
- Update term response shaping to pass through the extra metadata for imaging modalities while keeping existing shape for other attributes.
- implement test coverage for the new routes, including:
- Happy path with vocab providing labels/abbreviation/data_type.
- Handling missing labels/metadata.
- Auth behavior consistent with other standardized-term routes.
- Add
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
releasedThis issue/pull request has been released.This issue/pull request has been released.
Type
Projects
Status
Review - Done