Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estimation specification for multiple outcomes #466

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="js/styles/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="js/styles/typeahead.css">
<link rel="stylesheet" type="text/css" href="js/styles/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="js/styles/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
Expand Down
3 changes: 2 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ define(['jquery', 'knockout', 'ohdsi.util', 'appConfig', 'webapi/AuthAPI', 'atla
});
},
'/estimation/:cohortComparisonId:': function (cohortComparisonId) {
require(['cohort-comparison-manager', 'cohort-definition-browser', 'components/atlas.cohort-editor', 'cohort-comparison-print-friendly', 'cohort-comparison-r-code', 'cohort-comparison-multi-r-code'], function () {
require(['cohort-comparison-manager', 'cohort-definition-browser', 'cohort-comparison-spec-editor', 'cohort-comparison-results',
'components/atlas.cohort-editor', 'cohort-comparison-print-friendly', 'cohort-comparison-r-code', 'cohort-comparison-multi-r-code'], function () {
self.currentCohortComparisonId(+cohortComparisonId);
self.componentParams = {
currentCohortComparisonId: self.currentCohortComparisonId,
Expand Down
31 changes: 13 additions & 18 deletions js/components/cohort-comparison-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig','cohortcomparison/ComparativeCohortAnalysis','faceted-datatable'], function (ko, view, config) {
define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig', 'webapi/ComparativeCohortAnalysisAPI', 'cohortcomparison/ComparativeCohortAnalysis', 'faceted-datatable'], function (ko, view, config, comparativeCohortAnalysisAPI) {
function cohortComparisonBrowser(params) {
var self = this;
self.reference = ko.observableArray();
Expand All @@ -11,9 +11,9 @@ define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig','cohort
'caption': 'Last Modified',
'binding': function (o) {
var daysSinceModification = (new Date().getTime() - new Date(o.modified).getTime()) / 1000 / 60 / 60 / 24;
if (daysSinceModification < .01) {
if (daysSinceModification < .01) {
return 'Just Now';
} else if (daysSinceModification < 1) {
} else if (daysSinceModification < 1) {
return 'Within 24 Hours';
} else if (daysSinceModification < 7) {
return 'This Week';
Expand All @@ -38,9 +38,9 @@ define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig','cohort
},
{
title: 'Name',
data: d => {
return '<span class=\'linkish\'>' + d.name + '</span>';
},
data: d => {
return '<span class=\'linkish\'>' + d.name + '</span>';
},
},
{
title: 'Created',
Expand All @@ -56,19 +56,14 @@ define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig','cohort
}
];

self.newCohortComparison = function() {
document.location = '#/estimation/0' ;
self.newCohortComparison = function () {
document.location = '#/estimation/0';
}

self.loading(true);

$.ajax({
url: config.api.url + 'comparativecohortanalysis',
method: 'GET',
success: function (d) {
self.loading(false);
self.reference(d);
}
comparativeCohortAnalysisAPI.getComparativeCohortAnalysisList().then(function (d) {
self.loading(false);
self.reference(d);
});
}

Expand All @@ -79,4 +74,4 @@ define(['knockout', 'text!./cohort-comparison-browser.html', 'appConfig','cohort

ko.components.register('cohort-comparison-browser', component);
return component;
});
});
726 changes: 72 additions & 654 deletions js/components/cohort-comparison-manager.html

Large diffs are not rendered by default.

Loading