... | ... | @@ -483,7 +483,7 @@ A legacy document with multiple gene specifications will be fully archived when |
|
|
|
|
|
#### Current Approved Versions
|
|
|
|
|
|
- Cspec Registry API on SequenceVariantInterpretation will return all the specifications that are both approved and under review.To get the current "Released" (SVI approved) versions do the following:
|
|
|
Cspec Registry API on SequenceVariantInterpretation will return all the specifications that are both approved and under review.To get the current "Released" (SVI approved) versions do the following:
|
|
|
|
|
|
> 1. Get the SequenceVariantInterpretation documents, say for instance from the following endpoint - _https://cspec.genome.network/cspec/SequenceVariantInterpretation/id?detail=high&fields=entContent.states,entContent.legacyFullySuperseded,entContent.legacyReplaced,entId,ldhId,entContent.title_
|
|
|
> 2. Now drop the ones that
|
... | ... | @@ -494,4 +494,4 @@ A legacy document with multiple gene specifications will be fully archived when |
|
|
|
|
|
For instance, given below is an example where the above logic is applied to the end point mentioned in step(1).
|
|
|
|
|
|
<pre>let currentVersions = \\\[\\\] if( respObj && respObj.status && respObj.status === 200 ) { const sviObj = respObj.data.data for(const svi of sviObj){ if(svi.entContent.states) { const stateNames = svi.entContent.states.map((x) => x.name); if(stateNames.includes("Released")) { // has been approved if(svi.entContent.legacyFullySuperseded === false || svi.entContent.legacyReplaced === true) { // drop the doc that has not superseded the legacy yet or the ones that have been fully replaced. continue } else { currentVersions.push(svi.entId) } } } } }</pre>### [Markdown support for Criteria Code Specifications](Markdown-and-Citations) |
|
|
\ No newline at end of file |
|
|
<pre>let currentVersions = \\\\\\\[\\\\\\\] if( respObj && respObj.status && respObj.status === 200 ) { const sviObj = respObj.data.data for(const svi of sviObj){ if(svi.entContent.states) { const stateNames = svi.entContent.states.map((x) => x.name); if(stateNames.includes("Released")) { // has been approved if(svi.entContent.legacyFullySuperseded === false || svi.entContent.legacyReplaced === true) { // drop the doc that has not superseded the legacy yet or the ones that have been fully replaced. continue } else { currentVersions.push(svi.entId) } } } } }</pre>[Markdown support for Criteria Code Specifications](Markdown-and-Citations) |
|
|
\ No newline at end of file |