2019-05-29 14:39:54 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import PropTypes from 'prop-types';
|
2019-06-11 19:56:18 +02:00
|
|
|
import { withRouter } from 'react-router-dom';
|
|
|
|
|
import ConnectedViewerRetrieveStudyData from '../connectedComponents/ConnectedViewerRetrieveStudyData.js';
|
2019-10-11 09:59:38 +02:00
|
|
|
import OHIF from '@ohif/core';
|
|
|
|
|
const { urlUtil: UrlUtil } = OHIF.utils;
|
2019-06-11 19:56:18 +02:00
|
|
|
|
|
|
|
|
function IHEInvokeImageDisplay({ location }) {
|
|
|
|
|
const {
|
|
|
|
|
// patientID,
|
|
|
|
|
requestType,
|
|
|
|
|
studyUID,
|
2019-10-11 09:59:38 +02:00
|
|
|
} = UrlUtil.parse(location.search);
|
2019-06-11 19:56:18 +02:00
|
|
|
|
|
|
|
|
switch (requestType) {
|
|
|
|
|
case 'STUDY':
|
|
|
|
|
return (
|
|
|
|
|
<ConnectedViewerRetrieveStudyData
|
2020-03-09 20:03:23 +01:00
|
|
|
studyInstanceUIDs={studyUID.split(';')}
|
2019-06-11 19:56:18 +02:00
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
case 'STUDYBASE64':
|
|
|
|
|
return (
|
|
|
|
|
<ConnectedViewerRetrieveStudyData
|
2020-03-09 20:03:23 +01:00
|
|
|
studyInstanceUIDs={UrlUtil.paramString.parseParam(studyUID)}
|
2019-06-11 19:56:18 +02:00
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
case 'PATIENT':
|
|
|
|
|
// TODO: connect this to the StudyList when we have the filter parameters set up
|
2020-03-09 20:03:23 +01:00
|
|
|
// return <StudyList patientUIDs={patientID.split(';')} />;
|
2019-06-11 19:56:18 +02:00
|
|
|
return '';
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
// TODO: Figure out what to do here, this won't work because StudyList expects studies
|
|
|
|
|
// return <StudyList />;
|
|
|
|
|
return '';
|
|
|
|
|
}
|
2018-12-14 15:23:48 +01:00
|
|
|
}
|
|
|
|
|
|
2018-12-17 17:23:03 +01:00
|
|
|
IHEInvokeImageDisplay.propTypes = {
|
2019-06-11 19:56:18 +02:00
|
|
|
location: PropTypes.shape({
|
|
|
|
|
search: PropTypes.string,
|
|
|
|
|
}).isRequired,
|
2018-12-17 17:23:03 +01:00
|
|
|
};
|
|
|
|
|
|
2019-06-11 19:56:18 +02:00
|
|
|
export default withRouter(IHEInvokeImageDisplay);
|