prod phta | ohif-391:v3.2 | next: ecg no expertise
This commit is contained in:
@@ -146,6 +146,7 @@ function ViewerLayout({
|
||||
side="right"
|
||||
activeTabIndex={rightPanelClosedState ? null : 0}
|
||||
servicesManager={servicesManager}
|
||||
expandedWidth={400}
|
||||
/>
|
||||
) : null}
|
||||
</React.Fragment>
|
||||
|
||||
@@ -6,7 +6,7 @@ function OHIFCornerstonePdfViewport({ displaySets }) {
|
||||
var [url, setUrl] = useState(null);
|
||||
|
||||
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`;
|
||||
|
||||
useEffect(() => {
|
||||
document.body.addEventListener('drag', makePdfDropTarget);
|
||||
|
||||
@@ -23,8 +23,8 @@ window.config = {
|
||||
// above, the number of requests can be go a lot higher.
|
||||
prefetch: 25,
|
||||
},
|
||||
expertise_host: `http://192.168.1.29`, // IP ke NV di PACS Server, untuk fetch expertise bawaan versi NV
|
||||
pacs_document_host: `192.168.1.29`, // IP ke NV di PACS Server untuk ambil pdf
|
||||
expertise_host: `http://10.9.10.86`, // IP ke NV di PACS Server, untuk fetch expertise bawaan versi NV
|
||||
pacs_document_host: `10.9.10.86`, // IP ke NV di PACS Server untuk ambil pdf
|
||||
pacs_document_port: 8080,
|
||||
defaultDataSourceName: 'local-proxy',
|
||||
dataSources: [
|
||||
@@ -34,8 +34,8 @@ window.config = {
|
||||
configuration: {
|
||||
friendlyName: 'Static WADO Local Data',
|
||||
name: 'DCM4CHEE',
|
||||
qidoRoot: `http://192.168.1.29:5000/rs`, // IP ke dicomweb-proxy PACS Server. URI selalu /rs
|
||||
wadoRoot: `http://192.168.1.29:5000/rs`, // IP ke dicomweb-proxy PACS Server. URI selalu /rs
|
||||
qidoRoot: `http://10.9.10.86:5000/rs`, // IP ke dicomweb-proxy PACS Server. URI selalu /rs
|
||||
wadoRoot: `http://10.9.10.86:5000/rs`, // IP ke dicomweb-proxy PACS Server. URI selalu /rs
|
||||
qidoSupportsIncludeField: false,
|
||||
supportsReject: true,
|
||||
supportsStow: true,
|
||||
|
||||
@@ -358,12 +358,45 @@ const SidePanel = ({
|
||||
setIsExpertiseLoading(true);
|
||||
const url = `${window.config.expertise_host}/nv/query.php?method=view&AccessionNumber=${encodeURIComponent(accessionNumber)}`;
|
||||
|
||||
// Debuggging
|
||||
// const url = 'http://152.42.173.210/nv/testQueryBase64.php';
|
||||
|
||||
const response = await fetch(url);
|
||||
const data = await response.json();
|
||||
console.log('Study data:', data);
|
||||
|
||||
if (data?.study?.expertise && data.study.expertise.length > 0) {
|
||||
setExpertiseData(data.study.expertise[0]);
|
||||
const expertiseItem = { ...data.study.expertise[0] };
|
||||
|
||||
// Decode base64 encoded fields
|
||||
// UTF-8 safe base64 decoding
|
||||
const decodeBase64 = str => {
|
||||
try {
|
||||
// Step 1: decode base64 to binary
|
||||
const binary = atob(str);
|
||||
// Step 2: create a Uint8Array from the binary string
|
||||
const bytes = new Uint8Array(binary.length);
|
||||
for (let i = 0; i < binary.length; i++) {
|
||||
bytes[i] = binary.charCodeAt(i);
|
||||
}
|
||||
// Step 3: decode the Uint8Array as UTF-8
|
||||
return new TextDecoder('utf-8').decode(bytes);
|
||||
} catch (e) {
|
||||
console.error('Error decoding base64 string:', e);
|
||||
return str; // Return original if decoding fails
|
||||
}
|
||||
};
|
||||
|
||||
// Decode known base64 fields
|
||||
if (expertiseItem.expertise) {
|
||||
expertiseItem.expertise = decodeBase64(expertiseItem.expertise);
|
||||
}
|
||||
if (expertiseItem.radiologist) {
|
||||
expertiseItem.radiologist = decodeBase64(expertiseItem.radiologist);
|
||||
}
|
||||
// Add any other fields that might be base64 encoded
|
||||
|
||||
setExpertiseData(expertiseItem);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching expertise data:', error);
|
||||
@@ -441,7 +474,7 @@ const SidePanel = ({
|
||||
});
|
||||
|
||||
return (
|
||||
<ScrollArea className="border-input bg-background h-[500px] w-[350px] rounded-md border p-2 text-sm text-white">
|
||||
<ScrollArea className="border-input bg-background h-[500px] w-full rounded-md border p-2 text-sm text-white">
|
||||
<h3 className="mb-4 text-lg font-bold">Expertise</h3>
|
||||
{formattedData.map((section, index) => (
|
||||
<div
|
||||
@@ -456,7 +489,7 @@ const SidePanel = ({
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p>{section.value}</p>
|
||||
<p className="break-words">{section.value}</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user