diff --git a/.gitignore b/.gitignore index 61dcb78..2142e3d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ coverage/ .yarn/ .nx/ addOns/yarn.lock +**.zip # YALC (for Erik) .yalc diff --git a/platform/app/public/config/default.js b/platform/app/public/config/default.js index 60b4ee4..bc93a37 100644 --- a/platform/app/public/config/default.js +++ b/platform/app/public/config/default.js @@ -24,8 +24,8 @@ window.config = { prefetch: 25, }, expertise: false, //* Tambahan untuk enable expertise (CustomizableViewportOverlay) - expertise_host: `http://192.168.1.29`, //* Tambahan untuk fetch data Expertise) - pacs_document_host: `192.168.1.29`, + expertise_host: `https://devone.aplikasi.web.id/one-api/mockup/pacsmwl/Workorder/get_dummy_expertise`, //* Tambahan untuk fetch data Expertise) + pacs_document_host: `152.42.173.210`, pacs_document_port: 8080, // filterQueryParam: false, // defaultDataSourceName: 'dicomweb', @@ -47,8 +47,8 @@ window.config = { configuration: { friendlyName: 'Static WADO Local Data', name: 'DCM4CHEE', - qidoRoot: `http://192.168.1.29:5000/rs`, - wadoRoot: `http://192.168.1.29:5000/rs`, + qidoRoot: `http://152.42.173.210:5000/rs`, + wadoRoot: `http://152.42.173.210:5000/rs`, qidoSupportsIncludeField: false, supportsReject: true, supportsStow: true, diff --git a/platform/app/public/config/google.js b/platform/app/public/config/google.js index cd3c6b2..8cd74c0 100644 --- a/platform/app/public/config/google.js +++ b/platform/app/public/config/google.js @@ -10,25 +10,6 @@ window.config = { showCPUFallbackMessage: true, showLoadingIndicator: true, strictZSpacingForVolumeViewport: true, - // This is an array, but we'll only use the first entry for now - // Remove OIDC configuration since proxy handles authentication - // oidc: [ - // { - // // ~ REQUIRED - // // Authorization Server URL - // authority: 'https://accounts.google.com', - // client_id: '382212153306-7q39hdie4ecj0uhemkitvedo93bnvfhn.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, - // }, - // ], extensions: [], modes: [], showStudyList: true, @@ -53,12 +34,6 @@ window.config = { dicomUploadEnabled: true, omitQuotationForMultipartRequest: true, configurationAPI: 'ohif.dataSourceConfigurationAPI.google', - // defaultDicomStoreConfiguredItems: { - // id: 'projects/ohifproxy/locations/asia-southeast2/datasets/sas-storage', - // itemType: '3', - // name: 'store-1', - // url: 'https://healthcare.googleapis.com/v1/projects/ohifproxy/locations/asia-southeast2/datasets/sas-storage/dicomStores/store-1' - // }, }, }, { diff --git a/platform/ui-next/src/components/SidePanel/SidePanel.tsx b/platform/ui-next/src/components/SidePanel/SidePanel.tsx index 71d6f37..ed1f7d2 100644 --- a/platform/ui-next/src/components/SidePanel/SidePanel.tsx +++ b/platform/ui-next/src/components/SidePanel/SidePanel.tsx @@ -356,14 +356,21 @@ const SidePanel = ({ } setIsExpertiseLoading(true); - const url = `${window.config.expertise_host}/nv/query.php?method=view&AccessionNumber=${encodeURIComponent(accessionNumber)}`; + const url = `${window.config.expertise_host}?accessionNo=${accessionNumber}`; const response = await fetch(url); const data = await response.json(); - console.log('Study data:', data); + if (data?.status === 'OK' && data?.data) { + // Create expertise data in the format expected by your component + const formattedExpertiseData = { + ordering_physician: data.data.senderDoctorName, + radiologist: data.data.pjDoctorName, + expertise_dttm: data.data.expTime, + // Convert the expertise object to a string format that parseExpertise can handle + expertise: formatExpertiseToString(data.data.expertise), + }; - if (data?.study?.expertise && data.study.expertise.length > 0) { - setExpertiseData(data.study.expertise[0]); + setExpertiseData(formattedExpertiseData); } } catch (error) { console.error('Error fetching expertise data:', error); @@ -372,6 +379,32 @@ const SidePanel = ({ } }; + // Helper function to convert expertise object to string format + const formatExpertiseToString = expertiseObj => { + if (!expertiseObj) return ''; + + let result = ''; + + // Add each section with proper formatting + if (expertiseObj.Indikasi) { + result += `KLINIS: ${expertiseObj.Indikasi}\r\n`; + } + + if (expertiseObj.Teknik) { + result += `TEKNIK: ${expertiseObj.Teknik}\r\n\r\n`; + } + + if (expertiseObj.Deskripsi) { + result += `KETERANGAN:\r\n${expertiseObj.Deskripsi.replace(/\n/g, '\r\n')}\r\n\r\n`; + } + + if (expertiseObj.Kesan) { + result += `KESAN: ${expertiseObj.Kesan}`; + } + + return result; + }; + const getExpertisePanel = () => { if (side !== 'right') return null; // Only show in the right side panel