OCT标准更改

uat_us
caiyiling 2024-09-09 13:21:48 +08:00
parent ccf3b823d8
commit 8831847850
5 changed files with 108 additions and 176 deletions

View File

@ -51,15 +51,31 @@ function getQuestions(questions) {
// ivus // ivus
answerObj.area1 = getQuestionAnswer(item.TableQuestions.Questions, 1001, answerObj) answerObj.area1 = getQuestionAnswer(item.TableQuestions.Questions, 1001, answerObj)
answerObj.area2 = getQuestionAnswer(item.TableQuestions.Questions, 1002, answerObj) answerObj.area2 = getQuestionAnswer(item.TableQuestions.Questions, 1002, answerObj)
var v = getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj) const v = getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj)
answerObj.diff = v answerObj.diff = v
answerObj.saveTypeEnum = isNaN(parseFloat(v)) ? 1 : 2 answerObj.saveTypeEnum = isNaN(parseFloat(v)) ? 1 : 2
} else if (criterionType === 20) {
// oct
if (item.LesionType === 101) {
answerObj.l1 = getQuestionAnswer(item.TableQuestions.Questions, 1011, answerObj)
answerObj.l2 = getQuestionAnswer(item.TableQuestions.Questions, 1012, answerObj)
answerObj.l3 = getQuestionAnswer(item.TableQuestions.Questions, 1013, answerObj)
const min = getQuestionAnswer(item.TableQuestions.Questions, 1014, answerObj)
answerObj.min = min
const mean = getQuestionAnswer(item.TableQuestions.Questions, 1015, answerObj)
answerObj.mean = mean
answerObj.saveTypeEnum = (isNaN(parseFloat(min)) || isNaN(parseFloat(mean))) ? 1 : 2
} else if (item.LesionType === 103) {
const angle = getQuestionAnswer(item.TableQuestions.Questions, 1016, answerObj)
answerObj.angle = angle
answerObj.saveTypeEnum = isNaN(parseFloat(angle)) ? 1 : 2
}
} else { } else {
answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj) answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj)
answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj) answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj)
answerObj.lesionLength = getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj) answerObj.lesionLength = getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj)
answerObj.lesionShort = getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj) answerObj.lesionShort = getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj)
var isLymphLesion = getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj) let isLymphLesion = getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
answerObj.isLymphLesion = isLymphLesion answerObj.isLymphLesion = isLymphLesion
answerObj.lesionState = getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj) answerObj.lesionState = getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)

View File

