|
@@ -0,0 +1,317 @@
|
|
|
+<template>
|
|
|
+ <CyFlex header-class="layout_card patinfo_query">
|
|
|
+ <template #header>
|
|
|
+ <el-form :inline="true" ref="formRef" :model="param">
|
|
|
+
|
|
|
+ <el-form-item label="住院号" prop="patNo">
|
|
|
+ <el-input v-model="param.patNo" clearable
|
|
|
+ style="width: 120px"
|
|
|
+ @blur="param.patNo=$event.target.value.trim()"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
+ <el-input v-model="param.name" clearable
|
|
|
+ style="width: 120px"
|
|
|
+ @blur="param.name=$event.target.value.trim()"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="入院时间" prop="admissionTime">
|
|
|
+ <xc-date-picker style="width: 180px"
|
|
|
+ type="daterange"
|
|
|
+ clearable
|
|
|
+ v-model="param.admissionTime"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="出院时间" prop="dischargeTime">
|
|
|
+ <xc-date-picker style="width: 180px"
|
|
|
+ type="daterange"
|
|
|
+ clearable
|
|
|
+ v-model="param.dischargeTime"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="科室" prop="dept">
|
|
|
+ <select-v4 :data="deptWardList" style="width: 220px;" clearable v-model="param.dept"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="病房" prop="ward">
|
|
|
+ <select-v4 :data="deptWardList" style="width: 220px;" clearable v-model="param.ward"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="诊断代码" prop="diagnosticCode">
|
|
|
+ <el-select-v2 v-model="param.diagnosticCode"
|
|
|
+ style="width: 120px;"
|
|
|
+ class="select_v2_width_150"
|
|
|
+ remote
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ :remote-method="method"
|
|
|
+ :options="diagnosisData"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="已上传" prop="isUpload">
|
|
|
+ <el-checkbox v-model="param.isUpload"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="出院" prop="leaveHospital">
|
|
|
+ <el-checkbox v-model="param.leaveHospital"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="管床医生" prop="empCode">
|
|
|
+ <el-select-v2 v-model="param.empCode"
|
|
|
+ clearable
|
|
|
+ remote
|
|
|
+ style="width: 120px"
|
|
|
+ filterable
|
|
|
+ :remote-method="empMethod"
|
|
|
+ :options="empList"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="出院科室" prop="disDept">
|
|
|
+ <select-v4 :data="deptWardList" style="width: 220px;" clearable v-model="param.disDept"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="审核">
|
|
|
+ <el-select v-model="param.emrAudit"
|
|
|
+ style="width: 80px">
|
|
|
+ <el-option v-for="item in audit"
|
|
|
+ :value="item.code"
|
|
|
+ :label="item.name"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="querySearch" type="primary">查询</el-button>
|
|
|
+ <el-button @click="reset" type="warning">重置</el-button>
|
|
|
+ <el-button @click="upload" type="success">上传</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ <pat-infomation-dialog
|
|
|
+ v-if="dialog"
|
|
|
+ @closed="dialog = false"
|
|
|
+ :admiss-date="rowData.admissDate"
|
|
|
+ :pat-no="rowData.patNo"
|
|
|
+ :times="rowData.admissTimes"
|
|
|
+ :leave-hospital="param.leaveHospital ? 2 : 1"
|
|
|
+ :dics="dics"/>
|
|
|
+
|
|
|
+ <CyVxeTable @checkbox-change="handleCheckboxChange">
|
|
|
+ <vxe-column
|
|
|
+ type="checkbox"
|
|
|
+ width="60"
|
|
|
+ ></vxe-column>
|
|
|
+
|
|
|
+ <vxe-column title="住院号" field="inpatientNo" min-width="70"/>
|
|
|
+ <vxe-column title="次数" field="admissTimes" min-width="56"/>
|
|
|
+ <vxe-column title="床位" field="bedNo" min-width="53"/>
|
|
|
+ <vxe-column title="姓名" field="name" min-width="101"/>
|
|
|
+ <vxe-column title="性别" field="sexName" min-width="60"/>
|
|
|
+ <vxe-column title="入院时间" field="admissDate" min-width="80"/>
|
|
|
+ <vxe-column title="出院时间" field="disDate" min-width="80"/>
|
|
|
+ <vxe-column title="医保身份" field="responceName" min-width="86"/>
|
|
|
+ <vxe-column title="总费用" field="totalCharge" min-width="87"/>
|
|
|
+ <vxe-column title="余额" field="balance" min-width="67"/>
|
|
|
+ <vxe-column title="入院诊断" field="admissDiagStr" min-width="82"/>
|
|
|
+ </CyVxeTable>
|
|
|
+ </CyFlex>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import {getHospWardAndDept, getPatientInfoDip, diagnosis, employeeList} from "@/api/zhu-yuan-yi-sheng/pat-info-query";
|
|
|
+import SelectV4 from "@/components/xiao-chan/select-v4/SelectV4.vue";
|
|
|
+import XcDatePicker from "@/components/xiao-chan/date-picker/XcDatePicker.vue";
|
|
|
+import {getAllDictionary} from "@/api/case-front-sheet";
|
|
|
+import {operations} from "@/data";
|
|
|
+import {autopsies, haveOrNot, yesOrNo} from "@/views/hospitalization/case-front-sheet/common";
|
|
|
+import PatInfomationDialog from "@/components/pat-info-list/PatInfomationDialog.vue";
|
|
|
+import {
|
|
|
+ emrStateEnum,
|
|
|
+ getEmrUrl,
|
|
|
+ getInEmrUrl
|
|
|
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
+import {subtractTime} from "@/utils/date";
|
|
|
+import {getServerDateApi} from "@/api/public-api";
|
|
|
+import {upldSetlListAList} from "@/api/medical-insurance/si-setl-upload";
|
|
|
+import {ref, onMounted, onActivated} from 'vue'
|
|
|
+import router from "@/router";
|
|
|
+import sleep from "@/utils/sleep";
|
|
|
+import {openPatient360} from "@/views/view/patient360/src";
|
|
|
+import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
|
|
|
+import UseVxeTable from "@/utils/cy-use/useVxeTable";
|
|
|
+import {useUserStore} from "@/pinia/user-store";
|
|
|
+import {useCompRef} from "@/utils/useCompRef";
|
|
|
+import { ElForm, ElMessage } from "element-plus";
|
|
|
+
|
|
|
+const userInfo = useUserStore().userInfo
|
|
|
+const param = ref({
|
|
|
+ patNo: '',
|
|
|
+ name: '',
|
|
|
+ leaveHospital: false,
|
|
|
+ admissionTime: [],
|
|
|
+ dischargeTime: [],
|
|
|
+ dept: '',
|
|
|
+ ward: '',
|
|
|
+ diagnosticCode: '',
|
|
|
+ isPrimaryDiagnosis: false,
|
|
|
+ empCode: '',
|
|
|
+ disDept: '',
|
|
|
+ emrAudit: 0,
|
|
|
+ isUpload: false
|
|
|
+})
|
|
|
+
|
|
|
+const deptWardList = ref([])
|
|
|
+const formRef = useCompRef(ElForm)
|
|
|
+const dialog = ref(false)
|
|
|
+const rowData = ref()
|
|
|
+const dics = ref([])
|
|
|
+
|
|
|
+const diagnosisData = ref([])
|
|
|
+const empList = ref([]);
|
|
|
+
|
|
|
+const checkboxSelect = ref({});
|
|
|
+
|
|
|
+const handleCheckboxChange = ({ checked, records, row, rowKey }) => {
|
|
|
+ checkboxSelect.value = records;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const {CyVxeTable, querySearch, exportExcel, tableRef} = UseVxeTable({
|
|
|
+ localPaging: true,
|
|
|
+ keyField: "patId",
|
|
|
+ remoteSearch: () => {
|
|
|
+ return getPatientInfoDip(param.value)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+onActivated(async () => {
|
|
|
+ const params = router.currentRoute.value.query
|
|
|
+ if (params && params.patNo) {
|
|
|
+ param.value.patNo = params.patNo as string
|
|
|
+ param.value.name = ''
|
|
|
+ param.value.leaveHospital = false
|
|
|
+ param.value.admissionTime = []
|
|
|
+ param.value.dischargeTime = []
|
|
|
+ param.value.dept = ''
|
|
|
+ param.value.ward = ''
|
|
|
+ param.value.diagnosticCode = ''
|
|
|
+ param.value.isPrimaryDiagnosis = false
|
|
|
+ param.value.empCode = ''
|
|
|
+ param.value.disDept = ''
|
|
|
+ param.value.emrAudit = 0
|
|
|
+ await nextTick()
|
|
|
+ await sleep(300);
|
|
|
+ await querySearch()
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const reset = () => {
|
|
|
+ formRef.value?.resetFields()
|
|
|
+}
|
|
|
+
|
|
|
+const upload = () => {
|
|
|
+ let params = [];
|
|
|
+ checkboxSelect.value.forEach(item => {
|
|
|
+ let param = {
|
|
|
+ patNo: item.inpatientNo,
|
|
|
+ times: item.admissTimes,
|
|
|
+ ledgerSn: 1
|
|
|
+ }
|
|
|
+ params.push(param);
|
|
|
+ });
|
|
|
+
|
|
|
+ upldSetlListAList(params).then(res => {
|
|
|
+ console.log('res', res);
|
|
|
+ let errorInpatient = "";
|
|
|
+ res.data.forEach(d => {
|
|
|
+ if(d.errorMsg) {
|
|
|
+ errorInpatient += "[住院号:" + d.patNo + "错误:" + d.errorMsg + "]\n";
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(res.code == 301) {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ title: "上传失败",
|
|
|
+ duration: 8000,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: "有部分数据上传失败,详情:" + errorInpatient,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ title: "上传成功",
|
|
|
+ duration: 2000,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: "上传成功",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const details = async (row) => {
|
|
|
+ rowData.value = row
|
|
|
+ dialog.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const method = (val: string) => {
|
|
|
+ if (val.length === '') return
|
|
|
+ diagnosis(val).then((res) => {
|
|
|
+ diagnosisData.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const empMethod = (val) => {
|
|
|
+ employeeList(val).then((res) => {
|
|
|
+ empList.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const openEmr = async (data) => {
|
|
|
+ if (param.value.leaveHospital) {
|
|
|
+ const dischargeDays = subtractTime(await getServerDateApi(), data.disDate)
|
|
|
+ if (dischargeDays <= 7) {
|
|
|
+ // 时间小于 7 天 ,且是自己的患者就是出院编辑状态
|
|
|
+ if (userInfo.code === data.referPhysician) {
|
|
|
+ window.open(getInEmrUrl(data.inpatientNo, data.admissTimes, emrStateEnum.出院编辑), '_blank')
|
|
|
+ } else {
|
|
|
+ window.open(getInEmrUrl(data.inpatientNo, data.admissTimes, emrStateEnum.出院只读), '_blank')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window.open(getInEmrUrl(data.inpatientNo, data.admissTimes, emrStateEnum.出院只读), '_blank')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window.open(getEmrUrl(data.inpatientNo, data.admissTimes, emrStateEnum.在院只读), '_blank')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ getHospWardAndDept().then(res => {
|
|
|
+ deptWardList.value = res
|
|
|
+ })
|
|
|
+
|
|
|
+ getAllDictionary().then(res => {
|
|
|
+ res.getOperations = operations;
|
|
|
+ res.getYesOrNo = yesOrNo;
|
|
|
+ res.getHaveOrNot = haveOrNot;
|
|
|
+ res.getAutopsies = autopsies;
|
|
|
+ dics.value = res
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+const audit = [
|
|
|
+ {code: 0, name: '全部'},
|
|
|
+ {code: 1, name: '已审'},
|
|
|
+ {code: 2, name: '未审'}
|
|
|
+]
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.patinfo_query {
|
|
|
+ padding: 10px 10px 0 10px;
|
|
|
+ margin-bottom: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|