Compare commits
4 Commits
coba-panel
...
bisone-int
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63b9bc5ffc | ||
|
|
f4dea5a9d6 | ||
|
|
860a738734 | ||
|
|
f323b0b046 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -12,6 +12,7 @@ coverage/
|
|||||||
.yarn/
|
.yarn/
|
||||||
.nx/
|
.nx/
|
||||||
addOns/yarn.lock
|
addOns/yarn.lock
|
||||||
|
**.zip
|
||||||
|
|
||||||
# YALC (for Erik)
|
# YALC (for Erik)
|
||||||
.yalc
|
.yalc
|
||||||
@@ -59,3 +60,4 @@ tests/playwright-report/
|
|||||||
|
|
||||||
# Dummy
|
# Dummy
|
||||||
/dump
|
/dump
|
||||||
|
platform/app/dist.zip
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ function OHIFCornerstonePdfViewport({ displaySets }) {
|
|||||||
var [url, setUrl] = useState(null);
|
var [url, setUrl] = useState(null);
|
||||||
|
|
||||||
const sopInstanceUid = displaySets[0].SOPInstanceUID;
|
const sopInstanceUid = displaySets[0].SOPInstanceUID;
|
||||||
url = `http://128.199.154.150:8080/rid/IHERetrieveDocument?requestType=DOCUMENT&documentUID=${sopInstanceUid}&preferredContentType=application%2Fpdf`;
|
url = `http://${window.config.pacs_document_host}:${window.config.pacs_document_port}/rid/IHERetrieveDocument?requestType=DOCUMENT&documentUID=${sopInstanceUid}&preferredContentType=application%2Fpdf`;
|
||||||
|
|
||||||
|
// console.log('PDF URL:', url);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.body.addEventListener('drag', makePdfDropTarget);
|
document.body.addEventListener('drag', makePdfDropTarget);
|
||||||
@@ -33,13 +35,15 @@ function OHIFCornerstonePdfViewport({ displaySets }) {
|
|||||||
|
|
||||||
const { pdfUrl } = displaySets[0];
|
const { pdfUrl } = displaySets[0];
|
||||||
|
|
||||||
useEffect(() => {
|
// console.log('Dicomweb PDF URL:', pdfUrl);
|
||||||
const load = async () => {
|
|
||||||
setUrl(await pdfUrl);
|
|
||||||
};
|
|
||||||
|
|
||||||
load();
|
// useEffect(() => {
|
||||||
}, [pdfUrl]);
|
// const load = async () => {
|
||||||
|
// setUrl(await pdfUrl);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// load();
|
||||||
|
// }, [pdfUrl]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -50,9 +54,7 @@ function OHIFCornerstonePdfViewport({ displaySets }) {
|
|||||||
data={url}
|
data={url}
|
||||||
type="application/pdf"
|
type="application/pdf"
|
||||||
className={style}
|
className={style}
|
||||||
>
|
></object>
|
||||||
<div>No online PDF viewer installed</div>
|
|
||||||
</object>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ window.config = {
|
|||||||
prefetch: 25,
|
prefetch: 25,
|
||||||
},
|
},
|
||||||
expertise: false, //* Tambahan untuk enable expertise (CustomizableViewportOverlay)
|
expertise: false, //* Tambahan untuk enable expertise (CustomizableViewportOverlay)
|
||||||
expertise_host: `http://${window.location.hostname}`, //* Tambahan untuk fetch data Expertise)
|
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,
|
// filterQueryParam: false,
|
||||||
// defaultDataSourceName: 'dicomweb',
|
// defaultDataSourceName: 'dicomweb',
|
||||||
defaultDataSourceName: 'local-proxy',
|
defaultDataSourceName: 'local-proxy',
|
||||||
@@ -45,8 +47,8 @@ window.config = {
|
|||||||
configuration: {
|
configuration: {
|
||||||
friendlyName: 'Static WADO Local Data',
|
friendlyName: 'Static WADO Local Data',
|
||||||
name: 'DCM4CHEE',
|
name: 'DCM4CHEE',
|
||||||
qidoRoot: `http://${window.location.hostname}:5050/rs`,
|
qidoRoot: `http://152.42.173.210:5000/rs`,
|
||||||
wadoRoot: `http://${window.location.hostname}:5050/rs`,
|
wadoRoot: `http://152.42.173.210:5000/rs`,
|
||||||
qidoSupportsIncludeField: false,
|
qidoSupportsIncludeField: false,
|
||||||
supportsReject: true,
|
supportsReject: true,
|
||||||
supportsStow: true,
|
supportsStow: true,
|
||||||
|
|||||||
@@ -1,44 +1,15 @@
|
|||||||
/** @type {AppTypes.Config} */
|
/** @type {AppTypes.Config} */
|
||||||
window.config = {
|
window.config = {
|
||||||
routerBasename: '/',
|
routerBasename: '/',
|
||||||
|
pacs_document_host: '152.42.173.210',
|
||||||
|
pacs_document_port: 8080,
|
||||||
|
expertise: false,
|
||||||
enableGoogleCloudAdapter: false,
|
enableGoogleCloudAdapter: false,
|
||||||
// below flag is for performance reasons, but it might not work for all servers
|
// below flag is for performance reasons, but it might not work for all servers
|
||||||
showWarningMessageForCrossOrigin: true,
|
showWarningMessageForCrossOrigin: true,
|
||||||
showCPUFallbackMessage: true,
|
showCPUFallbackMessage: true,
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
strictZSpacingForVolumeViewport: true,
|
strictZSpacingForVolumeViewport: true,
|
||||||
// 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: '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,
|
|
||||||
|
|
||||||
// Tambahan dari Google CLoud Secret
|
|
||||||
project_id: "westone-433204",
|
|
||||||
auth_uri: "https://accounts.google.com/o/oauth2/auth",
|
|
||||||
token_uri: "https://oauth2.googleapis.com/token",
|
|
||||||
auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
|
|
||||||
client_secret: "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",
|
|
||||||
redirect_uris: [
|
|
||||||
"http://devkedungdoro.aplikasi.web.id:3000/callback"
|
|
||||||
],
|
|
||||||
javascript_origins: [
|
|
||||||
"https://devone.aplikasi.web.id",
|
|
||||||
"http://devkedungdoro.aplikasi.web.id:3000"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
],
|
|
||||||
extensions: [],
|
extensions: [],
|
||||||
modes: [],
|
modes: [],
|
||||||
showStudyList: true,
|
showStudyList: true,
|
||||||
@@ -51,12 +22,9 @@ window.config = {
|
|||||||
configuration: {
|
configuration: {
|
||||||
friendlyName: 'dcmjs DICOMWeb Server',
|
friendlyName: 'dcmjs DICOMWeb Server',
|
||||||
name: 'GCP',
|
name: 'GCP',
|
||||||
wadoUriRoot:
|
wadoUriRoot: `http://152.42.173.210:5555/dicomWeb`,
|
||||||
'https://healthcare.googleapis.com/v1/projects/westone-433204/locations/asia-southeast2/datasets/sas-dicom-storage/dicomStores/ohif/dicomWeb',
|
qidoRoot: `http://152.42.173.210:5555/dicomWeb`,
|
||||||
qidoRoot:
|
wadoRoot: `http://152.42.173.210:5555/dicomWeb`,
|
||||||
'https://healthcare.googleapis.com/v1/projects/westone-433204/locations/asia-southeast2/datasets/sas-dicom-storage/dicomStores/ohif/dicomWeb',
|
|
||||||
wadoRoot:
|
|
||||||
'https://healthcare.googleapis.com/v1/projects/westone-433204/locations/asia-southeast2/datasets/sas-dicom-storage/dicomStores/ohif/dicomWeb',
|
|
||||||
qidoSupportsIncludeField: true,
|
qidoSupportsIncludeField: true,
|
||||||
imageRendering: 'wadors',
|
imageRendering: 'wadors',
|
||||||
thumbnailRendering: 'wadors',
|
thumbnailRendering: 'wadors',
|
||||||
@@ -66,12 +34,6 @@ window.config = {
|
|||||||
dicomUploadEnabled: true,
|
dicomUploadEnabled: true,
|
||||||
omitQuotationForMultipartRequest: true,
|
omitQuotationForMultipartRequest: true,
|
||||||
configurationAPI: 'ohif.dataSourceConfigurationAPI.google',
|
configurationAPI: 'ohif.dataSourceConfigurationAPI.google',
|
||||||
defaultDicomStoreConfiguredItems: {
|
|
||||||
id: 'projects/westone-433204/locations/asia-southeast2/datasets/sas-dicom-storage',
|
|
||||||
itemType: '3',
|
|
||||||
name: 'ohif',
|
|
||||||
url: 'https://healthcare.googleapis.com/v1/projects/westone-433204/locations/asia-southeast2/datasets/sas-dicom-storage/dicomStores/ohif'
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -356,14 +356,21 @@ const SidePanel = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsExpertiseLoading(true);
|
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 response = await fetch(url);
|
||||||
const data = await response.json();
|
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(formattedExpertiseData);
|
||||||
setExpertiseData(data.study.expertise[0]);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching expertise data:', 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 = () => {
|
const getExpertisePanel = () => {
|
||||||
if (side !== 'right') return null; // Only show in the right side panel
|
if (side !== 'right') return null; // Only show in the right side panel
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user