소스 검색

填写主手术时做分值推荐

lighter 3 년 전
부모
커밋
a9329bc72e
2개의 변경된 파일106개의 추가작업 그리고 72개의 파일을 삭제
  1. 35 27
      src/api/case-front-sheet/index.js
  2. 71 45
      src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

+ 35 - 27
src/api/case-front-sheet/index.js

@@ -1,17 +1,17 @@
-import request from '../../utils/request';
+import request from '../../utils/request'
 
 export function getAllDictionary() {
   return request({
     url: '/caseFrontSheet/getAllDictionary',
     method: 'get',
-  });
+  })
 }
 
 export function getUserWards() {
   return request({
     url: '/caseFrontSheet/getUserWards',
     method: 'get',
-  });
+  })
 }
 
 export function getPatientOverview(ward) {
@@ -19,7 +19,7 @@ export function getPatientOverview(ward) {
     url: '/caseFrontSheet/getPatientOverview',
     method: 'get',
     params: { ward },
-  });
+  })
 }
 
 export function getSheetInfo(data) {
@@ -27,7 +27,7 @@ export function getSheetInfo(data) {
     url: '/caseFrontSheet/getSheetInfo',
     method: 'post',
     data,
-  });
+  })
 }
 
 export function sheetSearch(data) {
@@ -35,7 +35,15 @@ export function sheetSearch(data) {
     url: '/sheetSearch/execute',
     method: 'post',
     data,
-  });
+  })
+}
+
+export function getSsfzSurgeriesByIcd(icd) {
+  return request({
+    url: '/sheetSearch/getSsfzSurgeriesByIcd',
+    method: 'get',
+    params: { icd },
+  })
 }
 
 export function executeSaveVerify(data) {
@@ -43,7 +51,7 @@ export function executeSaveVerify(data) {
     url: '/caseFrontSheet/saveVerify',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function executePrintVerify(data) {
@@ -51,7 +59,7 @@ export function executePrintVerify(data) {
     url: '/caseFrontSheet/printVerify',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function fetchOutPatients(data) {
@@ -59,7 +67,7 @@ export function fetchOutPatients(data) {
     url: '/caseFrontSheet/outPatients',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function fetchSsfz(code, bah, times) {
@@ -67,7 +75,7 @@ export function fetchSsfz(code, bah, times) {
     url: '/caseFrontSheet/fetchSsfz',
     method: 'get',
     params: { code, bah, times },
-  });
+  })
 }
 
 export function increaseDiagWeight(code) {
@@ -75,7 +83,7 @@ export function increaseDiagWeight(code) {
     url: '/caseFrontSheet/increaseDiagWeight',
     method: 'get',
     params: { code },
-  });
+  })
 }
 
 export function getYbDiags(bah, times) {
@@ -83,7 +91,7 @@ export function getYbDiags(bah, times) {
     url: '/caseFrontSheet/getYbDiags',
     method: 'get',
     params: { bah, times },
-  });
+  })
 }
 
 export function doSaveYbDiags(data) {
@@ -91,7 +99,7 @@ export function doSaveYbDiags(data) {
     url: '/caseFrontSheet/saveYbDiags',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function signApply(data) {
@@ -99,14 +107,14 @@ export function signApply(data) {
     url: '/caseFrontSheet/signApply',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function getAllWards() {
   return request({
     url: '/caseFrontSheet/getAllWards',
     method: 'get',
-  });
+  })
 }
 
 export function basOutPatients(data) {
@@ -114,7 +122,7 @@ export function basOutPatients(data) {
     url: '/caseFrontSheet/basOutPatients',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function executeUnArchiveBa(data) {
@@ -122,7 +130,7 @@ export function executeUnArchiveBa(data) {
     url: '/caseFrontSheet/unArchiveBa',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function executeAdvanceSearch(data) {
@@ -130,7 +138,7 @@ export function executeAdvanceSearch(data) {
     url: '/caseFrontSheet/advanceSearch',
     method: 'post',
     data: data,
-  });
+  })
 }
 
 export function analyzeDismissCount(data) {
@@ -138,14 +146,14 @@ export function analyzeDismissCount(data) {
     url: '/caseFrontSheet/analyzeDismissCount',
     method: 'post',
     data,
-  });
+  })
 }
 
 export function gethuiZhenLeiBie() {
   return request({
     url: '/huiZhenShenQing/huiZhenLeiBie',
     method: 'get',
-  });
+  })
 }
 
 export function queryDept(code) {
@@ -153,7 +161,7 @@ export function queryDept(code) {
     url: '/huiZhenShenQing/queryDept',
     method: 'get',
     params: { code },
-  });
+  })
 }
 
 export function submitHuiZhenShenQing(data) {
@@ -161,7 +169,7 @@ export function submitHuiZhenShenQing(data) {
     url: '/huiZhenShenQing/submitHuiZhenShenQing',
     method: 'post',
     data,
-  });
+  })
 }
 
 export function chaKanHuiZhenShenQing(inpatientNo, admissTimes) {
@@ -169,7 +177,7 @@ export function chaKanHuiZhenShenQing(inpatientNo, admissTimes) {
     url: '/huiZhenShenQing/chaKanHuiZhenShenQing',
     method: 'get',
     params: { inpatientNo, admissTimes },
-  });
+  })
 }
 
 export function shanChuHuiZhenShenQing(inpatientNo, admissTimes, actOrderNo, reqTimes) {
@@ -177,7 +185,7 @@ export function shanChuHuiZhenShenQing(inpatientNo, admissTimes, actOrderNo, req
     url: '/huiZhenShenQing/shanChuHuiZhenShenQing',
     method: 'get',
     params: { inpatientNo, admissTimes, actOrderNo, reqTimes },
-  });
+  })
 }
 
 export function pingJieZhenDuan(inpatientNo, admissTimes) {
@@ -185,7 +193,7 @@ export function pingJieZhenDuan(inpatientNo, admissTimes) {
     url: '/huiZhenShenQing/pingJieZhenDuan',
     method: 'get',
     params: { inpatientNo, admissTimes },
-  });
+  })
 }
 
 export function huiZhenYiSheng(deptCode, hzType) {
@@ -193,7 +201,7 @@ export function huiZhenYiSheng(deptCode, hzType) {
     url: '/huiZhenShenQing/huiZhenYiSheng',
     method: 'get',
     params: { deptCode, hzType },
-  });
+  })
 }
 
 export function huoQuHuanZheZhuYaoZhenDuan(patNo, times, flag) {
@@ -201,5 +209,5 @@ export function huoQuHuanZheZhuYaoZhenDuan(patNo, times, flag) {
     url: '/huiZhenShenQing/huoQuHuanZheZhuYaoZhenDuan',
     method: 'get',
     params: { patNo, times, flag },
-  });
+  })
 }

