Browse Source

初步做完门特补录

lighter 4 years ago
parent
commit
c3dafb159f

+ 19 - 3
src/api/medical-insurance/si-outpatient.js

@@ -32,11 +32,11 @@ export function getHistoryMzReceipts(patNo) {
   })
 }
 
-export function getHistoryReceiptDetail(hisOrdNum) {
+export function getHistoryReceiptDetail(data) {
   return request({
     url: '/siMz/getHistoryReceiptDetail',
-    method: 'get',
-    params: { hisOrdNum },
+    method: 'post',
+    data,
   })
 }
 
@@ -87,3 +87,19 @@ export function outpatientPreSettlement(data) {
     data,
   })
 }
+
+export function outpatientSettlement(data) {
+  return request({
+    url: '/siMz/outpatientSettlement',
+    method: 'post',
+    data,
+  })
+}
+
+export function revokeOutpatientSettlement(data) {
+  return request({
+    url: '/siMz/revokeOutpatientSettlement',
+    method: 'post',
+    data,
+  })
+}

+ 5 - 0
src/router/modules/dashboard.js

@@ -65,6 +65,11 @@ const route = [
             component: createNameComponent(() => import('@/views/medical-insurance/outpatient/MzRegister.vue')),
             meta: { title: '门诊登记', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2' },
           },
+          {
+            path: 'spcSpltryRcrd',
+            component: createNameComponent(() => import('@/views/medical-insurance/outpatient/SpcSpltryRcrd.vue')),
+            meta: { title: '门特补录', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2' },
+          },
           {
             path: 'spcChrRcd',
             component: createNameComponent(() => import('@/views/medical-insurance/outpatient/SpcChrRcd.vue')),

+ 12 - 8
src/store/index.js

@@ -2,7 +2,7 @@ import { createStore, createLogger } from 'vuex'
 import Presistent from './plugins/persistent'
 const debug = process.env.NODE_ENV !== 'production'
 
-const files= import.meta.globEager('./modules/*.js')
+const files = import.meta.globEager('./modules/*.js')
 
 let modules = {}
 Object.keys(files).forEach((c) => {
@@ -11,15 +11,19 @@ Object.keys(files).forEach((c) => {
   modules[moduleName] = module
 })
 
-const presistent = Presistent({ key: 'vuex', modules, modulesKeys: {
-  local: Object.keys(modules),
-  session: []
-} })
+const presistent = Presistent({
+  key: 'vuex',
+  modules,
+  modulesKeys: {
+    local: Object.keys(modules),
+    session: [],
+  },
+})
 
 export default createStore({
   modules: {
-    ...modules
+    ...modules,
   },
   strict: debug,
-  plugins: debug ? [createLogger(), presistent] : [presistent]
-})
+  plugins: [presistent],
+})

+ 0 - 31
src/views/medical-insurance/outpatient/MzRegister.vue

@@ -4,7 +4,6 @@
       <el-input size="mini" v-model="patientId" style="width: 200px; margin-left: 2px" clearable placeholder="请输入">
         <template #prepend>门诊id</template>
       </el-input>
-
       <el-select v-model="medType" size="mini" style="width: 120px">
         <el-option v-for="item in medTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
       </el-select>
@@ -23,7 +22,6 @@
         <template #dropdown>
           <el-dropdown-menu>
             <el-dropdown-item icon="el-icon-document" command="require">获取门诊处方</el-dropdown-item>
-            <el-dropdown-item icon="el-icon-check" command="history">获取历史处方</el-dropdown-item>
             <el-dropdown-item icon="el-icon-delete" command="delete">删除所有处方</el-dropdown-item>
             <el-dropdown-item icon="el-icon-upload" command="upload">医保处方上传</el-dropdown-item>
             <el-dropdown-item icon="el-icon-refresh-left" command="retract">撤销处方上传</el-dropdown-item>
@@ -145,16 +143,6 @@
         <el-table-column property="enddate" label="失效日期"></el-table-column>
       </el-table>
     </el-dialog>
-
-    <el-dialog title="历史处方" v-model="showHistoryReceipts" width="60%">
-      <el-table :data="historyReceipts" @row-click="fetchHistoryReceiptDetail">
-        <el-table-column property="visitDeptName" label="开方科室"></el-table-column>
-        <el-table-column property="doctorName" label="开方医生"></el-table-column>
-        <el-table-column property="chargeDate" label="开方时间"></el-table-column>
-        <el-table-column property="times" label="就诊次数"></el-table-column>
-        <el-table-column property="amount" label="收费金额"></el-table-column>
-      </el-table>
-    </el-dialog>
   </el-container>
 </template>
 
@@ -164,8 +152,6 @@ import {
   deleteAllMzReceipts,
   deleteMzReceipt,
   getMzReceipts,
-  getHistoryMzReceipts,
-  getHistoryReceiptDetail,
   insertSiMzFees,
   outpatientPreSettlement,
   outpatientRegistration,
@@ -256,8 +242,6 @@ export default {
       }
     }
 
-    const historyReceipts = ref([])
-    const showHistoryReceipts = ref(false)
     const receiptsOpts = (command) => {
       if (nullPatientId()) {
         return
@@ -271,12 +255,6 @@ export default {
         case 'require':
           fetchReceipts(param)
           break
-        case 'history':
-          getHistoryMzReceipts(patientId.value).then((res) => {
-            historyReceipts.value = res
-            showHistoryReceipts.value = true
-          })
-          break
         case 'delete':
           deleteAllMzReceipts(param).then((res) => {
             ElMessage({
@@ -318,12 +296,6 @@ export default {
         })
     }
 
-    const fetchHistoryReceiptDetail = (row) => {
-      getHistoryReceiptDetail(row.hisOrdNum).then((res) => {
-        console.log(res)
-      })
-    }
-
     const markMzFees = () => {
       if (currentReceipts.value.length === 0) {
         ElMessage({
@@ -488,9 +460,6 @@ export default {
       spcChrDiseAccts,
       showSpcChrAccts,
       uploadFees,
-      historyReceipts,
-      showHistoryReceipts,
-      fetchHistoryReceiptDetail,
     }
   },
 }

+ 390 - 0
src/views/medical-insurance/outpatient/SpcSpltryRcrd.vue

@@ -0,0 +1,390 @@
+<template>
+  <el-container>
+    <el-header style="height: 35px; margin-top: 10px">
+      <el-input size="mini" v-model="patNo" style="width: 200px; margin-left: 2px" clearable placeholder="请输入">
+        <template #prepend>门诊id</template>
+      </el-input>
+      <el-button type="primary" size="mini" @click="fetchHistoryReceipts">历史处方</el-button>
+      <el-button type="primary" size="mini" @click="registor(1)">登记</el-button>
+      <el-button type="primary" size="mini" @click="markMzFees">生成</el-button>
+      <el-button type="primary" size="mini" @click="qrySpcChrDiseAcct">上传</el-button>
+      <el-button type="primary" size="mini" @click="mzPreSetl">试算</el-button>
+      <el-button type="primary" size="mini" @click="mzSettle">结算</el-button>
+      <el-button type="warning" size="mini" @click="deleteMtFees">撤销处方</el-button>
+      <el-button type="warning" size="mini" @click="registor(2)">取消登记</el-button>
+      <el-button type="warning" size="mini" @click="revokeFees">取消上传</el-button>
+      <el-button type="warning" size="mini" @click="revokeMzSettle">取消结算</el-button>
+    </el-header>
+    <el-container>
+      <el-aside width="400px">
+        <el-tag>历史处方目录</el-tag>
+        <el-table :height="tableHeight" size="mini" :data="historyReceipts" stripe highlight-current-row @row-click="fetchHistoryReceiptDetail">
+          <el-table-column property="patNo" label="Id号" width="70"></el-table-column>
+          <el-table-column property="times" label="就诊次数" width="60"></el-table-column>
+          <el-table-column property="chargeFee" label="金额" width="60"></el-table-column>
+          <el-table-column property="chargeDate" label="时间"></el-table-column>
+          <el-table-column label="状态" width="60">
+            <template #default="scope">
+              <span v-html="colorStatus(scope.row.status)"></span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-aside>
+      <el-main>
+        <el-tag>历史处方明细</el-tag>
+        <div :style="receiptBoxStyle">
+          <div v-for="(item, index) in currentReceipts" :key="index">
+            <div class="receipt-item">
+              <div class="w75">{{ index + 1 }}){{ item.drugName }}&nbsp;</div>
+              <div class="w25">&times;&nbsp;&nbsp;&nbsp;{{ item.quantity }}</div>
+            </div>
+            <div class="receipt-tips"></div>
+          </div>
+        </div>
+        <el-dialog title="个人参保信息" v-model="showInsuinfo" width="65%">
+          <el-table :data="insuinfo" @row-click="handleClickInsuinfo">
+            <el-table-column property="balc" label="余额"></el-table-column>
+            <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
+            <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
+            <el-table-column label="参保状态" prop="psnInsuStasName"></el-table-column>
+            <el-table-column property="psnInsuDate" label="个人参保日期"></el-table-column>
+            <el-table-column property="pausInsuDate" label="暂停参保日期"></el-table-column>
+            <el-table-column property="cvlservFlagName" label="公务员标志"></el-table-column>
+            <el-table-column property="insuplcAdmdvs" label="参保地医保区划"></el-table-column>
+            <el-table-column property="insuplcAdmdvsName" label="参保地名称"></el-table-column>
+            <el-table-column property="empName" label="单位名称"></el-table-column>
+          </el-table>
+        </el-dialog>
+
+        <el-dialog title="请选择(慢特病备案信息)" v-model="showSpcChrAccts" width="40%">
+          <el-table :data="spcChrDiseAccts" @row-click="uploadFees">
+            <el-table-column property="opspDiseCode" label="病种编码"></el-table-column>
+            <el-table-column property="opspDiseName" label="病种名称"></el-table-column>
+            <el-table-column property="begndate" label="生效日期"></el-table-column>
+            <el-table-column property="enddate" label="失效日期"></el-table-column>
+          </el-table>
+        </el-dialog>
+      </el-main>
+    </el-container>
+  </el-container>
+</template>
+
+<script>
+import {
+  deleteAllMzReceipts,
+  getHistoryMzReceipts,
+  getHistoryReceiptDetail,
+  insertSiMzFees,
+  outpatientPreSettlement,
+  outpatientRegistration,
+  revokeOutpatientFeeDetails,
+  revokeOutpatientRegistration,
+  uploadOutpatientFeeDetails,
+  outpatientSettlement,
+  revokeOutpatientSettlement,
+} from '@/api/medical-insurance/si-outpatient'
+import { obtainBasicPersonInfo, querySpecialChronicDiseasesAccreditation } from '@/api/medical-insurance/si-query'
+import { ref } from 'vue-demi'
+import store from '@/store'
+import { ElMessage, ElMessageBox } from 'element-plus'
+export default {
+  setup() {
+    const windowSize = store.state.app.windowSize
+    const tableHeight = windowSize.h - 70
+    const receiptBoxStyle = {
+      height: tableHeight - 8 + 'px',
+      marginTop: '8px',
+      overflowY: 'auto',
+    }
+    const patNo = ref('')
+    const historyReceipts = ref([])
+    const currentRow = ref({})
+    const currentReceipts = ref([])
+    const colorStatus = (status) => {
+      return status > 0 ? '<span style="color: green">已生成</span>' : '<span style="color: red">未生成</span>'
+    }
+    const fetchHistoryReceipts = () => {
+      historyReceipts.value = []
+      currentRow.value = {}
+      getHistoryMzReceipts(patNo.value).then((res) => {
+        historyReceipts.value = res
+      })
+    }
+    const fetchHistoryReceiptDetail = (row) => {
+      currentRow.value = row
+      getHistoryReceiptDetail(row).then((res) => {
+        currentReceipts.value = res
+      })
+    }
+
+    const insuinfo = ref([])
+    const showInsuinfo = ref(false)
+    const registor = (flag) => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        medType: '14',
+        times: currentRow.value.times,
+        needSaving: 1,
+      }
+      if (flag === 1) {
+        obtainBasicPersonInfo(param).then((res) => {
+          insuinfo.value = res.insuinfo
+          showInsuinfo.value = true
+        })
+      } else {
+        revokeOutpatientRegistration(param).then((res) => {
+          ElMessage({
+            message: res,
+            type: 'success',
+            duration: 2000,
+            showClose: true,
+          })
+        })
+      }
+    }
+
+    const handleClickInsuinfo = (row) => {
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+        insutype: row.insutype,
+        psnType: row.psnType,
+        insuplcAdmdvs: row.insuplcAdmdvs,
+        empName: row.empName,
+      }
+      outpatientRegistration(param).then((res) => {
+        showInsuinfo.value = false
+        ElMessage({
+          message: res,
+          type: 'success',
+          duration: 2000,
+          showClose: true,
+        })
+      })
+    }
+
+    const markMzFees = () => {
+      if (currentReceipts.value.length === 0) {
+        ElMessage({
+          message: '请先选择要保存的处方!',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+        return
+      }
+      ElMessageBox.confirm('是否将选中处方生成门特费用?', '提示', {
+        type: 'warning',
+        confirmButtonText: '生成',
+        cancelButtonText: '取消',
+      })
+        .then(() => {
+          insertSiMzFees(currentReceipts.value).then(() => {
+            currentRow.value.status = '1'
+            ElMessage({
+              message: '已成功生成门特处方。',
+              type: 'success',
+              duration: 2500,
+              showClose: true,
+            })
+          })
+        })
+        .catch(() => {})
+    }
+
+    const spcChrDiseAccts = ref([])
+    const showSpcChrAccts = ref(false)
+    const qrySpcChrDiseAcct = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      querySpecialChronicDiseasesAccreditation(param).then((res) => {
+        spcChrDiseAccts.value = res
+        showSpcChrAccts.value = true
+      })
+    }
+
+    const uploadFees = (row) => {
+      uploadOutpatientFeeDetails(row).then((res) => {
+        showSpcChrAccts.value = false
+        mzPreSetl()
+      })
+    }
+
+    const mzPreSetl = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        staffId: store.state.user.info.code,
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      outpatientPreSettlement(param).then((res) => {
+        const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
+        ElMessageBox.alert(message, '试算成功', {
+          type: 'success',
+          showCancelButton: false,
+        }).then(() => {})
+      })
+    }
+
+    const revokeFees = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      revokeOutpatientFeeDetails(param).then((res) => {
+        ElMessage({
+          message: res,
+          type: 'success',
+          duration: 2000,
+          showClose: true,
+        })
+      })
+    }
+
+    const deleteMtFees = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      deleteAllMzReceipts(param).then((res) => {
+        ElMessage({
+          message: res,
+          type: 'success',
+          duration: 2000,
+          showClose: true,
+        })
+        fetchHistoryReceipts()
+      })
+    }
+
+    const mzSettle = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      outpatientSettlement(param).then((res) => {
+        const message = '医保处方总费用:' + res.totalCost + ',医保报销金额:' + res.fundPay + '。'
+        ElMessageBox.alert(message, '结算成功', {
+          type: 'success',
+          showCancelButton: false,
+        }).then(() => {})
+      })
+    }
+
+    const revokeMzSettle = () => {
+      if (!currentRow.value.times) {
+        ElMessage({
+          message: '请先选择历史处方。',
+          type: 'warning',
+          duration: 2000,
+          showClose: true,
+        })
+        return
+      }
+      const param = {
+        patNo: patNo.value,
+        times: currentRow.value.times,
+      }
+      revokeOutpatientSettlement(param).then((res) => {
+        ElMessageBox.alert(res, '取消结算成功', {
+          type: 'success',
+          showCancelButton: false,
+        })
+      })
+    }
+
+    return {
+      patNo,
+      tableHeight,
+      receiptBoxStyle,
+      historyReceipts,
+      currentRow,
+      currentReceipts,
+      colorStatus,
+      fetchHistoryReceipts,
+      fetchHistoryReceiptDetail,
+      insuinfo,
+      showInsuinfo,
+      registor,
+      handleClickInsuinfo,
+      markMzFees,
+      spcChrDiseAccts,
+      showSpcChrAccts,
+      qrySpcChrDiseAcct,
+      uploadFees,
+      mzPreSetl,
+      revokeFees,
+      deleteMtFees,
+      mzSettle,
+      revokeMzSettle,
+    }
+  },
+}
+</script>
+
+<style scoped>
+.receipt-item {
+  display: flex;
+}
+.receipt-tips {
+  margin: 0 0 10px 100px;
+}
+.receipt-tips > span {
+  margin-right: 15px;
+}
+</style>