Quellcode durchsuchen

Merge branch 'master' of https://172.16.32.165/lighter/vue-intergration-platform

lighter vor 2 Jahren
Ursprung
Commit
779d69a019

+ 11 - 3
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -1,6 +1,5 @@
 import request from '@/utils/request'
 
-
 const url = '/yiZhuLuRu'
 
 // 下面是 api 请求
@@ -120,14 +119,14 @@ export function huoQuFeiYongXinXi(queryCode) {
 
 export function getFrequency() {
     return request({
-        url: url + '/getFrequency',
+        url: '/yiZhuLuRu/getFrequency',
         method: 'get',
     })
 }
 
 export function getSupplyType() {
     return request({
-        url: url + '/getSupplyType',
+        url: '/yiZhuLuRu/getSupplyType',
         method: 'get',
     })
 }
@@ -270,3 +269,12 @@ export function oneClickStopOrder(data) {
         data
     })
 }
+
+export function doctorAuthorizationLogin(data) {
+    return request({
+        url: url + '/doctorAuthorizationLogin',
+        method: 'post',
+        data
+    })
+}
+

+ 2 - 2
src/components/xiao-chan/dialog/XcDialogV2.vue

@@ -38,10 +38,10 @@
 
       <template #footer>
         <slot name="footer"/>
-        <div v-if="props.showButton">
+        <template v-if="props.showButton">
           <el-button @click="emit('cancel')" type="danger">取消</el-button>
           <el-button @click="emit('confirm')" type="primary">{{ props.confirmText }}</el-button>
-        </div>
+        </template>
       </template>
     </el-dialog>
   </div>

+ 1 - 1
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -3,7 +3,7 @@
     <div @click="collapseChange"
          style="padding-left: 30px;cursor: pointer;border-bottom: 1px solid #000">
       {{ titleName() }}
-      当前登录账号:{{userInfo.codeRs}} 姓名:{{ userInfo.name}}
+      当前登录账号:{{ userInfo.codeRs }} 姓名:{{ userInfo.name }}
     </div>
     <div v-show="collapse">
       <div class="box">

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

@@ -180,12 +180,14 @@ 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 LODOP = getLodop()
-  LODOP.PRINT_INIT('检查检验申请单')
-  LODOP.SET_PRINT_PAGESIZE(0, 0, 0, 'A5')
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true)
+  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_MODE("PRINT_START_PAGE", 1);
+  LODOP.SET_PRINT_MODE("PRINT_END_PAGE", 1);
   LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', html)
-  LODOP.PREVIEW()
+  LODOP.PREVIEW();
 }
 
 const fillData = (data) => {

+ 6 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/EmrControlRuleDialog.vue

@@ -27,6 +27,7 @@ import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
 import {myPatientQualityControl} from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
 import RuleSift
   from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleSift.vue";
+import {isDev} from "@/utils/public";
 
 
 const patientList = ref([])
@@ -36,6 +37,10 @@ const dialog = ref(false)
 
 onMounted(() => {
 
+  if (isDev) {
+    return
+  }
+
   myPatientQualityControl().then((res) => {
 
     patientList.value = res.timeQualityControl.details
@@ -45,7 +50,7 @@ onMounted(() => {
       dialog.value = true
     }
 
-  })
+  });
 
 })
 

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

@@ -12,7 +12,8 @@
       <el-divider direction="vertical"/>
       <button @click="copyClick" title="复制当前工作台的医嘱,并粘贴到工作台中">复制</button>
       <button @click="pasteClick" :disabled="copyOrderNo.actOrderNo === null"
-              title="复制当前工作台的医嘱,并粘贴到工作台中">粘贴
+              title="复制当前工作台的医嘱,并粘贴到工作台中">
+        粘贴
       </button>
       <el-divider direction="vertical"/>
       <button @click="duplicateAndPaste" title="复制当前工作台的医嘱,并粘贴到工作台中">复制并粘贴</button>
@@ -21,6 +22,7 @@
       </button>
       <outpatient-appointments/>
       <one-click-stop/>
+      <doctor-authorization/>
     </div>
     <div class="editing_area"
          :style="{color: isEdit ? '#0014fc' : ''}">
