Bladeren bron

检验检查限制

xiaochan 1 jaar geleden
bovenliggende
commit
5dd440f1d7

+ 4 - 1
src/components/xiao-chan/dialog/XcDialogV2.vue

@@ -45,7 +45,10 @@
   </div>
 </template>
 
-<script setup name='XcDialogV2'>
+<script setup lang="ts">
+import {ref, onMounted, watch, nextTick} from "vue";
+import {ElDialog, ElButton} from 'element-plus'
+
 const props = defineProps({
   modelValue: {
     type: Boolean,

+ 5 - 2
src/components/zhu-yuan-yi-sheng/YzTag.vue

@@ -14,9 +14,12 @@
 
 <script setup name="YzTag">
 import {
+  clearPatInfo,
   frequCodeEnum,
-  queryParam, tempYzData,
-  youWuXuanZheHuanZhe, yzData, yzMitt
+  queryParam,
+  tempYzData,
+  youWuXuanZheHuanZhe,
+  yzMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {getDrgIntelligentGrouping} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import router from "@/router";

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

@@ -29,20 +29,16 @@
           {{ rowData.orderName }}
         </el-form-item>
         <el-form-item label="检查所见:">
-          <el-input type="textarea" rows="5" v-model="record.checkWhatYouSee"/>
+          <el-input type="textarea" rows="5" readonly v-model="record.checkWhatYouSee"/>
         </el-form-item>
         <el-form-item label="诊断意见:">
-          <el-input type="textarea" rows="5" v-model="record.diagnosticOpinion"/>
-        </el-form-item>
-        <el-form-item label="复制如下内容:">
-          <el-input type="textarea" rows="5" v-model="record.diagnosticOpinionTemp"/>
+          <el-input type="textarea" rows="5" readonly v-model="record.diagnosticOpinion"/>
         </el-form-item>
         <el-form-item label="">
           <el-button type="primary"
                      @click="copyClick">
             复制
           </el-button>
-          点击后,上方文本框,上方可以打字进行补充。
         </el-form-item>
         <el-form-item label="">
           <el-button type="primary"

+ 7 - 2
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianYan.vue

@@ -85,7 +85,7 @@ import {
   cuoWuXinXi,
   huanZheXinXi,
   jsQueryYzData,
-  jyExtraInformation,
+  jyExtraInformation, jyJcRestriction,
   xuanZhongJianYan, yzMitt, yzSize
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
 import {getServerDateApi, yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
@@ -263,6 +263,7 @@ const nodeClick = async (val) => {
   if (val.code.length < 5) {
     BizException(ExceptionEnum.LOGICAL_ERROR, '无法添加目录')
   }
+  jyJcRestriction(val)
   let temp = {
     classes: val.classes,
     orderType: "",
@@ -276,7 +277,11 @@ const nodeClick = async (val) => {
     checkFlag: "0",
     jzFlag: 0,
     ybSelfFlag: 0,
-    note: val.note
+    note: val.note,
+    collectionInfo: val.ccollectionInfo,
+    genderRestriction: val.genderRestriction,
+    minAgeRestriction: val.minAgeRestriction,
+    maxAgeRestriction: val.maxAgeRestriction
   };
   if (xuanZhongJianYan.value.weiBianMa.indexOf(temp.orderCode) > -1) {
     xcMessage.error('请勿重复添加。')

+ 9 - 7
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication.vue

@@ -16,7 +16,7 @@
   </div>
 </template>
 
-<script setup name='NewApplication'>
+<script setup lang="ts">
 import {ref} from "vue";
 import {
   getTemplateGrouping,
@@ -26,7 +26,7 @@ import JyJcTree from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJ
 import {ElMessageBox} from "element-plus";
 import store from "@/store";
 import {
-  addJcCheck,
+  addJcCheck, AddJcParams,
   yzSize,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import JcJyTemplate
@@ -38,11 +38,9 @@ const props = defineProps({
 
 const config = {value: 'code', label: 'name', children: 'children'}
 
-
 const chaZhaoLeiXing = ref(1)
 const templateData = ref([])
 
-
 const rowClick = (data) => {
   if (data.isTheParentNode === '2') {
     addJcCheck(data)
@@ -57,15 +55,19 @@ const dianJiLeiXingChaXun = () => {
   }
 }
 
-const nodeClick = (data) => {
-  let temp = {
+const nodeClick = (data: any) => {
+  let temp: AddJcParams = {
     execDept: data.execUnit,
     execDeptName: data.execUnitName,
     orderCode: data.code,
     orderName: data.name,
     orderType: data.classes,
     isTheParentNode: '2',
-    note: data.note
+    note: data.note,
+    collectionInfo: data.collectionInfo,
+    genderRestriction: data.genderRestriction,
+    minAgeRestriction: data.minAgeRestriction,
+    maxAgeRestriction: data.maxAgeRestriction
   }
   rowClick(temp)
 }

+ 2 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue

@@ -21,10 +21,11 @@
   </el-tree>
 </template>
 
-<script setup name='JyJcTree' lang="ts">
+<script setup lang="ts">
 import {jcTree, jyTree} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {Ref, ref, watch} from "vue";
 import {ElTree} from "element-plus";
+import {Document, FolderOpened} from "@element-plus/icons-vue";
 
 const props = defineProps({
   yjyc: {

+ 0 - 1
src/main.js

@@ -37,7 +37,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 
 VXETable.config({
     version: 0,
-    // zIndex: 99999,
     table: {
         autoResize: true
     }

+ 29 - 0
src/utils/copmToJs/useCompToJs.ts

@@ -0,0 +1,29 @@
+import {createVNode, render, Component, DefineComponent} from 'vue';
+import {app} from '../../main.js'
+
+type PropsType<T> = T extends DefineComponent<infer P, infer E> ? E : Record<string, any>;
+
+
+/**
+ * 这个只适用 el-dialog 且必须发出 closed 事件
+ * @param comp 组件
+ * @param compData 组件props
+ */
+const useCompToJs = <T extends Component>(comp: T, compData: PropsType<T>) => {
+    return new Promise<any>(resolve => {
+        const div = document.createElement('div')
+        document.body.appendChild(div)
+
+        const data = {
+            onClosed: (...val) => {
+                div.remove()
+                resolve(val)
+            },
+            ...compData
+        }
+        const vNode = createVNode(comp, data, null)
+        render(vNode, div)
+    })
+}
+
+export default useCompToJs

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

@@ -20,12 +20,12 @@
       <el-button icon="Check" type="primary" @click="saveTemplate"
                  :disabled="addCheckList.length ===0">存为模板
       </el-button>
-      搜索:
-      <xc-combo-grid :query-data-func="getJcItem" @rowClick="searchAdd">
-        <el-table-column label="编码" prop="code"/>
-        <el-table-column width="240" label="名称" prop="name"/>
-        <el-table-column label="执行科室" prop="execUnitName"/>
-      </xc-combo-grid>
+      <!--      搜索:-->
+      <!--      <xc-combo-grid :query-data-func="getJcItem" @rowClick="searchAdd">-->
+      <!--        <el-table-column label="编码" prop="code"/>-->
+      <!--        <el-table-column width="240" label="名称" prop="name"/>-->
+      <!--        <el-table-column label="执行科室" prop="execUnitName"/>-->
+      <!--      </xc-combo-grid>-->
     </el-header>
 
     <el-main>
@@ -74,7 +74,6 @@
 
 <script setup>
 import {
-  addJcCheck,
   addCheckList,
   cuoWuXinXi,
   huanZheXinXi,
@@ -86,7 +85,6 @@ import {
 import {computed, ref} from 'vue'
 import {
   baoCunJianYanJianCha,
-  getJcItem,
   huoQuJianChaShenQing,
   huoQuShengQingXiangQing,
   queryCheckTextResults,
@@ -103,7 +101,6 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {yaoPinXiangMuPiPeiYiBao} from "@/api/public-api";
 import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
 import JianChaJieGuo from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/JianChaJieGuo.vue";
-import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
 import {getWindowSize} from "@/utils/window-size";
 import JianChaJianYanTable
   from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
@@ -142,7 +139,6 @@ const dianJiChaXunHuanZheJianCha = () => {
   huoQuJianChaShenQing(param).then((res) => {
     jianChaShuJu.value = res
   })
-
   jieGuoRefV2.value.queryData()
 }
 
@@ -259,16 +255,16 @@ const deleteRequest = (index) => {
   addCheckList.value.splice(index, 1)
 }
 
-const searchAdd = (data) => {
-  let temp = {
-    execDept: data.execUnit,
-    execDeptName: data.execUnitName,
-    orderCode: data.code,
-    orderName: data.name,
-    note: data.note
-  }
-  addJcCheck(temp);
-}
+// const searchAdd = (data) => {
+//   let temp  = {
+//     execDept: data.execUnit,
+//     execDeptName: data.execUnitName,
+//     orderCode: data.code,
+//     orderName: data.name,
+//     note: data.note
+//   }
+//   addJcCheck(temp);
+// }
 
 function imageClick() {
   if (youWuXuanZheHuanZhe()) return

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

@@ -19,13 +19,13 @@
     <el-button @click="yzMitt.emit('jySaveTemplate')" icon="Check" type="primary">存为模板</el-button>
     <CuoWuXinXiVue/>
     <el-button icon="View" type="primary" @click="dianJiChaKanHuanZheJianYan">查看患者检验</el-button>
-    检验搜索查询:
-    <xc-combo-grid :query-data-func="getJyItem" @rowClick="searchAdd">
-      <el-table-column label="编码" prop="code"/>
-      <el-table-column width="240" label="名称" prop="name"/>
-      <el-table-column label="标本" prop="inspectStuffName"/>
-      <el-table-column label="执行科室" prop="execUnitName"/>
-    </xc-combo-grid>
+<!--    检验搜索查询:-->
+<!--    <xc-combo-grid :query-data-func="getJyItem" @rowClick="searchAdd">-->
+<!--      <el-table-column label="编码" prop="code"/>-->
+<!--      <el-table-column width="240" label="名称" prop="name"/>-->
+<!--      <el-table-column label="标本" prop="inspectStuffName"/>-->
+<!--      <el-table-column label="执行科室" prop="execUnitName"/>-->
+<!--    </xc-combo-grid>-->
   </div>
 
   <!--  这里是打印病理检验申请单的   -->

+ 10 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue

@@ -3,6 +3,7 @@ import {getTemplateByCodeAndType} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-ch
 import {getWindowSize} from "@/utils/window-size";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
 import XEUtils from 'xe-utils'
+import {jyJcRestriction} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 
 const {isCheck, data} = defineProps({
   isCheck: {
@@ -27,13 +28,6 @@ const cellClick = ({row}) => {
   })
 }
 
-const tempClick = (val) => {
-  let {row, column} = val
-  if (column.type !== 'checkbox') {
-    vxeTableRef.value.toggleCheckboxRow(row);
-  }
-}
-
 const confirm = () => {
   let temp = vxeTableRef.value.getCheckboxRecords()
   if (XEUtils.isEmpty(temp)) {
@@ -42,6 +36,13 @@ const confirm = () => {
   selectAll(temp)
 }
 
+const checkboxConfig = reactive({
+  labelField: 'name',
+  checkMethod: ({row}) => {
+    return jyJcRestriction(row, false)
+  },
+})
+
 const selectAll = (data) => {
   if (data) {
     data.forEach(item => {
@@ -78,18 +79,16 @@ const selectAll = (data) => {
                :height="getWindowSize.h - 400"
                style="width: 100%"
                border
+               :checkbox-config="checkboxConfig"
                ref="vxeTableRef"
                :scroll-x="{gt: 0,enabled: false}"
                :scroll-y="{gt: 0 ,enabled: true}"
-               @cell-click="tempClick"
                :column-config="{resizable: true}"
                :row-config="{height: 24}"
                class="vxe-header-max_content vxe-scroll_15"
                show-header-overflow
                show-overflow>
-      <vxe-column type="checkbox" width="60">
-      </vxe-column>
-      <vxe-column field="name" title="名称"/>
+      <vxe-column type="checkbox" title="名称"/>
     </vxe-table>
 
     <template #footer>

+ 8 - 28
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue

@@ -104,40 +104,20 @@ const showStartTime = () => {
   return userInfo.value.deptCode === '1160000' || userInfo.value.deptCode === '3100000'
 }
 
-declare type  ExamineIllustrate = {
-  note: string,
-  collectionInfo: string
-}
-
-const examineIllustrate = new Map<string, ExamineIllustrate>();
-
-function explanationClick(value: { orderCode: string }) {
-  function messageBox(data: ExamineIllustrate) {
-    const message = `注意事项:${data.note || ''}<br/><br/>采集说明:${data.collectionInfo || ''}。`;
-    CyMessageBox.confirm({
-      type: 'info',
-      title: '说明',
-      message,
-      dangerouslyUseHTMLString: true,
-    })
-  }
-
-  if (examineIllustrate.has(value.orderCode)) {
-    messageBox(examineIllustrate.get(value.orderCode))
-  } else {
-    getExamineIllustrate(value.orderCode, props.isCheck).then(res => {
-      examineIllustrate.set(value.orderCode, res)
-      messageBox(res)
-    })
-  }
+function explanationClick({note, collectionInfo}) {
+  const message = `注意事项:${note || ''}<br/><br/>采集说明:${collectionInfo || ''}。`;
+  CyMessageBox.confirm({
+    type: 'info',
+    title: '说明',
+    message,
+    dangerouslyUseHTMLString: true,
+  })
 }
 
-
 onMounted(() => {
   watch(() => data.value.length, () => {
     if (data.value.length === 0) {
       feeListMap.value = {}
-      examineIllustrate.clear()
     }
   })
 })

+ 68 - 6
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -26,7 +26,10 @@ export interface PatInfo {
     consultPhysician?: string
     deptDirector?: string
     zkWard?: string
-    zkWardName?: string
+    zkWardName?: string,
+    sex?: number
+    age?: number
+    admissWard?: string
 }
 
 // 患者信息
@@ -46,6 +49,26 @@ export const huanZheXinXi = ref<PatInfo>({
     inpatientNo: null,
     admissDate: ''
 })
+
+export function clearPatInfo() {
+    huanZheXinXi.value = {
+        zkWardName: "",
+        zkWard: "",
+        consultPhysician: "",
+        deptDirector: "",
+        referPhysician: "",
+        groupInfoBl: "",
+        groupInfoFeeStand: "",
+        groupInfoName: "",
+        groupInfoWeight: "",
+        setGroupInfoProfit: "",
+        ledgerSn: 0,
+        admissTimes: 0,
+        inpatientNo: null,
+        admissDate: ''
+    }
+}
+
 // 是否点击了修改整个模板
 export const muBanMing = ref({})
 // 错误信息
@@ -667,6 +690,7 @@ export const xuanZhongJianYan = ref({
     daiXuanZhong: [],
 })
 
+
 // 检验树状图
 export const jyTree = ref([])
 // 检查树状图
@@ -711,11 +735,9 @@ export function clickTimeLimitReminder() {
 export const clickOnThePatient = async (patNo: string) => {
     switchPatients();
     huanZheXinXi.value = await getPatientInfo(patNo) as any;
-
     changePatientHook.forEach(item => {
         item()
     })
-
     getDrgPatInfo(huanZheXinXi.value).then(res => {
         if (res != null) {
             huanZheXinXi.value.groupInfoName = res['name']
@@ -727,7 +749,7 @@ export const clickOnThePatient = async (patNo: string) => {
     })
     if (yzMitt.exists('queryYz')) {
         await nextTick();
-        yzMitt.emit('queryYz');
+        await yzMitt.emit('queryYz');
     } else {
         await jsQueryYzData();
     }
@@ -770,6 +792,12 @@ const switchPatients = (): boolean => {
     }
 
     if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
+        addCheckList.value = []
+        xuanZhongJianYan.value = {
+            data: [],
+            weiBianMa: [],
+            daiXuanZhong: [],
+        }
         return true
     } else {
         if (stringNotBlank(str)) {
@@ -832,14 +860,48 @@ export let tableHeader = [
     {label: '药房', prop: 'groupName'},
 ]
 
-export const addJcCheck = async (data) => {
+export declare type AddJcParams = {
+    execDept: string,
+    execDeptName: string,
+    orderCode: string,
+    orderName: string,
+    note: string,
+    collectionInfo: string;
+    genderRestriction: number;
+    minAgeRestriction: number;
+    maxAgeRestriction: number;
+    startTime?: string
+}
+
+export const jyJcRestriction = (data: AddJcParams, error: boolean = true) => {
+    if (stringNotBlank(huanZheXinXi.value.inpatientNo)) {
+        if (data.genderRestriction && data.genderRestriction !== huanZheXinXi.value.sex) {
+            error && BizException(ExceptionEnum.MESSAGE_ERROR, '患者性别不允许开此项目。')
+            return false
+        }
+
+        if (data.minAgeRestriction && data.minAgeRestriction > huanZheXinXi.value.age) {
+            error && BizException(ExceptionEnum.MESSAGE_ERROR, "项目最小年龄限制" + data.minAgeRestriction + "岁,患者年龄不符合。")
+            return false
+        }
+
+        if (data.maxAgeRestriction && data.maxAgeRestriction < huanZheXinXi.value.age) {
+            error && BizException(ExceptionEnum.MESSAGE_ERROR, "项目最大年龄限制" + data.maxAgeRestriction + "岁,患者年龄不符合。")
+            return false
+        }
+    }
+    return true
+}
+
+export const addJcCheck = async (data: AddJcParams) => {
     let temp = addCheckList.value.findIndex(item => {
         return item.orderCode === data.orderCode
     })
     if (temp > -1) {
         BizException(ExceptionEnum.MESSAGE_ERROR, '请勿重复添加。')
     }
-    data.startTime = await getServerDateApi()
+    jyJcRestriction(data)
+    data.startTime = await getServerDateApi();
     addCheckList.value.push(data)
 }