diff --git a/projects/v2/src/app/services/sheet.service.ts b/projects/v2/src/app/services/sheet.service.ts index 21a03408..8a9232e0 100644 --- a/projects/v2/src/app/services/sheet.service.ts +++ b/projects/v2/src/app/services/sheet.service.ts @@ -112,7 +112,11 @@ export class SheetService { * @param data is the parsed ASCTB data from the csv file of the sheet */ getDataWithBody(data: any) { - const organ: Structure = { name: 'Body', id: '' }; + const organ: Structure = { + name: 'Body', + id: 'UBERON:0013702', + rdfs_label: 'body proper' + }; data.forEach((row) => { row.anatomical_structures.unshift(organ); }); diff --git a/projects/v2/src/app/store/sheet.state.ts b/projects/v2/src/app/store/sheet.state.ts index 72043d24..9aa77283 100644 --- a/projects/v2/src/app/store/sheet.state.ts +++ b/projects/v2/src/app/store/sheet.state.ts @@ -151,6 +151,8 @@ export class SheetStateModel { export class SheetState { constructor(private sheetService: SheetService) { } faliureMsg = 'Failed to fetch data'; + bodyId = 'UBERON:0013702'; + bodyLabel: 'body proper'; /** * Returns an observable that watches the data @@ -305,7 +307,8 @@ export class SheetState { const organ: Structure = { name: 'Body', - id: '', + id: this.bodyId, + rdfs_label: this.bodyLabel, }; for await (const [_unused, sheet] of compareData.entries()) { @@ -403,8 +406,8 @@ export class SheetState { row.organName = organsNames[i]; const newStructure: Structure = { name: 'Body', - id: '', - rdfs_label: 'NONE', + id: this.bodyId, + rdfs_label: this.bodyLabel, }; row.anatomical_structures.unshift(newStructure); } @@ -664,7 +667,8 @@ export class SheetState { const state = getState(); const organ: Structure = { name: 'Body', - id: '', + id: this.bodyId, + rdfs_label: this.bodyLabel, }; return this.sheetService.fetchPlaygroundData().pipe( @@ -725,7 +729,8 @@ export class SheetState { ); const organ: Structure = { name: 'Body', - id: '', + id: this.bodyId, + rdfs_label: this.bodyLabel, }; return this.sheetService.updatePlaygroundData(data).pipe(