edit: add header to additional fetch diluar bawaan OHIF
This commit is contained in:
@@ -102,8 +102,20 @@ export const studyDataForOverlayItem = (studyInstanceUID: string) => {
|
|||||||
try {
|
try {
|
||||||
const qidoRootUrl = getQidoRootUrl();
|
const qidoRootUrl = getQidoRootUrl();
|
||||||
|
|
||||||
|
// Get the authentication token from session storage
|
||||||
|
const authToken = window.sessionStorage.getItem('ohif-auth-token');
|
||||||
|
|
||||||
|
// Create request headers with Authorization if token exists
|
||||||
|
const headers: HeadersInit = {};
|
||||||
|
if (authToken) {
|
||||||
|
headers['Authorization'] = `Bearer ${authToken}`;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${qidoRootUrl}/studies?limit=101&offset=0&fuzzymatching=false&includefield=00080050,00081030,00101010,0010004&StudyInstanceUID=${studyInstanceUID}`
|
`${qidoRootUrl}/studies?limit=101&offset=0&fuzzymatching=false&includefield=00080050,00081030,00101010,0010004&StudyInstanceUID=${studyInstanceUID}`,
|
||||||
|
{
|
||||||
|
headers,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user