Closed j6u closed 1 year ago
Hi @j6u!
So the OpenID Connect integration with Google Cloud Heathcare API works fine right now in v3, the only thing that's missing is the user interface that exists in v2 to manually switch between projects / locations / datasets etc.
If you want to use a single DICOM store, you can write an app-config like this:
window.config = {
routerBasename: '/',
// This is an array, but we'll only use the first entry for now
oidc: [
{
// ~ REQUIRED
// Authorization Server URL
authority: 'https://accounts.google.com/',
client_id:
'72392840.........2rhu69vlnibipmmk9i57p.apps.googleusercontent.com',
redirect_uri: '/callback',
response_type: 'id_token token',
scope:
'email profile openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/cloud-healthcare', // email profile openid
// ~ OPTIONAL
post_logout_redirect_uri: '/logout-redirect.html',
revoke_uri: 'https://accounts.google.com/o/oauth2/revoke?token=',
automaticSilentRenew: true,
revokeAccessTokenOnSignout: true,
},
],
// whiteLabelling: {},
extensions: [],
modes: [],
showStudyList: true,
// filterQueryParam: false,
dataSources: [
{
friendlyName: 'dcmjs DICOMWeb Server',
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'dicomweb',
configuration: {
name: 'GCP',
wadoUriRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
qidoRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
wadoRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
qidoSupportsIncludeField: true,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: true,
supportsWildcard: false,
},
},
{
friendlyName: 'dicom json',
namespace: '@ohif/extension-default.dataSourcesModule.dicomjson',
sourceName: 'dicomjson',
configuration: {
name: 'json',
},
},
{
friendlyName: 'dicom local',
namespace: '@ohif/extension-default.dataSourcesModule.dicomlocal',
sourceName: 'dicomlocal',
configuration: {},
},
],
defaultDataSourceName: 'dicomweb',
};
If you'd like to start building the UI to select projects, that would be awesome! We were calling it the Google Cloud Adapter. I'm honestly not sure where it would live in v3 though, maybe as a separate page before loading the study list..
Hello @sedghi
I am using embedded OHIF Viewer with Google Healthcare API in my application. My application has valid Google Bearer token which I can use in calling Healthcare APIs.
My application already has Google OAuth Login page. Is there any way to inject token to OHIF Viewer to bypass OHIF Viewer login page?
I added and removed IDC candidate label, because for us the smaller task of basic support through URL (no GUI / fancy picker) is in the critical path.
Hi, I'm trying to use the viewer with Google Health API, I am using the following code to generate the token
from google.oauth2 import service_account
import google.auth.transport.requests
# Load the credentials from your service account key file
credentials = service_account.Credentials.from_service_account_file(
'XXXX.json', scopes=['https://www.googleapis.com/auth/cloud-healthcare'])
# Use the credentials to obtain an access token
auth_req = google.auth.transport.requests.Request()
credentials.refresh(auth_req)
Using this token, I can get all requests in python easily, however, the OHIF is giving me 401 error, any idea what needs to be adjusted? I am using the google.js config file from public/config. I also tried dicomweb-server.js, same issue.
Any idea?
@alib022 You need to add the client_id and register it with Google.
We have updated Google Store docs https://docs.ohif.org/deployment/google-cloud-healthcare
Request
I'd love to see Google Health DICOM Store integration added back to v3. If no one is taking on this one, is it possible to get some guidance on this task? I'd love to contribute,
Why should we prioritize this feature? This is important as it is supported by OHIF-V2 and prevent the community who uses GCP for DICOM storage from using OHIF V3.