| | |
| | | |
| | | <!-- 药品关联 --> |
| | | <el-row v-if="form.appltype == 6"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="关联药品" prop="region"> |
| | | <el-select |
| | | v-model="medicalCodes" |
| | | @remove-tag="removeMedical" |
| | | style="width: 400px" |
| | | size="medium" |
| | | multiple |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | :remote-method="remoteSearchMedical" |
| | | placeholder="请输入药品名称搜索" |
| | | loading-text="搜索中..." |
| | | > |
| | | <el-option |
| | | v-for="item in medicalOptions" |
| | | :key="item.id" |
| | | :label="item.itemName + ' (' + item.manufacturerName + ')'" |
| | | :value="item.itemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-form-item label="关联药品" prop="region"> |
| | | <el-select |
| | | v-model="medicalCodes" |
| | | @remove-tag="removeMedical" |
| | | style="width: 400px" |
| | | size="medium" |
| | | multiple |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | :remote-method="remoteSearchMedical" |
| | | placeholder="请输入药品名称搜索" |
| | | loading-text="搜索中..." |
| | | > |
| | | <el-option |
| | | v-for="item in medicalOptions" |
| | | :key="item.id" |
| | | :label=" |
| | | item.itemName + ' (' + item.manufacturerName + ')' |
| | | " |
| | | :value="item.itemCode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div |
| | | style=" |
| | | margin-bottom: 20px; |
| | | padding: 8px 12px; |
| | | background-color: #f0f9ff; |
| | | border-left: 4px solid #409eff; |
| | | " |
| | | > |
| | | <p style="margin: 0; color: #606266; font-size: 13px"> |
| | | <i |
| | | class="el-icon-info" |
| | | style="color: #409eff; margin-right: 6px" |
| | | ></i> |
| | | 针对同一药品在多科室/病区下存在的情况,可选择性配置固定科室/病区 |
| | | </p> |
| | | </div> |
| | | <el-row :gutter="20" style="margin-top: 20px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联科室" prop="diseaseDept"> |
| | | <el-select |
| | | v-model="diseaseDept" |
| | | style="width: 100%" |
| | | clearable |
| | | filterable |
| | | placeholder="请选择科室(可选)" |
| | | value-key="deptCode" |
| | | @change="handleDiseaseDeptChange" |
| | | > |
| | | <el-option |
| | | v-for="item in belongDepts" |
| | | :key="item.deptCode" |
| | | :label="item.deptName" |
| | | :value="item" |
| | | ></el-option> |
| | | </el-select> |
| | | <div v-if="diseaseDept" class="selected-info"> |
| | | 已选择: {{ diseaseDept.deptName }} ({{ |
| | | diseaseDept.deptCode |
| | | }}) |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联病区" prop="diseaseWard"> |
| | | <el-select |
| | | v-model="diseaseWard" |
| | | style="width: 100%" |
| | | clearable |
| | | filterable |
| | | placeholder="请选择病区(可选)" |
| | | value-key="districtCode" |
| | | @change="handleDiseaseWardChange" |
| | | > |
| | | <el-option |
| | | v-for="item in belongWards" |
| | | :key="item.districtCode" |
| | | :label="item.districtName" |
| | | :value="item" |
| | | ></el-option> |
| | | </el-select> |
| | | <div v-if="diseaseWard" class="selected-info"> |
| | | 已选择: {{ diseaseWard.districtName }} ({{ |
| | | diseaseWard.districtCode |
| | | }}) |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> |
| | | |
| | | <!-- 科室关联 --> |
| | |
| | | </el-option> |
| | | </el-select> </el-form-item |
| | | ></el-col> |
| | | </el-row> |
| | | |
| | | <!-- 缙云县人民医院:超时未完成是否再次随访 / 再次随访关联任务 --> |
| | | <el-row v-if="form.appltype == 1 && orgname == '缙云县人民医院'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="超时未完成是否再次随访"> |
| | | <el-radio-group v-model="form.nexttaskflag"> |
| | | <el-radio label="1">是</el-radio> |
| | | <el-radio label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="再次随访关联任务"> |
| | | <el-input |
| | | style="width: 300px" |
| | | :disabled="true" |
| | | v-model="nextTaskName" |
| | | placeholder="请点击右侧选择任务" |
| | | /> |
| | | <el-button |
| | | style="margin-left: 10px" |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | | circle |
| | | @click="openNextTaskDialog" |
| | | ></el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 病区关联 --> |
| | |
| | | <el-tag |
| | | v-for="tag in diagglist" |
| | | :key="tag.icdcode" |
| | | @close="removediagg(tag.icd10code)" |
| | | @close="removediagg(tag)" |
| | | type="warning" |
| | | closable |
| | | :disable-transitions="false" |
| | |
| | | </div> |
| | | <el-tag |
| | | v-for="tag in diagglist" |
| | | @close="removediagg(tag.icd10code)" |
| | | @close="removediagg(tag)" |
| | | type="warning" |
| | | closable |
| | | :disable-transitions="false" |
| | |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | <!-- 选择再次随访关联任务 --> |
| | | <el-dialog |
| | | title="选择任务" |
| | | :visible.sync="nextTaskDialogVisible" |
| | | width="60%" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :inline="true" size="small"> |
| | | <el-form-item label="任务名称"> |
| | | <el-input |
| | | v-model="nextTaskQuery.taskName" |
| | | placeholder="请输入任务名称" |
| | | @keyup.enter.native="handleNextTaskQuery" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="handleNextTaskQuery" |
| | | >搜索</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" @click="resetNextTaskQuery" |
| | | >重置</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="nextTaskList" border v-loading="nextTaskLoading"> |
| | | <el-table-column |
| | | label="任务名称" |
| | | prop="taskName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="任务描述" |
| | | prop="taskDesc" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="服务项目" |
| | | prop="templatename" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="操作" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="selectNextTask(scope.row)" |
| | | >选择</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-show="nextTaskTotal > 0" |
| | | :total="nextTaskTotal" |
| | | :page.sync="nextTaskQuery.pageNum" |
| | | :limit.sync="nextTaskQuery.pageSize" |
| | | @pagination="getNextTaskList" |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="nextTaskDialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <Optional-Form |
| | | ref="child" |
| | | :dialogVisiblepatient="dialogVisiblepatientjb" |
| | |
| | | taskdepthospgetsondel, |
| | | taskoperhospgetsondel, |
| | | taskdiaghospgetsondel, |
| | | taskmedicaldel, |
| | | taskdiaggetlist, |
| | | taskopergetlist, |
| | | rwztaskdepthospgetsonlist, |
| | | rwztaskdiaggetlist, |
| | | taskmedicallist, |
| | | getQtemplatelist, |
| | | getTasklist, |
| | | } from "@/api/AiCentre/index"; |
| | | import { listMedication } from "@/api/knowledge/drug"; |
| | | import { getIvrtask } from "@/api/smartor/ivrtask"; |
| | | import { deptTreeSelect } from "@/api/system/user"; |
| | | import OptionalForm from "@/components/OptionalForm"; |
| | | import SortCheckbox from "@/components/SortCheckbox"; |
| | |
| | | SelectPatientslist: [], |
| | | form: { |
| | | patTaskRelevances: [], |
| | | nexttaskflag: "0", |
| | | nexttaskid: null, |
| | | sendType: 3, |
| | | longTask: 0, |
| | | templatename: "", |
| | |
| | | belongDepts: [], |
| | | quote: false, |
| | | serviceType: null, |
| | | // 再次随访关联任务(缙云县人民医院) |
| | | orgname: localStorage.getItem("orgname"), |
| | | nextTaskDialogVisible: false, |
| | | nextTaskLoading: false, |
| | | nextTaskList: [], |
| | | nextTaskTotal: 0, |
| | | nextTaskQuery: { pageNum: 1, pageSize: 10, taskName: "" }, |
| | | nextTaskName: "", |
| | | // 模板搜索 |
| | | templateOptions: [], |
| | | templateLoading: false, |
| | |
| | | this.form.serviceType == 9 || |
| | | this.form.serviceType == 11 || |
| | | this.form.serviceType == 12 || |
| | | this.form.serviceType == 20 || |
| | | this.form.serviceType == 10 |
| | | ) { |
| | | this.checkboxlist = [ |
| | |
| | | Getdetails() { |
| | | this.form = { |
| | | patTaskRelevances: [], |
| | | nexttaskflag: "0", |
| | | nexttaskid: null, |
| | | sendType: 1, |
| | | sendDay: 5, |
| | | templatename: "", |
| | |
| | | getTaskInfo({ taskid: this.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.form = res.data; |
| | | // 回显再次随访关联任务 |
| | | if (this.form.nexttaskflag == null) this.form.nexttaskflag = "0"; |
| | | this.nextTaskName = ""; |
| | | if (this.form.nexttaskid) { |
| | | getIvrtask(this.form.nexttaskid).then((r) => { |
| | | this.nextTaskName = (r.data && r.data.taskName) || ""; |
| | | }); |
| | | } |
| | | // 如果返回了 serviceTaskScheduleVO,则解析明细中的 content |
| | | if ( |
| | | this.form.serviceTaskScheduleVO && |
| | |
| | | this.form.patTaskRelevances = this.form.patTaskRelevances |
| | | ? this.form.patTaskRelevances |
| | | : []; |
| | | // 药品关联回显 |
| | | if (this.form.medicalCode) { |
| | | this.medicalCodes = this.form.medicalCode.split(",").filter(Boolean); |
| | | listMedication({ itemCode: this.form.medicalCode, pageNum: 1, pageSize: 200 }).then((res) => { |
| | | this.medicalOptions = res.rows || []; |
| | | }); |
| | | } |
| | | this.overallCase = this.form.patTaskRelevances.concat(); |
| | | this.checkList = this.form.preachform |
| | | ? this.form.preachform.split(",") |
| | |
| | | this.time2 = ""; |
| | | this.time3 = ""; |
| | | this.time4 = ""; |
| | | this.form.nexttaskflag = "0"; |
| | | this.form.nexttaskid = null; |
| | | this.nextTaskName = ""; |
| | | // 重置任务组 |
| | | this.form.serviceTaskScheduleVO = { |
| | | scheduleStyle: 0, |
| | |
| | | listDept() { |
| | | this.leavehospitaldistrictcodes = []; |
| | | this.deptcodesWards = []; |
| | | this.medicalCodes = []; |
| | | this.medicalOptions = []; |
| | | this.queryParamsdept.taskId = this.form.taskid; |
| | | |
| | | if (this.form.appltype == 5) { |
| | |
| | | item.icdname = item.icd10name; |
| | | this.diagglist.push(item); |
| | | } else { |
| | | this.diagglist.push(item); |
| | | this.diagglist.push(item); |
| | | } |
| | | this.illnesscodes.push(item.icd10code); |
| | | }); |
| | |
| | | }); |
| | | } |
| | | }); |
| | | taskdiaggetlist(this.queryParamsdept).then((res) => { |
| | | taskdiaggetlist(this.queryParamsdept).then((res) => { |
| | | if (res.code == 200) { |
| | | let arr = res.rows; |
| | | arr.forEach((item) => { |
| | |
| | | item.icdname = item.icd10name; |
| | | this.diagglist.push(item); |
| | | } else { |
| | | getillnesslist({ icdname: item.icd10name }).then((res) => { |
| | | |
| | | getillnesslist({ icdcode: item.icd10code }).then((res) => { |
| | | item.icdname = res.rows[0].icdname; |
| | | this.diagglist.push(item); |
| | | }); |
| | | } |
| | | this.illnesscodes.push(item.icd10code); |
| | | }); |
| | | } |
| | | }); |
| | | // 获取关联药品 |
| | | taskmedicallist(this.queryParamsdept).then((res) => { |
| | | if (res.code == 200) { |
| | | let arr = res.rows || []; |
| | | arr.forEach((item) => { |
| | | const code = item.itemCode || item.medicalCode; |
| | | this.medicalCodes.push(code); |
| | | this.medicalOptions.push({ |
| | | ...item, |
| | | itemCode: code, |
| | | itemName: item.itemName || item.medicalName, |
| | | manufacturerName: item.manufacturerName || item.medicalCompany, |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | removediagg(row) { |
| | | removediagg(tag) { |
| | | // 任务组:本地删除即可,后端保存时统一更新 |
| | | if (this.form.appltype == 5) { |
| | | this.diagglist = this.diagglist.filter((item) => item.icd10code != row); |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | return; |
| | | } |
| | | // 普通疾病关联:调后端接口逐条删除 |
| | | let result = this.diagglist |
| | | .filter((item) => item.icd10code == row) |
| | | .map((item) => item.id); |
| | | if (result.length) { |
| | | taskdiaghospgetsondel(result).then((res) => { |
| | | |
| | | // 普通疾病关联:判断是否有 id(已保存的记录才有 id) |
| | | if (tag.id) { |
| | | // id 存在,调后端接口删除 |
| | | taskdiaghospgetsondel([tag.id]).then((res) => { |
| | | if (res.code) { |
| | | this.diagglist = this.diagglist.filter( |
| | | (item) => item.icd10code != row |
| | | ); |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | }); |
| | | } else { |
| | | // id 不存在(未保存的新记录),直接本地删除 |
| | | this.diagglist = this.diagglist.filter((item) => item != tag); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | }, |
| | | remoteopcode(name) { |
| | | // 占位 |
| | | }, |
| | | remoteSearchMedical(query) { |
| | | if (!query) { this.medicalOptions = []; return; } |
| | | listMedication({ itemName: query, pageNum: 1, pageSize: 20 }).then((res) => { |
| | | this.medicalOptions = res.rows || []; |
| | | }); |
| | | if (!query) { |
| | | this.medicalOptions = []; |
| | | return; |
| | | } |
| | | listMedication({ itemName: query, pageNum: 1, pageSize: 20 }).then( |
| | | (res) => { |
| | | this.medicalOptions = res.rows || []; |
| | | } |
| | | ); |
| | | }, |
| | | removeMedical(code) { |
| | | this.medicalCodes = this.medicalCodes.filter((c) => c !== code); |
| | | taskmedicaldel({ itemCode: code, taskid: this.form.taskid }).then( |
| | | (res) => { |
| | | if (res.code == 200) { |
| | | this.medicalCodes = this.medicalCodes.filter((c) => c !== code); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | } |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // ---------- 再次随访关联任务 ---------- |
| | | openNextTaskDialog() { |
| | | this.nextTaskQuery = { pageNum: 1, pageSize: 10, taskName: "" }; |
| | | this.nextTaskDialogVisible = true; |
| | | this.getNextTaskList(); |
| | | }, |
| | | getNextTaskList() { |
| | | this.nextTaskLoading = true; |
| | | getTasklist({ |
| | | pageNum: this.nextTaskQuery.pageNum, |
| | | pageSize: this.nextTaskQuery.pageSize, |
| | | taskName: this.nextTaskQuery.taskName || undefined, |
| | | }) |
| | | .then((res) => { |
| | | this.nextTaskList = res.rows || []; |
| | | this.nextTaskTotal = res.total || 0; |
| | | this.nextTaskLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.nextTaskLoading = false; |
| | | }); |
| | | }, |
| | | handleNextTaskQuery() { |
| | | this.nextTaskQuery.pageNum = 1; |
| | | this.getNextTaskList(); |
| | | }, |
| | | resetNextTaskQuery() { |
| | | this.nextTaskQuery = { pageNum: 1, pageSize: 10, taskName: "" }; |
| | | this.getNextTaskList(); |
| | | }, |
| | | selectNextTask(row) { |
| | | this.form.nexttaskid = row.taskid; |
| | | this.nextTaskName = row.taskName; |
| | | this.nextTaskDialogVisible = false; |
| | | }, |
| | | |
| | | // ---------- 患者选择 ---------- |
| | |
| | | // 将主对象放入 form 提交 |
| | | } |
| | | if (this.form.appltype == 5) { |
| | | console.log(this.form,'进入任务组配置'); |
| | | console.log(this.form, "进入任务组配置"); |
| | | |
| | | this.form.serviceTaskScheduleVO.icd10codes = this.form.icd10code; |
| | | this.form.serviceTaskScheduleVO.wardCodes = |
| | |
| | | ); |
| | | this.form.medicalCode = this.medicalCodes.join(","); |
| | | this.form.medicalName = selectedMeds.map((m) => m.itemName).join(","); |
| | | this.form.medicalCompany = selectedMeds.map((m) => m.manufacturerName).join(","); |
| | | this.form.medicalCompany = selectedMeds |
| | | .map((m) => m.manufacturerName) |
| | | .join(","); |
| | | } |
| | | |
| | | this.form.serviceType = this.serviceType; |
| | |
| | | this.form.icd10name = this.diagglist |
| | | .map((item) => item.icdname) |
| | | .join(","); |
| | | // 疾病/手术关联的科室/病区校验 |
| | | if (this.form.appltype == 3 || this.form.appltype == 4) { |
| | | // 疾病/手术/药品关联的科室/病区校验 |
| | | if ( |
| | | this.form.appltype == 3 || |
| | | this.form.appltype == 4 || |
| | | this.form.appltype == 6 |
| | | ) { |
| | | const hasDept = this.diseaseDept?.deptCode; |
| | | const hasWard = this.diseaseWard?.districtCode; |
| | | if (!hasDept && !hasWard) { |
| | | this.$modal.msgError("当前疾病需关联科室或病区"); |
| | | this.$modal.msgError("需关联科室或病区"); |
| | | this.submitLoading = false; |
| | | return; |
| | | } |