Переглянути джерело

1、新增 入院病历中可以修改补充诊断留痕
2、优化 开医嘱时没有上级医生提升
3、优化 会诊中复制粘贴检验和电子病历一样
4、优化 打印检查申请单中电脑打印不一致问题
5、新增 电子病历,查看荧光检验

xiaochan 2 роки тому
батько
коміт
e76f35072b

+ 8 - 0
src/api/zhu-yuan-yi-sheng/emr-patient.js

@@ -313,3 +313,11 @@ export function getPastHistory(patNo, times) {
     })
 }
 
+
+export function getFluorescenceSpecimenResult(patNo, times) {
+    return request({
+        url: url + '/getFluorescenceSpecimenResult',
+        method: 'get',
+        params: {patNo, times}
+    })
+}

+ 0 - 1
src/components/SelectStaffCode.vue

@@ -47,7 +47,6 @@ const props = defineProps({
 })
 
 let staffList = $ref([])
-
 let value = $ref()
 
 const modelChange = () => {

+ 5 - 61
src/components/pat-info-list/GroupConsultation.vue

@@ -24,66 +24,8 @@
         <el-table-column label="接受意见" prop="hzComment" show-overflow-tooltip></el-table-column>
       </xc-table>
     </el-aside>
-    <el-main>
-      <el-form inline label-position="right" label-width="120px">
-        <el-form-item label="住院号">
-          {{ huanZheXinXi.inpatientNo }}
-        </el-form-item>
-        <el-form-item label="姓名">
-          {{ huanZheXinXi.name }}
-        </el-form-item>
-        <el-form-item label="性别">
-          {{ cptSex(huanZheXinXi.sex) }}
-        </el-form-item>
-        <el-form-item label="年龄">
-          {{ huanZheXinXi.age }}
-        </el-form-item>
-        <el-form-item label="科室">
-          {{ huanZheXinXi.deptCodeName }}
-        </el-form-item>
-        <el-form-item label="床号">
-          {{ huanZheXinXi.bedNo }}
-        </el-form-item>
-        <el-form-item label="会诊科室">
-          {{ huanZheXinXi.reqDept1Name }}
-        </el-form-item>
-        <el-form-item label="会诊类别">
-          {{ hzLeiBie(huanZheXinXi.hzType) }}
-        </el-form-item>
-        <el-form-item label="请求会诊科室">
-          {{ huanZheXinXi.deptCodeName }}
-        </el-form-item>
-        <el-form-item label="会诊申请医师">
-          {{ huanZheXinXi.reqDoctor }}
-        </el-form-item>
-        <el-form-item label="申请时间">
-          {{ huanZheXinXi.reqDate }}
-        </el-form-item>
-        <el-form-item label="会诊科室">
-          {{ huanZheXinXi.reqDept1Name }}
-        </el-form-item>
-        <el-form-item label="医师">
-          {{ huanZheXinXi.hzDoctor2Name }}
-        </el-form-item>
-        <el-form-item label="会诊时间">
-          {{ huanZheXinXi.hzDate }}
-        </el-form-item>
-      </el-form>
-      <el-form label-position="right" label-width="120px">
-        <el-form-item label="病情简介">
-            <textarea v-model="huanZheXinXi.reqComment" readonly
-                      style="height: 154px;width: 100%"></textarea>
-        </el-form-item>
-        <el-form-item label="目前主要诊断">
-          <textarea v-model="huanZheXinXi.hzZd" readonly style="height: 50px;width: 100%"></textarea>
-        </el-form-item>
-        <el-form-item label="会诊目的">
-          <textarea v-model="huanZheXinXi.hzMd" readonly style="height: 50px;width: 100%"></textarea>
-        </el-form-item>
-        <el-form-item label="会诊意见">
-          <textarea v-model="huanZheXinXi.hzComment" readonly style="height: 50px;width: 100%"></textarea>
-        </el-form-item>
-      </el-form>
+    <el-main style="overflow:auto;">
+      <print-the-consultation-form ref="daYingHuiZhenRef" :lai-yuan="2"/>
     </el-main>
   </el-container>
 </template>
@@ -93,7 +35,7 @@ import {chaKanHuiZhenShenQing} from "@/api/case-front-sheet";
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
 import {getHuanZheXinXi} from "@/api/case-front-sheet/jie-shou-hui-zhen";
 import {ref} from "vue";
-import {cptSex} from "../../utils/computed";
+import PrintTheConsultationForm from "@/components/hui-zhen-da-ying/PrintTheConsultationForm.vue";
 
 const props = defineProps({
   patNo: '',
@@ -108,10 +50,12 @@ onMounted(() => {
   })
 })
 
+const daYingHuiZhenRef = ref(null)
 const huanZheXinXi = ref({})
 const rowClick = (val) => {
   getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
     huanZheXinXi.value = res
+    daYingHuiZhenRef.value.huiZhenXinXiXiangQing(res)
   })
 }
 

+ 5 - 14
src/components/pat-info-list/PatInfomationDialog.vue

@@ -27,11 +27,10 @@
                             :times="props.times"/>
       </el-tab-pane>
       <el-tab-pane label="检验">
-        <inspection-report-index
-            style="font-size: 12px;height: 100%"
-            :pat-no="props.patNo"
-            :start="startDate"
-            :end="endDate"/>
+        <emr-test :pat-no="props.patNo"
+                  @close="emits('closed')"
+                  :admiss-date="startDate"
+                  :is-emr="false"/>
       </el-tab-pane>
       <el-tab-pane label="检查">
         <emr-inspect :pat-no="props.patNo"
@@ -51,20 +50,18 @@
 </template>
 
 <script setup name='PatInfomationDialog'>
-
 import FirstPageOfMedicalRecord from "@/components/pat-info-list/FirstPageOfMedicalRecord.vue";
 import EmrOrderList from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrOrderList.vue";
-import InspectionReportIndex from "@/views/examination/InspectionReportIndex.vue";
 import EmrInspect from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrInspect.vue";
 import GroupConsultation from "@/components/pat-info-list/GroupConsultation.vue";
 import ElectronicMedicalRecord from "@/components/pat-info-list/ElectronicMedicalRecord.vue";
 import {getSheetInfo} from "@/api/case-front-sheet";
 import {formatDate} from "@/utils/date";
-import {getServerDateApi} from "@/api/public-api";
 import ChargeList from '@/components/medical-insurance/charge-list/Index.vue'
 import {getDisPatient, getPatientInfo} from "@/api/inpatient/patient";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import EmrYzTemperature from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue";