+ 71 - 45
src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

@@ -373,7 +373,7 @@
                       readonly
                     ></textarea>
                     <div v-show="showDel[n - 1]" class="not-print" style="width: 100%; text-align: center">
-                      <el-button type="primary" circle icon="el-icon-edit" @click="showSearch = true"></el-button>
+                      <el-button type="primary" circle icon="el-icon-edit" @click="onEditSurgeryClick(n - 1)"></el-button>
                       <el-button type="danger" circle icon="el-icon-delete" @click="deleteSurgery(n - 1)"></el-button>
                     </div>
                   </td>
@@ -681,6 +681,9 @@
         <strong>主要诊断病种分值:{{ diseFamilyGrade }}</strong>
       </div>
       <el-tag type="info">医保诊断录入</el-tag>
+      <el-tag style="margin-left: 12px">患者:{{ patient.name }}</el-tag>
+      <el-tag style="margin-left: 8px">医疗类别:{{ patient.medTypeName }}</el-tag>
+      <el-tag style="margin-left: 8px">险种类型:{{ patient.insutype }}</el-tag>
       <div style="height: 5px"></div>
       <el-input placeholder="在此搜索诊断" style="width: 160px" v-model="ybDiag.name" @click="showSearchData('ybDiag')"></el-input>
       <el-input placeholder="诊断编码" disabled style="width: 100px" v-model="ybDiag.code"></el-input>
@@ -725,30 +728,36 @@
       </el-table>
     </el-dialog>
 
