Skip to content

Commit b058fdf

Browse files
authored
Merge pull request #34 from m00n620/fix/create-data-source
fix createDicomWebTreeApi to use serviceManager
2 parents 0851a07 + aa5c8e0 commit b058fdf

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/createDicomWebTreeApi.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ const initializeHealthlakeFetch = (healthlake) => {
107107
* @param {bool} lazyLoadStudy - "enableStudyLazyLoad"; Request series meta async instead of blocking
108108
* @param {string|bool} singlepart - indicates of the retrieves can fetch singlepart. Options are bulkdata, video, image or boolean true
109109
*/
110-
function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
110+
function createDicomWebTreeApi(dicomWebConfig, servicesManager) {
111+
const { userAuthenticationService } = servicesManager.services;
111112
const {
112113
qidoRoot,
113114
wadoRoot,
@@ -123,7 +124,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
123124
staticWado,
124125
healthlake,
125126
singlepart,
126-
headers: UserAuthenticationService.getAuthorizationHeader(),
127+
headers: userAuthenticationService.getAuthorizationHeader(),
127128
errorInterceptor: errorHandler.getHTTPErrorHandler(),
128129
};
129130

@@ -132,7 +133,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
132133
singlepart,
133134
staticWado,
134135
healthlake,
135-
headers: UserAuthenticationService.getAuthorizationHeader(),
136+
headers: userAuthenticationService.getAuthorizationHeader(),
136137
errorInterceptor: errorHandler.getHTTPErrorHandler(),
137138
};
138139

@@ -160,7 +161,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
160161
studies: {
161162
mapParams: mapParams.bind(),
162163
search: async function (origParams) {
163-
const headers = UserAuthenticationService.getAuthorizationHeader();
164+
const headers = userAuthenticationService.getAuthorizationHeader();
164165
if (headers) {
165166
qidoDicomWebClient.headers = headers;
166167
}
@@ -207,7 +208,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
207208
series: {
208209
// mapParams: mapParams.bind(),
209210
search: async function (studyInstanceUid) {
210-
const headers = UserAuthenticationService.getAuthorizationHeader();
211+
const headers = userAuthenticationService.getAuthorizationHeader();
211212
if (headers) {
212213
qidoDicomWebClient.headers = headers;
213214
}
@@ -240,7 +241,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
240241

241242
instances: {
242243
search: (studyInstanceUid, queryParameters) => {
243-
const headers = UserAuthenticationService.getAuthorizationHeader();
244+
const headers = userAuthenticationService.getAuthorizationHeader();
244245
if (headers) {
245246
qidoDicomWebClient.headers = headers;
246247
}
@@ -342,7 +343,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
342343
sortFunction,
343344
madeInClient = false,
344345
}) => {
345-
const headers = UserAuthenticationService.getAuthorizationHeader();
346+
const headers = userAuthenticationService.getAuthorizationHeader();
346347
if (headers) {
347348
wadoDicomWebClient.headers = headers;
348349
}
@@ -368,7 +369,7 @@ function createDicomWebTreeApi(dicomWebConfig, UserAuthenticationService) {
368369
store: {
369370
dicom: async dataset => {
370371
// remove
371-
const headers = UserAuthenticationService.getAuthorizationHeader();
372+
const headers = userAuthenticationService.getAuthorizationHeader();
372373
if (headers) {
373374
wadoDicomWebClient.headers = headers;
374375
}

0 commit comments

Comments
 (0)