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:
Egor Lezhnin authored and Erik Ziegler committed 2019-03-22 16:42:26 +01:00
1 parent 1783351f57
commit 9486522552
68 files changed
+1422 -514

No files matched your search

+38 -1
View File
@@ -234,4 +234,41 @@
<title>Password</title>
<path d="M5 12h8v-3c0-2.203-1.797-4-4-4s-4 1.797-4 4v3zM18 13.5v9c0 0.828-0.672 1.5-1.5 1.5h-15c-0.828 0-1.5-0.672-1.5-1.5v-9c0-0.828 0.672-1.5 1.5-1.5h0.5v-3c0-3.844 3.156-7 7-7s7 3.156 7 7v3h0.5c0.828 0 1.5 0.672 1.5 1.5z"></path>
</symbol>
</svg>
<symbol id="icon-sr" viewBox="0 0 21 21">
<title>Structured Report</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-24.000000, -24.000000)">
<g transform="translate(25.000000, 25.000000)">
<path d="M16,17 L16,18 C16,18.5522847 15.5522847,19 15,19 L1,19 C0.44771525,19 0,18.5522847 0,18 L0,1 C0,0.44771525 0.44771525,1.59872116e-14 1,1.59872116e-14 L12.5857864,1.59872116e-14 C12.8510029,1.59872116e-14 13.1053568,0.10535684 13.2928932,0.292893219 L15.7071068,2.70710678 C15.8946432,2.89464316 16,3.14899707 16,3.41421356 L16,5" stroke="#91B9CD" stroke-width="2" stroke-linecap="round"></path>
<path d="M8.421,8.642 C8.13499857,8.642 7.90950083,8.70983265 7.7445,8.8455 C7.57949918,8.98116734 7.497,9.16083221 7.497,9.3845 C7.497,9.60816778 7.59783233,9.78599934 7.7995,9.918 C8.00116768,10.0500007 8.46682968,10.2058324 9.1965,10.3855 C9.92617032,10.5651676 10.4926647,10.8346649 10.896,11.194 C11.2993353,11.5533351 11.501,12.0776632 11.501,12.767 C11.501,13.4563368 11.2425026,14.0154979 10.7255,14.4445 C10.2084974,14.8735021 9.52833755,15.088 8.685,15.088 C7.46766058,15.088 6.37133821,14.6370045 5.396,13.735 L6.419,12.481 C7.24767081,13.2070036 8.01399648,13.57 8.718,13.57 C9.03333491,13.57 9.28083243,13.5021673 9.4605,13.3665 C9.64016756,13.2308327 9.73,13.0475012 9.73,12.8165 C9.73,12.5854988 9.63466762,12.4021673 9.444,12.2665 C9.25333238,12.1308327 8.87566949,11.993334 8.311,11.854 C7.41632886,11.6413323 6.76183541,11.3645017 6.3475,11.0235 C5.93316459,10.6824983 5.726,10.1471703 5.726,9.4175 C5.726,8.68782968 5.98816404,8.12500198 6.5125,7.729 C7.03683596,7.33299802 7.69132941,7.135 8.476,7.135 C8.9893359,7.135 9.5026641,7.22299912 10.016,7.399 C10.5293359,7.57500088 10.9766648,7.82433172 11.358,8.147 L10.489,9.401 C9.82166333,8.89499747 9.13233689,8.642 8.421,8.642 Z M19.201,9.863 C19.201,11.0950062 18.7133382,11.8906649 17.738,12.25 L19.685,15 L17.573,15 L15.868,12.547 L14.68,12.547 L14.68,15 L12.964,15 L12.964,7.311 L15.879,7.311 C17.0743393,7.311 17.9268308,7.51266465 18.4365,7.916 C18.9461692,8.31933535 19.201,8.96832886 19.201,9.863 Z M15.934,11.062 C16.5206696,11.062 16.9203323,10.9666676 17.133,10.776 C17.3456677,10.5853324 17.452,10.2828354 17.452,9.8685 C17.452,9.45416459 17.3420011,9.17000077 17.122,9.016 C16.9019989,8.86199923 16.5170027,8.785 15.967,8.785 L14.68,8.785 L14.68,11.062 L15.934,11.062 Z" fill="#91B9CD"></path>
</g>
</g>
</g>
</symbol>
<symbol id="icon-ps" viewBox="0 0 22 21">
<title>Presentation State</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-22.000000, -64.000000)">
<g transform="translate(22.000000, 65.000000)">
<path d="M3,3.55271368e-14 L19,3.55271368e-14 C20.6568542,3.66943598e-14 22,1.34314575 22,3 L22,12.4553925 C22,14.1122467 20.6568542,15.4553925 19,15.4553925 L3,15.4553925 C1.34314575,15.4553925 2.02906125e-16,14.1122467 0,12.4553925 L0,3 C-2.02906125e-16,1.34314575 1.34314575,3.5831496e-14 3,3.55271368e-14 Z M7.4305,4.311 L4.7135,4.311 L4.7135,12 L6.4295,12 L6.4295,9.855 L7.4525,9.855 C8.58917235,9.855 9.43433057,9.6350022 9.988,9.195 C10.5416694,8.7549978 10.8185,8.06017141 10.8185,7.1105 C10.8185,6.16082858 10.5490027,5.45683562 10.01,4.9985 C9.47099731,4.54016437 8.61117257,4.311 7.4305,4.311 Z M14.6355,5.642 C15.3468369,5.642 16.0361633,5.89499747 16.7035,6.401 L17.5725,5.147 C17.1911648,4.82433172 16.7438359,4.57500088 16.2305,4.399 C15.7171641,4.22299912 15.2038359,4.135 14.6905,4.135 C13.9058294,4.135 13.251336,4.33299802 12.727,4.729 C12.202664,5.12500198 11.9405,5.68782969 11.9405,6.4175 C11.9405,7.14717032 12.1476646,7.6824983 12.562,8.0235 C12.9763354,8.36450171 13.6308289,8.64133227 14.5255,8.854 C15.0901695,8.99333403 15.4678324,9.13083266 15.6585,9.2665 C15.8491676,9.40216735 15.9445,9.58549885 15.9445,9.8165 C15.9445,10.0475012 15.8546676,10.2308327 15.675,10.3665 C15.4953324,10.5021673 15.2478349,10.57 14.9325,10.57 C14.2284965,10.57 13.4621708,10.2070036 12.6335,9.481 L11.6105,10.735 C12.5858382,11.6370045 13.6821606,12.088 14.8995,12.088 C15.7428376,12.088 16.4229974,11.8735021 16.94,11.4445 C17.4570026,11.0154979 17.7155,10.4563368 17.7155,9.767 C17.7155,9.07766322 17.5138354,8.55333513 17.1105,8.194 C16.7071647,7.83466487 16.1406703,7.56516757 15.411,7.3855 C14.6813297,7.20583244 14.2156677,7.05000066 14.014,6.918 C13.8123323,6.78599934 13.7115,6.60816779 13.7115,6.3845 C13.7115,6.16083222 13.7939992,5.98116735 13.959,5.8455 C14.1240008,5.70983266 14.3494986,5.642 14.6355,5.642 Z M7.5845,8.37 L6.4295,8.37 L6.4295,5.785 L7.4085,5.785 C7.97316949,5.785 8.389332,5.87849906 8.657,6.0655 C8.92466801,6.25250093 9.0585,6.56783111 9.0585,7.0115 C9.0585,7.45516888 8.95583436,7.79249884 8.7505,8.0235 C8.54516564,8.25450115 8.15650286,8.37 7.5845,8.37 Z" fill="#91B9CD"></path>
<path d="M11,15 L11,18" stroke="#91B9CD" stroke-width="2" stroke-linecap="round"></path>
<path d="M11,-1.11022302e-15 L11,1" stroke="#91B9CD" stroke-width="2" stroke-linecap="round"></path>
<path d="M7,19 L11,18" stroke="#91B9CD" stroke-width="2" stroke-linecap="round"></path>
<path d="M11,19 L15,18" stroke="#91B9CD" stroke-width="2" stroke-linecap="round" transform="translate(13.000000, 18.000000) scale(-1, 1) translate(-13.000000, -18.000000) "></path>
</g>
</g>
</g>
</symbol>
<symbol id="google-icon" viewBox="0 0 24 24">
<desc>Google icon</desc>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(3.000000, 3.000000)">
<path d="M17.64,9.20454545 C17.64,8.56636364 17.5827273,7.95272727 17.4763636,7.36363636 L9,7.36363636 L9,10.845 L13.8436364,10.845 C13.635,11.97 13.0009091,12.9231818 12.0477273,13.5613636 L12.0477273,15.8195455 L14.9563636,15.8195455 C16.6581818,14.2527273 17.64,11.9454545 17.64,9.20454545 L17.64,9.20454545 Z" id="Shape" fill="#4285F4"></path>
<path d="M9,18 C11.43,18 13.4672727,17.1940909 14.9563636,15.8195455 L12.0477273,13.5613636 C11.2418182,14.1013636 10.2109091,14.4204545 9,14.4204545 C6.65590909,14.4204545 4.67181818,12.8372727 3.96409091,10.71 L0.957272727,10.71 L0.957272727,13.0418182 C2.43818182,15.9831818 5.48181818,18 9,18 L9,18 Z" id="Shape" fill="#34A853"></path>
<path d="M3.96409091,10.71 C3.78409091,10.17 3.68181818,9.59318182 3.68181818,9 C3.68181818,8.40681818 3.78409091,7.83 3.96409091,7.29 L3.96409091,4.95818182 L0.957272727,4.95818182 C0.347727273,6.17318182 0,7.54772727 0,9 C0,10.4522727 0.347727273,11.8268182 0.957272727,13.0418182 L3.96409091,10.71 L3.96409091,10.71 Z" id="Shape" fill="#FBBC05"></path>
<path d="M9,3.57954545 C10.3213636,3.57954545 11.5077273,4.03363636 12.4404545,4.92545455 L15.0218182,2.34409091 C13.4631818,0.891818182 11.4259091,0 9,0 C5.48181818,0 2.43818182,2.01681818 0.957272727,4.95818182 L3.96409091,7.29 C4.67181818,5.16272727 6.65590909,3.57954545 9,3.57954545 L9,3.57954545 Z" id="Shape" fill="#EA4335"></path>
<polygon id="Shape" points="0 0 18 0 18 18 0 18"></polygon>
</g>
</g>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 27 KiB