-    <el-dialog v-model="showSearch" title="数据搜索" width="700px">
-      检索依据:
-      <el-select v-model="searchMethod" style="width: 100px">
-        <el-option v-for="item in searchMethods" :key="item.code" :label="item.name" :value="item.code"></el-option>
-      </el-select>
-      &nbsp;&nbsp;&nbsp;&nbsp; 搜索内容:
-      <el-input
-        ref="searchInput"
-        v-model="searchContent"
-        prefix-icon="el-icon-search"
-        placeholder="请输入搜索内容"
-        style="width: 160px"
-        clearable
-        @input="executeSearch"
-      ></el-input>
-      <el-table :data="searchResults" height="400" stripe highlight-current-row @row-click="handleSelectSearch">
-        <el-table-column prop="code" label="编码" width="200"></el-table-column>
-        <el-table-column prop="name" label="名称" width="450"></el-table-column>
-      </el-table>
-      <div style="margin-top: 15px; width: 100%; text-align: right">
-        <el-button type="primary" icon="el-icon-arrow-left" @click="lastPage" :disabled="currentSRPage === 1">上一页 </el-button>
-        <el-button type="primary" icon="el-icon-arrow-right" @click="nextPage" :disabled="currentSRPage > 1 && searchResults.length < 10">下一页 </el-button>
-      </div>
-    </el-dialog>
+    <div v-drag>
+      <el-dialog v-model="showSearch" title="数据搜索" width="730px">
+        检索依据:
+        <el-select v-model="searchMethod" style="width: 100px">
+          <el-option v-for="item in searchMethods" :key="item.code" :label="item.name" :value="item.code"></el-option>
+        </el-select>
+        &nbsp;&nbsp;&nbsp;&nbsp; 搜索内容:
+        <el-input
+          ref="searchInput"
+          v-model="searchContent"
+          prefix-icon="el-icon-search"
+          placeholder="请输入搜索内容"
+          style="width: 160px"
+          clearable
+          @input="executeSearch"
+        ></el-input>
+        <div v-if="showSurgeryRecommand" style="padding: 12px 0 4px 4px; color: gray">根据患者主要诊断,推荐以下手术操作:</div>
+        <el-table :data="searchResults" height="400" stripe highlight-current-row @row-click="handleSelectSearch">
+          <el-table-column prop="code" label="编码" width="180"></el-table-column>
+          <el-table-column prop="name" label="名称" width="430"></el-table-column>
+          <el-table-column v-if="showSurgeryRecommand" prop="ssfz" label="手术分值" width="60"></el-table-column>
+        </el-table>
+        <div style="margin-top: 15px; width: 100%; text-align: right">
+          <el-button type="primary" icon="el-icon-arrow-left" @click="lastPage" :disabled="showSurgeryRecommand || currentSRPage === 1">上一页 </el-button>
+          <el-button type="primary" icon="el-icon-arrow-right" @click="nextPage" :disabled="showSurgeryRecommand || (currentSRPage > 1 && searchResults.length < 10)"
+            >下一页
+          </el-button>
+        </div>
+      </el-dialog>
+    </div>
     <el-dialog v-model="showSurgeryDatetime" title="请选择手术时间" width="300px">
       <div style="height: 12px"></div>
       <el-date-picker v-model="surgeryDatetime" type="datetime" placeholder="选择日期时间"> </el-date-picker>
@@ -763,7 +772,7 @@
 
 <script setup name="FillCaseFrontSheet">
 import { yesOrNo, haveOrNot, searchMethods, autopsies, initShowDel, filterDismissStatus, clone } from './common'
-import { computed, onMounted, reactive, ref, watchEffect } from 'vue'
+import { onMounted, reactive, ref, watchEffect } from 'vue'
 import store from '@/store'
 import { operations } from '@/data/index'
 import { initLodop, getLodop } from '@/utils/c-lodop'
@@ -779,6 +788,7 @@ import {
   getUserWards,
   getYbDiags,
   sheetSearch,
+  getSsfzSurgeriesByIcd,
   increaseDiagWeight,
   signApply,
 } from '@/api/case-front-sheet'
@@ -787,7 +797,6 @@ import femaleIcon from '@/assets/female-icon.png'
 import { ElMessage } from 'element-plus'
 import { shortcuts } from '@/data/shortcuts'
 import { formatDate, formatDatetime, getDatetime, getOneMonthOffset } from '@/utils/date'
-import { cptSex } from '@/utils/computed'
 import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPage.vue'
 import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue'
 
@@ -810,19 +819,6 @@ const mainInfo = {
   padding: '0 20px',
   overflowY: 'scroll',
 }
