Browse Source

医保电子处方

lighter 1 year ago
parent
commit
f3ada316f6

+ 63 - 0
src/api/medical-insurance/si-outpatient.js

@@ -135,3 +135,66 @@ export function getMzBlRecord(patientId, times) {
     params: { patientId, times }
   })
 }
+
+export function rxPreCheck(data) {
+  return request({
+    url: '/siMz/rxPreCheck',
+    method: 'post',
+    data,
+  })
+}
+
+export function getRxForAuditing() {
+  return request({
+    url: '/siMz/getRxForAuditing',
+    method: 'get',
+  })
+}
+
+export function rxSign(data) {
+  return request({
+    url: '/siMz/rxSign',
+    method: 'post',
+    data,
+  })
+}
+
+export function rxUpload(data) {
+  return request({
+    url: '/siMz/rxUpload',
+    method: 'post',
+    data,
+  })
+}
+
+export function rxRevoke(data) {
+  return request({
+    url: '/siMz/rxRevoke',
+    method: 'post',
+    data,
+  })
+}
+
+export function rxInfoQuery(data) {
+  return request({
+    url: '/siMz/rxInfoQuery',
+    method: 'post',
+    data,
+  })
+}
+
+export function rxAuditingQuery(data) {
+  return request({
+    url: '/siMz/rxAuditingQuery',
+    method: 'post',
+    data,
+  })
+}
+
+export function rxSetlQuery(data) {
+  return request({
+    url: '/siMz/rxSetlQuery',
+    method: 'post',
+    data,
+  })
+}

+ 1 - 1
src/views/examination/AdiconQuery.vue

@@ -39,7 +39,7 @@
         </el-table>
       </aside>
       <div class="layout_main">
-        <iframe style="width: 99%; height: 99%" :src="pdfSrc" />
+        <iframe class="layout_full_iframe" :src="pdfSrc" />
       </div>
     </div>
   </div>

+ 103 - 0
src/views/medical-insurance/outpatient/DigitalRx.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="layout_container layout-horizontal digital-rx">
+    <aside class="layout_el-table">
+      <div class="rx-list-header">电子处方列表</div>
+      <el-table :data="rxList" stripe highlight-current-row @row-click="handleClickRow">
+        <el-table-column prop="rxTraceCode" label="处方追溯码" width="150"></el-table-column>
+        <el-table-column prop="patnName" label="患者姓名" width="90"></el-table-column>
+        <el-table-column prop="prscDrName" label="处方开具医师" width="100"></el-table-column>
+      </el-table>
+    </aside>
+    <div class="layout_main layout_container">
+      <header class="round-header">
+        <el-button type="primary" @click="doRxSign">处方签名</el-button>
+        <el-button type="primary" @click="doRxUpload">处方上传</el-button>
+        <el-button type="primary" @click="doRxInfoQuery">处方信息查询</el-button>
+        <el-button type="primary" @click="doRxAuditingQuery">处方审核查询</el-button>
+        <el-button type="primary" @click="doRxSettleQuery">处方结算查询</el-button>
+        <el-button type="danger" @click="doRxRevoke">撤销处方上传</el-button>
+      </header>
+      <div class="layout_main">
+        <iframe class="layout_full_iframe" :src="pdfSrc" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+
+import {getRxForAuditing, rxSign, rxUpload} from "@/api/medical-insurance/si-outpatient";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+
+const rxList = ref([])
+
+const pdfSrc = ref('')
+const currentRow = ref({})
+
+function handleClickRow(row) {
+  currentRow.value = row
+  showPDF('data:application/pdf;base64,' + row.rxFile)
+}
+
+function showPDF(base64) {
+  const blob = base64ToBlob(base64);
+  pdfSrc.value = URL.createObjectURL(blob)
+}
+
+function base64ToBlob(base64) {
+  const parts = base64.split(';base64,');
+  const contentType = parts[0].split(':')[1];
+  const raw = window.atob(parts[1]);
+  const rawLength = raw.length;
+  const uInt8Array = new Uint8Array(rawLength);
+  for (let i = 0; i < rawLength; ++i) {
+    uInt8Array[i] = raw.charCodeAt(i);
+  }
+  return new Blob([uInt8Array], {type: contentType});
+}
+
+function doRxSign() {
+  rxSign({
+    patientId: currentRow.value.patientId,
+    times: currentRow.value.times
+  }).then(res => {
+    xcMessage.success('签名成功。')
+  })
+}
+
+function doRxUpload() {
+  rxUpload({
+    patientId: currentRow.value.patientId,
+    times: currentRow.value.times
+  }).then(res => {
+    xcMessage.success('上传成功。')
+  })
+}
+
+function doRxInfoQuery() {}
+
+function doRxAuditingQuery() {}
+
+function doRxSettleQuery() {}
+
+function doRxRevoke() {}
+
+onActivated(() => {
+  getRxForAuditing().then(res => {
+    rxList.value = res
+  })
+})
+</script>
+
+<style lang="scss">
+.digital-rx {
+  .rx-list-header {
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 40px;
+    background-color: white;
+    padding-left: 4px;
+    border-bottom: 1px solid lightgrey;
+  }
+}
+</style>

