ソースを参照

婴儿信息的查询

LIJU 2 ヶ月 前
コミット
c2fe255923

+ 14 - 0
src/api/medical-advice/medical-advice-management.js

@@ -67,6 +67,20 @@ export function queryPatientInfo(patNo,ward,inOutStatusFlag) {
     })
 }
 
+/**
+ * 查询婴儿病人基本信息
+ * @param patNo
+ * @param ward
+ * @returns {AxiosPromise}
+ */
+export function queryBabyPatientInfo(patNo,ward,inOutStatusFlag) {
+    return request({
+        url: '/medicalAdvice/medicaManagement/queryBabyPatientInfo',
+        method: 'get',
+        params: {patNo, ward,inOutStatusFlag}
+    })
+}
+
 export function queryYz(data) {
     return request({
         url: '/medicalAdvice/medicaManagement/queryYz',

+ 166 - 0
src/components/medical-advice/bodyPatientBaseList.vue

@@ -0,0 +1,166 @@
+<template>
+  <el-select v-model="currentWard"
+             :clearable="wardsClearable"
+             style="width: 110px"
+             @change="fetchOverviews">
+    <el-option v-for="item in allWards"
+               :key="item.code"
+               :label="item.name"
+               :value="item.code"/>
+  </el-select>
+
+  <el-input v-model="queryPatNo" clearable style="width: 90px"  placeholder="住院号"
+            @keyup.enter="queryPatientInfoClick"></el-input>
+  <el-button icon="Search" type="primary"  @click="queryPatientInfoClick">查询</el-button>
+  &nbsp;<el-checkbox v-model="inOutStatus" @change="selectCheckbox">是否出院</el-checkbox>
+  <br>
+  <el-table :data="cptOverviews"
+            height="750"
+            @row-click="handleClickOverview"
+            ref="elTableRef"
+            highlight-current-row
+            class="remove_hover"
+            @selection-change="handleSelectionChange"
+           >
+    <el-table-column fixed v-if="props.selectFlag" type="selection" width="35"></el-table-column>
+    <el-table-column label="床" prop="bedNo" width="30"/>
+    <el-table-column label="姓名" width="70" prop="name">
+      <template #default="{row}">
+        <span>
+          {{ row.name }}
+        </span>
+      </template>
+    </el-table-column>
+    <el-table-column label="住院号" prop="inpatientNo" width="65"/>
+    <el-table-column label="次数" prop="admissTimes" width="65"/>
+    <el-table-column label="性别" prop="sex" width="65">
+      <template #default="scope">
+        {{ cptSex(scope.row.sex) }}
+      </template>
+    </el-table-column>
+  </el-table>
+</template>
+
+<script setup name='PatientBaseList'>
+import {computed, onMounted, ref} from "vue";
+import {allWardsVisible} from "@/utils/permission";
+import {cptSex} from "@/utils/computed";
+import {queryYz,getPatientBaseInfo,queryBabyPatientInfo} from "@/api/medical-advice/medical-advice-management";
+import {getAllWards} from "@/api/zhu-yuan-yi-sheng/resident-doctor";
+import {stringNotBlank} from "@/utils/blank-utils";
+import {ElMessage} from "element-plus";
+const selections = ref([])
+const queryPatNo = ref('')
+const wardsClearable = allWardsVisible()
+const allWards = ref([])
+const currentWard = ref()
+const overviews = ref([])
+const emit = defineEmits(['selectPatientInfo','allPatientList']);
+const props = defineProps({
+  yzType: {
+    type: String
+  },
+  selectFlag : {
+    type: Boolean
+  }
+})
+const fetchOverviews = () => {
+  // getOverView(currentWard.value).then((res) => {
+  //   overviews.value = res
+  // })
+  queryPatientInfoClick()
+}
+//入院出院状态
+const inOutStatus = ref(false)
+const selectCheckbox = () => {
+  queryPatientInfoClick()
+}
+
+const queryPatientInfoClick=()=>{
+  overviews.value =[]
+  let inOutStatusFlag =inOutStatus.value ? "1" :"0"
+  if(inOutStatus.value && !stringNotBlank(queryPatNo.value)){
+   return  ElMessage.error('住院号不能为空')
+  }
+  
+  // 直接查询婴儿患者信息
+  queryBabyPatientInfo(queryPatNo.value,currentWard.value,inOutStatusFlag).then((res) => {
+    overviews.value = res
+  })
+}
+const cptOverviews = computed(() => {
+  if(props.selectFlag){
+    emit('allPatientList',{allPatientList:overviews.value,currentWard:currentWard.value})
+  }
+  return overviews.value
+})
+
+const elTableRef = ref(null)
+//行点击事件
+const handleClickOverview = (row) => {
+  let inOutStatusFlag =inOutStatus.value ? "1" :"0"
+   if(props.yzType=='cxyz'){
+    let queryData ={
+      patNo:row.inpatientNo,
+      times:row.admissTimes,
+      queryRange:'0',
+      inOutStatusFlag:inOutStatusFlag,
+      statusFlag:'3'
+    }
+
+    queryYz(queryData).then((res) => {
+      let val = {patientInfo:res.patientInfo,
+        yzDataList:res.yzDataList,
+        queryRange:queryData.queryRange,
+        statusFlag:queryData.statusFlag,
+        inOutStatusFlag:inOutStatusFlag,
+      }
+      emit('selectPatientInfo',val)
+    })
+  }else {
+    let inOutStatusFlag =inOutStatus.value ? "1" :"0"
+    let params = {inpatientNo:row.inpatientNo,
+      admissTimes:row.admissTimes,inOutStatusFlag:inOutStatusFlag}
+    getPatientBaseInfo(params).then((res) => {
+      let  val = {
+        patientInfo:res,
+        inOutStatusFlag:inOutStatusFlag,
+        wardCode:currentWard.value
+      }
+      emit('selectPatientInfo',val)
+    })
+  }
+}
+
+
+const handleSelectionChange = (val) => {
+  if(props.selectFlag){
+    selections.value = val
+    emit('selectPatientInfo',val)
+  }
+}
+
+
+
+
+
+
+onMounted(() => {
+  getAllWards().then((res) => {
+    if (res.length > 0) {
+      allWards.value = res
+      currentWard.value =  res[0].code
+      // fetchOverviews()
+      queryPatientInfoClick()
+    }
+  })
+})
+</script>
+
+<style scoped lang="scss">
+
+.el_table__current {
+  background-color: #a7d3ff;
+}
+
+</style>

+ 1 - 1
src/views/medical-advice/nursing-manage/bodyPrintThreeTestList.vue

@@ -18,7 +18,7 @@
 <script setup name='PrintThreeTestList'>
 import  GraphicsTempalte from '@/components/medical-advice/temperature/GraphicsTempalte'
 import PatientInfo from "@/components/medical-advice/PatientInfo.vue"
-import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue"
+import PatientBaseList from "@/components/medical-advice/bodyPatientBaseList.vue"
 import {stringNotBlank} from "@/utils/blank-utils"
 import { getFormatDatetime } from "@/utils/date"
 import {getAllWards} from "@/api/zhu-yuan-yi-sheng/resident-doctor";

+ 1 - 1
src/views/medical-advice/nursing-manage/bodyThreeTestList.vue

@@ -257,7 +257,7 @@
 </template>
 
 <script setup name='ThreeTestList'>
-import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue"
+import PatientBaseList from "@/components/medical-advice/bodyPatientBaseList.vue"
 import twMbEdit from "@/components/medical-advice/nursing-manage/twMbEdit.vue"
 import PsInfo from "@/views/medical-advice/nursing-manage/PsInfo.vue"
 import {queryThreeTestList,saveThreeTest,queyGm,saveGm,deleteYzTemperature,deleteYzTemperatureSum} from "@/api/medical-advice/nursing-manage";