修改脾脏状态自动计算缺陷

uat_us
caiyiling 2024-01-15 16:45:19 +08:00
parent 8d3d7c6db9
commit bd843fd186
3 changed files with 48 additions and 50 deletions

View File

@ -4,7 +4,8 @@ src/utils/*
public
dist
src/*
# src/*
src/views/trials/trials-panel/reading/global-review/*
src/views/dictionary/checkConfig/*
src/views/trials/trials-panel/trial-summary/*
src/main.js

View File

@ -344,9 +344,8 @@ export default {
// if (parseInt(v) !== 5) {
// return
// }
if(question.QuestionType === 49){
console.log(question,v)
this.$emit('setFormItemData', {key:question.Id,val:v})
if (question.QuestionType === 49) {
this.$emit('setFormItemData', { key: question.Id, val: v })
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)

View File

@ -33,7 +33,7 @@
<script>
// import { uploadPrintscreen } from '@/api/reading'
import { saveImageQuality, getSplenicState,getSplenicVerify } from '@/api/trials'
import { saveImageQuality, getSplenicState, getSplenicVerify } from '@/api/trials'
import QuestionItem from './QuestionItem'
import DicomEvent from './DicomEvent'
import { mapGetters } from 'vuex'
@ -63,7 +63,7 @@ export default {
isQulityIssues: {
type: Boolean,
default: true
},
}
},
data() {
return {
@ -76,11 +76,11 @@ export default {
measurements: [],
spleenStatusId: '',
spleenLengthId: '',
spleenCommentsId:'',
spleenCommentsId: '',
isBaseLineTask: false,
criterionType: null,
spleenInfo:null,
calculateSpleenStatus:''
spleenInfo: null,
calculateSpleenStatus: ''
}
},
computed: {
@ -91,7 +91,7 @@ export default {
deep: true,
immediate: false,
handler(v) {
if(this.isQulityIssues){
if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', true)
}
}
@ -119,7 +119,6 @@ export default {
},
methods: {
async getQuestions(visitTaskId) {
console.log('getQuestions')
this.visitTaskId = visitTaskId
// const loading = this.$loading({ fullscreen: true })
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
@ -136,12 +135,12 @@ export default {
}
this.measurements.push(i)
})
if(this.readingTaskState < 2 && !this.isBaseLineTask && !this.spleenInfo){
const { Result } = await getSplenicVerify(visitTaskId)
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
@ -161,8 +160,8 @@ export default {
//
this.spleenLengthId = v.Id
}
if(v.QuestionType === 58){
//
if (v.QuestionType === 58) {
//
this.spleenCommentsId = v.Id
}
}
@ -173,7 +172,7 @@ export default {
}
// this.questions = questions
}
if(this.spleenLengthId){
if (this.spleenLengthId) {
this.calculateSpleenStatus = this.setSpleenStatus(this.questionForm[this.spleenLengthId])
this.setSpleenCommentDisplay()
}
@ -196,10 +195,9 @@ export default {
if (i.QuestionType === 48) {
//
this.spleenLengthId = i.Id
}
if(i.QuestionType === 58){
//
if (i.QuestionType === 58) {
//
this.spleenCommentsId = i.Id
}
}
@ -221,14 +219,14 @@ export default {
if (currentSpleenLength && currentSpleenStatus === 5) {
// '!'
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
}else if(currentSpleenLength === 5 && idx> -1 && this.measurements[idx].MeasureData){
callback: _ => {}
})
} 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{
callback: _ => {}
})
} else {
this.saveQuestionsList()
}
} else {
@ -274,7 +272,7 @@ export default {
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId)
this.loading = false
if(this.isQulityIssues){
if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', false)
}
DicomEvent.$emit('getReportInfo', true)
@ -296,14 +294,14 @@ export default {
this.loading = false
})
},
setSpleenCommentDisplay(){
if( this.spleenCommentsId && this.spleenStatusId ){
setSpleenCommentDisplay() {
if (this.spleenCommentsId && this.spleenStatusId) {
for (let i = 0; i < this.questions[0].Childrens.length; i++) {
if (this.questions[0].Childrens[i].QuestionType === 58) {
if(this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){
if (this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]) {
this.questions[0].Childrens[i].ShowQuestion = 0
this.questions[0].Childrens[i].IsRequired = 0
}else{
} else {
this.questions[0].Childrens[i].ShowQuestion = 2
this.questions[0].Childrens[i].IsRequired = 3
this.questionForm[this.spleenCommentsId] = ''
@ -391,7 +389,7 @@ 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){
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 })
@ -446,12 +444,12 @@ 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){
if (this.measurements[idx].QuestionType === 48) {
var status = this.setSpleenStatus(length)
this.$set(this.questionForm, this.spleenStatusId, status)
this.calculateSpleenStatus = status
}
// if (this.measurements[idx].QuestionType === 48 && length <= 130 && this.isBaseLineTask) {
// //
// this.$set(this.questionForm, this.spleenStatusId, '1')
@ -462,34 +460,34 @@ export default {
// }
}
store.dispatch('reading/addOrUpdateNonTargetMeasuredData', { visitTaskId: this.visitTaskId, data: data })
if(this.isQulityIssues){
if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', true)
}
},
setSpleenStatus(length){
setSpleenStatus(length) {
var status = ''
if(length){
if(this.isBaseLineTask){
if (length) {
if (this.isBaseLineTask) {
// 130mm
if(length <= 130){
if (length <= 130) {
// this.$set(this.questionForm, this.spleenStatusId, '1')
// this.calculateSpleenStatus = '1'
status = '1'
}
// >130mm
if(length > 130){
if (length > 130) {
// this.$set(this.questionForm, this.spleenStatusId, '6')
// this.calculateSpleenStatus = '6'
status = '6'
}
}else{
} 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) {
percentFormBaseline = diffFromBaseline * 100 / (this.spleenInfo.BaseLineSpleenLength - 130)
}
if(this.spleenInfo.BaseLineSpleenLength > 130 && diffFromBaseline >= 10 && percentFormBaseline > 50){
if (this.spleenInfo.BaseLineSpleenLength > 130 && diffFromBaseline >= 10 && percentFormBaseline > 50) {
// 1线 >130 mm
// 2线10 mm
// 3线>50
@ -497,7 +495,7 @@ export default {
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if( this.spleenInfo.BaseLineSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
} else if (this.spleenInfo.BaseLineSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130) {
// 1线130mm
// 2线20 mm
// 3>130 mm
@ -505,7 +503,7 @@ export default {
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if( this.spleenInfo.BaseLineSpleenLength > 130 && this.spleenInfo.LowSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
} else if (this.spleenInfo.BaseLineSpleenLength > 130 && this.spleenInfo.LowSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130) {
// 1线 >130 mm
// 2访访 130mm
// 320 mm
@ -514,20 +512,20 @@ export default {
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if(length < 130){
} else if (length < 130) {
// 访130mm
//
// this.$set(this.questionForm, this.spleenStatusId, '1')
// this.calculateSpleenStatus = '1'
status = '1'
}else if(this.spleenInfo.BaseLineState === '6' && percentFormBaseline < -50){
} else if (this.spleenInfo.BaseLineState === '6' && percentFormBaseline < -50) {
// 1线
// 2线-50
//
// this.$set(this.questionForm, this.spleenStatusId, '2')
// this.calculateSpleenStatus = '2'
status = '2'
}else{
} else {
// this.$set(this.questionForm, this.spleenStatusId, '3')
// this.calculateSpleenStatus = '3'
status = '3'
@ -548,7 +546,7 @@ export default {
},
setFormItemData(obj) {
this.questionForm[obj.key] = obj.val
if(obj.key === this.spleenStatusId){
if (obj.key === this.spleenStatusId) {
this.setSpleenCommentDisplay()
}
}