+ 17 - 19
src/views/medical-insurance/outpatient/MzRegister.vue

@@ -65,6 +65,7 @@
             <el-dropdown-item icon="Upload" command="upload">医保处方上传</el-dropdown-item>
             <el-dropdown-item icon="RefreshLeft" command="retract">撤销处方上传</el-dropdown-item>
             <el-dropdown-item divided icon="Edit" command="diags">医保诊断补录</el-dropdown-item>
+            <el-dropdown-item divided icon="Document" command="rxPrecheck">电子处方预核验</el-dropdown-item>
           </el-dropdown-menu>
         </template>
       </el-dropdown>
@@ -255,7 +256,7 @@ import {
   revokeOutpatientRegistration,
   uploadOutpatientFeeDetails,
   outpatientSettlement,
-  revokeOutpatientSettlement,
+  revokeOutpatientSettlement, rxPreCheck,
 } from '@/api/medical-insurance/si-outpatient'
 import {ElMessage, ElMessageBox, ElSelect} from 'element-plus'
 import {
@@ -276,6 +277,7 @@ import MzBlRecord from "@/components/outpatient/MzBlRecord.vue";
 import MzReceipt from "@/components/outpatient/MzReceipt.vue";
 import {useUserStore} from "@/pinia/user-store";
 import {CyMessageBox} from "@/components/cy/message-box";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 const medType = ref(null)
 const admdvs = ref(null)
@@ -469,12 +471,7 @@ const receiptsOpts = (command) => {
       break
     case 'delete':
       deleteAllMzReceipts(param).then((res) => {
-        ElMessage({
-          message: res,
-          type: 'success',
-          duration: 2000,
-          showClose: true,
-        })
+        xcMessage.success(res)
         fetchReceipts(param)
       })
       break
@@ -507,27 +504,28 @@ const receiptsOpts = (command) => {
           ledgerSn: 0,
         }
         revokeInjuryOutpatientFee(param).then(res => {
-          ElMessage({
-            message: res,
-            type: 'success',
-            duration: 2000,
-            showClose: true,
-          })
+          xcMessage.success(res)
         })
       } else {
         revokeOutpatientFeeDetails(param).then((res) => {
-          ElMessage({
-            message: res,
-            type: 'success',
-            duration: 2000,
-            showClose: true,
-          })
+          xcMessage.success(res)
         });
       }
       break
     case 'diags':
       showInputDiags.value = true
       break
+    case 'rxPrecheck':
+      if (injuryMode.value) {
+        xcMessage.danger('工伤患者无法上传电子医保处方。')
+      } else {
+        rxPreCheck({
+          patientId: patientId.value,
+          times: times.value
+        }).then(res => {
+          xcMessage.success('医保电子处方预核验成功。')
+        })
+      }
   }
 }