-const isCollapse = computed(() => store.state.app.isCollapse)
-const messageArea = {
-  width: windowSize.w - 1380 + 'px',
-  height: windowSize.h - 65 + 'px',
-  padding: '0 16px',
-  overflowY: 'scroll',
-}
-const collapseMessageArea = {
-  width: windowSize.w - 1240 + 'px',
-  height: windowSize.h - 65 + 'px',
-  padding: '0 16px',
-  overflowY: 'scroll',
-}
 const dics = ref({})
 const showGoSearchBtn1 = ref(false)
 const showGoSearchBtn2 = ref(false)
@@ -920,12 +916,7 @@ const fetchSheetInfo = (row) => {
   })
 }
 
-const pageSizeSR = ref(10)
 const currentSRPage = ref(1)
-const handleCurrentSRChange = (val) => {
-  currentSRPage.value = val
-  fetchSearchData()
-}
 const showSearch = ref(false)
 const insertDiag = ref(false)
 watchEffect(() => {
@@ -965,6 +956,14 @@ const fetchSearchData = () => {
   })
 }
 const executeSearch = () => {
+  showSurgeryRecommand = false
+  if (mainSurgeryFocused && searchContent.value === '' && patient.value.disdiagList[0].code) {
+    getSsfzSurgeriesByIcd(patient.value.disdiagList[0].code).then((res) => {
+      searchResults.value = res
+      showSurgeryRecommand = true
+    })
+    return
+  }
   if (searchContent.value.length < 2 && searchContent.value !== '-') return
   currentSRPage.value = 1
   if (searchContent.value === '-') {
@@ -997,6 +996,7 @@ const openYbDiag = () => {
 const searchMethod = ref('alpha')
 const searchResults = ref([])
 const showSearchData = (flag) => {
+  mainSurgeryFocused = false
   searchUrl.value = 'place'
   if (flag === 'birth') {
     searchTargetCode.value = 'birthPlace'
@@ -1082,6 +1082,7 @@ const confirmSurgeryDatetime = () => {
 }
 
 const showSearchSurgerior = (flag, index) => {
+  mainSurgeryFocused = false
   if (flag === 'operator') {
     searchTargetCode.value = 'surgeryOperatorCode' + (index - 1)
     searchTargetName.value = 'surgeryOperatorName' + (index - 1)
@@ -1220,6 +1221,7 @@ const saveYbDiags = () => {
 }
 
 const onSearchDiagFocus = (n) => {
+  mainSurgeryFocused = false
   if (n > 0 && !patient.value.disdiagList[n - 1].code) {
     ElMessage({
       message: '请按顺序填写',
@@ -1239,6 +1241,8 @@ const onSearchDiagFocus = (n) => {
   }
 }
 
+const showSurgeryRecommand = $ref(false)
+const mainSurgeryFocused = $ref(false)
 const onSearchSurgeryFocus = (n) => {
   if (n > 0 && !patient.value.surgeryList[n - 1].code) {
     ElMessage({
@@ -1249,16 +1253,37 @@ const onSearchSurgeryFocus = (n) => {
     })
     return
   }
+  mainSurgeryFocused = false
   searchUrl.value = 'surgery'
   searchTargetCode.value = 'surgeryCode' + n
   searchTargetName.value = 'surgeryName' + n
   if (!patient.value.surgeryList[n].code) {
+    if (n === 0 && patient.value.disdiagList[0].code) {
+      mainSurgeryFocused = true
+      getSsfzSurgeriesByIcd(patient.value.disdiagList[0].code).then((res) => {
+        searchResults.value = res
+        showSurgeryRecommand = true
+      })
+    }
     showSearch.value = true
   } else {
     showDel.value[n] = true
   }
 }
 
+const onEditSurgeryClick = (n) => {
+  showSearch.value = true
+  if (n === 0 && patient.value.disdiagList[0].code) {
+    mainSurgeryFocused = true
+    getSsfzSurgeriesByIcd(patient.value.disdiagList[0].code).then((res) => {
+      searchResults.value = res
+      showSurgeryRecommand = true
+    })
+  } else {
+    mainSurgeryFocused = false
+  }
+}
+
 const hasSurgeryChanged = (val) => {
   if (val === '0') {
     patient.value.diagConform3 = 0
@@ -1276,6 +1301,7 @@ const deleteDisdiag = (index) => {
 }
 
 const insertDisdiag = (index) => {
+  mainSurgeryFocused = false
   insertDiag.value = true
   searchUrl.value = 'normalDiag'
   searchTargetCode.value = 'disdiagsCode' + index