Browse Source

AI.diagnosis

master
pengjun 7 months ago
parent
commit
882df6ddb4
  1. 20
      src/components/doctorCheck/ButtonList.vue
  2. 19
      src/components/sumDoctorCheck/ButtonList.vue

20
src/components/doctorCheck/ButtonList.vue

@ -678,21 +678,33 @@ export default {
return return
} }
} }
let reqText = ''
let message = ''
let linkStr = ';' let linkStr = ';'
this.doctorCheck.checkItemList.forEach(e => { this.doctorCheck.checkItemList.forEach(e => {
if (e.result) { if (e.result) {
if (reqText) {
if (message) {
linkStr = ';' linkStr = ';'
} else { } else {
linkStr = '' linkStr = ''
} }
reqText += linkStr + e.itemName + ':' + e.result
message += linkStr + e.itemName + ':' + e.result
if(e.unitName) message += e.unitName
if(e.referenceRangeValue) message += '(正常范围:' + e.referenceRangeValue + ')'
} }
}); });
postapi('/api/app/AIMessage/GetAIMessageResult', { message })
.then(res => {
if (res.code > -1) {
this.AI.visible = true this.AI.visible = true
this.AI.diagnosis = reqText
this.AI.diagnosis = res.data.result
this.btnAImax(false) this.btnAImax(false)
} else {
this.$message.error({ showClose: true, message: res.message })
}
})
}, },
btnAImax(max) { btnAImax(max) {

19
src/components/sumDoctorCheck/ButtonList.vue

@ -420,23 +420,30 @@ export default {
} }
} }
let reqText = ''
let message = ''
let linkStr = ';' let linkStr = ';'
this.sumDoctorCheck.summaryList.forEach(e => { this.sumDoctorCheck.summaryList.forEach(e => {
if (reqText) {
if (message) {
linkStr = ';' linkStr = ';'
} else { } else {
linkStr = '' linkStr = ''
} }
reqText += linkStr + e.summaryTitle + ':'
message += linkStr + e.summaryTitle + ':'
e.details.forEach((e1, i) => { e.details.forEach((e1, i) => {
reqText += (i+1) + ')、' + e1.summaryContent
message += (i + 1) + ')、' + e1.summaryContent
}); });
}); });
postapi('/api/app/AIMessage/GetAIMessageResult', { message })
.then(res => {
if (res.code > -1) {
this.AI.visible = true this.AI.visible = true
this.AI.diagnosis = reqText
this.AI.diagnosis = res.data.result
this.btnAImax(false) this.btnAImax(false)
} else {
this.$message.error({ showClose: true, message: res.message })
}
})
}, },
btnAImax(max) { btnAImax(max) {

Loading…
Cancel
Save