人工随访待办

This commit is contained in:
shidongli 2024-04-09 16:20:00 +08:00
parent fb4d5e435b
commit 10dd6bb358
4 changed files with 457 additions and 54 deletions

View File

@ -0,0 +1,22 @@
import request from '@/utils/request'
export function selectFollowPatientInfo(id) {
return request({
url: '/manage/signroute/selectFollowPatientInfo/'+id,
method: 'get',
})
}
// 问卷量表
export function question(id) {
return request({
url: '/system/question/'+id,
method: 'get',
})
}
//保存
export function addPatientQuestionResult(data) {
return request({
url: '/manage/signroute/addPatientQuestionResult',
method: 'post',
data: data
})
}

View File

@ -1,5 +1,6 @@
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import Cookies from 'js-cookie'
const user = { const user = {
state: { state: {
@ -51,6 +52,11 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo().then(res => {
const user = res.user const user = res.user
console.log(user,'user')
Cookies.set("userId",user.userId)
Cookies.set("userName",user.userName)
// localStorage.setItem("userId",user.userId);
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
localStorage.setItem('user', JSON.stringify(user)) localStorage.setItem('user', JSON.stringify(user))
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组

View File

@ -128,13 +128,21 @@
v-model="queryParams.visitMethod" v-model="queryParams.visitMethod"
placeholder="请选择就诊类型" placeholder="请选择就诊类型"
clearable clearable
@change="change"
> >
<el-option <el-option
v-for="item in visitoptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
<!-- <el-option
v-for="dict in dict.type.visit_type" v-for="dict in dict.type.visit_type"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> /> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="就诊流水号" prop="visitSerialNumber"> <el-form-item label="就诊流水号" prop="visitSerialNumber">
@ -148,7 +156,7 @@
<el-form-item label="门诊/出院时间" prop="intentionalTimeStart"> <el-form-item label="门诊/出院时间" prop="intentionalTimeStart">
<el-date-picker <el-date-picker
@change="mzchange" @change="mzchange"
v-model="mzTime" v-model="mzTime"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
@ -256,11 +264,12 @@
align="center" align="center"
prop="attendingPhysicianName" prop="attendingPhysicianName"
/> />
<el-table-column label="就诊类型" align="center" prop="visitMethod"> <el-table-column label="就诊类型" align="center" prop="suitRange">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
>{{ scope.row.visitMethod == "OUTPATIENT_SERVICE" ? "门诊" : "" }} >{{ scope.row.suitRange == "OUTPATIENT_SERVICE" ? "门诊" : "" }}
{{ scope.row.visitMethod == "BE_IN_HOSPITAL" ? "住院" : "" }} {{ scope.row.suitRange == "IN_THE_HOSPITAL" ? "在院" : "" }}
{{ scope.row.suitRange == "DISCHARGE" ? "出院" : "" }}
</span> </span>
</template></el-table-column </template></el-table-column
> >
@ -327,7 +336,7 @@
/> />
</div> </div>
</template> </template>
<script> <script>
import { manualFollowUpList } from "@/api/system/followup" import { manualFollowUpList } from "@/api/system/followup"
@ -412,6 +421,18 @@ export default {
}, },
// //
form: {}, form: {},
visitoptions: [
{
value: 'IN_THE_HOSPITAL',
label: '在院'
}, {
value: 'OUTPATIENT_SERVICE',
label: '门诊'
}, {
value: 'DISCHARGE',
label: '出院'
},
],
// //
// rules: { // rules: {
// patientId: [ // patientId: [
@ -425,6 +446,29 @@ export default {
this.selectAgencyinfo(); this.selectAgencyinfo();
}, },
methods: { methods: {
change(e) {
if (e == 'DISCHARGE') {
this.queryParams.clinicalStartTime = null
this.queryParams.clinicalEndTime = null
} else if (e == 'OUTPATIENT_SERVICE') {
this.queryParams.dischargeStartTime = null
this.queryParams.dischargeEndTime = null
}else{
this.queryParams.dischargeStartTime = null
this.queryParams.dischargeEndTime = null
this.queryParams.clinicalStartTime = null
this.queryParams.clinicalEndTime = null
}
console.log(e)
// DISCHARGE
//
// OUTPATIENT
//
},
// //
usergetListinfo() { usergetListinfo() {
usergetList({ usergetList({
@ -571,23 +615,47 @@ export default {
this.queryParams.followEndTime = null this.queryParams.followEndTime = null
} else { } else {
this.queryParams.followStartTime = this.intentionalTime[0] this.queryParams.followStartTime = this.intentionalTime[0]
this.queryParams.followEndTime = this.intentionalTime[1] this.queryParams.followEndTime = this.intentionalTime[1]
} }
}, },
// //
mzchange(){ mzchange() {
if (this.mzTime == null) { if (this.mzTime == null) {
this.mzTime = []; this.mzTime = [];
this.queryParams.clinicalStartTime = null this.queryParams.clinicalStartTime = null
this.queryParams.clinicalEndTime = null this.queryParams.clinicalEndTime = null
} else { } else {
this.queryParams.clinicalStartTime = this.mzTime[0] console.log(this.queryParams, '-----')
this.queryParams.clinicalEndTime = this.mzTime[1] if (!this.queryParams.visitMethod || this.queryParams.visitMethod=='IN_THE_HOSPITAL') {
this.queryParams.clinicalStartTime = this.mzTime[0]
this.queryParams.clinicalEndTime = this.mzTime[1]
this.queryParams.dischargeStartTime = this.queryParams.clinicalStartTime
this.queryParams.dischargeEndTime = this.queryParams.clinicalEndTime
} else if (this.queryParams.visitMethod == 'DISCHARGE') {
this.queryParams.dischargeStartTime = this.mzTime[0]
this.queryParams.dischargeEndTime = this.mzTime[1]
this.queryParams.clinicalStartTime = null
this.queryParams.clinicalEndTime = null
} else if (this.queryParams.visitMethod == 'OUTPATIENT_SERVICE') {
this.queryParams.dischargeStartTime = null
this.queryParams.dischargeEndTime = null
this.queryParams.clinicalStartTime = this.mzTime[0]
this.queryParams.clinicalEndTime = this.mzTime[1]
}
} }
}, },
// //
rychange(){ rychange() {
if (this.ryTime == null) { if (this.ryTime == null) {
this.ryTime = []; this.ryTime = [];
this.queryParams.admissionStartTime = null this.queryParams.admissionStartTime = null
@ -606,7 +674,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams= { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
followStartTime: null, followStartTime: null,
@ -638,7 +706,7 @@ export default {
departmentId: null, departmentId: null,
wardId: null, wardId: null,
}, },
this.handleQuery(); this.handleQuery();
this.intentionalTime = []; this.intentionalTime = [];
this.mzTime = []; this.mzTime = [];
this.ryTime = []; this.ryTime = [];
@ -662,9 +730,12 @@ export default {
path: "/task/followupsee", path: "/task/followupsee",
query: { query: {
patientId: row.patientId, patientId: row.patientId,
taskContent: row.taskContent, taskType: row.taskType,
templateId: row.templateId,
cardNo: row.cardNo, cardNo: row.cardNo,
patientName: row.patientName, patientName: row.patientName,
manageRouteName: row.manageRouteName,
manageRouteNodeName:row.routeNodeName,
patientPhone: row.patientPhone, patientPhone: row.patientPhone,
sex: row.sex, sex: row.sex,
birthDate: row.birthDate, birthDate: row.birthDate,
@ -673,6 +744,8 @@ export default {
patientSource: row.patientSource, patientSource: row.patientSource,
createTime: row.createTime, createTime: row.createTime,
age: row.birthDate ? getAge(row.birthDate) : "", age: row.birthDate ? getAge(row.birthDate) : "",
manageRouteId: row.manageRouteId,
manageRouteNodeId: row.manageRouteNodeId,
}, },
}); });
@ -735,4 +808,3 @@ export default {
}, },
}; };
</script> </script>

View File

@ -24,8 +24,12 @@
{{ list.age }} {{ list.age }}
</div> </div>
<div class="source"> <div class="source">
<div class="item" @click="submit"><el-button plain>保存</el-button></div> <div class="item" @click="submit">
<div class="item" @click="cencal"><el-button plain>取消</el-button></div> <el-button plain>保存</el-button>
</div>
<div class="item" @click="cencal">
<el-button plain>取消</el-button>
</div>
</div> </div>
</div> </div>
<div class="information"> <div class="information">
@ -42,34 +46,167 @@
</div> </div>
</div> </div>
<div class="bottomheader"> <div class="bottomheader">
<div style="display: flex"> <div style="display: flex">
<!-- 问卷模板 --> <!-- 问卷模板 -->
<div <div
class="right" class="right"
v-if="$route.query.taskContent == 'QUESTIONNAIRE_SCALE'" v-if="$route.query.taskType == 'QUESTIONNAIRE_SCALE'"
> >
<div style="float: right; margin-top: 20px">
<el-form
:inline="true"
class="demo-form-inline"
:model="questiondata"
:rules="rules"
ref="questiondata"
>
<el-form-item label="任务处理信息" prop="routeHandleRemark">
<el-input
type="textarea"
placeholder="请输入任务处理信息"
v-model="questiondata.routeHandleRemark"
/>
</el-form-item>
</el-form>
</div>
<div class="sport">问卷模板: Barthel指数评定问卷</div> <div class="sport">问卷模板: Barthel指数评定问卷</div>
<div class="words"> <div class="words">
您好!本问卷用于评估日常生活能力请根据自身日常实际表现选择合适的选项 您好!本问卷用于评估日常生活能力请根据自身日常实际表现选择合适的选项
</div> </div>
<div class="words"> <div
1.进食单选题 class="words"
<el-radio-group v-model="radio" class="custom-radio-group"> v-for="(item, index) in questiondata.questionSubjectList"
<el-radio label="1" class="custom">备选项</el-radio> :key="index"
<el-radio label="2" class="custom">备选项</el-radio> >
<el-radio label="3" class="custom">备选项</el-radio> {{ index + 1 }}.{{ item.questionName }}
<span v-if="item.questionType == 'MULTIPLE_CHOICE'"
>单选题</span
>
<span v-if="item.questionType == 'MULTIPLE_CHOICE_QUESTIONS'"
>多选题</span
>
<span v-if="item.questionType == 'SCORING_QUESTIONS'"
>打分题</span
>
<span v-if="item.questionType == 'COMBINATION_RADIO_SUBJECT'"
>组合单选题</span
>
<span v-if="item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'"
>组合多选题</span
>
<span v-if="item.questionType == 'COMBINATION_BLANKS_SUBJECT'"
>组合填空题</span
>
<span v-if="item.questionType == 'FILL_IN_THE_BLANKS'"
>填空题</span
>
<span v-if="item.questionType == 'COMBINATION_SCORING_SUBJECT'"
>组合打分题</span
>
<span v-if="item.questionType == 'DATE_BLANKS_SUBJECT'"
>日期填空题</span
>
<span v-if="item.questionType == 'TIME_BLANKS_SUBJECT'"
>时间填空题</span
>
<el-radio-group
v-if="
item.questionType == 'MULTIPLE_CHOICE' ||
item.questionType == 'COMBINATION_RADIO_SUBJECT' ||
item.questionType == 'SCORING_QUESTIONS' ||
item.questionType == 'COMBINATION_SCORING_SUBJECT'
"
v-model="questiondata[index]"
class="custom-radio-group"
@change="radioGroupChange($event, item)"
>
<el-radio
class="custom"
v-for="(aitem, aindex) in item.questionSubjectOptionList"
:key="aindex"
:label="aitem.id"
@change="radioChange($event, aitem, index)"
>{{ aitem.optionName }}</el-radio
>
</el-radio-group> </el-radio-group>
<!-- 多选组合多选 -->
<el-checkbox-group
v-model="checkeddata"
@change="radioGroupChange($event, item, 'checkbox')"
v-if="
item.questionType == 'MULTIPLE_CHOICE_QUESTIONS' ||
item.questionType == 'COMBINATION_MULTIPLE_SUBJECT'
"
>
<el-checkbox
v-for="(aitem, aindex) in item.questionSubjectOptionList"
:key="aindex"
:label="aitem.id"
@change="radioChangecheck($event, aitem, index, aindex)"
>{{ aitem.optionName }}</el-checkbox
>
</el-checkbox-group>
<!-- 填空题组合填空 -->
<div
v-if="
item.questionType == 'FILL_IN_THE_BLANKS' ||
item.questionType == 'COMBINATION_BLANKS_SUBJECT'
"
class="tk"
>
<el-input
v-model="item.optionAnswer"
placeholder="请输入答案"
type="textarea"
/>
<!-- <el-input></el-input> -->
</div>
<!-- 日期填空题 -->
<div
v-if="item.questionType == 'DATE_BLANKS_SUBJECT'"
style="margin: 20px 0 10px 30px"
>
<el-date-picker
@change="timepicker($event,index)"
clearable
v-model="item.optionAnswer"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
</div>
<!-- 时间填空题 -->
<div
style="margin: 20px 0 10px 30px"
v-if="item.questionType == 'TIME_BLANKS_SUBJECT'"
>
<el-time-select
@change="timepickerselect($event,index)"
clearable
v-model="item.optionAnswer"
:picker-options="{
start: '08:30',
step: '00:30',
end: '23:30',
}"
placeholder="选择时间"
>
</el-time-select>
</div>
</div> </div>
</div> </div>
<!-- 电话外呼 --> <!-- 电话外呼 -->
<div v-if="$route.query.taskContent == 'PHONE_OUTBOUND'"> <div v-if="$route.query.taskType == 'PHONE_OUTBOUND'">
<div class="sport">电话外呼</div> <div class="sport">电话外呼</div>
<div class="nexttime">话术名称</div> <div class="nexttime">话术名称</div>
</div> </div>
<!-- 人工随访 --> <!-- 人工随访 -->
<div class="right" v-if="$route.query.taskContent == 'ARTIFICIAL_FOLLOW_UP'"> <div
class="right"
v-if="$route.query.taskType == 'ARTIFICIAL_FOLLOW_UP'"
>
<div class="sport">人工随访模板: 神经内科人工随访</div> <div class="sport">人工随访模板: 神经内科人工随访</div>
<div class="words">**您好!</div> <div class="words">**您好!</div>
<div class="words"> <div class="words">
@ -78,13 +215,20 @@
<div class="words"> <div class="words">
1.进食单选题 1.进食单选题
<el-radio-group v-model="radio" class="custom-radio-group"> <el-radio-group v-model="radio" class="custom-radio-group">
<el-radio label="1" class="custom">备选项</el-radio> <el-radio
v-for="item in options"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
<!-- <el-radio label="1" class="custom">备选项</el-radio>
<el-radio label="2" class="custom">备选项</el-radio> <el-radio label="2" class="custom">备选项</el-radio>
<el-radio label="3" class="custom">备选项</el-radio> <el-radio label="3" class="custom">备选项</el-radio> -->
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<!-- <div v-if="$route.query.taskContent == 'ARTIFICIAL_FOLLOW_UP'"> <!-- <div v-if="$route.query.taskType == 'ARTIFICIAL_FOLLOW_UP'">
<div class="sport">人工随访模板:</div> <div class="sport">人工随访模板:</div>
<div class="sport">人工随访模板内容:</div> <div class="sport">人工随访模板内容:</div>
</div> --> </div> -->
@ -92,42 +236,183 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { selectVisitRecord } from "@/api/system/taskExecuteRecord"; import { selectFollowPatientInfo, question, addPatientQuestionResult } from "@/api/system/followupsee";
import Cookies from 'js-cookie'
export default { export default {
name: "patientdetails", name: "patientdetails",
data() { data() {
return { return {
radio: "1", obj: {},
activeName: "first", checkList: [],
checked: false,
rules: {
routeHandleRemark: [
{ required: true, message: '请输入任务处理信息', trigger: 'change' }
],
},
options: [
{ id: 1, value: 'A', label: '选项A' },
{ id: 2, value: 'B', label: '选项B', show: 'true' },
{ id: 3, value: 'C', label: '选项C' }
],
radio: "B",
id: "", id: "",
list: [], list: [],
type: '',
checkeddata: [],
questiondata: {
totalScore: 0, //
routeHandlePerson: null,
routeHandleId: null,
},
}; };
}, },
created() { created() {
console.log(this.$route.query); this.id = this.$route.query.manageRouteId;
this.id = this.$route.query.patientId;
this.info(); this.info();
this.questioninfo();
}, },
methods: { methods: {
//
timepicker(e,index){
this.questiondata.questionSubjectList[index].optionAnswer=e
},
//
timepickerselect(e,index){
console.log(e)
this.questiondata.questionSubjectList[index].optionAnswer=e
},
radioGroupChange(e, item) {
},
// radio
radioChange(e, item, index) {
console.log(e, item, index, '选中某个单选框时')
this.questiondata.questionSubjectList[index].questionSubjectOptionList.forEach(el => {
if (el.id == item.id) {
el.optionChooseSign = '0'
}
else {
el.optionChooseSign = '1'
}
})
},
//
radioChangecheck(e, item, index, aindex) {
console.log(e, item, index, '选中某个复选框时')
if (e == true) {
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '0'
} else {
this.questiondata.questionSubjectList[index].questionSubjectOptionList[aindex].optionChooseSign = '1'
}
console.log(this.questiondata, '11111111复选框')
},
info() { info() {
selectVisitRecord(this.id).then((res) => { selectFollowPatientInfo(this.id).then((res) => {
console.log(res);
this.list = res.data; this.list = res.data;
}); });
},
questioninfo() {
question(this.$route.query.templateId).then((res) => {
this.questiondata = res.data;
this.questiondata.questionInfoId = res.data.id;
this.questiondata.routeHandlePerson = Cookies.get('userName')
this.questiondata.routeHandleId = Cookies.get('userId')
this.questiondata.patientId = this.$route.query.patientId
this.questiondata.manageRouteId = this.$route.query.manageRouteId
this.questiondata.manageRouteNodeId = this.$route.query.manageRouteNodeId
this.questiondata.patientName = this.$route.query.patientName
this.questiondata.manageRouteName = this.$route.query.manageRouteName
this.questiondata.manageRouteNodeName = this.$route.query.manageRouteNodeName
this.questiondata.totalScore = 0
this.questiondata.questionSubjectList.forEach(e => {
e.questionSubjectOptionList.forEach(el => {
if (e.questionType == 'MULTIPLE_CHOICE_QUESTIONS' || e.questionType == 'COMBINATION_MULTIPLE_SUBJECT') {
el.optionChooseSign = '1'
}
})
})
});
}, },
// //
submit(){},
//
cencal(){
this.$router.push({ /** 提交按钮 */
path: "/task/followup", submit() {
var score = 0
//
this.questiondata.questionSubjectList.forEach(e => {
if (e.questionSubjectOptionList?.length > 0) {
e.questionSubjectOptionList.forEach(el => {
if (e.questionType == 'MULTIPLE_CHOICE' || e.questionType == 'MULTIPLE_CHOICE_QUESTIONS' || e.questionType == 'SCORING_QUESTIONS') {
if(el.optionChooseSign=='0'){
score += el.optionScore
}
}
})
console.log(score,'score')
this.questiondata.totalScore=score
}); }
})
console.log(this.questiondata, 'questiondata')
// .=.
this.questiondata.subjectResultDTOList = this.questiondata.questionSubjectList
this.obj = JSON.parse(JSON.stringify(this.questiondata))
delete this.obj.questionSubjectList;
this.obj.subjectResultDTOList.forEach(e => {
e.optionResultList = e.questionSubjectOptionList
// console.log(e.optionResultList, 'e.optionResultList')
if (e.optionResultList.optionSubmitAnswer) {
e.optionResultList.optionSubmitAnswer = e.optionResultList.optionSubmitAnswer
}
this.$delete(this.obj, '0', '')
// this.obj.splice(index, 1)
delete e.questionSubjectOptionList;
});
console.log(this.obj, 'obj')
// console.log(this.questiondata, 'questiondata')
this.$refs["questiondata"].validate(valid => {
if (valid) {
addPatientQuestionResult(this.obj).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
});
}, },
//
cencal() {
this.$router.push({
path: "/task/followup",
});
},
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
}, },
@ -135,6 +420,24 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tk {
::v-deep .el-textarea__inner {
margin: 20px 0 10px 30px;
}
}
::v-deep .el-radio {
padding: 10px;
}
::v-deep .el-checkbox-group {
display: flex;
flex-direction: column;
padding: 10px 0px 10px 24px;
}
::v-deep .el-checkbox {
padding: 10px 0 10px 0px;
// padding: 10px;
}
.custom-radio-group { .custom-radio-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -176,7 +479,7 @@ export default {
} }
} }
.right { .right {
width: 70%; width: 100%;
height: 500px; height: 500px;
// background: yellow; // background: yellow;
} }
@ -193,6 +496,7 @@ export default {
} }
.bottomheader { .bottomheader {
overflow: auto;
width: 99%; width: 99%;
background-color: #fff; background-color: #fff;
margin: 10px auto; margin: 10px auto;
@ -295,10 +599,10 @@ export default {
display: flex; display: flex;
position: relative; position: relative;
right: 59px; right: 59px;
position: absolute; position: absolute;
.item{ .item {
margin-left: 20px; margin-left: 20px;
} }
} }
.name { .name {
@ -323,4 +627,3 @@ export default {
} }
} }
</style> </style>