diff --git a/src/api/trials.js b/src/api/trials.js index ea61a961..15934d71 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3827,6 +3827,13 @@ export function getDicomModalityList(params) { params }) } +// 获取患者序列信息 +export function getPatientSeriesList(scpStudyId) { + return request({ + url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`, + method: 'get' + }) +} // 获取反馈列表 export function getUserFeedBackList(data) { return request({ diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index 5d3185eb..6e1f26d8 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -138,7 +138,7 @@ import * as cornerstone from 'cornerstone-core' import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader' import dicomViewer from '@/components/Dicom/DicomViewer' import { getStudyInfo, getSeriesList } from '@/api/reading' -import { getInstanceList, setSeriesStatus } from '@/api/trials' +import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/trials' import requestPoolManager from '@/utils/request-pool' import store from '@/store' @@ -219,6 +219,8 @@ export default { this.loadStudy() } else if (this.type === 'Share') { this.loadStudy() + } else if (this.type === 'Patient') { + this.loadPatientStudy() } cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress) window.addEventListener('beforeunload', e => { @@ -247,6 +249,65 @@ export default { this.getSeriesList(url) } }, + async loadPatientStudy() { + try { + let data = await getPatientSeriesList(this.studyId); + if (data.IsSuccess) { + const { Result } = data + var seriesList = [] + Result.forEach((item, index) => { + const imageIds = [] + item.InstanceInfoList.forEach(i => { + if (i.NumberOfFrames && i.NumberOfFrames > 1) { + for (let j = 0; j < i.NumberOfFrames; j++) { + imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`) + } + i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}` + } else { + const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}` + imageIds.push(imageId) + i.ImageId = imageId + } + }) + var subjectVisitId = this.$router.currentRoute.query.subjectVisitId + var studyId = this.$router.currentRoute.query.studyId + var trialId = this.$router.currentRoute.query.trialId + seriesList.push({ + trialId, + subjectVisitId, + studyId, + imageIds: imageIds, + instanceInfoList: item.InstanceInfoList, + seriesId: item.Id, + seriesUid: item.SeriesInstanceUid, + seriesNumber: item.SeriesNumber, + sliceThickness: item.SliceThickness, + modality: item.Modality, + description: item.Description, + isReading: item.IsReading, + isDeleted: item.IsDeleted, + previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`, + instanceCount: item.InstanceCount, + prefetchInstanceCount: 0, + hasLabel: item.HasLabel, + keySeries: item.KeySeries, + tpCode: this.tpCode, + loadStatus: false, + imageloadedArr: [], + isExistMutiFrames: item.IsExistMutiFrames + }) + }) + this.seriesList = seriesList + if (this.seriesList.length > 0) { + this.loadAllImages() + this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode]) + this.firstInstanceId = this.seriesList[0].imageIds[0] + } + } + } catch (err) { + console.log(err) + } + }, async getSeriesList(url) { try { const data = await getSeriesList(url) diff --git a/src/views/trials/trials-panel/trial-summary/image-inspect/components/view-study.vue b/src/views/trials/trials-panel/trial-summary/image-inspect/components/view-study.vue index c75a6100..74062ed0 100644 --- a/src/views/trials/trials-panel/trial-summary/image-inspect/components/view-study.vue +++ b/src/views/trials/trials-panel/trial-summary/image-inspect/components/view-study.vue @@ -260,7 +260,7 @@ export default { image(item) { let token = getToken(); const routeData = this.$router.resolve({ - path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Study`, + path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Patient`, }); this.newWindow = window.open(routeData.href, "_blank"); },