Browse Source

把医保登记信息抽出成组件。

lighter 3 years ago
parent
commit
4de7b9ef46

+ 196 - 0
src/components/medical-insurance/registinfo/Index.vue

@@ -0,0 +1,196 @@
+<template>
+  <div v-if="injuryMode">
+    <el-descriptions title="工伤患者在院信息" :column="3" size="small" border>
+      <el-descriptions-item>
+        <template #label> 姓名 </template>
+        {{ registerInfo.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 住院号 </template>
+        {{ registerInfo.patient_id }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 个人电脑号 </template>
+        {{ registerInfo.indi_id }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 性别 </template>
+        {{ cptSex(registerInfo.sex) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 身份证 </template>
+        {{ registerInfo.idcard }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 出生日期 </template>
+        {{ registerInfo.birthday }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 医疗类别 </template>
+        {{ registerInfo.treatment_name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 入院科室 </template>
+        {{ registerInfo.out_dept_name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 入院病房 </template>
+        {{ registerInfo.area_name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 诊断编码 </template>
+        {{ registerInfo.in_diagnose }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 诊断名称 </template>
+        {{ registerInfo.in_disease_name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 就诊登记号 </template>
+        {{ registerInfo.serial_no }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 工伤业务序号 </template>
+        {{ registerInfo.serial_bo_no }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 入院登记时间 </template>
+        {{ registerInfo.reg_date }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 单位名称 </template>
+        {{ registerInfo.corp_name }}
+      </el-descriptions-item>
+    </el-descriptions>
+  </div>
+  <div v-else>
+    <el-descriptions title="患者医保在院信息" :column="3" size="small" border>
+      <el-descriptions-item>
+        <template #label> 姓名 </template>
+        {{ registerInfo.psnName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 住院号 </template>
+        {{ registerInfo.iptOtpNo }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 性别 </template>
+        {{ cptSex(registerInfo.gend) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 证件类型 </template>
+        {{ cptPsnCertType(registerInfo.psnCertType) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 证件号码 </template>
+        {{ registerInfo.certno }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 出生日期 </template>
+        {{ registerInfo.brdy }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 险种类型 </template>
+        {{ cptInsutype(registerInfo.insutype) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 医疗类别 </template>
+        {{ cptMedType(registerInfo.medType) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 异地标志 </template>
+        {{ cptYesOrNo(registerInfo.outFlag) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 开始日期 </template>
+        {{ registerInfo.begndate }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 就诊ID </template>
+        {{ registerInfo.mdtrtId }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label> 人员编号 </template>
+        {{ registerInfo.psnNo }}
+      </el-descriptions-item>
+    </el-descriptions>
+  </div>
+</template>
+
+<script>
+import { computed, onMounted, ref, watch } from 'vue'
+import { useStore } from 'vuex'
+import { getInjuryRegisterInfo } from '@/api/medical-insurance/si-injury'
+import { queryInHospitalPatientsInfo } from '@/api/medical-insurance/si-query'
+import { cptSex, cptPsnCertType, cptInsutype, cptMedType, cptYesOrNo } from '@/utils/computed'
+export default {
+  props: {
+    timestamp: {
+      type: Number,
+      required: true,
+    },
+    params: {
+      type: Object,
+      required: true,
+    },
+  },
+  emits: ['close'],
+  setup(props, ctx) {
+    const store = useStore()
+    const registerInfo = ref({})
+
+    const injuryMode = computed(() => {
+      return store.state.ptnt.injuryMode
+    })
+
+    const getRegistinfo = () => {
+      if (injuryMode.value) {
+        getInjuryRegisterInfo(props.params)
+          .then((res) => {
+            registerInfo.value = res
+          })
+          .catch(() => {
+            registerInfo.value = {}
+            ctx.emit('close')
+          })
+      } else {
+        const param = {
+          patNo: props.params.inpatientNo,
+          times: props.params.admissTimes,
+          ledgerSn: props.params.ledgerSn,
+          begntime: props.params.admissDate,
+        }
+        queryInHospitalPatientsInfo(param)
+          .then((res) => {
+            registerInfo.value = res[0]
+          })
+          .catch(() => {
+            registerInfo.value = {}
+            ctx.emit('close')
+          })
+      }
+    }
+
+    watch(
+      () => props.timestamp,
+      () => {
+        getRegistinfo()
+      }
+    )
+
+    onMounted(() => {
+      getRegistinfo()
+    })
+
+    return {
+      injuryMode,
+      registerInfo,
+      cptSex,
+      cptPsnCertType,
+      cptInsutype,
+      cptMedType,
+      cptYesOrNo,
+    }
+  },
+}
+</script>

+ 24 - 1
src/views/medical-insurance/inpatient/AdmissVerification.vue

@@ -13,11 +13,12 @@
       <el-select v-show="injuryMode" v-model="patient.injuryArea" placeholder="工伤参保地" style="width: 120px">
         <el-option v-for="item in injuryAreas" :key="item.code" :label="item.name" :value="item.code"></el-option>
       </el-select>
-      <el-button style="margin-left: 10px" type="primary" icon="el-icon-location" @click="getPsnInsuinfo(0)">定点信息查询</el-button>
+      <el-button style="margin-left: 10px" type="primary" icon="el-icon-location" @click="getPsnInsuinfo(0)">定点信息</el-button>
       <el-button style="margin-left: 10px" type="primary" icon="el-icon-tickets" @click="getPsnInsuinfo(1)">待遇检查</el-button>
       <el-button type="primary" icon="el-icon-user" @click="checkIdCard">身份信息</el-button>
       <el-button type="success" icon="el-icon-check" @click="beforeHandleApply(true)">审核通过</el-button>
       <el-button type="danger" icon="el-icon-close" @click="beforeHandleApply(false)">审核不通过</el-button>
+      <el-button type="primary" icon="el-icon-document" @click="getRegInfo">登记信息</el-button>
     </el-header>
     <el-main>
       <el-container>
@@ -204,6 +205,9 @@
               <el-table-column prop="memo" label="备注"></el-table-column>
             </el-table>
           </el-dialog>
+          <el-dialog v-model="showRegisterInfo" width="60%">
+            <Registinfo :timestamp="timestamp" :params="patient" @close="showRegisterInfo = false"></Registinfo>
+          </el-dialog>
           <el-dialog v-model="showIdCardImg" title="身份信息" :close-on-click-modal="false" fullscreen :show-close="false">
             <IdentifyImage :timestamp="timestamp" :pat-no="currentApply.patNo" :times="currentApply.times" @close="showIdCardImg = false"></IdentifyImage>
           </el-dialog>
@@ -226,9 +230,11 @@ import { admissRegister } from '@/api/medical-insurance/si-inpatient'
 import { statusFlags, needVerifyMedTypes } from '../../../data/index'
 import { selectUnhandledApplies, selectPatientInfo, handleApply } from '../../../api/medical-insurance/si-admiss-apply'
 import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
+import Registinfo from '../../../components/medical-insurance/registinfo/Index.vue'
 export default {
   components: {
     IdentifyImage,
+    Registinfo,
   },
   setup() {
     const patient = ref({})
@@ -488,6 +494,21 @@ export default {
       }
     }
 
+    const showRegisterInfo = ref(false)
+    const getRegInfo = () => {
+      if (!currentApply.value.patNo) {
+        ElMessage({
+          message: '请先选择患者',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+        return
+      }
+      timestamp.value = new Date().getTime()
+      showRegisterInfo.value = true
+    }
+
     onActivated(() => {
       selectUnhandledApplies().then((res) => {
         allApplies.value = res
@@ -537,6 +558,8 @@ export default {
       showIdCardImg,
       checkIdCard,
       beforeHandleApply,
+      getRegInfo,
+      showRegisterInfo,
     }
   },
 }

+ 6 - 144
src/views/medical-insurance/inpatient/Home.vue

@@ -73,122 +73,7 @@
       </el-main>
     </el-container>
     <el-dialog v-model="showRegisterInfo" width="60%">
-      <div v-if="injuryMode">
-        <el-descriptions title="工伤患者在院信息" :column="3" size="small" border>
-          <el-descriptions-item>
-            <template #label> 姓名 </template>
-            {{ registerInfo.name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 住院号 </template>
-            {{ registerInfo.patient_id }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 个人电脑号 </template>
-            {{ registerInfo.indi_id }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 性别 </template>
-            {{ cptSex(registerInfo.sex) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 身份证 </template>
-            {{ registerInfo.idcard }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 出生日期 </template>
-            {{ registerInfo.birthday }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 医疗类别 </template>
-            {{ registerInfo.treatment_name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 入院科室 </template>
-            {{ registerInfo.out_dept_name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 入院病房 </template>
-            {{ registerInfo.area_name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 诊断编码 </template>
-            {{ registerInfo.in_diagnose }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 诊断名称 </template>
-            {{ registerInfo.in_disease_name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 就诊登记号 </template>
-            {{ registerInfo.serial_no }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 工伤业务序号 </template>
-            {{ registerInfo.serial_bo_no }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 入院登记时间 </template>
-            {{ registerInfo.reg_date }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 单位名称 </template>
-            {{ registerInfo.corp_name }}
-          </el-descriptions-item>
-        </el-descriptions>
-      </div>
-      <div v-else>
-        <el-descriptions title="患者医保在院信息" :column="3" size="small" border>
-          <el-descriptions-item>
-            <template #label> 姓名 </template>
-            {{ registerInfo.psnName }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 住院号 </template>
-            {{ registerInfo.iptOtpNo }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 性别 </template>
-            {{ cptSex(registerInfo.gend) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 证件类型 </template>
-            {{ cptPsnCertType(registerInfo.psnCertType) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 证件号码 </template>
-            {{ registerInfo.certno }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 出生日期 </template>
-            {{ registerInfo.brdy }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 险种类型 </template>
-            {{ cptInsutype(registerInfo.insutype) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 医疗类别 </template>
-            {{ cptMedType(registerInfo.medType) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 异地标志 </template>
-            {{ cptYesOrNo(registerInfo.outFlag) }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 开始日期 </template>
-            {{ registerInfo.begndate }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 就诊ID </template>
-            {{ registerInfo.mdtrtId }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template #label> 人员编号 </template>
-            {{ registerInfo.psnNo }}
-          </el-descriptions-item>
-        </el-descriptions>
-      </div>
+      <Registinfo :timestamp="timestamp" :params="patient" @close="showRegisterInfo = false"></Registinfo>
     </el-dialog>
     <el-dialog v-model="showIdCardImg" title="身份信息" :close-on-click-modal="false" fullscreen :show-close="false">
       <IdentifyImage :timestamp="timestamp" :pat-no="patient.inpatientNo" :times="patient.admissTimes" @close="showIdCardImg = false"></IdentifyImage>
@@ -207,14 +92,13 @@ import { statusFlags, medTypes } from '@/data/index'
 import { nullPatient } from '@/utils/validate'
 import { getGreatestRole } from '@/utils/permission'
 import { getWards } from '@/api/login'
-import { queryInHospitalPatientsInfo } from '@/api/medical-insurance/si-query'
-import { cptSex, cptPsnCertType, cptInsutype, cptMedType, cptYesOrNo } from '@/utils/computed'
 import { baseinfo, setBaseinfo } from '@/data/inpatient'
-import { getInjuryRegisterInfo } from '@/api/medical-insurance/si-injury'
 import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
+import Registinfo from '../../../components/medical-insurance/registinfo/Index.vue'
 export default {
   components: {
     IdentifyImage,
+    Registinfo,
   },
   setup() {
     const ward = reactive({
@@ -291,28 +175,12 @@ export default {
     const injuryMode = computed(() => {
       return store.state.ptnt.injuryMode
     })
-    const registerInfo = ref({})
-    const showRegisterInfo = ref(false)
 
+    const showRegisterInfo = ref(false)
     const getRegInfo = () => {
       if (nullPatient()) return
-      if (injuryMode.value) {
-        getInjuryRegisterInfo(patient.value).then((res) => {
-          registerInfo.value = res
-          showRegisterInfo.value = true
-        })
-      } else {
-        const param = {
-          patNo: patient.value.inpatientNo,
-          times: patient.value.admissTimes,
-          ledgerSn: patient.value.ledgerSn,
-          begntime: patient.value.admissDate,
-        }
-        queryInHospitalPatientsInfo(param).then((res) => {
-          registerInfo.value = res[0]
-          showRegisterInfo.value = true
-        })
-      }
+      timestamp.value = new Date().getTime()
+      showRegisterInfo.value = true
     }
 
     const currentPage = ref(1)
@@ -366,7 +234,6 @@ export default {
       getStatusFlag,
       handleClickOverview,
       handleSelectionChange,
-      registerInfo,
       showRegisterInfo,
       getRegInfo,
       currentPage,
@@ -375,11 +242,6 @@ export default {
       statusFlags,
       isUploadPage,
       toEmpiView,
-      cptSex,
-      cptPsnCertType,
-      cptInsutype,
-      cptMedType,
-      cptYesOrNo,
       dismissIcon,
       handleMedTypeChange,
       timestamp,