You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

448 lines
15 KiB

3 years ago
<template>
<!-- 门诊治疗 -->
<div class="patient-info">
<div v-if="!detailViewVisible" style="height: 100%">
<div class="patient-info-head">
<el-form :inline="true" :model="dataForm" class="demo-form-inline" @keyup.enter.native="getDataListInitial()">
<el-form-item label="登记号:">
3 years ago
<el-input v-model="dataForm.patientId" size="small" clearable placeholder="登记号" @clear="getDataListInitial()" />
3 years ago
</el-form-item>
<el-form-item label="患者姓名:">
3 years ago
<el-input v-model="dataForm.patientName" placeholder="患者姓名" size="small" clearable @clear="getDataListInitial()" />
3 years ago
</el-form-item>
<el-form-item prop="dateRange" label="就诊时间" class="form-item-date">
<el-date-picker
v-model="nextVisitTime"
size="small"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="dateChange"
/>
</el-form-item>
<el-form-item prop="dateRange" label="预约时间" class="form-item-date">
<el-date-picker
v-model="appointRange"
size="small"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="appointChange"
/>
</el-form-item>
3 years ago
<el-form-item style="flex:1">
<el-button type="primary" icon="el-icon-getDataListInitial" size="small" @click="getDataListInitial()">查询</el-button>
</el-form-item>
</el-form>
</div>
<div style="display: flex;justify-content: space-between;background-color: white;padding: 16px 16px 0">
2 years ago
<div style="display: flex;align-items: center">
<el-select v-model="dataForm.searchType" style="width:120px;float: left;margin-right: 16px" size="small" @change="getDataListInitial">
3 years ago
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
2 years ago
<el-button v-for="(item,index) in typeList" :key="index" :class="[curIndex === index ? 'active' : '']" style="margin-left: 0px" size="small" color="white" @click="handleType(item.value, index)">{{ item.label }}</el-button>
2 years ago
<div style="margin-left: 16px; display: flex;align-items: center">
<span style="flex: 1">项目名称</span>
2 years ago
<el-select v-model="dataForm.projectCode" style="width:220px" placeholder="项目名称" size="small" @change="getDataListInitial">
<el-option
v-for="item in projectList"
:key="item.itemId"
:label="item.itemName"
:value="item.itemId"
/>
</el-select>
</div>
3 years ago
</div>
<div>
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle('','','新增患者')">新增</el-button>
<el-button type="primary" size="small" @click="HISHandle">
<svg-icon icon-class="icon-HIS-up" style="font-size:12px;" />
<span style="padding-left:5px;vertical-align: middle;">HIS引入</span>
</el-button>
</div>
</div>
<div class="patient-info-content">
<el-table
ref="multipleTable"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column prop="patientId" label="登记号" header-align="center" align="center" width="120" />
<!-- <el-table-column prop="patientId" label="就诊号" header-align="center" align="center" />-->
<el-table-column label="状态" header-align="center" align="center" width="100">
3 years ago
<template slot-scope="scope">
{{ scope.row.patientStatus | patientStatus }}
</template>
</el-table-column>
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" width="100" />
<el-table-column label="出生日期" header-align="center" align="center" width="110">
3 years ago
<template slot-scope="scope">
{{ scope.row.patientBirthday ? $options.filters.dateFilterTwo( scope.row.patientBirthday): '- ' }}
</template>
</el-table-column>
<el-table-column prop="zlEye" label="眼别" header-align="center" align="center" width="100">
3 years ago
<template slot-scope="scope">
<el-select v-model="scope.row.zlEye" placeholder="" size="small" @change="value=>changeEyeType(value,scope)">
<el-option
v-for="item in eyeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
3 years ago
{{ scope.row.zlEye === 'os' ? '左眼' : ( scope.row.zlEye === 'od' ? '右眼' : '') }}
</template>
</el-table-column>
<el-table-column prop="mzDoctorName" label="门诊医师" header-align="center" align="center" width="100" />
<el-table-column label="操作员" header-align="center" align="center" width="100">
<template slot-scope="scope">
{{ getOperator(scope.row.zlProjectList) }}
</template>
</el-table-column>
<el-table-column prop="zlPorject" label="医疗项目" header-align="center" align="center">
<template slot-scope="scope">
{{ getYLProject(scope.row.zlProjectList) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center" />
<el-table-column prop="updateDate" label="就诊时间" header-align="center" align="center" width="165" />
<el-table-column prop="appointDate" label="预约时间" header-align="center" align="center" width="165" />
<!-- <el-table-column prop="callSort" label="分诊序号" header-align="center" align="center" />-->
3 years ago
<!-- <el-table-column prop="patientSex" label="叫号状态" header-align="center" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.callStatus | callStatus }}-->
<!-- </template>-->
<!-- </el-table-column>-->
3 years ago
<el-table-column prop="operation" label="操作" header-align="center" align="center" width="180">
<template slot-scope="scope">
<span
style="color: #1890ff; padding-right: 8px"
class="operation-details"
2 years ago
@click="showDetail(scope.row, 1)"
3 years ago
>开始</span>
<span
style="color: #1890ff; padding-right: 8px"
class="operation-details"
2 years ago
@click="finishTreat(scope.row, 1)"
3 years ago
>结束</span>
<span
style="color: #1890ff; padding-right: 8px"
class="operation-details"
2 years ago
@click="showDetail(scope.row, 2)"
3 years ago
>患者360</span>
</template>
</el-table-column>
</el-table>
<el-pagination background layout="total,prev, pager, next" :total="total" :current-page.sync="page" @current-change="pageCurrentChangeHandle" />
</div>
</div>
<!-- 弹窗, 新增 / 修改 -->
2 years ago
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataListInitial" />
3 years ago
<!-- HIS引入弹框 -->
2 years ago
<his-add v-if="HisAddVisible" ref="HisAddRef" @openAdd="getHisData" />
3 years ago
<!-- 详情页 -->
2 years ago
<detail-view v-if="detailViewVisible" ref="viewRef" :only-read="onlyRead" :is-search="'2'" :patient-id="patientId" @detailViewVisible="detailViewVisible=false" />
3 years ago
</div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import AddOrUpdate from './patient-add-or-update'
import hisAdd from './HIS-add'
import detailView from '@/components/360View/index1' // 360试图
export default {
components: {
hisAdd,
AddOrUpdate,
detailView
},
3 years ago
filters: {
callStatus(val) {
switch (val) {
case '1':
return '未叫号'
case '2':
return '已叫号'
case '3':
return '过号'
case '4':
return '呼叫中'
default:
return val
}
},
patientStatus(val) {
switch (val) {
2 years ago
case '200':
3 years ago
return '未报到'
2 years ago
case '300':
3 years ago
return '未诊断'
2 years ago
case '400':
3 years ago
return '已诊'
default:
return val
}
}
},
3 years ago
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/patient/page',
getDataListIsPage: true
},
2 years ago
curIndex: 0,
3 years ago
options: [
{
value: '0',
label: '今天'
3 years ago
}, {
value: '1',
label: '昨天'
3 years ago
}, {
value: '2',
label: '前天'
3 years ago
}, {
value: '3',
label: '近三天'
}, {
value: '4',
label: '近一周'
}, {
value: '5',
3 years ago
label: '近一个月 '
}, {
value: '6',
label: '近半年 '
3 years ago
}, {
value: '',
label: '全部'
}],
typeList: [
{
value: '',
label: '全部'
}, {
2 years ago
value: '200',
3 years ago
label: '未报到'
}, {
2 years ago
value: '300',
3 years ago
label: '未诊'
2 years ago
}, {
2 years ago
value: '400',
3 years ago
label: '已诊'
}],
eyeList: [{
value: 'OD',
label: 'OD'
}, {
value: 'OS',
label: 'OS'
}, {
value: 'OU',
label: 'OU'
}],
3 years ago
nextVisitTime: [],
appointRange: [],
2 years ago
onlyRead: false,
3 years ago
detailViewVisible: false,
HisAddVisible: false,
dataForm: {
3 years ago
platform: 2,
3 years ago
patientId: '',
3 years ago
beginDate: '',
endDate: '',
appointBeginDate: '',
appointEndDate: '',
searchType: '0',
projectCode: '',
3 years ago
patientName: '',
3 years ago
patientStatus: '',
3 years ago
patientIdNumber: ''
},
projectList: [],
2 years ago
patientId: ''
3 years ago
}
},
watch: {
$route(val) {
// 如果两级以上就隐藏父级
this.isShowPatient = !(val.matched.length > 2)
}
},
created() {
this.isShowPatient = !(this.$route.matched.length > 2)
this.queryProjectList()
3 years ago
},
methods: {
// 展示列表项目列
getYLProject(list) {
if (!list.length) {
return
}
const projects = list.map(item => item.porjectName).join('、')
return projects
},
getHisData(val) {
this.addOrUpdateHandle('', { ...val }, 'HIS引入')
},
// 展示列表操作者列
getOperator(list) {
if (!list.length) {
return ''
}
return list[0].finishUserName
},
// 获取项目列表
queryProjectList() {
this.$http.get('/patient/getZlItemDict', { params: { category: 'T' }}).then(data => {
this.projectList = data.data.data
this.projectList.unshift({
caseName: '',
enable: 1,
itemId: '',
itemName: '全部项目'
})
})
},
changeEyeType(value, scope) {
const idList = scope.row.zlProjectList.map(item => item.id)
this.$http.post('/patient/updateProjectEyeType', {
ids: idList,
zlEye: value
}).then(res => {
if (res.data.data) {
this.$message.error(res.data.data)
}
})
},
3 years ago
// 日期改变时
dateChange(e) {
3 years ago
this.dataForm.beginDate = e ? e[0] : ''
this.dataForm.endDate = e ? e[1] : ''
2 years ago
this.dataForm.searchType = e ? '' : '0'
3 years ago
this.getDataListInitial()
},
// 日期改变时
appointChange(e) {
this.dataForm.appointBeginDate = e ? e[0] : ''
this.dataForm.appointEndDate = e ? e[1] : ''
this.dataForm.searchType = e ? '' : '0'
this.getDataListInitial()
},
3 years ago
// 根据就诊状态查询
2 years ago
handleType(value, index) {
this.curIndex = index
3 years ago
this.dataForm.patientStatus = value
3 years ago
this.getDataListInitial()
},
2 years ago
async receiveTreat(item) {
const { data: res } = await this.$http.get('/patient/updateSGDoctorAndJzStatus', {
params: {
isAppoint: item.isAppoint,
patientId: item.patientId,
jzNumber: item.jzNumber,
platform: 2
}
})
if (res.code === 0) {
} else {
this.$message.error(res.msg)
}
},
2 years ago
finishTreat(scope) {
const idList = scope.zlProjectList.map(item => item.id)
if (!idList.length) {
this.$message.error('项目状态更新失败')
return
}
this.receiveTreat(scope)
2 years ago
this.$http.post('/patient/updateProjectStatus', idList).then((res) => {
this.$message.success(res.data.data)
this.getDataListInitial()
2 years ago
})
},
3 years ago
// 查看详情
2 years ago
showDetail(scopeRow, index) {
2 years ago
if (index === 1) {
this.receiveTreat(scopeRow)
}
2 years ago
this.onlyRead = index !== 1
3 years ago
this.detailViewVisible = true
this.patientId = scopeRow.patientId
2 years ago
const mzName = scopeRow.mzDoctorName ? scopeRow.mzDoctorName : ''
2 years ago
const jzNumber = scopeRow.jzNumber ? scopeRow.jzNumber : ''
2 years ago
window.localStorage.setItem('mzDoctorName', mzName)
2 years ago
window.localStorage.setItem('jzNumber', jzNumber)
3 years ago
},
// His引入
HISHandle() {
this.HisAddVisible = true
this.$nextTick(() => {
this.$refs.HisAddRef.init()
})
}
3 years ago
}
}
</script>
<style lang="scss" scoped>
.patient-info {
height: 100%;
.patient-info-head,
.patient-info-content {
background: #fff;
.head {
padding-bottom: 10px;
}
}
.patient-info-content {
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
}
.patient-info-head {
margin-bottom: 10px;
2 years ago
padding: 10px;
3 years ago
}
.operation-delete,
.operation-details {
cursor: pointer;
}
2 years ago
.active{
color: #3ea3f6;
background-color: #e0f2fd;
border-color: #3ea3f6;
}
3 years ago
}
</style>
<style lang="scss">
.patient-info {
.patient-info-head {
.el-form {
display: flex;
justify-content: space-between;
}
.el-form-item__content,
.el-select,
.el-range-editor--small.el-input__inner {
width: 100%;
}
2 years ago
.el-form-item {
display: flex;
margin-bottom: 0;
width: 25%;
}
3 years ago
}
}
</style>