Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit b0fffba

Browse files
author
Maxim Moinat
committed
Merge tag 'v2.6.0'
2 parents a743add + a82cfa9 commit b0fffba

File tree

835 files changed

+42295
-20377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

835 files changed

+42295
-20377
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.idea
22
/web.config
33
js/config-local.js
4-
/node_modules/
4+
/node_modules/
5+
/js/assets/bundle
6+
/js/assets/fonts
7+
/js/assets/images

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="http://www.ohdsi.org/web/atlas"><img src="http://www.ohdsi.org/web/wiki/lib/exe/fetch.php?cache=&media=documentation:software:logo_without_text.png" align="left" hspace="10" vspace="6" width="164" height="200"></a>
44

5-
**ATLAS** is an open source software tool for researchers to conduct scientific analyses on standardized observational data converted to the [OMOP Common Data Model V5](http://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:single-page "OMOP Common Data Model V5"). Researchers can create cohorts by defining groups of people based on an exposure to a drug or diagnosis of a particular condition using healthcare claims data. ATLAS has vocabulary searching of medical concepts to identify people with specific conditions, drug exposures etc. Patient profiles can be viewed within a specific cohort allowing visualization of a particular subject's health care records. Population effect level estimation analyses allows for comparison of two different cohorts and leverages R packages.
5+
**ATLAS** is an open source software tool for researchers to conduct scientific analyses on standardized observational data converted to the [OMOP Common Data Model V5](https://github.com/OHDSI/CommonDataModel/wiki "OMOP Common Data Model V5"). Researchers can create cohorts by defining groups of people based on an exposure to a drug or diagnosis of a particular condition using healthcare claims data. ATLAS has vocabulary searching of medical concepts to identify people with specific conditions, drug exposures etc. Patient profiles can be viewed within a specific cohort allowing visualization of a particular subject's health care records. Population effect level estimation analyses allows for comparison of two different cohorts and leverages R packages.
66

77
## Resources
88

build/index.js

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
const ajaxRequest = require('ajax-request');
2+
const settings = require('../js/settings');
3+
const requirejs = require('requirejs');
4+
const fs = require('fs');
5+
const extras = require('fs-extra');
6+
7+
const baseOptimizationSettings = {
8+
...settings,
9+
baseUrl: './js',
10+
paths: {
11+
'config-local': 'empty:',
12+
'css-builder': 'empty:',
13+
},
14+
excludeShallow: [],
15+
findNestedDependencies: false,
16+
optimize: 'uglify2',
17+
};
18+
const jsBundlePath = './js/assets/bundle/bundle.js';
19+
const cssBundlePath = './js/assets/bundle/bundle.css';
20+
21+
function createCdnLibPath(name) {
22+
return `./assets/bundle/cdn-libs/${name}`;
23+
}
24+
25+
function downloadLib(name, path, isJs) {
26+
const ext = isJs ? '.js' : '';
27+
console.log(`Downloading ${name} (${path}${ext})...`);
28+
return new Promise((resolve, reject) => {
29+
ajaxRequest.download({
30+
url: `${path}${ext}`,
31+
destPath: () => `./js/${createCdnLibPath(name)}${ext}`,
32+
}, (err, res, body, destpath) => {
33+
if (err) {
34+
console.log(`Downloading of the ${name} failed!`, err);
35+
reject(err);
36+
} else {
37+
console.log(`${name} is downloaded`);
38+
resolve();
39+
}
40+
});
41+
});
42+
}
43+
44+
function downloadLibs(aliasesMap, isJs = true) {
45+
const libs = [];
46+
const cdnLibs = [];
47+
const paths = {};
48+
Object.entries(aliasesMap).map(([name, path]) => {
49+
if (/^(components|modules)\//.test(path)) {
50+
return;
51+
}
52+
const isCdn = /^http(s?):\/\//.test(path);
53+
if (isCdn) {
54+
cdnLibs.push(downloadLib(name, path, isJs));
55+
}
56+
libs.push(name);
57+
paths[name] = isCdn ? createCdnLibPath(name) : path;
58+
});
59+
60+
return {
61+
libs,
62+
cdnLibs,
63+
paths,
64+
};
65+
}
66+
67+
function optimizeJs({ libs, cdnLibs, paths }) {
68+
const jsSettings = {
69+
...baseOptimizationSettings,
70+
include: libs,
71+
paths: {
72+
...paths,
73+
...baseOptimizationSettings.paths,
74+
},
75+
out: jsBundlePath,
76+
};
77+
78+
const promise = new Promise((resolve, reject) => {
79+
Promise.all(cdnLibs)
80+
.then(() => {
81+
console.log('');
82+
console.log('Optimizing JS bundle...');
83+
requirejs.optimize(
84+
jsSettings,
85+
() => {
86+
console.log('Success');
87+
resolve();
88+
},
89+
(er) => {
90+
console.error(er);
91+
reject();
92+
},
93+
);
94+
});
95+
});
96+
97+
return promise;
98+
}
99+
100+
function optimizeCss({ libs, cdnLibs, paths }) {
101+
const promise = new Promise((resolve, reject) => {
102+
Promise.all(cdnLibs)
103+
.then(() => {
104+
console.log('');
105+
console.log('Optimizing CSS bundle...');
106+
const fileHandle = fs.createWriteStream(cssBundlePath);
107+
Object.values(paths).map(path => {
108+
const css = fs.readFileSync('js/' + path);
109+
fileHandle.write(css);
110+
fileHandle.write('\n');
111+
});
112+
fileHandle.end();
113+
console.log('Success');
114+
resolve();
115+
});
116+
});
117+
}
118+
119+
function copyAssets() {
120+
console.log('');
121+
console.log('Copying assets...');
122+
extras.copySync('./js/images', './js/assets/images');
123+
extras.copySync('./js/fonts', './js/assets/fonts');
124+
console.log('Success');
125+
}
126+
127+
optimizeJs(downloadLibs(settings.paths))
128+
.then(() => optimizeCss(downloadLibs(settings.cssPaths, false)))
129+
.then(copyAssets);

images/atlas_loading.svg

Lines changed: 1 addition & 1 deletion
Loading

index.html

Lines changed: 39 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
<!DOCTYPE html>
22
<html lang="en">
33

4-
<head>
5-
<meta charset="utf-8">
6-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7-
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<meta name="description" content="">
9-
<meta name="author" content="">
10-
11-
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
12-
<link rel="stylesheet" type="text/css" href="js/styles/font-awesome.min.css">
13-
<link rel="stylesheet" type="text/css" href="js/styles/bootstrap.min.css">
14-
<link rel="stylesheet" type="text/css" href="js/styles/bootstrap-theme.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
16-
<link rel="stylesheet" type="text/css" href="js/styles/jquery.dataTables.min.css">
17-
<link rel="stylesheet" type="text/css" href="js/styles/buttons.dataTables.min.css">
18-
<link rel="stylesheet" type="text/css" href="js/styles/atlas.css">
19-
<link rel="stylesheet" type="text/css" href="js/styles/chart.css">
20-
<link rel="stylesheet" type="text/css" href="js/styles/achilles.css">
21-
22-
<title data-bind="text: pageTitle">ATLAS</title>
23-
</head>
24-
25-
<body>
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
11+
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
12+
<link rel="stylesheet" href="js/styles/splash.css" />
13+
14+
<title data-bind="text: pageTitle">ATLAS</title>
15+
</head>
16+
17+
<body class="app">
2618
<div id="splash" data-bind="if:!initializationComplete()">
2719
<div id="stage">
2820
<img src="images/atlas_loading.svg" />
@@ -33,24 +25,18 @@
3325
<div data-bind="text:applicationStatus" id="status"></div>
3426
</div>
3527

36-
<div id="wrapperLeftMenu" style="display:none;" data-bind="visible:initializationComplete()">
28+
<div style="display:none;" data-bind="visible: initializationComplete(), css: classes('menu-container')">
3729
<div id="wrapperLogo">
3830
<a href="#/home">ATLAS</a>
3931
</div>
4032

41-
<div class="list-group">
42-
<a class="list-group-item" href="#/home"><i class="fa fa-fw fa-home" aria-hidden="true"></i>&nbsp;Home</a>
43-
<a class="list-group-item" href="#/datasources"><i class="fa fa-fw fa-database" aria-hidden="true"></i>&nbsp;Data Sources</a>
44-
<a class="list-group-item" href="#/search"><i class="fa fa-fw fa-search" aria-hidden="true"></i>&nbsp;Vocabulary</a>
45-
<a class="list-group-item" href="#/conceptsets"><i class="fa fa-fw fa-shopping-cart" aria-hidden="true"></i>&nbsp;Concept Sets</a>
46-
<a class="list-group-item" href="#/cohortdefinitions"><i class="fa fa-fw fa-users" aria-hidden="true"></i>&nbsp;Cohort Definitions</a>
47-
<a class="list-group-item" data-bind="css: irStatusCss, attr: {href: irAnalysisURL}"><i class="fa fa-fw fa-bolt" aria-hidden="true"></i>&nbsp;Incidence Rates</a>
48-
<a class="list-group-item" href="#/profiles"><i class="fa fa-fw fa-user" aria-hidden="true"></i>&nbsp;Profiles</a>
49-
<a class="list-group-item" data-bind="css: ccaCss, attr: {href: ccaURL}"><i class="fa fa-fw fa-balance-scale" aria-hidden="true"></i>&nbsp;Estimation</a>
50-
<a class="list-group-item" data-bind="css: plpCss, attr: {href: plpURL}"><i class="fa fa-fw fa-heartbeat" aria-hidden="true"></i>&nbsp;Prediction</a>
51-
<a class="list-group-item" href="#/jobs"><i class="fa fa-fw fa-tasks" aria-hidden="true"></i>&nbsp;Jobs</a>
52-
<a class="list-group-item" href="#/configure"><i class="fa fa-fw fa-cogs" aria-hidden="true"></i>&nbsp;Configuration</a>
53-
<a class="list-group-item" data-bind="attr: {href: supportURL, target: targetSupportURL}" aria-hidden="true"><i class="fa fa-fw fa-comment"></i>&nbsp;Feedback</a>
33+
<div class="app__menu">
34+
<!-- ko foreach: router.pages -->
35+
<a data-bind="attr: {href: navUrl()}, css: $parent.classes({ element: 'menu-item', modifiers: $parent.activePage() === $data.title ? 'selected' : '', extra: statusCss() })">
36+
<i data-bind="css: $parent.classes({ element: 'menu-icon', extra: `fa fa-fw fa-${icon}`})" aria-hidden="true"></i>
37+
<span data-bind="text: $data.title, css: $parent.classes('menu-title')"></span>
38+
</a>
39+
<!-- /ko -->
5440
</div>
5541

5642
<div id="wrapper_ohdsi">
@@ -65,8 +51,8 @@
6551

6652
<div id="wrapperMainWindow" style="display:none;" data-bind="visible:initializationComplete()">
6753
<div id="wrapperMainWindowContainer">
68-
<user-bar params="{model: pageModel}"></user-bar>
69-
<div data-bind="if:sharedState.appInitializationStatus() == 'failed'">
54+
<user-bar params="{model: $data}"></user-bar>
55+
<div data-bind="if: appInitializationStatus() == 'failed'">
7056
<div style="width:100px;margin-left:auto;margin-right:auto;">
7157
<svg width="100" height="100" viewBox="0 -200 400 400">
7258
<g id="rings">
@@ -90,7 +76,7 @@
9076
</div>
9177
</div>
9278

93-
<div data-bind="if:sharedState.appInitializationStatus() == 'no-sources-available'">
79+
<div data-bind="if: noSourcesAvailable && !currentViewAccessible()">
9480
<div style="width:100px;margin-left:auto;margin-right:auto;">
9581
<svg width="100" height="100" viewBox="0 -200 400 400">
9682
<g id="rings">
@@ -110,34 +96,37 @@
11096
<div class="error">application initialization failed</div>
11197
<div class="error">
11298
<p>the current webapi has no sources defined.</p>
113-
<p>please contact your administrator to resolve this issue.</p>
99+
<p>please add one or more on <a href="#/configure">configuration</a> page.</p>
114100
</div>
115101
</div>
116102

117-
<!-- ko if: pageModel.currentCohortDefinition() || pageModel.currentConceptSet() -->
118-
<!-- ko if: pageModel.currentCohortDefinition() != null && pageModel.currentView() !='cohort-definition-manager' && pageModel.currentView() != 'loading' -->
103+
<!-- ko if: $data.currentCohortDefinition() || $data.currentConceptSet() -->
104+
<!-- ko if: $data.currentCohortDefinition() != null && $data.currentView() !='cohort-definition-manager' && $data.currentView() != 'loading' -->
119105
<div class="breadcrumb-container">
120106
<i class="fa fa-arrow-left"></i>
121-
<a data-bind="attr: { href: '#/cohortdefinition/' + pageModel.currentCohortDefinition().id()}, text: pageModel.currentCohortDefinition().name"></a>
122-
<!-- ko if: pageModel.currentConceptSet() != null && pageModel.currentConceptSetSource() == 'cohort' -->
107+
<a data-bind="attr: { href: '#/cohortdefinition/' + $data.currentCohortDefinition().id()}, text: $data.currentCohortDefinition().name"></a>
108+
<!-- ko if: $data.currentConceptSet() != null && $data.currentConceptSetSource() == 'cohort' -->
123109
<i class="fa fa-chevron-right"></i>
124-
<a data-bind="attr: { href: '#/cohortdefinition/' + pageModel.currentCohortDefinition().id() + '/conceptsets/' + pageModel.currentConceptSet().id + '/details'}, text:pageModel.currentConceptSet().name()"></a>
110+
<a data-bind="attr: { href: '#/cohortdefinition/' + $data.currentCohortDefinition().id() + '/conceptsets/' + $data.currentConceptSet().id + '/details'}, text:$data.currentConceptSet().name()"></a>
125111
<!-- /ko -->
126112
</div>
127113
<!-- /ko -->
128-
<!-- ko if: pageModel.currentConceptSet() && pageModel.currentConceptSetSource() == 'repository' && pageModel.currentView() != 'conceptset-manager' -->
114+
<!-- ko if: $data.currentConceptSet() && $data.currentConceptSetSource() == 'repository' && $data.currentView() != 'conceptset-manager' -->
129115
<div class="breadcrumb-container">
130116
<i class="fa fa-arrow-left"></i>
131-
<a data-bind="attr: { href: '#/conceptset/' + pageModel.currentConceptSet().id + '/details'}, text:pageModel.currentConceptSet().name"></a>
117+
<a data-bind="attr: { href: '#/conceptset/' + $data.currentConceptSet().id + '/details'}, text:$data.currentConceptSet().name"></a>
132118
</div>
133119
<!-- /ko -->
134120
<!-- /ko -->
135121

136-
<!-- ko if: pageModel.currentView && (sharedState.appInitializationStatus() != 'failed' && sharedState.appInitializationStatus() != 'no-sources-available') -->
137-
<div id="currentComponent" class="flexed" data-bind='component: {name: pageModel.currentView,params: pageModel.componentParams}'></div>
138-
<!-- /ko -->
122+
<div data-bind="if: currentViewAccessible" class="flexed">
123+
<div id="currentComponent" class="flexed" data-bind='component: {name: $data.currentView, params: { routerParams: routerParams, model: $data } }'></div>
124+
</div>
139125
</div>
140126
</div>
127+
<!-- ko if: appInitializationStatus() === 'running' -->
128+
<terms-and-conditions params="model: $data"></terms-and-conditions>
129+
<!-- /ko -->
141130
<script data-main="js/main" src="js/require.js"></script>
142131
</body>
143132

0 commit comments

Comments
 (0)