@@ -303,6 +305,8 @@ import {xcMessage} from "@/utils/xiaochan-element-plus";
 import OutpatientAppointments
   from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/OutpatientAppointments.vue";
 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";
 
 
 const props = defineProps({
@@ -359,10 +363,17 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   let newData = yiZhuData.value.statusFlag === '1'
   if (row.serial === '01' || row.serial === '99') {
     try {
-      let queryKey = row.orderCode + '_' + row.serial + '_' + props.patientInfo.zkWard + '_' + queryParam.value.groupNo
+      let queryKey = row.orderCode + '_' + row.serial + '_' + props.patientInfo.zkWard + '_' + queryParam.value.groupNo + "_" + yiZhuData.value.superiorDoctor
       let res = await huoQuFeiYongXinXi(queryKey)
+
+      if (res.permissionPrompt) {
+        let authorization = await yzMitt.emit('openDoctorAuthoriztion', row.orderCode + '_' + row.serial)
+        yiZhuData.value.superiorDoctor = authorization.code
+        yiZhuData.value.instruction = `由【${authorization.name}】医生授权。`
+      }
+
       // 加载药品计量
-      yaoPinJiLiangData.value = res.yaoPingJiLiang
+      yaoPinJiLiangData.value = res.yaoPingJiLiang;
       if (newData) {
         // 判断是否 是皮试的药 如果是就只能有这些 给药方式
         // geiYaoFangShiData.value = res.piShi
@@ -370,7 +381,6 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
         yiZhuData.value.kjywFlag = res.data.kjywFlag
         // 提示信息
         tiShiBiaoTi.value = res.prompt
-
         // 最小单位名称
         if (laiyuan === 1) {
           yiZhuData.value.miniUnit = res.data.packUnit;
@@ -416,14 +426,14 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
       openTheOrderPopUpWindow()
     } catch (e) {
       if (yiZhuData.value.statusFlag === '1') {
-        await Sleep(200)
-        qingKong()
+        await Sleep(200);
+        qingKong();
       }
     }
   } else {
     yiZhuData.value.kjywFlag = 0
     try {
-      let queryKey = row.orderCode + '_' + '00' + '_' + props.patientInfo.zkWard + '_' + queryParam.value.groupNo
+      let queryKey = row.orderCode + '_' + '00' + '_' + props.patientInfo.zkWard + '_' + queryParam.value.groupNo + "_" + yiZhuData.value.superiorDoctor
       let res = await huoQuFeiYongXinXi(queryKey)
       if (newData) {
         openTheOrderPopUpWindow('请输入处置医嘱名')
@@ -730,7 +740,7 @@ const toAddAnOrder = async () => {
     admissTimes: props.patientInfo.admissTimes,
     actOrderNo: yiZhuData.value.actOrderNo,
     groupNo: queryParam.value.groupNo,
-    data: yiZhuData.value
+    data: yiZhuData.value,
   }
   try {
     let res = await enterOrders(param)

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

@@ -762,14 +762,18 @@ const clickSaveData = async () => {
   if (readonlyPattern()) {
     BizException(ExceptionEnum.MESSAGE_ERROR, "当前为只读模式,无法保存病历。");
   }
+  editor = currentEmr.value.getEditor()
   if (editor === null) return
   waitForLoadingToComplete()
   // 判断是否有必填项目
-  let validator = editor.getValidator();
-  let valid = validator.valid();
+  try {
+    let validator = editor.getValidator();
+    let valid = validator.valid();
 
-  if (valid) {
-    BizException(ExceptionEnum.MESSAGE_ERROR, "有必填项不能为空,请仔细检查,红色输入框.")
+    if (valid) {
+      BizException(ExceptionEnum.MESSAGE_ERROR, "有必填项不能为空,请仔细检查,红色输入框.")
+    }
+  } catch {
   }
   // 解析 id
   await analysisIframeSrcSearch()
@@ -784,12 +788,11 @@ const clickSaveData = async () => {
     parent: parent
   }
 
-  objectValuesCannotBeNull(data);
   data.emrDataElement = editor.getDataElements('business')
+  objectValuesCannotBeNull(data);
   if (categoryCode === emrCodeEnum.courseRecord) {
     templateName = '病程记录'
   }
-
   if (isDev) {
     save(data).then(res => {
       console.log(res.data.data)

+ 1 - 5
src/views/hospitalization/zhu-yuan-yi-sheng/level3-doctor-setup/Level3DoctorSetup.vue

@@ -11,7 +11,6 @@ import {updateDoctor} from "@/api/zhu-yuan-yi-sheng/level3-doctor-setup";
 
 const currentWard = ref('')
 const wardList = ref([])
-
 const patInfoList = ref([])
 const personnelAll = ref([])
 
@@ -49,6 +48,7 @@ const saveClick = () => {
   updateDoctor(tempData).then(() => {
     updateData.clear()
   })
+
 }
 
 
@@ -139,7 +139,3 @@ onMounted(() => {
     </el-main>
   </el-container>
 </template>
-
-<style scoped lang="scss">
-
-</style>

+ 1 - 9
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -10,6 +10,7 @@ import {isDev} from "@/utils/public";
 import {getFrequency, getSupplyType, huoQuYiZhuShuJu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import EventBus from "@/utils/mitt";
 import {hzMitt, hzMittEnum} from "@/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/hui-zhen";
+import {useLocalStorage} from "@vueuse/core";
 
 // 患者信息
 export const huanZheXinXi = ref({})
@@ -25,14 +26,6 @@ export const geiYaoFangShiData = ref([])
 // 频率
 export const yaoPinPingLvData = ref([])
 
-getSupplyType().then(res => {
-    geiYaoFangShiData.value = res
-})
-getFrequency().then(res => {
-    yaoPinPingLvData.value = res
-})
-
-
 export function youWuXuanZheHuanZhe() {
     if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
         ElMessage({
@@ -408,4 +401,3 @@ export const addJcCheck = async (data) => {
 
 
 export const yzMitt = new EventBus();
-

+ 8 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -77,7 +77,7 @@
 
 <script name="YiZhuLuRuZhuJian" setup>
 import {
-  associateOrdersApi, deleteMultipleOrders, huoQuYiZhuShuJu,
+  associateOrdersApi, deleteMultipleOrders, getFrequency, getSupplyType, huoQuYiZhuShuJu,
   insertTemplateOrder,
   stopOrder, voidOrders,
 } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
@@ -89,7 +89,7 @@ import {
   clickOnThePatient,
   drugManual,
   associateOrders,
-  clearAssociate, youWuXuanZheHuanZhe, yzData, errorMsg, yzMitt, jsQueryYzData
+  clearAssociate, youWuXuanZheHuanZhe, yzData, errorMsg, yzMitt, jsQueryYzData, geiYaoFangShiData, yaoPinPingLvData
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {listIsBlank, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
@@ -497,6 +497,12 @@ const batchDeleteOrdersClick = () => {
 }
 
 onMounted(async () => {
+  getSupplyType().then(res => {
+    geiYaoFangShiData.value = res
+  })
+  getFrequency().then(res => {
+    yaoPinPingLvData.value = res
+  })
   await sleep(200)
   zkList.value = await getTheTransferList()
 })

+ 89 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/DoctorAuthorization.vue

@@ -0,0 +1,89 @@
+<script setup name='DoctorAuthorization'>
+// 医生开医嘱可能有些没有权限通过这种登录方式进行授权
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+import {doctorAuthorizationLogin} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import {yzMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+
+const dialog = ref(false)
+const cancel = (flag = true) => {
+  dialog.value = false
+  if (flag) {
+    cancelReject();
+  }
+  clear()
+}
+
+const param = ref({
+  codeRs: '',
+  code: '',
+  password: '',
+  name: '',
+  drugCode: ''
+})
+
+const confirm = () => {
+  doctorAuthorizationLogin(param.value).then((res) => {
+    xcMessage.success('授权成功。')
+    next(res)
+    cancel(false)
+  })
+}
+
+const clear = () => {
+  param.value = {
+    codeRs: '',
+    code: '',
+    password: '',
+    name: '',
+    drugCode: ''
+  }
+}
+
+let next = null
+let cancelReject = null
+
+onMounted(() => {
+  yzMitt.on('openDoctorAuthoriztion', (drugCode) => {
+    param.value.drugCode = drugCode
+    dialog.value = true
+    return new Promise((resolve, reject) => {
+      next = resolve
+      cancelReject = reject
+    })
+  })
+})
+
+</script>
+
+<template>
+  <xc-dialog-v2 v-model="dialog"
+                title="医生授权"
+                show-button
+                @closed="cancel"
+                @confirm="confirm"
+                @cancel="cancel">
+
+    <el-alert type="warning">
+      药品分为限制等级,可通过上级医生授权的方式开出大于自身等级的药品,输入上级医生的工号和密码后,点击确认即可。
+    </el-alert>
+    <hr>
+    <el-form>
+
+      <el-form-item label="工号:">
+        <el-input v-model="param.codeRs"/>
+      </el-form-item>
+
+      <el-form-item label="密码:">
+        <el-input v-model="param.password" type="password"/>
+      </el-form-item>
+
+    </el-form>
+
+  </xc-dialog-v2>
+
+</template>
+
+<style scoped lang="scss">
+
+</style>