2018-12-17 17:23:03 +01:00
|
|
|
import React from "react";
|
2018-12-14 15:23:48 +01:00
|
|
|
import PropTypes from "prop-types";
|
2019-01-17 17:00:21 +01:00
|
|
|
import ViewerRetrieveStudyData from "../connectedComponents/ViewerRetrieveStudyData.js";
|
2018-12-14 15:23:48 +01:00
|
|
|
|
|
|
|
|
function IHEInvokeImageDisplay({ match }) {
|
|
|
|
|
const requestType = match.params.query.requestType;
|
|
|
|
|
let studyInstanceUids;
|
2018-12-31 13:26:38 +01:00
|
|
|
//let patientUids;
|
2018-12-14 15:23:48 +01:00
|
|
|
let displayStudyList = false;
|
2018-12-17 17:23:03 +01:00
|
|
|
|
2018-12-14 15:23:48 +01:00
|
|
|
if (requestType === "STUDY") {
|
|
|
|
|
studyInstanceUids = match.params.query.studyUID.split(';');
|
|
|
|
|
} else if (requestType === "STUDYBASE64") {
|
|
|
|
|
const uids = this.params.query.studyUID;
|
|
|
|
|
const decodedData = window.atob(uids);
|
|
|
|
|
studyInstanceUids = decodedData.split(';');
|
|
|
|
|
} else if (requestType === "PATIENT") {
|
2018-12-31 13:26:38 +01:00
|
|
|
//patientUidspatientUids = this.params.query.patientID.split(';');
|
2018-12-14 15:23:48 +01:00
|
|
|
displayStudyList = true
|
|
|
|
|
} else {
|
|
|
|
|
displayStudyList = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (displayStudyList) {
|
2018-12-17 17:23:03 +01:00
|
|
|
return ('')//<StudyList patientUids={patientUids}/>);
|
2018-12-14 15:23:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2019-01-17 17:00:21 +01:00
|
|
|
<ViewerRetrieveStudyData studyInstanceUids={studyInstanceUids}/>
|
2018-12-14 15:23:48 +01:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-17 17:23:03 +01:00
|
|
|
IHEInvokeImageDisplay.propTypes = {
|
|
|
|
|
match: PropTypes.shape({
|
|
|
|
|
params: PropTypes.shape({
|
|
|
|
|
query: PropTypes.shape({
|
|
|
|
|
requestType: PropTypes.string.isRequired,
|
|
|
|
|
studyUID: PropTypes.string,
|
|
|
|
|
patientID: PropTypes.string
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
2018-12-14 15:23:48 +01:00
|
|
|
export default IHEInvokeImageDisplay;
|