diff --git a/cypress/e2e/page/download-pagetests.cy.js b/cypress/e2e/page/download-pagetests.cy.js index f0382abc..040eebe9 100644 --- a/cypress/e2e/page/download-pagetests.cy.js +++ b/cypress/e2e/page/download-pagetests.cy.js @@ -78,6 +78,11 @@ describe("tests on download page ui via programmatic state loading and store int expect(folderStateAfter[folderStateAfter.length - 1]).to.contain(dataDictionaryFilenameNoExt); }); + // C. Check if the last file retrieved contains the Identifies property and its value under the participant_id key + cy.readFile('cypress/downloads/' + folderStateAfter[folderStateAfter.length - 1]).then((fileContent) => { + expect(fileContent.participant_id.Annotations).to.have.property("Identifies"); + expect(fileContent.participant_id.Annotations.Identifies).to.eq("participant"); + }); }); }); }); diff --git a/store/index.js b/store/index.js index f9e63746..b7d53adc 100644 --- a/store/index.js +++ b/store/index.js @@ -439,6 +439,19 @@ export const getters = { columnOutput = p_getters.getContinuousJsonOutput(columnName); break; + + default: + columnOutput = { + "Description": "A participant ID", + Annotations: { + + IsAbout: { + Label: "Subject Unique Identifier", + TermURL: "nb:ParticipantID" + }, + Identifies: "participant" + } + }; } } @@ -722,6 +735,12 @@ export const mutations = { // NOTE: The latter are initialized here to eliminate checks for their // nullness in other store functions switch ( p_state.columnToCategoryMap[columnName] ) { + case "Subject ID": + p_state.dataDictionary.annotated[columnName] = Object.assign( + {}, + p_state.dataDictionary.userProvided[columnName] + ); + break; case "Age":