Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120297757
query-viewer.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 09:26
Size
1 KB
Mime Type
text/x-java
Expires
Sat, Jul 5, 09:26 (2 d)
Engine
blob
Format
Raw Data
Handle
27168957
Attached To
R2664 SHRINE MedCo Fork
query-viewer.js
View Options
import { inject, computedFrom } from 'aurelia-framework';
import { QueryViewerService } from 'views/query-viewer/query-viewer.service';
import { I2B2Service } from 'common/i2b2.service.js';
@inject(QueryViewerService, I2B2Service)
export class QueryViewer {
constructor(service, i2b2Svc) {
// -- init -- //
this.screenIndex = 0;
this.showCircles = false;
this.service = service;
this.vertStyle = 'v-min';
// -- fetch queries -- //
const parseResultToScreens = result => this.service.getScreens(result.adapters, result.queryResults);
const setVM = screens => {
this.screens = screens;
this.showCircles = this.screens.length > 1;
};
const refresh = () => this.service
.fetchPreviousQueries()
.then(parseResultToScreens)
.then(setVM)
.catch(error => console.log(error));
// -- add i2b2 event listener -- //
const isMinimized = e => e.action !== 'ADD';
i2b2Svc.onResize((a, b) => this.vertStyle = b.find(isMinimized) ? 'v-min' : '');
i2b2Svc.onHistory(refresh);
// -- init -- //
refresh();
}
}
Event Timeline
Log In to Comment