瀏覽代碼

电子病历解析,医技费用录入查询新增字段,新增医技处方签

xiaochan 3 周之前
父節點
當前提交
53540b50e5

+ 188 - 0
src/components/xmlr/components/PrintPrescriptionSign.vue

@@ -0,0 +1,188 @@
+<script setup lang="ts">
+import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
+import { useVuePrint } from "@/utils/cy-use/useVuePrint";
+import env from "@/utils/setting";
+import { UseDialogType } from "@/components/cy/CyDialog/index";
+import dayjs from "dayjs";
+import XEUtils from "xe-utils";
+import SystemStaffSelect from "@/components/system/staff-select/SystemStaffSelect.vue";
+
+const props = defineProps<{
+  data: any[];
+  frequency: any[];
+  patientInfo: any;
+}>();
+
+const now = dayjs().format("YYYY年MM月DD日");
+const doctor = reactive({
+  code: "",
+  name: "",
+});
+
+const [TemplateDefault, print] = useVuePrint({
+  hidden: false,
+  extraPageCss: `table {
+  border-collapse: collapse;
+  height: 210mm;
+  width: 148mm;
+  table-layout: fixed;
+}
+
+th {
+  line-height: 5mm;
+}
+
+tr > td {
+  border: none;
+  height: auto;
+  vertical-align: top;
+}
+
+th {
+  text-align: center;
+}
+
+.doctor_info {
+  text-align: right;
+  width: 5mm;
+}`,
+});
+const colspan = 6;
+
+defineExpose<UseDialogType.Expose>({
+  confirm() {
+    return print();
+  },
+});
+</script>
+
+<template>
+  <div class="layout_container">
+    <TemplateDefault>
+      <table>
+        <thead>
+          <tr>
+            <th scope="col" :colspan="colspan">
+              <span style="font-size: 12pt">{{ env.VITE_HOSPITAL_NAME }}</span>
+            </th>
+          </tr>
+          <tr>
+            <th scope="col" :colspan="colspan">处方筏</th>
+          </tr>
+          <tr>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              科室:{{ patientInfo.wardName }}
+            </th>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              住院号:{{ patientInfo.inpatientNo }}
+            </th>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              {{ now }}
+            </th>
+          </tr>
+          <tr>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              姓名:{{ patientInfo.name }}
+            </th>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              年龄:{{ patientInfo.age }}
+            </th>
+            <th style="border-bottom: 1px solid #000" colspan="2">
+              性别:{{ patientInfo.sexName }}
+            </th>
+          </tr>
+          <tr>
+            <th
+              style="
+                text-align: left;
+                border-bottom: 1px solid #000;
+                padding-left: 12pt;
+              "
+              :colspan="colspan"
+            >
+              临床诊断:{{ patientInfo.emrDiagStr }}
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <td colspan="6">
+              <div style="height: 12pt"></div>
+              <div
+                style="display: flex; font-size: 13pt; padding-left: 15pt"
+                v-for="item in props.data"
+              >
+                <div>
+                  {{ item.chargeName }}
+                </div>
+                <div style="width: 2mm"></div>
+                <div>
+                  {{ item.frequencyName }}
+                </div>
+              </div>
+            </td>
+          </tr>
+        </tbody>
+        <tfoot style="border-top: 1px solid #000">
+          <tr>
+            <td class="doctor_info">医师:</td>
+            <td style="border-bottom: 1px solid #000">
+              <img
+                :src="`/doctorSignatureImage/${doctor.code}.png`"
+                style="height: 16pt; width: 47pt"
+                :alt="doctor.name"
+              />
+            </td>
+            <td class="doctor_info">审核:</td>
+            <td style="border-bottom: 1px solid #000"></td>
+
+            <td class="doctor_info">金额:</td>
+            <td style="border-bottom: 1px solid #000"></td>
+          </tr>
+          <tr>
+            <td class="doctor_info">调配:</td>
+            <td style="border-bottom: 1px solid #000"></td>
+
+            <td class="doctor_info">核对:</td>
+            <td style="border-bottom: 1px solid #000"></td>
+
+            <td class="doctor_info">发药:</td>
+            <td style="border-bottom: 1px solid #000"></td>
+          </tr>
+        </tfoot>
+      </table>
+    </TemplateDefault>
+    <header>
+      医师:
+      <SystemStaffSelect v-model="doctor" value="code" label="name" />
+    </header>
+    <div class="layout_main">
+      <el-table :data="props.data" height="100%">
+        <el-table-column prop="chargeDate" label="录入日期" width="80px" />
+        <el-table-column prop="chargeCodeMx" label="项目编码" />
+        <el-table-column prop="chargeName" label="项目名称" />
+        <el-table-column prop="genTime" label="执行时间" width="80px" />
+        <el-table-column prop="execDept" label="执行科室" />
+        <el-table-column label="执行频率">
+          <template #default="{ row }">
+            <el-select
+              v-model="row.frequency"
+              filterable
+              @change="
+                value => {
+                  row.frequencyName = XEUtils.find(props.frequency, item => {
+                    return item.code === value;
+                  }).name;
+                }
+              "
+            >
+              <xc-el-option :data="props.frequency" />
+            </el-select>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<style lang="scss"></style>

