feat(google-cloud): Add support for Google Cloud Healthcare API DICOM Store Switch (#325)
* NOTASK: PoC for loading data from Healthcare API * NOTASK: PoC for loading data from Healthcare API fix * Add sample dialog for loading test dicom-picker * Fix incorrect promise resolving * NOTASK: PoC for loading dicom store * Add web-components as git submodules. (Probably will be changed later) * Add rough dicomStore picker * Add dataset selector * NOTASK: QIDO metadata first draft * NOTASK: Not Implemented error for color images * NOTASK: clean-up * Dicom files uploader intermediate version * NOTASK: Accept header * NOTASK: docker configs * NOTASK: fix * NOTASK: howTo * Add draft of DICOM uploader * Add missing files * Fix error with missing clientId * Update submodule * NOTASK: HowTo * NOTASK: config for dev * NOTASK: new docker file * clean-up * Update GCP web-components * Add integration with async web components * Fix errors in nginx.conf * Structured reports views basic implementation * NOTASK: qido -> wado * NOTASK: config fix * NOTASK: dirty copy-paste implementation * Add "Change dicom store" button. Add an ability to clear date. Fix bug, when OAuth dosn't work if URL is not / * Fix studylist filtering * Fix dockerfile * NOTASK: meteor update * NOTASK: fix of package structure * NOTASK: merge fix * improvements Move check for now SR into SR modal Use simple button to open SR modal Remove button styling cleanup * copy SR data retrieval to wado * make search of SR simpler * Codestyle fix * NOTASK: palette color error message * Fix date filter. Fix server settings on first loading. Add SR and PS buttons * NOTASK: PS is now hidden by default * NOTASK: dirty solution * NOTASK: new wadoimage lib version * Fix PS and SR buttons * Make modal dialogs vertically centered * Update web components. Quick UI fixes * Add missing files to the previous commit * NOTASK: show-hide for PS * NOTASK: show-hide for PS * NOTASK: fix of min-max PixelValue bug * Add "sign out" functionality for Google OAuth. Update web-components. * intermediate commit * Add demo signin page * Beautifying demo sign in page * NOTASK: merge * NOTASK: clean-up * Use npm for getting healthcare-api-adapter instead of git submodule. * NOTASK: clean-up * meteor update * clean-up * clean-up * Clean up code * Update healthcare-api-adapter version. Add location to dicom store path. Fix buttons style. * Downgrade meteor and packages to master version. Use meteor-build-client-fixed2
This commit is contained in:
1 parent
1783351f57
commit
9486522552
68 files changed
+1422
-514
No files matched your search
@@ -0,0 +1,3 @@
|
||||
healthcare-api-adapter/node_modules/
|
||||
healthcare-api-adapter/public/
|
||||
healthcare-api-adapter/src/
|
||||
@@ -0,0 +1,12 @@
|
||||
<template name="gcloudDialog">
|
||||
<div id="{{this.id}}" class="modal fade gcloud-dialog {{this.class}}" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog {{this.dialogClass}}" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
{{>UI.contentBlock}}
|
||||
</div>
|
||||
<div class="modal-footer">{{>section 'dialogFooter'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.gcloudDialog.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
// Allow options ovewrite
|
||||
const modalOptions = _.extend(
|
||||
{
|
||||
backdrop: 'static',
|
||||
keyboard: false,
|
||||
width: 650,
|
||||
},
|
||||
instance.data.modalOptions
|
||||
);
|
||||
|
||||
const $modal = instance.$('.modal');
|
||||
|
||||
// Create the bootstrap modal
|
||||
$modal.modal(modalOptions);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
@import '{ohif:design}/app'
|
||||
|
||||
.gcloud-dialog
|
||||
display flex
|
||||
.modal-dialog
|
||||
margin auto
|
||||
@@ -0,0 +1,9 @@
|
||||
<template name="dicomStorePicker">
|
||||
{{#gcloudDialog (extend this
|
||||
id='dicomStorePicker' dialogClass='themed modal-lg'
|
||||
)}}
|
||||
<div class="dicom-store-picker">
|
||||
<gcp-dataset-selector id={{datasetPickerId}} event={{eventName}} oidc-key={{oidcStorageKey}} can-close={{this.canClose}}></gcp-dataset-selector>
|
||||
</div>
|
||||
{{/gcloudDialog}}
|
||||
</template>
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
const DATASET_PICKER_ID = 'gcp-dataset-picker';
|
||||
const EVENT_NAME = 'onSelect';
|
||||
|
||||
Template.dicomStorePicker.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
instance.$('#' + DATASET_PICKER_ID).on(EVENT_NAME, (event, data) => {
|
||||
instance
|
||||
.$('.modal')
|
||||
.one('hidden.bs.modal', event => {
|
||||
instance.data.promiseResolve(data);
|
||||
})
|
||||
.modal('hide');
|
||||
});
|
||||
});
|
||||
|
||||
Template.dicomStorePicker.helpers({
|
||||
datasetPickerId() {
|
||||
return DATASET_PICKER_ID;
|
||||
},
|
||||
eventName() {
|
||||
return EVENT_NAME;
|
||||
},
|
||||
oidcStorageKey() {
|
||||
return OHIF.user.getOidcStorageKey();
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
@import '{ohif:design}/app'
|
||||
|
||||
#dicomStorePicker
|
||||
.modal-dialog
|
||||
width 694px
|
||||
@@ -0,0 +1,12 @@
|
||||
import './dialogs/gcloudDialog.html';
|
||||
import './dialogs/gcloudDialog.js';
|
||||
import './dialogs/gcloudDialog.styl';
|
||||
|
||||
|
||||
import './dicomStorePicker/dicomStorePicker.html';
|
||||
import './dicomStorePicker/dicomStorePicker.js';
|
||||
import './dicomStorePicker/dicomStorePicker.styl';
|
||||
|
||||
import './uploadStudiesDialog/uploadStudiesDialog.html';
|
||||
import './uploadStudiesDialog/uploadStudiesDialog.js';
|
||||
import './uploadStudiesDialog/uploadStudiesDialog.styl';
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<template name="uploadStudiesDialog">
|
||||
{{#gcloudDialog (extend this
|
||||
id='dicomFilesUploader' dialogClass='themed modal-lg'
|
||||
)}}
|
||||
<div class="dicom-files-uploader">
|
||||
<gcp-dicom-uploader id={{dicomFilesUploaderId}} event={{eventName}} oidc-key={{oidcStorageKey}} url={{url}}></gcp-dicom-uploader>
|
||||
</div>
|
||||
{{/gcloudDialog}}
|
||||
</template>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
const DICOM_FILE_UPLOADER_ID = 'gcp-dicom-uploader';
|
||||
const EVENT_NAME = 'onClose';
|
||||
|
||||
Template.uploadStudiesDialog.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
instance.$('#' + DICOM_FILE_UPLOADER_ID).on(EVENT_NAME, (event, data) => {
|
||||
instance
|
||||
.$('.modal')
|
||||
.one('hidden.bs.modal', event => {
|
||||
instance.data.promiseResolve(data);
|
||||
})
|
||||
.modal('hide');
|
||||
});
|
||||
});
|
||||
|
||||
Template.uploadStudiesDialog.helpers({
|
||||
dicomFilesUploaderId() {
|
||||
return DICOM_FILE_UPLOADER_ID;
|
||||
},
|
||||
eventName() {
|
||||
return EVENT_NAME;
|
||||
},
|
||||
oidcStorageKey() {
|
||||
return OHIF.user.getOidcStorageKey();
|
||||
},
|
||||
url() {
|
||||
return OHIF.gcloud.getConfig().qidoRoot; // FIXME: not QIDO
|
||||
}
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
@import '{ohif:design}/app'
|
||||
|
||||
#dicomFilesUploader
|
||||
.modal-dialog
|
||||
.modal-body
|
||||
padding 0
|
||||
width 536px
|
||||
max-height 563px
|
||||
@@ -0,0 +1,8 @@
|
||||
import { loadScript } from "../lib/utils"
|
||||
|
||||
loadScript("/packages/ohif_google-cloud/.npm/package/node_modules/healthcare-api-adapter/dist/vue.js", () => {
|
||||
loadScript("/packages/ohif_google-cloud/.npm/package/node_modules/healthcare-api-adapter/dist/gcp.min.js");
|
||||
});
|
||||
|
||||
|
||||
import './components';
|
||||
@@ -0,0 +1,41 @@
|
||||
const GCloudAdapter = {};
|
||||
|
||||
const GCP_HEALTHCARE_CONFIG = 'GCP_HEALTHCARE_CONFIG';
|
||||
let isEnabled = true;
|
||||
|
||||
GCloudAdapter.getConfig = function() {
|
||||
const configStr = sessionStorage.getItem(GCP_HEALTHCARE_CONFIG);
|
||||
if (configStr) return JSON.parse(configStr);
|
||||
return null;
|
||||
};
|
||||
|
||||
GCloudAdapter.setConfig = function(config) {
|
||||
if (config) sessionStorage.setItem(GCP_HEALTHCARE_CONFIG, JSON.stringify(config));
|
||||
else sessionStorage.removeItem(GCP_HEALTHCARE_CONFIG);
|
||||
};
|
||||
|
||||
GCloudAdapter.showDicomStorePicker = function(options) {
|
||||
return OHIF.ui.showDialog('dicomStorePicker', options).then(config => {
|
||||
if (config) OHIF.gcloud.setConfig(config);
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
GCloudAdapter.showUploadStudiesDialog = function() {
|
||||
return OHIF.ui.showDialog('uploadStudiesDialog')
|
||||
};
|
||||
|
||||
const gcpConfig = GCloudAdapter.getConfig();
|
||||
if (gcpConfig) {
|
||||
OHIF.servers.applyCloudServerConfig(gcpConfig);
|
||||
}
|
||||
|
||||
GCloudAdapter.setEnabled = function(value) {
|
||||
isEnabled = value;
|
||||
}
|
||||
|
||||
GCloudAdapter.isEnabled = function() {
|
||||
return isEnabled;
|
||||
};
|
||||
|
||||
export default GCloudAdapter;
|
||||
@@ -0,0 +1,10 @@
|
||||
export function loadScript(url, callback=undefined)
|
||||
{
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = url;
|
||||
script.onreadystatechange = callback;
|
||||
script.onload = callback;
|
||||
head.appendChild(script);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import GCloudAdapter from './lib/GCloudAdapter';
|
||||
|
||||
if (Meteor.settings.public.googleCloud) {
|
||||
const gcloud = GCloudAdapter;
|
||||
OHIF.gcloud = gcloud;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
Package.describe({
|
||||
name: 'ohif:google-cloud',
|
||||
summary: 'DICOM Services: Google Cloud Healthcare API integration',
|
||||
version: '0.0.1',
|
||||
documentation: 'README.md',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
'healthcare-api-adapter': "git+https://github.com/quantumsoftgroup/healthcare-api-adapter#v0.2.1"
|
||||
});
|
||||
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.4');
|
||||
|
||||
api.use('http');
|
||||
api.use('ecmascript');
|
||||
|
||||
api.use(['templating', 'stylus'], 'client');
|
||||
|
||||
// Main module
|
||||
api.mainModule('main.js', ['client']);
|
||||
|
||||
// Client imports and routes
|
||||
api.addFiles('client/index.js', 'client');
|
||||
|
||||
var assets = [
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/gcp.min.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/gcp.0.min.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/gcp.2.min.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/gcp.3.min.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/gcp.4.min.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/vue.js',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/Button_File.473e74a7.svg',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/Button_Folder.271da60b.svg',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/Icon-24px-Close.d1a4d6d2.svg',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/Icon-Arrow.e493b444.svg',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/Icon-Warn.f3b4b640.svg',
|
||||
'.npm/package/node_modules/healthcare-api-adapter/dist/img/arrow_right.d8a5b209.svg',
|
||||
];
|
||||
|
||||
api.addAssets(assets, 'client');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user