随访脾脏长度更新,自动计算脾脏状态

uat_us
caiyiling 2024-01-12 09:43:32 +08:00
parent 1d1cb9617e
commit 2fdb103a3c
6 changed files with 139 additions and 58 deletions

View File

@ -3481,6 +3481,13 @@ export function getSplenicState(visitTaskId, spleenLength) {
method: 'post'
})
}
export function getSplenicVerify(visitTaskId) {
return request({
url: `/LuganoCalculate/getSplenicVerify?visitTaskId=${visitTaskId}`,
method: 'post'
})
}
export function uploadTrialSiteSurveyUser(trialId, baseUrl, routeUrl, param) {
return request({
url: `/TrialSiteSurvey/UploadTrialSiteSurveyUser?trialId=${trialId}&baseUrl=${baseUrl}&routeUrl=${routeUrl}`,

View File

@ -725,7 +725,7 @@ export default {
this.$message({
type: 'info',
message: `action: ${action}`
});
})
}
})
return

View File

@ -33,7 +33,7 @@
<script>
// import { uploadPrintscreen } from '@/api/reading'
import { saveImageQuality, getSplenicState } from '@/api/trials'
import { saveImageQuality, getSplenicState,getSplenicVerify } from '@/api/trials'
import QuestionItem from './QuestionItem'
import DicomEvent from './DicomEvent'
import { mapGetters } from 'vuex'
@ -77,7 +77,9 @@ export default {
spleenStatusId: '',
spleenLengthId: '',
isBaseLineTask: false,
criterionType: null
criterionType: null,
spleenInfo:null,
calculateSpleenStatus:''
}
},
computed: {
@ -91,6 +93,14 @@ export default {
if(this.isQulityIssues){
DicomEvent.$emit('questionFormChange', true)
}
// if(this.criterionType === 2 && this.groupClassify === 3 && this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){
// for (let i = 0; i < this.questions[0].Childrens.length; i++) {
// if (this.questions[0].Childrens[i].QuestionType === 49) {
// this.questions[0].Childrens[i].ShowQuestion = 2
// break
// }
// }
// }
}
},
currentReadingTaskState: {
@ -132,7 +142,12 @@ export default {
}
this.measurements.push(i)
})
if(this.readingTaskState < 2 && !this.isBaseLineTask && !this.spleenInfo){
const { Result } = await getSplenicVerify(visitTaskId)
this.spleenInfo = Result
}
}
for (var i = 0; i < questions.length; i++) {
var v = questions[i]
v.IsBaseLineTask = this.isBaseLineTask
@ -151,6 +166,8 @@ export default {
if (v.QuestionType === 48) {
//
this.spleenLengthId = v.Id
this.calculateSpleenStatus = ''
this.setSpleenStatus(this.questionForm[this.spleenLengthId])
}
}
if (v.Childrens.length > 0) {
@ -192,34 +209,23 @@ export default {
if (!valid) return
// lugano
if (this.criterionType === 2 && this.groupClassify === 3) {
var res = await this.getSplenicState()
if (res.isSuccess) {
var systemSpleenStatus = isNaN(parseInt(res.result)) ? null : parseInt(res.result)
var currentSpleenStatus = this.questionForm[this.spleenStatusId]
var currentSpleenLength = this.questionForm[this.spleenLengthId]
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
var idx = this.measurements.findIndex(i => i.QuestionType === 48)
if (currentSpleenLength && currentSpleenStatus === 5) {
// '!'
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
} else {
if (systemSpleenStatus !== currentSpleenStatus) {
// xxxyyy
var message = this.$t('trials:lugano:message:validSpleen2').replace('xxx', this.$fd('SpleenState', systemSpleenStatus))
message = message.replace('yyy', this.$fd('SpleenState', currentSpleenStatus))
this.$confirm(message, this.$t('trials:lugano:fusionDialog:warning'), {
type: 'warning'
}).then(() => {
this.saveQuestionsList()
}).catch(() => {
}else if(currentSpleenLength === 5 && idx> -1 && this.measurements[idx].MeasureData){
//
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
}else{
this.saveQuestionsList()
}
}
}
} else {
this.saveQuestionsList()
}
@ -364,6 +370,9 @@ export default {
var idx = this.measurements.findIndex(i => i.QuestionId === Id)
if (idx === -1) return
this.$set(this.questionForm, Id, '')
if (this.measurements[idx].QuestionType === 48){
this.$set(this.questionForm, this.spleenStatusId, '')
}
await store.dispatch('reading/removeNonTargetMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.measurements[idx].MeasureData, questionId: Id })
this.measurements.splice(idx, 1)
DicomEvent.$emit('getMeasureData')
@ -414,20 +423,85 @@ export default {
if (measurement.type === 'Length') {
const length = measurement.data.length ? measurement.data.length : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, length || null)
if (this.measurements[idx].QuestionType === 48 && length <= 130 && this.isBaseLineTask) {
//
this.$set(this.questionForm, this.spleenStatusId, '1')
}
if (this.measurements[idx].QuestionType === 48 && length > 130 && this.isBaseLineTask) {
//
this.$set(this.questionForm, this.spleenStatusId, '6')
if (this.measurements[idx].QuestionType === 48){
this.calculateSpleenStatus = ''
this.setSpleenStatus(length)
}
// if (this.measurements[idx].QuestionType === 48 && length <= 130 && this.isBaseLineTask) {
// //
// this.$set(this.questionForm, this.spleenStatusId, '1')
// }
// if (this.measurements[idx].QuestionType === 48 && length > 130 && this.isBaseLineTask) {
// //
// this.$set(this.questionForm, this.spleenStatusId, '6')
// }
}
store.dispatch('reading/addOrUpdateNonTargetMeasuredData', { visitTaskId: this.visitTaskId, data: data })
if(this.isQulityIssues){
DicomEvent.$emit('questionFormChange', true)
}
},
setSpleenStatus(length){
if(length){
if(this.isBaseLineTask){
// 130mm
if(length <= 130){
this.$set(this.questionForm, this.spleenStatusId, '1')
this.calculateSpleenStatus = '1'
}
// >130mm
if(length > 130){
this.$set(this.questionForm, this.spleenStatusId, '6')
this.calculateSpleenStatus = '6'
}
}else{
// 线
var diffFromBaseline = length - this.spleenInfo.BaseLineSpleenLength
var percentFormBaseline = 0
if(this.spleenInfo.BaseLineSpleenLength){
percentFormBaseline = length * 100 / (this.spleenInfo.BaseLineSpleenLength - 130)
}
if(this.spleenInfo.BaseLineSpleenLength > 130 && diffFromBaseline >= 10 && percentFormBaseline > 50){
// 1线 >130 mm
// 2线10 mm
// 3线>50
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
}else if( this.spleenInfo.BaseLineSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
// 1线130mm
// 2线20 mm
// 3>130 mm
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
}else if( this.spleenInfo.BaseLineSpleenLength > 130 && this.spleenInfo.LowSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
// 1线 >130 mm
// 2访访 130mm
// 320 mm
// 4>130 mm
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
}else if(length < 130){
// 访130mm
//
this.$set(this.questionForm, this.spleenStatusId, '1')
this.calculateSpleenStatus = '1'
}else if(this.spleenInfo.BaseLineState === '6' && percentFormBaseline < -50){
// 1线
// 2线-50
//
this.$set(this.questionForm, this.spleenStatusId, '2')
this.calculateSpleenStatus = '2'
}else{
this.$set(this.questionForm, this.spleenStatusId, '3')
this.calculateSpleenStatus = '3'
}
}
}
},
resetFormItemData(v) {
this.questionForm[v] = null
if (v === this.spleenLengthId) {