+ 3 - 0
src/components/xmlr/components/TableFee.vue

@@ -140,6 +140,9 @@ function rcvrcalcost() {
           <el-button type="danger" icon="Delete" @click="refund"
             >退费
           </el-button>
+          <el-button @click="mutation.handlePrintPrescriptionSign"
+            >打印处方签</el-button
+          >
           <GenerateMedicineReturnOrder v-if="!medicalTechnology" />
         </el-form-item>
       </el-form>

+ 36 - 4
src/components/xmlr/index.ts

@@ -5,11 +5,13 @@ import { BizException, ExceptionEnum } from "@/utils/BizException";
 import useCompRef from "@/utils/useCompRef";
 import { ElTable } from "element-plus";
 import { refund } from "@/api/hospitalization-costs/hospitalization-costs-api";
-import { isDev, needRule, ruleName } from "@/utils/public";
+import { isDev } from "@/utils/public";
 import cyRefList from "@/utils/cyRefList";
-import { UseDialogType } from "@/components/cy/CyDialog/index";
+import { useDialog, UseDialogType } from "@/components/cy/CyDialog/index";
 import { useUserStore } from "@/pinia/user-store";
 import { getServerDateApi } from "@/api/public-api";
+import PrintPrescriptionSign from "@/components/xmlr/components/PrintPrescriptionSign.vue";
+import { getFrequency } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 
 type PatInfo = {
   name?: string;
@@ -43,7 +45,7 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
 
   const store = reactive({
     // 住院号
-    searchPatNo: isDev ? "0420189" : "",
+    searchPatNo: isDev ? "0434450" : "",
     // 患者信息
     patInfo: {} as PatInfo,
     searchFeeParams: {
@@ -57,7 +59,7 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
       refundSymbol: 3,
       execDept: props.medicalTechnology ? (isDev ? "" : userInfo.deptCode) : "",
     },
-    tabsVal: isDev ? "项目录入" : "费用",
+    tabsVal: isDev ? "费用" : "费用",
 
     feeTotal: 0,
     feeData: [],
@@ -155,6 +157,36 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
       tmp[9] = `${store.feeTotal} 元`;
       return tmp;
     },
+    async handlePrintPrescriptionSign() {
+      const data = feeTableRef.value.getSelectionRows();
+      if (data.length === 0) {
+        return;
+      }
+      const filter = XEUtils.filter(data, item => {
+        return item.orderNo === 6 && item.serial !== "00";
+      });
+      if (filter.length === 0) {
+        return;
+      }
+      console.log(data);
+      const frequency = await mutation.getExecutionFrequency();
+
+      useDialog(PrintPrescriptionSign, {
+        dialogProps: {
+          title: "打印处方签",
+          fullscreen: true,
+        },
+        confirmText: "打印",
+        params: {
+          data: XEUtils.cloneDeep(filter),
+          frequency,
+          patientInfo: store.patInfo,
+        },
+      });
+    },
+    getExecutionFrequency: XEUtils.once(async () => {
+      return await getFrequency();
+    }),
   };
 
   onActivated(() => {

+ 5 - 10
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue

@@ -23,11 +23,6 @@
       prop="receiveFlagName"
       width="80"
     ></el-table-column>
-    <el-table-column
-      label="部位"
-      prop="inspectStuffName"
-      width="80"
-    ></el-table-column>
     <el-table-column label="时间" prop="startTime"></el-table-column>
     <el-table-column label="操作" width="120">
       <template #default="{ row, $index }">
@@ -40,7 +35,7 @@
           <div class="but_item">
             <el-button @click.stop="detailsClick(row)"> 详情</el-button>
           </div>
-          <div v-if="props.data.delFlag !== '1'" class="but_item">
+          <div v-if="row.delFlag !== '1'" class="but_item">
             <el-button type="danger" @click.stop="dianJiShanChu(row, $index)">
               删除
             </el-button>
@@ -84,6 +79,8 @@ const props = defineProps<{
   height: number;
 }>();
 
+const emits = defineEmits(["print"]);
+
 const daYingJianChaRef = ref();
 const dialogPrintRef = ref();
 const jianChaJieGuoRef = ref();
@@ -97,7 +94,7 @@ const dianJiShanChu = (row, index) => {
   ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, "提示")
     .then(() => {
       shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then(
-        res => {
+        () => {
           props.data.splice(index, 1);
         }
       );
@@ -106,9 +103,7 @@ const dianJiShanChu = (row, index) => {
 };
 
 function printClick(row) {
-  huoQuShengQingXiangQing(row.reqNo).then(res => {
-    daYingJianChaRef.value.printClick(res);
-  });
+  emits("print", row.reqNo);
 }
 
 async function detailsClick(row) {

+ 5 - 2
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckList.vue

@@ -47,7 +47,6 @@ defineExpose({
   async print(reqs: number[]) {
     data.value = await printListReqNo(reqs);
     handleQrCode();
-    await nextTick();
     await printFun();
   },
 });
@@ -130,7 +129,11 @@ defineExpose({
         <tbody>
           <tr v-for="tmpItem in item.items">
             <td style="height: 40px; width: 40%">
-              <img :src="tmpItem.qrCode" style="height: 100%; width: 100%" />
+              <img
+                :src="tmpItem.qrCode"
+                style="height: 100%; width: 100%"
+                :alt="item.reqNo"
+              />
             </td>
             <td>
               {{ tmpItem.itemName }}

+ 0 - 1
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckTable.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-    <el-button v-if="showPrint" @click="printDirectly">打印</el-button>
     <div ref="printRef" style="width: 147mm; height: 209mm">
       <div
         style="

+ 9 - 8
src/utils/cy-use/useVuePrint.tsx

@@ -19,15 +19,16 @@ export function useVuePrint(
     id?: string;
     extraCss?: string[];
     hidden?: boolean;
-    contentStyle?: StyleValue;
+    contentStyle?: string;
+    // css 样式
     extraPageCss?: string;
     popTitle?: string;
     useTable?: boolean;
-    previewBeforeOpenCallback: () => void;
-    previewOpenCallback: () => void;
-    openCallback: () => void;
-    closeCallback: () => void;
-    beforeOpenCallback: () => void;
+    previewBeforeOpenCallback?: () => void;
+    previewOpenCallback?: () => void;
+    openCallback?: () => void;
+    closeCallback?: () => void;
+    beforeOpenCallback?: () => void;
   } = {}
 ) {
   const {
@@ -46,7 +47,7 @@ export function useVuePrint(
       const str = "/static/printcss" + item;
       tmpExtraCss += str + ",";
     });
-
+    // @ts-ignore
     printOjb.extraCss = tmpExtraCss;
   }
 
@@ -110,7 +111,7 @@ export function useVuePrint(
     },
   });
 
-  async function print() {
+  async function print(): Promise<void> {
     await nextTick();
     buttonRef.value.click();
   }

+ 7 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -44,6 +44,11 @@
           <template #default="{ height }">
             <CheckApplicationHistory
               ref="historyTableRef"
+              @print="
+                value => {
+                  printListRef.print([value]);
+                }
+              "
               :data="jianChaShuJu"
               :height="height"
             />
@@ -95,12 +100,13 @@ import { CyMessageBox } from "@/utils/cy-message-box";
 import XEUtils from "xe-utils";
 import PrintCheckList from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckList.vue";
 import { ElMessageBox } from "element-plus";
+import { useCompShallowRef } from "@/utils/useCompRef";
 
 const orderName = ref("");
 const dateRange = ref(null);
 const jianChaShuJu = ref([]);
 const asideTabs = ref(0);
-const printListRef = ref();
+const printListRef = useCompShallowRef(PrintCheckList);
 
 // 检查结果
 const jieGuoRefV2 = ref();