goci icon indicating copy to clipboard operation
goci copied to clipboard

Inclusion of Child trait in REST API

Open ljwh2 opened this issue 1 month ago • 0 comments

As a developer, we require a Rest API feature that allows the inclusion or exclusion of entities (associations, and studies) belonging to child traits in the data retrieved from the association and studies endpoints

This will require that we add a url parameter show_child_trait which can either have a value of yes or no

For the Association Endpoint it might be something as this

http://gwas-snoopy:8087/gwas/rest/api/v2/associations?efoTrait=headache&show_child_trait=yes

This will require prefetching the association and studies record for all child traits of every Trait in the catalog

The prefetched data will be stored in Solr or Oracle View for fast retrieval.

For Example for trait "Parkinson disease", while indexing,

All the association records belonging to "Parkinson disease", and its child traits (secondary Parkinson disease, Young adult-onset Parkinsonism) will be prefetched

This will be stored with the key "Parkinson disease"

When a query such as this is invoked.

All associations belonging to Parkinson diease, secondary Parkinson disease, and Young adult-onset Parkinsonism are returrned

ljwh2 avatar Jan 22 '25 12:01 ljwh2