+import EmrTest from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue";
 
 
 const props = defineProps({
@@ -91,7 +88,6 @@ const emits = defineEmits(['closed'])
 const dialog = ref(false)
 const sheetData = ref({})
 const startDate = ref('')
-const endDate = ref('')
 
 const patInfo = ref({})
 
@@ -107,15 +103,12 @@ const details = async () => {
 }
 
 onMounted(async () => {
-  endDate.value = formatDate(await getServerDateApi())
   await details()
   if (props.leaveHospital === 1) {
     patInfo.value = await getPatientInfo(props.patNo)
   } else {
     patInfo.value = await getDisPatient(props.patNo, props.times)
   }
-  console.log(patInfo.value)
-
 })
 
 </script>
@@ -140,6 +133,4 @@ onMounted(async () => {
     }
   }
 }
-
-
 </style>

+ 13 - 1
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -23,6 +23,7 @@
       <el-button @click="open(9)" type="info" round>血糖</el-button>
       <hr>
       <el-button @click="open(10)" type="success">病理</el-button>
+      <el-button @click="open(11)" type="primary">荧光</el-button>
     </template>
   </el-popover>
   <el-drawer v-model="drawer"
@@ -54,7 +55,9 @@
     <emr-operation v-if="index === 5"
                    :emr-data="props.emrData"
                    @to-fill-in-data="toFillInData"/>
-    <emr-test @close="close" v-if="index === 6"/>
+    <emr-test @close="close" v-if="index === 6"
+              :admiss-date="patInfo.admissDate"
+              :pat-no="patInfo.inpatientNo"/>
     <emr-herbs v-if="index === 7"
                @close="close"
                :pat-no="patInfo.inpatientNo"
@@ -66,6 +69,8 @@
                      :times="patInfo.admissTimes"/>
 
     <pims-web-view v-if="index === 10" :pat-no="patInfo.inpatientNo"/>
+
+    <fluorescence-test v-bind="patProps" v-if="index === 11"/>
   </el-drawer>
 
 </template>
@@ -91,6 +96,8 @@ import {xcMessage} from "@/utils/xiaochan-element-plus";
 import EmrElectrocardiogram from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrElectrocardiogram.vue";
 import BloodSugarQuery from "@/views/examination/BloodSugarQuery/BloodSugarQuery.vue";
 import PimsWebView from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/PimsWebView.vue";
+import FluorescenceTest
+  from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/fluorescence-test/FluorescenceTest.vue";
 
 const props = defineProps({
   patInfo: {
@@ -107,8 +114,13 @@ const end = ref('')
 const start = ref('')
 
 const drawer = ref(false)
+let patProps = $ref()
 
 onMounted(async () => {
+  patProps = {
+    patNo: props.patInfo.inpatientNo,
+    times: props.patInfo.admissTimes
+  }
   patInfo.value = props.patInfo
   end.value = formatDate(await getServerDateApi())
   start.value = formatDate(props.patInfo.admissDate)

+ 173 - 172
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrOrderList.vue

@@ -1,70 +1,71 @@
 <template>
-    <div style="height: 5%">
-        医嘱
-        <el-radio-group v-model="radio">
-            <el-radio :label="0">临时</el-radio>
-            <el-radio :label="1">长期</el-radio>
-        </el-radio-group>
-        <el-divider direction="vertical"/>
-        <el-select v-model="orderType" style="width: 90px">
-            <el-option :value="1" label="全部"/>
-            <el-option :value="2" label="已停止"/>
-            <el-option :value="3" label="当前"/>
-            <el-option :value="4" label="今日"/>
-        </el-select>
-        <el-button @click="copyClick">复制值</el-button>
-    </div>
+  <div style="height: 5%">
+    医嘱
+    <el-radio-group v-model="radio">
+      <el-radio :label="0">临时</el-radio>
+      <el-radio :label="1">长期</el-radio>
+    </el-radio-group>
+    <el-divider direction="vertical"/>
+    <el-select v-model="orderType" style="width: 90px">
+      <el-option :value="1" label="全部"/>
+      <el-option :value="2" label="已停止"/>
+      <el-option :value="3" label="当前"/>
+      <el-option :value="4" label="今日"/>
+    </el-select>
+    <el-button @click="copyClick">复制值</el-button>
+  </div>
 
-    <div style="height: 95%">
-        <el-auto-resizer>
-            <template #default="{ height, width }">
-                <vxe-table :data="tempList"
-                           :height="height"
-                           class="vxe-padding_zero"
-                           align="left"
-                           border
-                           :row-config="{isHover : true, isCurrent: true,height: 24,useKey :  'actOrderNo'}"
-                           show-overflow
-                           ref="tableRef">
-                    <vxe-column type="checkbox" width="30"/>
-                    <vxe-column type="seq" width="45"/>
-                    <vxe-column title="开始时间" field="startTime" min-width="140"/>
-                    <vxe-column title="医嘱号" field="actOrderNo" min-width="90"/>
-                    <vxe-column title="组" field="orderGroup" width="35">
-                        <template #default="{row}">
-                            <span style="color: red">{{ row.orderGroup }}</span>
-                        </template>
-                    </vxe-column>
-                    <vxe-column title="医嘱名称" field="orderName" min-width="220"/>
-                    <vxe-column title="嘱托" field="instruction" min-width="90"/>
-                    <vxe-column title="频率" field="frequCode" min-width="90"/>
-                    <vxe-column title="剂量" min-width="90">
-                        <template #default="{row}">
-                            {{ row.dose }} {{ row.doseUnitName }}
-                        </template>
-                    </vxe-column>
-                    <vxe-column title="给药方式" field="supplyCodeName" min-width="90"/>
-                    <vxe-column title="申请科室" field="deptName" min-width="90"/>
-                    <vxe-column title="执行科室" field="execUnitName" min-width="90"/>
-                    <vxe-colgroup title="确认">
-                        <vxe-column title="医生" field="signerName" min-width="60"/>
-                        <vxe-column title="护士" field="executer1" min-width="60"/>
-                    </vxe-colgroup>
-                    <vxe-colgroup title="停止">
-                        <vxe-column title="时间" field="endTime" min-width="140"/>
-                        <vxe-column title="医生" field="modifierName" min-width="60"/>
-                        <vxe-column title="护士" field="executer1" min-width="60"/>
-                    </vxe-colgroup>
-                </vxe-table>
+  <div style="height: 95%">
+    <el-auto-resizer>
+      <template #default="{ height, width }">
+        <vxe-table :data="tempList"
+                   :height="height"
+                   class="vxe-padding_zero"
+                   align="left"
+                   :scroll-y="{enabled: true}"
+                   border
+                   :row-config="{isHover : true, isCurrent: true,height: 24,useKey :  'actOrderNo'}"
+                   show-overflow
+                   ref="tableRef">
+          <vxe-column type="checkbox" width="30"/>
+          <vxe-column type="seq" width="45"/>
+          <vxe-column title="开始时间" field="startTime" min-width="140"/>
+          <vxe-column title="医嘱号" field="actOrderNo" min-width="90"/>
+          <vxe-column title="组" field="orderGroup" width="35">
+            <template #default="{row}">
+              <span style="color: red">{{ row.orderGroup }}</span>
             </template>
-        </el-auto-resizer>
-    </div>
+          </vxe-column>
+          <vxe-column title="医嘱名称" field="orderName" min-width="220"/>
+          <vxe-column title="嘱托" field="instruction" min-width="90"/>
+          <vxe-column title="频率" field="frequCode" min-width="90"/>
+          <vxe-column title="剂量" min-width="90">
+            <template #default="{row}">
+              {{ row.dose }} {{ row.doseUnitName }}
+            </template>
+          </vxe-column>
+          <vxe-column title="给药方式" field="supplyCodeName" min-width="90"/>
+          <vxe-column title="申请科室" field="deptName" min-width="90"/>
+          <vxe-column title="执行科室" field="execUnitName" min-width="90"/>
+          <vxe-colgroup title="确认">
+            <vxe-column title="医生" field="signerName" min-width="60"/>
+            <vxe-column title="护士" field="executer1" min-width="60"/>
+          </vxe-colgroup>
+          <vxe-colgroup title="停止">
+            <vxe-column title="时间" field="endTime" min-width="140"/>
+            <vxe-column title="医生" field="modifierName" min-width="60"/>
+            <vxe-column title="护士" field="executer1" min-width="60"/>
+          </vxe-colgroup>
+        </vxe-table>
+      </template>
+    </el-auto-resizer>
+  </div>
 </template>
 
 <script setup name='EmrOrderList' lang="tsx">
 import {computed, Ref, ref, onMounted} from "vue";
 import {
-    huoQuYiZhuShuJu
+  huoQuYiZhuShuJu
 } from "../../../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {getFormatDatetime} from "@/utils/date";
 import {getServerDateApi} from "@/api/public-api";
@@ -75,9 +76,9 @@ import {stringNotBlank} from "@/utils/blank-utils";
 import {emrCopyFunc} from '@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init'
 
 const props = defineProps({
-    patNo: String,
-    times: Number,
-    inTheHospital: Boolean,
+  patNo: String,
+  times: Number,
+  inTheHospital: Boolean,
 })
 
 const list: Ref<Array<any>> = ref([])
@@ -86,134 +87,134 @@ const orderType = ref(3)
 const tableRef = ref(null)
 
 const columns: XcColumn[] = [
-    {
-        type: 'selection',
-        title: '选择',
-    },
-    {
-        type: 'index',
-        title: '序号',
-        width: 30
-    },
-    {key: 'startTime', title: '开始时间', width: 150},
-    {key: 'actOrderNo', title: '医嘱号', width: 90},
-    {
-        key: 'orderGroup', title: '组', width: 20,
-        cellRenderer: ({row}) => (
-            <span style="color: red"> {row.orderGroup}</span>
-        )
-    },
-    {
-        key: 'orderName', title: '医嘱名称',
-    },
-    {
-        key: 'instruction', title: '嘱托', width: 90
-    },
-    {
-        key: 'frequCode', title: '频率', width: 90
-    },
-    {
-        key: 'supplyCodeName', title: '给药方式', width: 90
-    },
-    {
-        key: 'deptName', title: '申请科室', width: 90,
-    },
-    {
-        key: 'execUnitName', title: '执行科室', width: 90,
-    },
-    {
-        title: '确认',
-        children: [
-            {key: 'signerName', title: '确认医生', width: 120},
-            {key: 'executer1', title: '确认护士', width: 120}
-        ]
-    },
-    {
-        title: '停止',
-        children: [
-            {key: 'endTime', title: '停止时间', width: 220},
-            {key: 'modifierName', title: '停止医生', width: 120},
-            {key: 'executer1', title: '停止护士', width: 120}
-        ]
-    },
+  {
+    type: 'selection',
+    title: '选择',
+  },
+  {
+    type: 'index',
+    title: '序号',
+    width: 30
+  },
+  {key: 'startTime', title: '开始时间', width: 150},
+  {key: 'actOrderNo', title: '医嘱号', width: 90},
+  {
+    key: 'orderGroup', title: '组', width: 20,
+    cellRenderer: ({row}) => (
+        <span style="color: red"> {row.orderGroup}</span>
+    )
+  },
+  {
+    key: 'orderName', title: '医嘱名称',
+  },
+  {
+    key: 'instruction', title: '嘱托', width: 90
+  },
+  {
+    key: 'frequCode', title: '频率', width: 90
+  },
+  {
+    key: 'supplyCodeName', title: '给药方式', width: 90
+  },
+  {
+    key: 'deptName', title: '申请科室', width: 90,
+  },
+  {
+    key: 'execUnitName', title: '执行科室', width: 90,
+  },
+  {
+    title: '确认',
+    children: [
+      {key: 'signerName', title: '确认医生', width: 120},
+      {key: 'executer1', title: '确认护士', width: 120}
+    ]
+  },
+  {
+    title: '停止',
+    children: [
+      {key: 'endTime', title: '停止时间', width: 220},
+      {key: 'modifierName', title: '停止医生', width: 120},
+      {key: 'executer1', title: '停止护士', width: 120}
+    ]
+  },
 ]
 
 let newDate = ''
 getServerDateApi().then(res => {
-    newDate = res as any
+  newDate = res as any
 })
 
 const tempList = computed(() => {
-    return list.value.filter(item => {
-        let onceFlag = false
-        let type = false
-        if (radio.value === 0 && item.frequCode === 'ONCE') {
-            onceFlag = true
-        } else if (radio.value === 1 && item.frequCode !== 'ONCE') {
-            onceFlag = true
-        }
-        if (orderType.value === 1) {
-            type = true
-        }
-        if (orderType.value === 2) {
-            type = item.statusFlag === '5'
-        }
-        if (orderType.value === 3) {
-            type = item.statusFlag === '3' || item.statusFlag === '4'
-        }
-        if (orderType.value === 4) {
-            type = getFormatDatetime(newDate, 'YYYY-MM-DD') === getFormatDatetime(item.startTime, 'YYYY-MM-DD')
-        }
-        return onceFlag && type
-    })
+  return list.value.filter(item => {
+    let onceFlag = false
+    let type = false
+    if (radio.value === 0 && item.frequCode === 'ONCE') {
+      onceFlag = true
+    } else if (radio.value === 1 && item.frequCode !== 'ONCE') {
+      onceFlag = true
+    }
+    if (orderType.value === 1) {
+      type = true
+    }
+    if (orderType.value === 2) {
+      type = item.statusFlag === '5'
+    }
+    if (orderType.value === 3) {
+      type = item.statusFlag === '3' || item.statusFlag === '4'
+    }
+    if (orderType.value === 4) {
+      type = getFormatDatetime(newDate, 'YYYY-MM-DD') === getFormatDatetime(item.startTime, 'YYYY-MM-DD')
+    }
+    return onceFlag && type
+  })
 })
 
 const open = () => {
-    huoQuYiZhuShuJu({
-        patNo: props.patNo,
-        times: props.times,
-        inTheHospital: props.inTheHospital
-    }).then(res => {
-        list.value = res as any
-        console.log(res)
-    })
+  huoQuYiZhuShuJu({
+    patNo: props.patNo,
+    times: props.times,
+    inTheHospital: props.inTheHospital
+  }).then(res => {
+    list.value = res as any
+    console.log(res)
+  })
 }
 
 const copyClick = () => {
-    let tempData = tableRef.value.getCheckboxRecords(true)
-    let str = ''
-    if (tempData.length > 0) {
-        for (let i = 0; i < tempData.length; i++) {
-            let item = tempData[i]
-            str += item.orderName
-            if (stringNotBlank(item.instruction)) {
-                str += "," + item.instruction
-            }
-            if (stringNotBlank(item.instruction)) {
-                str += "," + item.instruction
-            }
-            if (stringNotBlank(item.supplyCodeName)) {
-                str += "," + item.supplyCodeName
-            }
-            if (stringNotBlank(item.drugQuan)) {
-                str += "," + item.drugQuan
-                if (stringNotBlank(item.drugQuanName)) {
-                    str += item.drugQuanName
-                } else {
-                    str += '次'
-                }
-            }
-            str += i + 1 === tempData.length ? '。' : '、';
+  let tempData = tableRef.value.getCheckboxRecords(true)
+  let str = ''
+  if (tempData.length > 0) {
+    for (let i = 0; i < tempData.length; i++) {
+      let item = tempData[i]
+      str += item.orderName
+      if (stringNotBlank(item.instruction)) {
+        str += "," + item.instruction
+      }
+      if (stringNotBlank(item.instruction)) {
+        str += "," + item.instruction
+      }
+      if (stringNotBlank(item.supplyCodeName)) {
+        str += "," + item.supplyCodeName
+      }
+      if (stringNotBlank(item.drugQuan)) {
+        str += "," + item.drugQuan
+        if (stringNotBlank(item.drugQuanName)) {
+          str += item.drugQuanName
+        } else {
+          str += '次'
         }
-        emrCopyFunc(str)
-
-    } else {
-        xcMessage.error('请先选择医嘱。')
+      }
+      str += i + 1 === tempData.length ? '。' : '、';
     }
+    emrCopyFunc(str)
+
+  } else {
+    xcMessage.error('请先选择医嘱。')
+  }
 }
 
 onMounted(() => {
-    open()
+  open()
 })
 
 </script>

+ 29 - 16
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue

@@ -11,15 +11,13 @@
       <el-button @click="appendCopy" type="success">复制 / 追加</el-button>
       <el-button @click="copyClick" type="success">确认复制</el-button>
       <br>
-
-
     </div>
     <div class="describe">
-      <el-button type="primary" @click="copyOutcome('病理结果')">
+      <el-button v-if="isEmr" type="primary" @click="copyOutcome('病理结果')">
         病理结果
       </el-button>
 
-      <el-button type="primary" @click="copyOutcome('细菌培养结果')">
+      <el-button v-if="isEmr" type="primary" @click="copyOutcome('细菌培养结果')">
         细菌培养结果
       </el-button>
 
@@ -60,27 +58,27 @@
       <div class="test-date">
         <div>
           <test-describe front="接收时间"
-                         :text="inspectionHeader.aply_DATE "/>
+                         :text="inspectionHeader.aply_DATE"/>
         </div>
         <div>
           <test-describe front="检验时间"
-                         :text="inspectionHeader.ordr_CREATE_DATE "/>
+                         :text="inspectionHeader.ordr_CREATE_DATE"/>
         </div>
         <div>
           <test-describe front="报告时间"
-                         :text="inspectionHeader.audt_TIME "/>
+                         :text="inspectionHeader.audt_TIME"/>
         </div>
         <div>
           <test-describe front="送检医生"
-                         :text="inspectionHeader.test_USR_NAME "/>
+                         :text="inspectionHeader.test_USR_NAME"/>
         </div>
         <div>
           <test-describe front="检验人"
-                         :text="inspectionHeader.ordr_USR_NAME "/>
+                         :text="inspectionHeader.ordr_USR_NAME"/>
         </div>
         <div>
           <test-describe front="审核人"
-                         :text="inspectionHeader.audt_USR_NAME "/>
+                         :text="inspectionHeader.audt_USR_NAME"/>
         </div>
       </div>
     </div>
@@ -93,6 +91,7 @@
             <vxe-table :height="height"
                        :row-config="{isHover : true, isCurrent: true,height: 24}"
                        show-overflow
+                       :scroll-y="{enabled: true}"
                        class="vxe-padding_zero"
                        @cell-click="sidebarRow"
                        :data="sidebarList">
@@ -150,7 +149,6 @@ import {
   queryInspectionDetail,
   queryInspectionsIndex
 } from '@/api/inspections'
-import {patInfo} from './emr-tools-store'
 import {onMounted, ref} from "vue";
 import {xcMessage} from '@/utils/xiaochan-element-plus'
 import TestDescribe from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/TestDescribe.vue";
@@ -159,6 +157,17 @@ import {
   elementReplication,
   emrCopyFunc
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init'
+import {copyStrFunc} from "@/utils/public";
+
+const {patNo, admissDate, isEmr} = defineProps({
+  patNo: String,
+  admissDate: String,
+  isEmr: {
+    type: Boolean,
+    default: true
+  }
+})
+
 
 const emits = defineEmits(['close'])
 const sidebarList = ref()
@@ -179,13 +188,12 @@ const query = async () => {
   let {startTime, endTime} = getDateRangeFormatDate(dateRange.value)
   const param = {
     type: 1,
-    content: patInfo.value.inpatientNo,
+    content: patNo,
     start: startTime,
     end: endTime,
   }
   queryInspectionsIndex(param).then((res) => {
     sidebarList.value = res
-    console.log(res)
   })
 }
 const expands = ref([])
@@ -236,7 +244,11 @@ const appendCopy = () => {
 }
 
 const copyClick = () => {
-  emrCopyFunc(copyStr)
+  if (isEmr) {
+    emrCopyFunc(copyStr)
+  } else {
+    copyStrFunc(copyStr)
+  }
   emits('close')
 }
 
@@ -302,8 +314,9 @@ function getItemStr(val, strValue, value) {
 }
 
 onMounted(async () => {
-  dateRange.value.push(patInfo.value.admissDate)
-  dateRange.value.push(await getServerDateApi())
+  let nowDate = await getServerDateApi()
+  dateRange.value.push(admissDate)
+  dateRange.value.push(nowDate)
   await query()
   // todo 检验接口没有返回危急值。
   // let res = await getCriticalValueByPatInfo(patInfo.value.inpatientNo, patInfo.value.admissTimes)

+ 2 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue

@@ -13,10 +13,12 @@
     <el-auto-resizer>
       <template #default="{ height, width }">
         <vxe-table :height="height"
+                   :max-height="height"
                    border
                    class="vxe-padding_zero hl-style"
                    header-row-class-name="padding_zero"
                    show-overflow
+                   :scroll-y="{enabled: false}"
                    :column-config="{resizable: true}"
                    :row-config="{ height: 24}"
                    :row-class-name="rowClassName"
@@ -200,8 +202,6 @@ const rowClick = ({row}) => {
   otherInfo.value = str
 }
 const query = (patNo, times) => {
-
-
   getYzTemperature(patNo, times)
       .then((res) => {
         let {list, map} = res

+ 245 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/fluorescence-test/FluorescenceTest.vue

@@ -0,0 +1,245 @@
+<script setup name='FluorescenceTest'>
+import {getFluorescenceSpecimenResult} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {getWindowSize} from "@/utils/window-size";
+import {encrypt} from "@/utils/public";
+import {emrCopyFunc} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+
+const {patNo, times} = defineProps({
+  patNo: String,
+  times: Number
+})
+
+let data = $ref([])
+let mainData = $ref({})
+let outcomeJson = $ref({})
+
+const rowClick = (row) => {
+  mainData = row
+  outcomeJson = JSON.parse(row.outcome)
+}
+
+const content = {
+  MicroSystemList: '微生态体系指标',
+  MicroFormList: '微生态形态学指标',
+  OtherList: '其他'
+}
+
+const getValue = (val) => {
+  try {
+    return outcomeJson.ReportResultInfo[val]
+  } catch {
+    return []
+  }
+}
+
+let refMap = {}
+const setRefMap = (el, name) => {
+  refMap[name] = el
+}
+
+const trClick = (event) => {
+  let input = event.target.querySelector('input')
+  input.checked = !input.checked
+}
+
+const copyClick = () => {
+  let temp = ''
+  for (const key in refMap) {
+    let item = refMap[key]
+    if (item.checked) {
+      let data = encrypt.decrypt(item.getAttribute("data"))
+      temp += `检测项目:${data.CheckItem} 结果值:${data.Result} 参考值:${data.Reference},`
+    }
+  }
+  try {
+    let str = `临床诊断:${outcomeJson?.ReportResultInfo?.DiagnosisResult}。`
+    temp += str.replace(/\r\n/g, "");
+  } catch {
+    temp = temp.slice(0, -1) + '。';
+  }
+  emrCopyFunc(temp)
+}
+
+
+onMounted(() => {
+  getFluorescenceSpecimenResult(patNo, times).then((res) => {
+    console.log(res)
+    data = res
+  })
+})
+
+</script>
+
+<template>
+  <el-container>
+    <el-aside>
+      <el-table :data="data" :height="getWindowSize.h  - 20" @row-click="rowClick">
+        <el-table-column prop="sample" label="项目名称"/>
+        <el-table-column prop="testTime" label="检验时间"/>
+      </el-table>
+    </el-aside>
+    <el-main>
+      <div style="width: 100%; height: 100%;flex-flow: column;  display: flex; overflow: auto">
+        <div class="table_text_align_left">
+          <table width="100%">
+            <thead>
+            <tr>
+              <th>
+                病理号:{{ mainData.id }}
+              </th>
+              <th>
+                标本种类:{{ mainData.sample }}
+              </th>
+              <th>
+                样本编号:{{ mainData.specimen }}
+              </th>
+            </tr>
+            <tr>
+              <th>
+                姓名:{{ mainData.patientName }}
+              </th>
+              <th>
+                年龄:{{ mainData.patientAge }}
+              </th>
+              <th>
+                床号:{{ mainData.bedNo }}
+              </th>
+            </tr>
+            <tr>
+              <th>
+                送检科室:{{ mainData.office }}
+              </th>
+              <th>
+                送检医师:{{ mainData.doctor }}
+              </th>
+              <th>
+                送检日期:{{ mainData.sendTime }}
+              </th>
+            </tr>
+            </thead>
+            <tfoot>
+            <tr>
+              <td colspan="3" style="text-align: center;">
+                临床诊断:{{ outcomeJson?.ReportResultInfo?.DiagnosisResult }}
+              </td>
+            </tr>
+            </tfoot>
+          </table>
+        </div>
+
+        <div style="display: flex;flex: 1">
+          <div style="width:calc(100% - 260px)" class="test_table">
+            <table style="width: 100%" cellspacing="0">
+              <thead style="height: 14pt; text-align: center">
+              <tr>
+                <th style="width: 25pt">
+                  <el-button text @click="copyClick" type="success">复制</el-button>
+                </th>
+                <th>
+                  检测项目
+                </th>
+                <th>
+                  结果值
+                </th>
+                <th>
+                  参考值
+                </th>
+              </tr>
+              </thead>
+
+              <tbody style="width: 100%">
+              <template v-for="(value,key) in content">
+                <tr style="line-height: 25pt; text-align: start">
+                  <td colspan="4">
+                    <span style="margin-left: 10px">
+                    {{ value + ":" }}
+                    </span>
+                  </td>
+                </tr>
+                <tr v-for="(item,index) in getValue(key)"
+                    style="line-height: 20pt">
+                  <td @click.stop="trClick($event)" style="cursor: pointer">
+                    <input type="checkbox"
+                           style="cursor: pointer"
+                           @click.stop
+                           :ref="(el) => setRefMap(el, value + index)"
+                           :data="encrypt.encrypt(item)"/>
+                  </td>
+                  <td>
+                    {{ item.CheckItem }}
+                  </td>
+                  <td>
+                    {{ item.Result }}
+                  </td>
+                  <td>
+                    {{ item.Reference }}
+                  </td>
+                </tr>
+              </template>
+
+              </tbody>
+
+            </table>
+
+            <div class="table_text_align_left">
+              <table width="100%" cellspacing="0">
+                <tr>
+                  <td>检验者:{{ mainData.proofer }}</td>
+                  <td>审核人签字:{{ mainData.reporter }}</td>
+                </tr>
+                <tr>
+                  <td>检验日期:{{ mainData.testTime }}</td>
+                  <td>报告日期:{{ mainData.reportTime }}</td>
+                </tr>
+              </table>
+            </div>
+
+          </div>
+
+          <div style="flex: 1;text-align: center ">
+            <div style="">
+              镜下结果
+            </div>
+            <img v-for="item in outcomeJson.ListReportPicInfo" :src="'data:image/jpg;base64,'  + item.Base64Resource"/>
+          </div>
+        </div>
+
+      </div>
+    </el-main>
+  </el-container>
+</template>
+
+<style scoped lang="scss">
+.table_text_align_left {
+
+  th {
+    text-align: left;
+  }
+
+  td {
+    text-align: left;
+    line-height: 15pt;
+  }
+
+}
+
+.test_table {
+  table {
+    border-right: 1px solid #000000;
+    border-bottom: 1px solid #000000;
+    text-align: center;
+  }
+
+  table th {
+    border-left: 1px solid #000000;
+    border-top: 1px solid #000000;
+  }
+
+  table td {
+    border-left: 1px solid #000000;
+    border-top: 1px solid #000000;
+  }
+}
+
+
+</style>

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

@@ -1,9 +1,11 @@
 <template>
   <div>
     <el-button v-if="showPrint" @click="printDirectly">打印</el-button>
-    <div ref="printRef">
+    <div ref="printRef" style="width:147mm;height:209mm">
       <div
-          style="width:147mm;height:209mm;background-color: white;font-size: 9.75pt;position: relative">
+          style="background-color: white;
+          border:1px solid transparent;
+          width:100%;height:100%;font-size: 9.75pt;position: relative">
         <div style="position:absolute; margin-top: 12pt">
           <img ref="svgRef"/>
         </div>
@@ -178,15 +180,15 @@ const printClick = async (data) => {
 }
 
 const printDirectly = () => {
-  let css = `@page {size: 148mm 210mm;margin:0; padding: 0} *{margin:0; padding: 0;box-sizing: border-box;} table{width:100%}table td{font-size:9pt}.no_border{border:0;width:100%}.table_border{width:100%}.table_border td{border:0.75pt solid;border-top:0;vertical-align:baseline}.describe{width:52.5pt;height:52.5pt;text-align:center;font-size:9pt} `
-  let html = `<style>${css}</style><meta http-equiv="X-UA-Compatible" content="IE=edge"><body>${printRef.value.innerHTML}</body>`
+  let css = `@page {size: 147mm 209mm;margin:0; padding: 0} *{margin:0; padding: 0;box-sizing: border-box;} table{width:100%}table td{font-size:9pt}.no_border{border:0;width:100%}.table_border{width:100%}.table_border td{border:0.75pt solid #000;border-top:0;vertical-align:baseline}.describe{width:52.5pt;height:52.5pt;text-align:center;font-size:9pt} `
+  let html = `<style>${css}</style><body>${printRef.value.innerHTML}</body>`
   let LODOP = getLodop();
   LODOP.PRINT_INIT('检查检验申请单');
-  LODOP.SET_PRINT_PAGESIZE(0, 0, 0, 'A5');
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true);
+  LODOP.SET_PRINT_PAGESIZE(1, '148mm', '210mm', '');
+  LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width')
   LODOP.SET_PRINT_MODE("PRINT_START_PAGE", 1);
   LODOP.SET_PRINT_MODE("PRINT_END_PAGE", 1);
-  LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', html)
+  LODOP.ADD_PRINT_HTM('1mm', '1mm', '100%', '100%', html)
   LODOP.PREVIEW();
 }
 

+ 15 - 4
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -50,16 +50,16 @@
       <el-form-item label="管床医生:">
         <select-staff-code v-model="thirdLevelDoctorSetting.data"
                            :name="['referPhysician', 'referPhysicianName']"
-                           dept-code/>
+        />
       </el-form-item>
       <el-form-item label="主治医生:">
         <select-staff-code v-model="thirdLevelDoctorSetting.data"
                            :name="['consultPhysician', 'consultPhysicianName']"
-                           dept-code/>
+        />
       </el-form-item>
       <el-form-item label="主任医生:">
         <select-staff-code v-model="thirdLevelDoctorSetting.data"
-                           :name="['deptDirector', 'deptDirectorName']" dept-code/>
+                           :name="['deptDirector', 'deptDirectorName']"/>
       </el-form-item>
       <el-form-item label=" ">
         <el-button @click="submitToTheThirdLevelDoctor">提交</el-button>
@@ -75,7 +75,11 @@ import {allWardsVisible} from "@/utils/permission";
 import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox";
 import {cptSex} from "@/utils/computed";
 import {getMyPatient, saveTheThirdLevelDoctor} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
-import {clickOnThePatient, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {
+  clickOnThePatient,
+  huanZheXinXi,
+  yzMitt
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
 import SelectStaffCode from "@/components/SelectStaffCode.vue";
 import {getAllWards} from "@/api/zhu-yuan-yi-sheng/resident-doctor";
@@ -147,6 +151,13 @@ const submitToTheThirdLevelDoctor = () => {
 }
 
 onMounted(() => {
+
+  yzMitt.on('upperDoctorSetting', (data) => {
+    thirdLevelDoctorSetting.dialog = true
+    thirdLevelDoctorSetting.data = data
+  })
+
+
   getAllWards().then((res) => {
     if (res.length > 0) {
       allWards.value = res

+ 191 - 193
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue

@@ -1,118 +1,116 @@
 <template>
-    <el-dialog draggable v-model="dialog" destroy-on-close title="模板" width="90%" @close="emit('close')">
-        <div style="display: flex">
-            <div style="width: 350px">
-                <el-radio-group v-model="muBanLeiXing" size="small" @change="dianJiChaXun">
-                    <el-radio-button :label="0">全部</el-radio-button>
-                    <el-radio-button :label="1">全院</el-radio-button>
-                    <el-radio-button :label="2">本科室</el-radio-button>
-                    <el-radio-button :label="3">个人</el-radio-button>
-                    <el-radio-button :label="4">收藏</el-radio-button>
-                </el-radio-group>
-                <el-input v-model="code" clearable style="width: 120px" @keyup.enter="dianJiChaXun"></el-input>
-                <el-button @click="dianJiChaXun">查询</el-button>
-                <el-table :data="fuJiMuBanShuJu.data"
-                          :height="windowSize.h / 1.6"
-                          highlight-current-row stripe
-                          @row-click="dianJiMuBanMing"
-                          style="width: 300px">
-                    <el-table-column label="操作" width="180">
-                        <template #default="scope">
-                            <el-button type="primary"
-                                       icon="Edit"
-                                       v-if="muBanLeiXing !== 4 && props.editor"
-                                       link
-                                       title="编辑模板"
-                                       @click.stop="clickToEditTemplate(scope.row)"/>
-                            <el-button type="warning"
-                                       v-if="muBanLeiXing !== 4"
-                                       title="收藏模板"
-                                       link
-                                       @click.stop="clickToFavoriteTemplates(scope.row,scope.$index)"
-                                       :icon="scope.row.yiBeiShouCang ?  'StarFilled' : 'Star'"/>
-                            <el-button type="danger"
-                                       icon="Delete"
-                                       title="删除模板"
-                                       link
-                                       @click.stop="clickDeleteTemplate(scope.row.patternCode,scope.$index)"/>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="名称" prop="patternName" width="70"/>
-                </el-table>
-                <el-pagination
-                        :current-page="fuJiMuBanShuJu.currentPage"
-                        :page-size="fuJiMuBanShuJu.pageSize"
-                        :pager-count="5"
-                        :total="fuJiMuBanShuJu.total"
-                        layout="total,prev, pager, next"
-                        small
-                        @current-change="handleCurrentChange"
-                >
-                </el-pagination>
+  <el-dialog draggable v-model="dialog" destroy-on-close title="模板" width="90%" @close="emit('close')">
+    <div style="display: flex">
+      <div style="width: 350px">
+        <el-radio-group v-model="muBanLeiXing" size="small" @change="dianJiChaXun">
+          <el-radio-button :label="0">全部</el-radio-button>
+          <el-radio-button :label="1">全院</el-radio-button>
+          <el-radio-button :label="2">本科室</el-radio-button>
+          <el-radio-button :label="3">个人</el-radio-button>
+          <el-radio-button :label="4">收藏</el-radio-button>
+        </el-radio-group>
+        <el-input v-model="code" clearable style="width: 120px" @keyup.enter="dianJiChaXun"></el-input>
+        <el-button @click="dianJiChaXun">查询</el-button>
+        <el-table :data="fuJiMuBanShuJu.data"
+                  :height="windowSize.h / 1.6"
+                  highlight-current-row stripe
+                  @row-click="dianJiMuBanMing"
+                  style="width: 300px">
+          <el-table-column label="操作" width="180">
+            <template #default="scope">
+              <el-button type="primary"
+                         icon="Edit"
+                         v-if="muBanLeiXing !== 4 && props.editor"
+                         link
+                         title="编辑模板"
+                         @click.stop="clickToEditTemplate(scope.row)"/>
+              <el-button type="warning"
+                         v-if="muBanLeiXing !== 4"
+                         title="收藏模板"
+                         link
+                         @click.stop="clickToFavoriteTemplates(scope.row,scope.$index)"
+                         :icon="scope.row.yiBeiShouCang ?  'StarFilled' : 'Star'"/>
+              <el-button type="danger"
+                         icon="Delete"
+                         title="删除模板"
+                         link
+                         @click.stop="clickDeleteTemplate(scope.row.patternCode,scope.$index)"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="名称" prop="patternName" width="70"/>
+        </el-table>
+        <el-pagination
+            :current-page="fuJiMuBanShuJu.currentPage"
+            :page-size="fuJiMuBanShuJu.pageSize"
+            :pager-count="5"
+            :total="fuJiMuBanShuJu.total"
+            layout="total,prev, pager, next"
+            small
+            @current-change="handleCurrentChange">
+        </el-pagination>
 
-            </div>
-            <div>
-                <el-button type="primary" @click="dianJiQueDing">确定</el-button>
-                开始时间:
-                <el-date-picker
-                        v-model="startTime"
-                        :disabled-date="disabledDate"
-                        format="YYYY-MM-DD HH:mm:ss"
-                        style="width: 180px"
-                        type="datetime"
-                        value-format="YYYY-MM-DD HH:mm:ss"
-                ></el-date-picker>
-                医嘱时间:
-                <el-input v-model="orderTime" disabled style="width: 180px"></el-input>
-                <!--        频率:-->
-                <!--        <select-v4 :data="yaoPinPingLvData"-->
-                <!--                   ref="pingLv"-->
-                <!--                   key="frequCodeTemp"-->
-                <!--                   v-model="frequCode"-->
-                <!--                   @change="getFrequCodeName"-->
-                <!--                   @clear="frequCode = null"-->
-                <!--                   style="width: 120px"/>-->
-
-                <xc-table ref="tableRef"
-                          row-key="id"
-                          :local-data="muBanShuJu"
-                          :open-paging="false"
-                          :final-height="windowSize.h / 1.6">
-                    <el-table-column fixed="left" type="selection"/>
-                    <el-table-column fixed="left" label="uuid" prop="id"></el-table-column>
-                    <el-table-column label="医嘱名称" prop="orderName" show-overflow-tooltip
-                                     width="135"></el-table-column>
-                    <el-table-column label="规格" prop="drugSpecification"></el-table-column>
-                    <el-table-column label="频率" prop="frequCodeName"></el-table-column>
-                    <el-table-column label="一次剂量" prop="dose">
-                        <template #default="scope"> {{ scope.row.dose }} {{ scope.row.doseUnitName }}</template>
-                    </el-table-column>
-                    <el-table-column label="领量" prop="drugQuan">
-                        <template #default="scope"> {{ scope.row.drugQuan }} {{ scope.row.miniUnitName }}</template>
-                    </el-table-column>
-                    <el-table-column label="给药方式" prop="supplyCodeName"></el-table-column>
-                    <el-table-column label="执行科室" prop="execUnitName"></el-table-column>
-                    <el-table-column label="药房" prop="groupNoName"></el-table-column>
-                    <el-table-column label="父医嘱" prop="parentNo"></el-table-column>
-                </xc-table>
-            </div>
+      </div>
+      <div>
+        <div>
+          <p
+              style="color: red">注意:如果你在长期医嘱页面,那么模板中的临时医嘱会变成ALWAYS,如果在临时医嘱页面中,那么模板中的长期医嘱都会变成ONCE,在全部页面中那么模板中的频率不会变,
+            复制和粘贴医嘱同理。
+          </p>
         </div>
-    </el-dialog>
+
+        <el-button type="primary" @click="dianJiQueDing">确定</el-button>
+        开始时间:
+        <el-date-picker
+            v-model="startTime"
+            :disabled-date="disabledDate"
+            format="YYYY-MM-DD HH:mm:ss"
+            style="width: 180px"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"/>
+        医嘱时间:
+        <el-input v-model="orderTime" disabled style="width: 180px"></el-input>
+        <xc-table ref="tableRef"
+                  row-key="id"
+                  :local-data="muBanShuJu"
+                  :open-paging="false"
+                  :final-height="windowSize.h / 1.6">
+          <el-table-column fixed="left" type="selection"/>
+          <el-table-column fixed="left" label="uuid" prop="id"></el-table-column>
+          <el-table-column label="医嘱名称"
+                           prop="orderName"
+                           show-overflow-tooltip
+                           width="135"/>
+          <el-table-column label="规格" prop="drugSpecification"/>
+          <el-table-column label="频率" prop="frequCodeName"/>
+          <el-table-column label="一次剂量" prop="dose">
+            <template #default="scope"> {{ scope.row.dose }} {{ scope.row.doseUnitName }}</template>
+          </el-table-column>
+          <el-table-column label="领量" prop="drugQuan">
+            <template #default="scope"> {{ scope.row.drugQuan }} {{ scope.row.miniUnitName }}</template>
+          </el-table-column>
+          <el-table-column label="给药方式" prop="supplyCodeName"/>
+          <el-table-column label="执行科室" prop="execUnitName"/>
+          <el-table-column label="药房" prop="groupNoName"/>
+          <el-table-column label="父医嘱" prop="parentNo"/>
+        </xc-table>
+      </div>
+    </div>
+  </el-dialog>
 </template>
 
 <script name="HuoQuMuBan" setup>
 import store from '../../../store'
 import {
-    collectDoctorSOrderTemplate,
-    deleteADoctorSOrderTemplate,
-    huoQuMuBanShuJu,
-    huoQuYiZhuMuBan,
-    huoQuZhuYuanPinLv,
+  collectDoctorSOrderTemplate,
+  deleteADoctorSOrderTemplate,
+  huoQuMuBanShuJu,
+  huoQuYiZhuMuBan,
+  huoQuZhuYuanPinLv,
 } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
 import {
-    frequCodeEnum,
-    muBanMing,
-    queryParam
+  frequCodeEnum,
+  muBanMing,
+  queryParam
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
 import {computed, ref} from 'vue'
 import {stringNotBlank} from '@/utils/blank-utils'
@@ -123,14 +121,14 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
 
 const props = defineProps({
-    dialog: {
-        type: Boolean,
-        default: false
-    },
-    editor: {
-        type: Boolean,
-        default: true
-    }
+  dialog: {
+    type: Boolean,
+    default: false
+  },
+  editor: {
+    type: Boolean,
+    default: true
+  }
 
 })
 
@@ -138,11 +136,11 @@ const props = defineProps({
 const emit = defineEmits(['mu-ban-shu-ju', 'close', 'edit-template'])
 
 const windowSize = computed(() => {
-    return store.state.app.windowSize
+  return store.state.app.windowSize
 })
 
 const user = computed(() => {
-    return store.state.user.info
+  return store.state.user.info
 })
 
 const code = ref('')
@@ -161,147 +159,147 @@ const yaoPinPingLvData = ref([])
 const dianJiFuJiXinXi = ref('')
 
 const fuJiMuBanShuJu = ref({
-    currentPage: 1,
-    pageSize: 20,
-    total: 0,
-    data: [],
+  currentPage: 1,
+  pageSize: 20,
+  total: 0,
+  data: [],
 })
 // 获取医嘱
 const dianJiChaXun = () => {
-    huoQuYiZhuMuBan(code.value, user.value.deptCode, muBanLeiXing.value, fuJiMuBanShuJu.value.currentPage, 0).then((res) => {
-        fuJiMuBanShuJu.value.data = res.records
-        fuJiMuBanShuJu.value.total = res.total
-    })
+  huoQuYiZhuMuBan(code.value, user.value.deptCode, muBanLeiXing.value, fuJiMuBanShuJu.value.currentPage, 0).then((res) => {
+    fuJiMuBanShuJu.value.data = res.records
+    fuJiMuBanShuJu.value.total = res.total
+  })
 }
 
 const dianJiMuBanMing = async (row) => {
-    dianJiFuJiXinXi.value = row
-    muBanShuJu.value = await huoQuMuBanShuJu(row.inputType === '4' ? row.collectCode : row.patternCode)
-    let serverDate = await getServerDateApi()
-    orderTime = serverDate
-    startTime = serverDate
+  dianJiFuJiXinXi.value = row
+  muBanShuJu.value = await huoQuMuBanShuJu(row.inputType === '4' ? row.collectCode : row.patternCode)
+  let serverDate = await getServerDateApi()
+  orderTime = serverDate
+  startTime = serverDate
 }
 
 // 分页
 const handleCurrentChange = (val) => {
-    fuJiMuBanShuJu.value.currentPage = val
-    huoQuYiZhuMuBan(code.value, user.value.deptCode, muBanLeiXing.value, fuJiMuBanShuJu.value.currentPage, fuJiMuBanShuJu.value.total).then((res) => {
-        fuJiMuBanShuJu.value.data = res.records
-    })
+  fuJiMuBanShuJu.value.currentPage = val
+  huoQuYiZhuMuBan(code.value, user.value.deptCode, muBanLeiXing.value, fuJiMuBanShuJu.value.currentPage, fuJiMuBanShuJu.value.total).then((res) => {
+    fuJiMuBanShuJu.value.data = res.records
+  })
 }
 
 // 删除模板
 const clickDeleteTemplate = (patternCode, index) => {
-    ElMessageBox.confirm('确定要删除该模板吗?', '提示', {
-        type: 'error',
-    }).then(() => {
-        deleteADoctorSOrderTemplate(patternCode).then((res) => {
-            fuJiMuBanShuJu.value.data.splice(index, 1)
-            muBanShuJu.value = []
-        })
-    }).catch((e) => {
+  ElMessageBox.confirm('确定要删除该模板吗?', '提示', {
+    type: 'error',
+  }).then(() => {
+    deleteADoctorSOrderTemplate(patternCode).then((res) => {
+      fuJiMuBanShuJu.value.data.splice(index, 1)
+      muBanShuJu.value = []
     })
+  }).catch((e) => {
+  })
 }
 
 // 收藏模板
 const clickToFavoriteTemplates = ({inputId, patternCode}, index) => {
-    if (inputId === store.state.user.info.code) {
-        BizException(ExceptionEnum.MESSAGE_ERROR, "无法收藏自己创建的模板。")
-    }
-    collectDoctorSOrderTemplate(patternCode).then((res) => {
-        fuJiMuBanShuJu.value.data[index].yiBeiShouCang = !fuJiMuBanShuJu.value.data[index].yiBeiShouCang
-    });
+  if (inputId === store.state.user.info.code) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "无法收藏自己创建的模板。")
+  }
+  collectDoctorSOrderTemplate(patternCode).then((res) => {
+    fuJiMuBanShuJu.value.data[index].yiBeiShouCang = !fuJiMuBanShuJu.value.data[index].yiBeiShouCang
+  });
 }
 
 // 点击编辑模板
 const clickToEditTemplate = async (row) => {
-    await dianJiMuBanMing(row)
-    let temp = []
-    muBanShuJu.value.forEach(item => {
-        settingValue(item)
-        temp.push(item)
-        if (item.children) {
-            item.children.forEach(value => {
-                settingValue(value)
-                temp.push(value)
-            })
-        }
-    })
-    emit('edit-template', clone(temp))
-    muBanMing.value = dianJiFuJiXinXi.value
+  await dianJiMuBanMing(row)
+  let temp = []
+  muBanShuJu.value.forEach(item => {
+    settingValue(item)
+    temp.push(item)
+    if (item.children) {
+      item.children.forEach(value => {
+        settingValue(value)
+        temp.push(value)
+      })
+    }
+  })
+  emit('edit-template', clone(temp))
+  muBanMing.value = dianJiFuJiXinXi.value
 }
 
 const settingValue = (item) => {
-    item.startTime = startTime
-    item.orderTime = orderTime
-    if (stringNotBlank(frequCode.value)) {
-        item.frequCode = frequCode.value
-        item.frequCodeName = frequCodeName.value
-    }
+  item.startTime = startTime
+  item.orderTime = orderTime
+  if (stringNotBlank(frequCode.value)) {
+    item.frequCode = frequCode.value
+    item.frequCodeName = frequCodeName.value
+  }
 }
 
 // 获取选中的 医嘱数据
 const xuanZhongShuJu = ref([])
 
 const dianJiQueDing = () => {
-    xuanZhongShuJu.value = tableRef.value.getSelectionRows()
-    xuanZhongShuJu.value.forEach((item) => {
-        item.startTime = startTime
-        item.orderTime = orderTime
-        if (queryParam.value.frequCode === frequCodeEnum.temporary && item.frequCode !== 'ONCE') {
-            item.frequCode = 'ONCE'
-        } else if (queryParam.value.frequCode === frequCodeEnum.longTerm && item.frequCode === 'ONCE') {
-            item.frequCode = frequCodeEnum.always
-        }
-    })
-    emit('mu-ban-shu-ju', clone(xuanZhongShuJu.value))
+  xuanZhongShuJu.value = tableRef.value.getSelectionRows()
+  xuanZhongShuJu.value.forEach((item) => {
+    item.startTime = startTime
+    item.orderTime = orderTime
+    if (queryParam.value.frequCode === frequCodeEnum.temporary && item.frequCode !== 'ONCE') {
+      item.frequCode = 'ONCE'
+    } else if (queryParam.value.frequCode === frequCodeEnum.longTerm && item.frequCode === 'ONCE') {
+      item.frequCode = frequCodeEnum.always
+    }
+  })
+  emit('mu-ban-shu-ju', clone(xuanZhongShuJu.value))
 }
 
 const openTemplateByCode = (code) => {
-    dianJiMuBanMing({
-        patternCode: code
-    })
+  dianJiMuBanMing({
+    patternCode: code
+  })
 }
 
 // 时间限制
 // 医嘱限制时间不能在之前
 const disabledDate = (time) => {
-    return time.getTime() < Date.now() - 8.64e7
+  return time.getTime() < Date.now() - 8.64e7
 }
 
 // 获取评率
 const getFrequCodeName = async (val) => {
-    frequCodeName.value = val.name
+  frequCodeName.value = val.name
 }
 
 const pinLvRemoteMethod = (val) => {
-    if (val.length > 1) {
-        huoQuZhuYuanPinLv(val).then((res) => {
-            yaoPinPingLvData.value = res
-        })
-    }
+  if (val.length > 1) {
+    huoQuZhuYuanPinLv(val).then((res) => {
+      yaoPinPingLvData.value = res
+    })
+  }
 }
 
 onMounted(() => {
-    dianJiChaXun()
+  dianJiChaXun()
 })
 
 const openOrCloseDialog = (val) => {
-    dialog.value = val
+  dialog.value = val
 }
 
 defineExpose({
-    openTemplateByCode,
-    openOrCloseDialog
+  openTemplateByCode,
+  openOrCloseDialog
 })
 </script>
 
 <style scoped>
 :deep(.el-table .children-row) {
-    background: rgba(145, 247, 145, 0.5);
+  background: rgba(145, 247, 145, 0.5);
 }
 
 :deep(.el-table) {
-    --el-table-row-hover-background-color: #85dbfd7a;
+  --el-table-row-hover-background-color: #85dbfd7a;
 }
 </style>

+ 6 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -307,6 +307,7 @@ import OutpatientAppointments
 import OneClickStop from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/OneClickStop.vue";
 import DoctorAuthorization
   from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/DoctorAuthorization.vue";
+import sleep from "@/utils/sleep";
 
 
 const props = defineProps({
@@ -786,7 +787,11 @@ const confirmOrdersClick = async () => {
       errorList.push('主任医生为空')
     }
     if (listNotBlank(errorList)) {
-      return xcMessage.error("按医务部要求:" + listToStr(errorList) + "无法确认医嘱。")
+      yzMitt.emit('upperDoctorSetting', huanZheXinXi.value)
+      sleep(200).then(() => {
+        xcMessage.error("按医务部要求:" + listToStr(errorList) + "无法确认医嘱。")
+      })
+      return
     }
     let res = await confirmOrders(props.patientInfo)
     if (res !== null && res.error) {

+ 27 - 0
src/utils/public.js

@@ -1,5 +1,6 @@
 import store from '@/store'
 import {stringIsBlank} from "@/utils/blank-utils";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 export function needRule(...val) {
     const userRoles = store.state.user.info.roles
@@ -76,3 +77,29 @@ export function compareVersion(version1, version2) {
     }
     return 0
 }
+
+
+export const encrypt = {
+    encrypt: (val) => {
+        if (stringIsBlank(val)) {
+            return "";
+        }
+        return encodeURI(JSON.stringify(val))
+    },
+    decrypt: (val) => {
+        if (stringIsBlank(val)) {
+            return "";
+        }
+        return JSON.parse(decodeURI(val))
+    }
+}
+
+export const copyStrFunc = (val) => {
+    let input = document.createElement('input')
+    document.body.appendChild(input);
+    input.value = val;
+    input.select();
+    document.execCommand("copy");
+    document.body.removeChild(input);
+    xcMessage.success("复制成功。")
+}

+ 68 - 37
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -454,6 +454,7 @@ import EmrAudit
 import EmrConnotation
   from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrConnotation.vue";
 import {save} from "@/api/zhu-yuan-yi-sheng/connotation-quality-control";
+import XEUtils from 'xe-utils'
 
 
 const props = defineProps({
@@ -795,10 +796,8 @@ const clickSaveData = async () => {
   }
   if (isDev) {
     save(data).then(res => {
-      console.log(res.data.data)
       ElMessage.warning(res.data.data)
     })
-    return
   }
 
   saveDialog.dialog = true
@@ -1085,12 +1084,58 @@ const getCurrentPersonnelInformation = (data) => {
 }
 
 const 入院病历 = 'ruyuanjiluzhuanyong'
+
+/**
+ * 判断是否可有编辑病历
+ * @returns {*}
+ */
+function generalMedicalRecords() {
+  if (whetherToEditFunc(createId)) {
+    editor.setEditorMode('free')
+  } else {
+    editor.setEditorMode('readonly')
+  }
+  // 如果创建人不是自己就要开启审阅
+  openTheTraceByUser(createId)
+}
+
+/**
+ *
+ * @param create 创建人
+ * @returns {boolean}
+ */
+function whetherToEditFunc(create) {
+  let currentCode = userData.code
+  if (emrConfig.value.editor) {
+    if (stringIsBlank(create)) {
+      return true
+    }
+    if (create === currentCode) {
+      return true;
+    }
+    // 科室质控员
+    if (departmentQualityController()) {
+      return true;
+    }
+    switch (doctorLevel) {
+      case 1:
+        return createId === userData.code
+      case 2:
+        // 二级医生不能改三级医生的
+        return createId !== extractFields('主任医生编码');
+      case 3:
+        return true
+    }
+    return false
+  } else {
+    return false
+  }
+}
+
 // 设置编辑器的模式
 const setEditorModeFun = () => {
   // 判断是不是编辑模式
   if (emrConfig.value.editor) {
-    // 设置成编辑模式
-    currentEmr.value.callMethod('setEditorMode', 'free')
     // 如果不是首次病程记录就需要执行下面的代码
     if (!isCourse()) {
       // 入院病历有点特殊,任何人都可以写补充诊断
@@ -1098,39 +1143,24 @@ const setEditorModeFun = () => {
         let EMR = editor.getScriptRuntime().EMR
         let emrDoc = EMR.getDocument()
         let areas = emrDoc.getNodesByCode(null, 'area')
-      } else {
-        // 如果创建人是空的就说明是第一次创建
-        if (createId === null) {
-          return currentEmr.value.callMethod('setEditorMode', 'free');
-        }
-        if (createId == userData.code) {
-          return currentEmr.value.callMethod('setEditorMode', 'free');
-        }
-        // 科室质控员
-        if (departmentQualityController()) {
-          currentEmr.value.callMethod('setEditorMode', 'free');
-          openTheTraceByUser(createId)
-          return
+        // 如果没有数据说明的历史数据历史数据就不能用下面的逻辑
+        if (XEUtils.isArray(areas)) {
+          let edit = whetherToEditFunc(createId)
+          XEUtils.arrayEach(areas, (item, key) => {
+            if (edit) {
+              item.target.setReadonly(false)
+              item.target.setDeletable(false)
+            } else {
+              item.target.setReadonly(true)
+              item.target.setDeletable(false)
+            }
+          })
+        } else {
+          generalMedicalRecords()
         }
 
-        // 创建人不是自己就只能看
-        if (doctorLevel === 1 && createId !== userData.code) {
-          currentEmr.value.callMethod('setEditorMode', 'readonly');
-        }
-        if (doctorLevel === 2) {
-          // 不能修改三级医生写的病历
-          if (createId === extractFields('主任医生编码')) {
-            currentEmr.value.callMethod('setEditorMode', 'readonly');
-          } else {
-            currentEmr.value.callMethod('setEditorMode', 'free');
-          }
-        }
-        // 医生等级 3 没有限制
-        if (doctorLevel === 3) {
-          currentEmr.value.callMethod('setEditorMode', 'free');
-        }
-        // 如果创建人不是自己就要开启审阅
-        openTheTraceByUser(createId)
+      } else {
+        generalMedicalRecords()
       }
     }
   } else {
@@ -1143,6 +1173,9 @@ const setEditorModeFun = () => {
  * @param editorCode
  */
 const openTheTraceByUser = (editorCode) => {
+  if (readonlyPattern() || stringIsBlank(createId)) {
+    return
+  }
   if (editorCode === userData.code) {
     editor.setRevisionMode('off')
   } else {
@@ -1190,7 +1223,6 @@ const courseSegmentLocking = async () => {
         pushData.trueCreationTime = fragment?.creationTime
       }
       courseTitles.push(pushData);
-
       if (emrConfig.value.editor) {
         let editorCode = value['编辑者']?.value[0]?.code;
         if (editorCode) {
@@ -1218,7 +1250,6 @@ const courseSegmentLocking = async () => {
             } else {
               node.view.setReadonly(false);
               node.view.setDeletable(false);
-
             }
           } else if (doctorLevel === 3) {
             node.view.setReadonly(false);

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

@@ -137,6 +137,7 @@ const dianJiaJianChaXiangQing = (row) => {
   huoQuShengQingXiangQing(row.reqNo).then((res) => {
     daYingJianChaRef.value.fillData(res)
     mainTabs.value = 0
+    console.log(res)
   })
 
   queryCheckTextResults(row.inpatientNo, row.reqNo).then((res) => {

+ 4 - 70
src/views/settings/Test.vue

@@ -1,78 +1,12 @@
 <template>
-  <el-button @click="te">测试</el-button>
-  <print-check-table ref="printCheck"/>
+  <fluorescence-test pat-no="0403883" :times="3"/>
+
 </template>
 
 <script setup>
-import PrintCheckTable from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckTable.vue";
-import {getLodop, initLodop} from "@/utils/c-lodop";
-
-let data = {
-  "mattersNeedingAttention": "",
-  "data": {
-    "reqNo": 5563470,
-    "inpatientNo": "0403883",
-    "admissTimes": 3,
-    "bedNo": "-06",
-    "groupName": "中晚孕常规检查(单胎)",
-    "actOrderNo": 17648200,
-    "orderCode": "09634",
-    "orderName": "中晚孕常规检查(单胎)",
-    "pageNo": "5563470",
-    "reqComment": "噶啥的",
-    "reqDoctor": "02896",
-    "reqDoctorName": "肖蟾",
-    "reqDept": "8000007",
-    "reqDeptName": "七病室",
-    "reqWard": "8000007",
-    "execDept": "2020300",
-    "execDeptName": null,
-    "reqDate": "2023-06-02 19:48:02",
-    "inspectPart": null,
-    "inspectStuff": null,
-    "inspectStuffName": "测试标本名称,已实际为准。",
-    "sampleStatus": null,
-    "printFlag": null,
-    "receiveFlag": "1",
-    "reqType": "3",
-    "resultComment": null,
-    "sysDate": "2023-06-02 19:48:02",
-    "startTime": "2023-06-02 19:47:50",
-    "diagText": "埃尔托生物型霍乱",
-    "diagCode": "A00.100x001",
-    "orderType": "02",
-    "reportNo": null,
-    "jzFlag": null,
-    "reqStudyid": null,
-    "reqTzComment": "法撒旦",
-    "reqOtherResult": "法撒旦",
-    "receiveJc": null,
-    "sex": 2,
-    "homeStreet": "落刀嘴118号广福园5栋2单元203房  ",
-    "homeTel": "18008466033     ",
-    "responceTypeName": "普通住院",
-    "ybSelfFlag": null,
-    "confirmId": null,
-    "confirmFlag": null,
-    "classes": "00",
-    "page": "53岁",
-    "pbarCode": null,
-    "pname": "梁建",
-    "receiveFlagName": "申请医技"
-  },
-  "title": "病理检验申请单"
-}
-
-const printCheck = ref(null)
-
-onMounted(async () => {
-  initLodop()
-})
-
+import FluorescenceTest
+  from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/fluorescence-test/FluorescenceTest.vue";
 
-const te = async () => {
-  await printCheck.value.printClick(data)
-}
 
 </script>