@ -18,30 +18,6 @@
<i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" /> <i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" />
</div> </div>
</div> </div>
<!-- <el-form-item
:label="$t('trials:reading:title:lesionType')"
prop="LesionType"
:rules="[
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
]"
>
<el-select
v-model="questionForm.LesionType"
filterable
:disabled="!isCurrentTask || readingTaskState>=2"
@change="((val)=>{lesionTypeChange(val)})"
>
<el-option
v-for="item of $d.LesionType"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item> -->
<el-form-item <el-form-item
v-for="qs in questions" v-for="qs in questions"
v-show="qs.ShowQuestion!==2" v-show="qs.ShowQuestion!==2"
@ -315,44 +291,6 @@ export default {
return '' return ''
} }
}, },
async lesionTypeChange(v) {
this.$emit('determineExistsUnsavedLession', async val => {
if (val) {
//
var idx = this.tableQuestions.findIndex(item => item.LesionType === v)
if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
// msg = msg.replace('xxx', this.tableQuestions[idx].QuestionName)
msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
return
}
var arr = []
this.questionForm[this.getQuestionId(1001)] = ''
this.questionForm[this.getQuestionId(1002)] = ''
this.questionForm[this.getQuestionId(1003)] = ''
this.questions.forEach(item => {
item.Answer = this.questionForm[item.Id] ? this.questionForm[item.Id] : ''
arr.push(item)
})
var type = null
if (this.questionForm.RowId) {
type = 1
} else {
type = 0
}
DicomEvent.$emit('changeLesionType', { questionForm: arr, oldLesionType: this.lesionType, newLesionType: v, rowIndex: this.questionForm.RowIndex, questionId: this.parentQsId, measureData: this.questionForm.MeasureData, type, rowId: this.questionForm.RowId })
} else {
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
}
})
},
deleteLesionInfo() { deleteLesionInfo() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
@ -390,7 +328,7 @@ export default {
}, },
calculate(qsMarkArr, type) { calculate(qsMarkArr, type) {
var num = 0 var num = 0
for (let i = 0; i< qsMarkArr.length; i++) { for (let i = 0; i < qsMarkArr.length; i++) {
const mark = qsMarkArr[i] const mark = qsMarkArr[i]
const v = this.questionForm[this.getQuestionId(mark)] const v = this.questionForm[this.getQuestionId(mark)]
if (isNaN(parseFloat(v))) { if (isNaN(parseFloat(v))) {
@ -407,7 +345,7 @@ export default {
} }
} }
} }
return num === null ? num : num.toFixed(this.digitPlaces) return num === null ? num : num.toFixed(this.digitPlaces)
}, },
limitBlur(qId, valueType) { limitBlur(qId, valueType) {

View File

@ -75,13 +75,13 @@
</el-tooltip> </el-tooltip>
<div style="position: absolute;left: 60px;top: 2px;"> <div style="position: absolute;left: 60px;top: 2px;">
<div style="display: flex;flex-direction: row;font-size: 11px;width:200px;height: 30px;"> <div style="display: flex;flex-direction: row;font-size: 11px;width:200px;height: 30px;">
<div style="margin-left:10px;"> <div v-show="item.TableQuestions.Answers[i].area1" style="margin-left:10px;">
{{ item.TableQuestions.Answers[i].area1 }}m {{ item.TableQuestions.Answers[i].area1 }}m
</div> </div>
<div style="margin-left:10px;"> <div v-show="item.TableQuestions.Answers[i].area2" style="margin-left:10px;">
{{ item.TableQuestions.Answers[i].area2 }}m {{ item.TableQuestions.Answers[i].area2 }}m
</div> </div>
<div style="margin-left:10px;margin-bottom:5px;"> <div v-show="item.TableQuestions.Answers[i].diff" style="margin-left:10px;margin-bottom:5px;">
{{ item.TableQuestions.Answers[i].diff }}m {{ item.TableQuestions.Answers[i].diff }}m
</div> </div>
</div> </div>

View File

@ -18,30 +18,6 @@
<i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" /> <i class="el-icon-circle-close" style="font-size: 25px;cursor: pointer;" @click="handleClose" />
</div> </div>
</div> </div>
<!-- <el-form-item
:label="$t('trials:reading:title:lesionType')"
prop="LesionType"
:rules="[
{ required:true,message: $t('common:ruleMessage:select'), trigger: ['blur']},
]"
>
<el-select
v-model="questionForm.LesionType"
filterable
:disabled="!isCurrentTask || readingTaskState>=2"
@change="((val)=>{lesionTypeChange(val)})"
>
<el-option
v-for="item of $d.LesionType"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item> -->
<el-form-item <el-form-item
v-for="qs in questions" v-for="qs in questions"
v-show="qs.ShowQuestion!==2" v-show="qs.ShowQuestion!==2"
@ -70,9 +46,9 @@
@change="((val)=>{formItemChange(val, qs)})" @change="((val)=>{formItemChange(val, qs)})"
@blur="limitBlur(qs.Id, qs.ValueType)" @blur="limitBlur(qs.Id, qs.ValueType)"
> >
<!-- <template v-if="qs.Unit" slot="append"> <template v-if="qs.Unit" slot="append">
{{ $fd('ValueUnit', parseInt(qs.Unit)) }} {{ $fd('ValueUnit', parseInt(qs.Unit)) }}
</template> --> </template>
</el-input> </el-input>
</template> </template>
<!-- 自动计算 --> <!-- 自动计算 -->
@ -315,96 +291,65 @@ export default {
return '' return ''
} }
}, },
async lesionTypeChange(v) {
this.$emit('determineExistsUnsavedLession', async val => {
if (val) {
//
var idx = this.tableQuestions.findIndex(item => item.LesionType === v)
if (idx > -1 && !!this.tableQuestions[idx].MaxQuestionCount && this.tableQuestions[idx].MaxQuestionCount <= this.tableQuestions[idx].TableQuestions.Answers.length) {
let msg = this.$t('trials:reading:warnning:msg14')
// msg = msg.replace('xxx', this.tableQuestions[idx].QuestionName)
msg = msg.replace('xxx', this.tableQuestions[idx].MaxQuestionCount)
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
return
}
var arr = []
this.questionForm[this.getQuestionId(1001)] = ''
this.questionForm[this.getQuestionId(1002)] = ''
this.questionForm[this.getQuestionId(1003)] = ''
this.questions.forEach(item => {
item.Answer = this.questionForm[item.Id] ? this.questionForm[item.Id] : ''
arr.push(item)
})
var type = null
if (this.questionForm.RowId) {
type = 1
} else {
type = 0
}
DicomEvent.$emit('changeLesionType', { questionForm: arr, oldLesionType: this.lesionType, newLesionType: v, rowIndex: this.questionForm.RowIndex, questionId: this.parentQsId, measureData: this.questionForm.MeasureData, type, rowId: this.questionForm.RowId })
} else {
this.$set(this.questionForm, 'LesionType', this.originalQuestionForm.LesionType)
}
})
},
deleteLesionInfo() {
return new Promise((resolve, reject) => {
const loading = this.$loading({ fullscreen: true })
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
deleteReadingRowAnswer(param)
.then(async res => {
if (res.IsSuccess) {
DicomEvent.$emit('getReportInfo', true)
}
loading.close()
resolve()
}).catch(() => {
loading.close()
reject()
})
})
},
async formItemChange(v, question) { async formItemChange(v, question) {
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 1) this.$set(this.questionForm, 'saveTypeEnum', 1)
} else { } else {
this.$set(this.questionForm, 'saveTypeEnum', 0) this.$set(this.questionForm, 'saveTypeEnum', 0)
} }
if (question.QuestionMark === 1001 || question.QuestionMark === 1002) { if (question.QuestionMark === 1011 || question.QuestionMark === 1012 || question.QuestionMark === 1013) {
this.questionForm[this.getQuestionId(1003)] = this.calculate([1001, 1002], '-') //
this.questionForm[this.getQuestionId(1014)] = this.calculate([1011, 1012, 1013], 'min')
//
this.questionForm[this.getQuestionId(1015)] = this.calculate([1011, 1012, 1013], 'avg')
} }
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm }) let l1, l2, l3, min, mean, angle
if (this.lesionType === 101) {
l1 = this.getQuestionVal(1011)
l2 = this.getQuestionVal(1012)
l3 = this.getQuestionVal(1013)
min = this.getQuestionVal(1014)
mean = this.getQuestionVal(1015)
} else if (this.lesionType === 103) {
angle = this.getQuestionVal(1016)
}
this.$emit('resetQuestions', { l1, l2, l3, min, mean, angle, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
}, },
calculate(qsMarkArr, type) { calculate(qsMarkArr, type) {
var num = 0 var num = 0
qsMarkArr.map((qsmark, i) => { const arr = []
for (let i = 0; i < qsMarkArr.length; i++) {
const mark = qsMarkArr[i]
let v = this.questionForm[this.getQuestionId(mark)]
if (isNaN(parseFloat(v))) {
num = null
break
}
v = parseFloat(v)
if (i === 0) { if (i === 0) {
const v = this.questionForm[this.getQuestionId(qsmark)] num = v
num = isNaN(parseFloat(v)) ? 0 : parseFloat(v) arr.push(v)
} else { } else {
const v = this.questionForm[this.getQuestionId(qsmark)]
switch (type) { switch (type) {
case '-': case 'min':
num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v) num = num > v ? v : num
break
case 'avg':
arr.push(v)
if (arr.length === qsMarkArr.length) {
num = arr.reduce((acc, curr) => {
return acc + curr
}, 0) / arr.length
}
break break
} }
} }
}) }
return parseFloat(num).toFixed(this.digitPlaces)
return num === null ? num : num.toFixed(this.digitPlaces)
}, },
limitBlur(qId, valueType) { limitBlur(qId, valueType) {
const value = isNaN(parseFloat(this.questionForm[qId])) ? null : parseFloat(this.questionForm[qId]) const value = this.questionForm[qId]
if (value === null) return
if (valueType === 0) { if (valueType === 0) {
this.$set(this.questionForm, qId, parseInt(value)) this.$set(this.questionForm, qId, parseInt(value))
} else if (valueType === 3) { } else if (valueType === 3) {
@ -494,7 +439,17 @@ export default {
this.$set(this.questionForm, 'saveTypeEnum', 2) this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm } this.originalQuestionForm = { ...this.questionForm }
this.$set(this.questionForm, 'RowId', res.Result.RowId) this.$set(this.questionForm, 'RowId', res.Result.RowId)
this.$emit('resetQuestions', { saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm }) let l1, l2, l3, min, mean, angle
if (this.lesionType === 101) {
l1 = this.getQuestionVal(1011)
l2 = this.getQuestionVal(1012)
l3 = this.getQuestionVal(1013)
min = this.getQuestionVal(1014)
mean = this.getQuestionVal(1015)
} else if (this.lesionType === 103) {
angle = this.getQuestionVal(1016)
}
this.$emit('resetQuestions', { l1, l2, l3, min, mean, angle, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$emit('close') this.$emit('close')
DicomEvent.$emit('refreshQuestions') DicomEvent.$emit('refreshQuestions')

View File

@ -73,6 +73,19 @@
<el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) ===1" class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')" placement="bottom"> <el-tooltip v-if="readingTaskState<2 && parseInt(item.TableQuestions.Answers[i].saveTypeEnum) ===1" class="item" effect="dark" :content="$t('trials:reading:button:incompleteInfor')" placement="bottom">
<i class="el-icon-warning" style="color:#ff9800" /> <i class="el-icon-warning" style="color:#ff9800" />
</el-tooltip> </el-tooltip>
<div style="position: absolute;left: 60px;top: 2px;">
<div style="display: flex;flex-direction: row;font-size: 11px;width:200px;height: 30px;">
<div v-show="item.TableQuestions.Answers[i].min && item.LesionType === 101" style="margin-left:10px;">
min: {{ item.TableQuestions.Answers[i].min }}μm
</div>
<div v-show="item.TableQuestions.Answers[i].mean && item.LesionType === 101" style="margin-left:10px;">
mean: {{ item.TableQuestions.Answers[i].mean }}μm
</div>
<div v-show="item.TableQuestions.Answers[i].angle && item.LesionType === 103" style="margin-left:10px;">
{{ item.TableQuestions.Answers[i].angle }}°
</div>
</div>
</div>
</div> </div>
</template> </template>
@ -91,7 +104,6 @@
:reading-task-state="readingTaskState" :reading-task-state="readingTaskState"
:is-base-line-task="isBaseLineTask" :is-base-line-task="isBaseLineTask"
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer" @getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
@determineExistsUnsavedLession="determineExistsUnsavedLession"
@resetQuestions="resetQuestions" @resetQuestions="resetQuestions"
@close="close" @close="close"
/> />
@ -349,7 +361,15 @@ export default {
if (item.Type === 'table' && item.Id === obj.questionId) { if (item.Type === 'table' && item.Id === obj.questionId) {
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex) var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum
if (item.LesionType === 101) {
item.TableQuestions.Answers[idx].l1 = obj.l1
item.TableQuestions.Answers[idx].l2 = obj.l2
item.TableQuestions.Answers[idx].l3 = obj.l3
item.TableQuestions.Answers[idx].min = obj.min
item.TableQuestions.Answers[idx].mean = obj.mean
} else if (item.LesionType === 103) {
item.TableQuestions.Answers[idx].angle = obj.angle
}
for (const i in obj.anwsers) { for (const i in obj.anwsers) {
item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i]) item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i])
} }
@ -364,8 +384,14 @@ export default {
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) { if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
item.TableQuestions.Answers.forEach(answerObj => { item.TableQuestions.Answers.forEach(answerObj => {
if (answerObj.RowId) { if (answerObj.RowId) {
var diffVal = this.getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj) if (item.LesionType === 101) {
this.$set(answerObj, 'saveTypeEnum', isNaN(parseFloat(diffVal)) ? 1 : 2) var min = this.getQuestionAnswer(item.TableQuestions.Questions, 1014, answerObj)
var mean = this.getQuestionAnswer(item.TableQuestions.Questions, 1015, answerObj)
this.$set(answerObj, 'saveTypeEnum', (isNaN(parseFloat(min)) || isNaN(parseFloat(mean))) ? 1 : 2)
} else if (item.LesionType === 103) {
var angle = this.getQuestionAnswer(item.TableQuestions.Questions, 1016, answerObj)
this.$set(answerObj, 'saveTypeEnum', isNaN(parseFloat(angle)) ? 1 : 2)
}
} else { } else {
this.$set(answerObj, 'saveTypeEnum', 0) this.$set(answerObj, 'saveTypeEnum', 0)
} }
@ -497,10 +523,6 @@ export default {
return 0 return 0
} }
}, },
determineExistsUnsavedLession(callback) {
callback(true)
return
},
getLesionName(orderMark, rowIndex) { getLesionName(orderMark, rowIndex) {
var lessionName = '' var lessionName = ''
var rowIndexArr = rowIndex.split('.') var rowIndexArr = rowIndex.split('.')
@ -623,6 +645,7 @@ export default {
async close(questionsObj) { async close(questionsObj) {
if (questionsObj) { if (questionsObj) {
this.getReadingQuestionAndAnswer(questionsObj.visitTaskId) this.getReadingQuestionAndAnswer(questionsObj.visitTaskId)
this.refreshQuestions()
} }
this.activeItem.activeRowIndex = null this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null this.activeItem.activeCollapseId = null