The current biospecimen model does not adequately capture lineage of biospecimens or biological equivalency among groups of biospecimens. This information is important for several reasons. One reason is when someone needs to know the total remaining quantity of aliquots/biospecimens that can be used for additional sequencing or processing.
Approach
Introduce 2 new tables: Sample and Container. These tables will be populated by deriving containers and samples from the incoming Biospecimen in a POST/PATCH request (#645).
Sample: represents a biologically distinct amount of material from a single person. A sample will also be used to group biospecimens (also known as aliquots or containers) that are biologically equivalent.
Container: an extracted portion of a Sample
Note: We wanted to take this approach to minimize or eliminate any changes to the current biospecimen table so that current functionality is not disrupted in any way.
Database
Create a Sample table
Create a Container table
Delete Life Cycles
When a Participant is deleted its child Samples are also deleted
When a Biospecimen is deleted its associated Container is deleted
When a Sample is deleted its child Containers are also deleted
When a Sample has 0 child Containers, it will be deleted. This is considered an orphan sample
API
Implement REST API for both Sample and Container
In the future we may remove POST/PUT/PATCH/DELETE from the API for these two concepts since eventually the create, update, delete lifecycles will be managed internally by the API.
Todo
[ ] Add db schema migrations once finalized
[x] (#645) Implement logic that will automatically create/update/delete rows in Sample and Container each time a Biospecimen is created/updated
Motivation
The current biospecimen model does not adequately capture lineage of biospecimens or biological equivalency among groups of biospecimens. This information is important for several reasons. One reason is when someone needs to know the total remaining quantity of aliquots/biospecimens that can be used for additional sequencing or processing.
Approach
Introduce 2 new tables:
Sample
andContainer
. These tables will be populated by deriving containers and samples from the incoming Biospecimen in a POST/PATCH request (#645).Sample
: represents a biologically distinct amount of material from a single person. A sample will also be used to group biospecimens (also known as aliquots or containers) that are biologically equivalent.Container
: an extracted portion of a SampleNote: We wanted to take this approach to minimize or eliminate any changes to the current biospecimen table so that current functionality is not disrupted in any way.
Database
Sample
tableContainer
tableDelete Life Cycles
API
Sample
andContainer
Todo
Sample
andContainer
each time a Biospecimen is created/updated