... | @@ -470,14 +470,36 @@ As per the ClinGen Variant Curation Working Group recommendation a VCEP should b |
... | @@ -470,14 +470,36 @@ As per the ClinGen Variant Curation Working Group recommendation a VCEP should b |
|
|
|
|
|
A legacy document with multiple gene specifications will be fully archived when the attribute `legacyReplaced` is set to `true`. This property will be true only AFTER all the linked specification documents are re-released. For example API to access a legacy document is given here. - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=entContent.legacyReplaced`. All the corresponding individual, single gene specific documents can be accessed via - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=ld.SequenceVariantInterpretation`. A superseded document fully replaces its legacy document only when the property `entContent.legacyFullySuperseded` is set to true. Identifiers for all the legacy documents in the Registry include - `GN014,GN016,GN004,GN005,GN011,GN018,GN023`
|
|
A legacy document with multiple gene specifications will be fully archived when the attribute `legacyReplaced` is set to `true`. This property will be true only AFTER all the linked specification documents are re-released. For example API to access a legacy document is given here. - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=entContent.legacyReplaced`. All the corresponding individual, single gene specific documents can be accessed via - `https://genboree.org/cspec/SequenceVariantInterpretation/id/GN023?fields=ld.SequenceVariantInterpretation`. A superseded document fully replaces its legacy document only when the property `entContent.legacyFullySuperseded` is set to true. Identifiers for all the legacy documents in the Registry include - `GN014,GN016,GN004,GN005,GN011,GN018,GN023`
|
|
|
|
|
|
#### Current versions
|
|
#### 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:
|
|
|
|
> 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
|
|
|
|
a) have never been approved, that is _entContent.states_ has NO item where name === 'Released'
|
|
|
|
b) is a legacy document which have been replaced, that is, _entContent.legacyReplaced_ is true
|
|
|
|
c) is a document that have not been superseded yet, that is _entContent.legacyFullySuperseded_
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
let released = undefined
|
|
|
|
for(const svi of sviObj){
|
|
|
|
if(svi.entContent.states) {
|
|
|
|
const stateNames = svi.entContent.states.map((x) => x.name);
|
|
|
|
if(stateNames.includes("Released")) {
|
|
|
|
if(svi.entContent.legacyFullySuperseded === false || svi.entContent.legacyReplaced === true) {
|
|
|
|
// drop the ones that have not been superseded yet or the ones that have been fully replaced.
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
currentVersions.push(svi.entId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.brl.log( 'info', __filename, 'main', `CURRENT VERSION. ${global.brl.inspc(currentVersions.length)}` )</pre>
|
|
|
|
|
|
A specification document is valid and has the current version if it meets the following criteria in this order
|
|
|
|
|
|
|
|
a) `entContent.states` has an item where name === 'Released' AND `entContent.legacyFullySuperseded` === true. Example - https://cspec.genome.network/cspec/SequenceVariantInterpretation/id/GN037
|
|
|
|
|
|
|
|
b) `entContent.states` has an item where name ==='Released' AND `entContent.legacyReplaced` === false. Example - https://cspec.genome.network/cspec/SequenceVariantInterpretation/id/GN016
|
|
|
|
|
|
|
|
c) `entContent.states` has an item where name ==='Released'. Example - https://cspec.genome.network/cspec/SequenceVariantInterpretation/id/GN002
|
|
|
|
|
|
|
|
### [Markdown support for Criteria Code Specifications](Markdown-and-Citations) |
|
### [Markdown support for Criteria Code Specifications](Markdown-and-Citations) |
|
\ No newline at end of file |
|
|