diff --git a/src/api/trials.js b/src/api/trials.js index 94baeebc..2e79d92f 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -4430,4 +4430,22 @@ export function updateImageResizePath(data) { method: 'post', data }) +} + +// 获取PET图像上患者信息 +export function getPatientInfo(data) { + return request({ + url: `/Study/getPatientInfo`, + method: 'post', + data + }) +} + +//编辑患者基本信息 +export function editPatientInfo(data) { + return request({ + url: `/Study/editPatientInfo`, + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/components/Dicom/DicomViewer.vue b/src/components/Dicom/DicomViewer.vue index 1c60d3cb..58ebfa96 100644 --- a/src/components/Dicom/DicomViewer.vue +++ b/src/components/Dicom/DicomViewer.vue @@ -282,6 +282,59 @@ + + +
+
{{ $t('trials:tab:patientData') }}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('trials:ptData:button:submit') + }} + + +
+
@@ -306,6 +359,10 @@ console.log(cornerstoneTools, 'cornerstoneTools') console.log(cornerstone, 'cornerstone') import '@/utils/dialog' import { studyMaskImage, studyUndoMaskImage } from "@/api/reading" +import { + getPatientInfo, + editPatientInfo +} from '@/api/trials' export default { name: 'DicomsViewer', components: { @@ -316,6 +373,10 @@ export default { loading: { type: Boolean, default: false + }, + modality: { + type: String, + default: '' } }, data() { @@ -345,6 +406,47 @@ export default { series: {}, customWwc: { visible: false, title: null }, fps: 15, + formData: { + Id: '', + PatientSex: '', + PatientWeight: null, + RadionuclideTotalDose: null, + RadionuclideHalfLife: null, + RadiopharmaceuticalStartTime: null, + AcquisitionTime: null, + TimeCheck: '' + }, + rules: { + PatientSex: [ + { required: true, message: this.$t('common:ruleMessage:select'), trigger: 'change' } + ], + PatientWeight: [ + { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, + { type: 'number', min: 0, message: this.$t('trials:ptData:ruleMessage:number1'), trigger: 'blur' }//数值必须大于0 + ], + RadionuclideTotalDose: [ + { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, + { type: 'number', min: 0, message: this.$t('trials:ptData:ruleMessage:number1'), trigger: 'blur' }//数值必须大于0 + ], + RadionuclideHalfLife: [ + { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, + { type: 'number', min: 0, message: this.$t('trials:ptData:ruleMessage:number1'), trigger: 'blur' } + ], + RadiopharmaceuticalStartTime: [ + { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, + { type: 'number', message: this.$t('trials:ptData:ruleMessage:number2'), trigger: 'blur' }//请输入数字 + ], + AcquisitionTime: [ + { required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, + { type: 'number', message: this.$t('trials:ptData:ruleMessage:number2'), trigger: 'blur' },//请输入数字 + // 自定义校验:确保成像时间不早于注射时间 + { validator: this.validateTime, trigger: 'blur' } + ] + }, + formLoading: false, + isHaveStudyClinicalData: false, + type: '', + isEdit: 0 } }, mounted() { @@ -357,6 +459,12 @@ export default { this.wwwcList[0] = '-1' this.colormapsList = cornerstone.colors.getColormapsList() this.currentDicomCanvas = this.$refs['dicomCanvas0'] + this.isHaveStudyClinicalData = this.$route.query.isHaveStudyClinicalData === 'true' + this.type = this.$route.query.type + this.isEdit = parseInt(this.$route.query.showDelete) + if (this.isHaveStudyClinicalData && this.type === 'Study' && ['PT、CT', 'CT、PT', 'PET-CT'].includes(this.modality)) { + this.getPatientInfo() + } }, methods: { @@ -684,13 +792,76 @@ export default { } } }, - }, + // 时间一致性校验 + validateTime(rule, value, callback) { + const { RadiopharmaceuticalStartTime } = this.formData + if (value && RadiopharmaceuticalStartTime !== null && value < RadiopharmaceuticalStartTime) { + callback(new Error(this.$t('trials:ptData:ruleMessage:number3')))//成像时间不能早于注射时间 + } else { + callback() + } + }, + computeTimeRelation() { + const startTime = this.formData.RadiopharmaceuticalStartTime + const acquireTime = this.formData.AcquisitionTime + + if (!startTime || !acquireTime) { + this.formData.TimeCheck = '' + return + } + + if (startTime <= acquireTime) { + this.formData.TimeCheck = this.$t('trials:ptData:timeCheck:val1') //注射时间 ≤ 成像时间 + } else { + this.formData.TimeCheck = this.$t('trials:ptData:timeCheck:val2') //注射时间 > 成像时间 + } + }, + async getPatientInfo() { + try { + this.formLoading = true + let studyId = this.$route.query.studyId + let res = await getPatientInfo({ studyId: studyId }) + this.formData = { + Id: res.Result.Id || '', + PatientSex: res.Result.PatientSex || '', + PatientWeight: parseFloat(res.Result.PatientWeight) || null, + RadionuclideTotalDose: parseFloat(res.Result.RadionuclideTotalDose) || null, + RadionuclideHalfLife: parseFloat(res.Result.RadionuclideHalfLife) || null, + RadiopharmaceuticalStartTime: parseFloat(res.Result.RadiopharmaceuticalStartTime) || '', + AcquisitionTime: parseFloat(res.Result.AcquisitionTime) || '', + TimeCheck: '' + } + this.computeTimeRelation() + this.formLoading = false + } catch (e) { + this.formLoading = false + console.log(e) + } + }, + async submitForm() { + try { + let valid = await this.$refs.patientForm.validate() + if (!valid) return + this.formLoading = true + let res = await editPatientInfo(this.formData) + this.formLoading = false + if (res.IsSuccess) { + this.$message.success(this.$t('common:message:savedSuccessfully')) + } + } catch (e) { + this.formLoading = false + console.log(e) + } + + } + } } diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index 61c42b0f..7592d05b 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -123,12 +123,12 @@
- +
- diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue index 72a6e7fc..72c31829 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue @@ -2341,7 +2341,7 @@ export default { this.readingTaskState = 2 await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 }) await store.dispatch('reading/setCurrentReadingTaskState', 2) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) var isAutoTask = res.Result.AutoCutNextTask if (isAutoTask) { window.location.reload() diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Others.vue b/src/views/trials/trials-panel/reading/dicoms/components/Others.vue index 771cb03e..3c3408ac 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Others.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Others.vue @@ -31,6 +31,12 @@ import { setAutoCutNextTask, getAutoCutNextTask } from '@/api/user' export default { name: 'Others', + props: { + imageToolType: { + type: Number, + default: 1 + } + }, data() { return { form: { @@ -47,7 +53,7 @@ export default { async initForm() { this.loading = true try { - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: this.imageToolType}) if (res.IsSuccess) { this.form.AutoCutNextTask = res.Result.AutoCutNextTask this.form.IsDoubleScreen = res.Result.IsDoubleScreen @@ -62,7 +68,8 @@ export default { if (!valid) return this.loading = true try { - const res = await setAutoCutNextTask(this.form) + let params = Object.assign(this.form, {imageToolType: this.imageToolType}) + const res = await setAutoCutNextTask(params) if (res.IsSuccess) { this.$message.success(this.$t('common:message:savedSuccessfully')) } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue b/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue index 9775a33c..808f5f7c 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue @@ -733,7 +733,7 @@ export default { await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 }) // DicomEvent.$emit('setReadingState', 2) await store.dispatch('reading/setCurrentReadingTaskState', 2) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) var isAutoTask = res.Result.AutoCutNextTask if (isAutoTask) { // DicomEvent.$emit('reload') @@ -780,7 +780,7 @@ export default { var readingTool = this.$router.currentRoute.query.readingTool var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}` const routeData = this.$router.resolve({ path }) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) let IsDoubleScreen = false if (res.IsSuccess) { IsDoubleScreen = res.Result.IsDoubleScreen diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomViewer.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomViewer.vue index 507bc05e..f2a1801d 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomViewer.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomViewer.vue @@ -411,7 +411,7 @@ - +
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue index e935303b..1edb30f7 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPage.vue @@ -835,7 +835,7 @@ export default { store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 }) DicomEvent.$emit('setReadingState', 2) window.opener.postMessage('refreshTaskList', window.location) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) let isAutoTask = res.Result.AutoCutNextTask if (isAutoTask) { window.location.reload() @@ -875,7 +875,7 @@ export default { var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}` const routeData = this.$router.resolve({ path }) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) let IsDoubleScreen = false if (res.IsSuccess) { IsDoubleScreen = res.Result.IsDoubleScreen diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/Others.vue b/src/views/trials/trials-panel/reading/dicoms/customize/Others.vue index 36e408e9..c84f4fe4 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/Others.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/Others.vue @@ -23,6 +23,12 @@ import { setAutoCutNextTask, getAutoCutNextTask } from '@/api/user' export default { name: 'Others', + props: { + imageToolType: { + type: Number, + default: 1 + } + }, data() { return { form: { @@ -38,7 +44,7 @@ export default { async initForm() { this.loading = true try{ - await getAutoCutNextTask() + await getAutoCutNextTask({imageToolType: this.imageToolType}) this.form.AutoCutNextTask = res.Result.AutoCutNextTask this.loading = false }catch(e){ @@ -50,7 +56,8 @@ export default { if (!valid) return this.loading = true try{ - await setAutoCutNextTask(this.form) + let params = Object.assign(this.form, {imageToolType: this.imageToolType}) + await setAutoCutNextTask(params) this.loading = false this.$message.success(this.$t('common:message:savedSuccessfully')) }catch(e){ diff --git a/src/views/trials/trials-panel/reading/dicoms/index.vue b/src/views/trials/trials-panel/reading/dicoms/index.vue index fafb30d9..8eccffcc 100644 --- a/src/views/trials/trials-panel/reading/dicoms/index.vue +++ b/src/views/trials/trials-panel/reading/dicoms/index.vue @@ -53,20 +53,26 @@ :visit-task-id="visitTaskId" :reading-category="readingCategory" :subject-code="subjectCode" :task-blind-name="taskBlindName" :is-reading-show-subject-info="isReadingShowSubjectInfo" :is-reading-show-previous-results="isReadingShowPreviousResults" - :is-exists-clinical-data="isExistsClinicalData" /> + :is-exists-clinical-data="isExistsClinicalData" + :imageToolType="1" + /> + :is-exists-clinical-data="isExistsClinicalData" + :imageToolType="1" + /> + :is-exists-clinical-data="isExistsClinicalData" + :imageToolType="1" + /> diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index 8bfe8c25..335e5b22 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -477,7 +477,7 @@ - + diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue index 4594a05f..3544c672 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue @@ -918,7 +918,7 @@ export default { // 设置当前任务阅片状态为已读 this.readingTaskState = 2 this.$emit('setReadingTaskState', 2) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) var isAutoTask = res.Result.AutoCutNextTask if (isAutoTask) { window.location.reload() @@ -963,7 +963,7 @@ export default { var readingTool = this.$router.currentRoute.query.readingTool var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}` const routeData = this.$router.resolve({ path }) - const res = await getAutoCutNextTask() + const res = await getAutoCutNextTask({imageToolType: 1}) let IsDoubleScreen = false if (res.IsSuccess) { IsDoubleScreen = res.Result.IsDoubleScreen diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue index 14a05bde..779e9e45 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue @@ -74,8 +74,39 @@ #{{ series.SeriesNumber }} -
+
{{ series.Description }} +
+ +

{{ $t('trials:ptData:title') }}

+
+ + {{ study.PatientSex }} +
+
+ + {{ study.PatientWeight }} +
+
+ + {{ study.RadionuclideTotalDose }} +
+
+ + {{ study.RadionuclideHalfLife }} +
+
+ + {{ study.RadiopharmaceuticalStartTime }} +
+
+ + {{ study.AcquisitionTime }} +
+ +
+
T: {{ parseFloat(series.SliceThickness).toFixed(digitPlaces) }} @@ -223,10 +254,56 @@ export default { const seriesIndex = seriseList[newIndex].SeriesIndex this.setSeriesActive(studyIndex, seriesIndex) this.activeSeries(seriseList[newIndex], seriesIndex, studyIndex) + }, + showPatientInfo(study) { + console.log(study) } } } + diff --git a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue index 8d7b361e..8e5a25f2 100644 --- a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue +++ b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue @@ -76,7 +76,18 @@ - + + + @@ -149,7 +160,7 @@ @@ -2441,7 +2452,7 @@ export default { const routeData = this.$router.resolve({ path: `/showdicom?trialId=${this.trialId}&subjectVisitId=${this.data.Id }&studyId=${row.StudyId}&showDelete=${this.isAudit ? 0 : 1 - }&TokenKey=${token}&type=Study`, + }&TokenKey=${token}&type=Study&isHaveStudyClinicalData=${this.IsHaveStudyClinicalData}`, }) this.open = window.open(routeData.href, '_blank') },