@@ -9,7 +9,7 @@ export function getWADORSImageUrl(instance, frame) {
frame = (frame || 0) + 1;
// Replaces /frame/1 by /frame/{frame}
wadorsuri = wadorsuri.replace(/(%2Fframes%2F)(\d+)/, `$1${frame}`);
wadorsuri = wadorsuri.replace(/(\/frames\/)(\d+)/, `$1${frame}`);
return wadorsuri;
}
@@ -9,10 +9,28 @@ const formatPN = context => {
// Convert the first ^ to a ', '. String.replace() only affects
// the first appearance of the character.
const commaBetweenFirstAndLast = context.replace('^', ', ');
//const commaBetweenFirstAndLast = context.replace('^', ', ');
// Replace any remaining '^' characters with spaces
const cleaned = commaBetweenFirstAndLast.replace(/\^/g, ' ');
//const cleaned = commaBetweenFirstAndLast.replace(/\^/g, ' ');
// for cloud healthcare replace all ^ with ', '
const cleaned = context.replace(/\^/g, ', ');
// Trim any extraneous whitespace
return cleaned.trim();
};
/**
* Formats a patient name for display purposes
*/
const reverseFormatPN = context => {
if (!context) {
context;
}
// Replace any remaining '^' characters with spaces
const cleaned = context.replace(/, /g, '^');
// Trim any extraneous whitespace
return cleaned.trim();
@@ -27,4 +45,8 @@ if (!Blaze._getGlobalHelper('formatPN')) {
Blaze.registerHelper('formatPN', formatPN);
}
export { formatPN };
if (!Blaze._getGlobalHelper('reverseFormatPN')) {
Blaze.registerHelper('reverseFormatPN', reverseFormatPN);
}
export { formatPN, reverseFormatPN };
@@ -3,7 +3,7 @@
*/
import { isTouchDevice } from './isTouchDevice';
import { formatPN } from './formatPN';
import { formatPN, reverseFormatPN } from './formatPN';
import { formatDA } from './formatDA';
import { formatTM } from './formatTM';
@@ -33,7 +33,8 @@ const helpers = {
isTouchDevice,
formatPN,
formatDA,
formatTM
formatTM,
reverseFormatPN
};
export { helpers };
@@ -225,6 +225,16 @@ Meteor.startup(function() {
name: 'Show/Hide Download Dialog',
action: viewportUtils.toggleDownloadDialog,
disabled: () => !viewportUtils.isDownloadEnabled()
},
ps: {
name: 'Show/Hide Presentation State',
action: () => Session.set('MeasurementsReady', !Session.get('MeasurementsReady')),
disabled: () => false
},
sr: {
name: 'Show/Hide Structured Report',
action: () => OHIF.ui.showDialog('structuredReportModal'),
disabled: () => false
}
}, true);
@@ -167,6 +167,18 @@ const clearTools = () => {
toolStateManager.clear(element);
cornerstone.updateImage(element);
};
const hideTools = () => {
const element = getActiveViewportElement();
const toolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager;
toolStateManager.hide(element);
cornerstone.updateImage(element);
};
const unhideTools = () => {
const element = getActiveViewportElement();
const toolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager;
toolStateManager.unhide(element);
cornerstone.updateImage(element);
};
const linkStackScroll = () => {
const synchronizer = OHIF.viewer.stackImagePositionOffsetSynchronizer;
@@ -383,6 +395,8 @@ const viewportUtils = {
flipH,
resetViewport,
clearTools,
hideTools,
unhideTools,
linkStackScroll,
toggleDialog,
toggleCinePlay,