kids-first / kf-api-dataservice

:file_cabinet: Primary API for interacting with the Kids First data
http://kf-api-dataservice.kidsfirstdrc.org
Apache License 2.0
5 stars 2 forks source link

✨ Track parent studies #653

Closed znatty22 closed 5 months ago

znatty22 commented 5 months ago

Motivation

Some studies are actually divided into sub-studies where each sub-study has a different funding source. We need to be able to track the study information for the parent study and also the child studies, as well as know which child studies are part of which parent studies

Approach

Add a new column to the Study table for parent_study_id. This will contain the KF ID of another existing study in the table. It is not implemented as a self-referencing foreign key for simplicity's sake. There is validation on the field to ensure only KF IDs of existing studies can be put in that column