Browse Source

会诊单和护士退药单

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
e24a092d00

+ 2 - 2
src/api/case-front-sheet/index.js

@@ -212,11 +212,11 @@ export function huiZhenYiSheng(deptCode, hzType) {
     })
 }
 
-export function huoQuHuanZheZhuYaoZhenDuan(patNo, times, flag) {
+export function huoQuHuanZheZhuYaoZhenDuan(patNo, times) {
     return request({
         url: '/huiZhenShenQing/huoQuHuanZheZhuYaoZhenDuan',
         method: 'get',
-        params: {patNo, times, flag},
+        params: {patNo, times},
     })
 }
 

+ 2 - 2
src/api/inpatient/xiang-mu-lu-ru.js

@@ -150,11 +150,11 @@ export function xiuGaiZiFeiBiaoZhi(data) {
     })
 }
 
-export function drugRefundForm(groupNo, patNo, times) {
+export function drugRefundForm(groupNo, patNo, times, refundTime) {
     return request({
         url: '/xmlr/drugRefundForm',
         method: 'get',
-        params: {groupNo, patNo, times},
+        params: {groupNo, patNo, times, refundTime},
     })
 }
 

+ 94 - 68
src/components/med-tec-mod/PrintTheDrugReturnForm.vue

@@ -7,67 +7,59 @@
           <el-option value="71" label="门诊"/>
           <el-option value="73" label="住院"/>
         </el-select>
-
+        退费时间:
+        <el-date-picker type="date"
+                        placeholder="Pick a day"
+                        value-format="YYYY-MM-DD"
+                        v-model="refundTime"/>
+        <el-button @click="queryTheDrugReturnForm">查询</el-button>
         <el-button @click="clickPrint">打印</el-button>
       </template>
       <template #mainMaxContentHeight>
-        <div style="border: 1px solid; height: 500px;width: 560px">
-          <div ref="divRef" style="width: 100%">
-            <table>
-              <thead>
-              <tr>
-                <th colspan="7">
-                  <div style="font-size: 20px;margin: 5px">护士退药单</div>
-                  <div style="font-size: 12px;margin: 5px; display: flex;justify-content: space-between">
-                    <div>
-                      住院号: {{ patient.inpatientNo }}
-                    </div>
-                    <div>
-                      住院次数: {{ patient.admissTimes }}
-                    </div>
-                    <div>
-                      姓名: {{ patient.name }}
-                    </div>
-                  </div>
-                </th>
-              </tr>
-              <tr>
-                <th>单号</th>
-                <th>编码</th>
-                <th>名称</th>
-                <th>规格</th>
-                <th>数量</th>
-                <th>零售价</th>
-                <th>金额</th>
-              </tr>
-              </thead>
-              <tbody>
-              <template v-for="(item,index) in list">
-                <tr v-for="(drugs,di) in item">
-                  <td>
-                    <div style="display: flex;justify-content: center;align-items: center">
-                      {{ drugs.pageNoTy }}
-                      <div v-if="di === 0"
-                           style="
-                      height:10px;width:10px;
-                      margin-left: 3px;
-                      border-top:1px solid;
-                      border-right: 1px solid">
+
+        <div style="display: flex">
+          <div style="flex: 1">
+            <div v-for="(value,key) in billNoMap"
+                 class="drug_button"
+                 :style="selectStyle(key)"
+                 @click="checkTheMedicineList(value,key)">
+              药单: {{ key }}
+            </div>
+          </div>
+          <div style="border: 1px solid; height: 500px;width: 560px">
+            <div ref="divRef" style="width: 100%">
+              <table>
+                <thead>
+                <tr>
+                  <th colspan="7">
+                    <div style="font-size: 20px;margin: 5px">护士退药单</div>
+                    <div style="font-size: 12px;margin: 5px; display: flex;justify-content: space-between">
+                      <div>
+                        住院号: {{ patient.inpatientNo }}
                       </div>
-                      <div v-else-if="di === item.length - 1"
-                           style="
-                      height:10px;width:10px;
-                      margin-left: 3px;
-                      border-bottom: 1px solid;
-                      border-right: 1px solid">
+                      <div>
+                        住院次数: {{ patient.admissTimes }}
                       </div>
-                      <div v-else style="
-                      height:10px;width:10px;
-                      margin-left: 3px;
-                      border-right: 1px solid">
+                      <div>
+                        姓名: {{ patient.name }}
+                      </div>
+                      <div>
+                        药单: {{ currentPageNo }}
                       </div>
                     </div>
-                  </td>
+                  </th>
+                </tr>
+                <tr>
+                  <th>编码</th>
+                  <th>名称</th>
+                  <th>规格</th>
+                  <th>数量</th>
+                  <th>零售价</th>
+                  <th>金额</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr v-for="(drugs,di) in list">
                   <td>
                     {{ drugs.chargeCode }}
                   </td>
@@ -87,13 +79,14 @@
                     {{ drugs.retprice }}
                   </td>
                 </tr>
-              </template>
-              </tbody>
-
-            </table>
+                </tbody>
+              </table>
 
+            </div>
           </div>
         </div>
+
+
       </template>
     </page-layer>
   </xc-dialog-v2>
@@ -104,6 +97,8 @@ import {getLodop, initLodop} from '@/utils/c-lodop'
 import {drugRefundForm} from '@/api/inpatient/xiang-mu-lu-ru'
 import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2";
 import PageLayer from "@/layout/PageLayer";
+import {getServerDateApi} from "@/api/public-api";
+import {getFormatDatetime} from "@/utils/date";
 
 const emit = defineEmits(['close'])
 const props = defineProps({
@@ -114,10 +109,9 @@ const props = defineProps({
 const divRef = ref()
 
 let groupNo = $ref('71')
+let refundTime = $ref()
 let dialog = $ref(true)
-let list = $ref()
-
-let config = $ref({})
+let list = $ref([])
 
 /**
  * 打印退药但
@@ -133,20 +127,38 @@ const clickPrint = () => {
   LODOP.PREVIEW() // 关闭
 }
 
+let billNoMap = $ref({})
+
 const queryTheDrugReturnForm = () => {
-  drugRefundForm(groupNo, props.patient.inpatientNo, props.patient.admissTimes).then((res) => {
-    console.log(res)
-    list = res
+  drugRefundForm(groupNo, props.patient.inpatientNo, props.patient.admissTimes, refundTime == null ? '' : refundTime).then((res) => {
+    billNoMap = res
   })
 }
 
-onMounted(() => {
+// 当前药单号
+let currentPageNo = $ref('')
+const checkTheMedicineList = (value, key) => {
+  list = value
+  currentPageNo = key
+}
+
+// 选中的样式
+const selectStyle = (key) => {
+  if (key === currentPageNo) {
+    return {
+      backgroundColor: '#f16565',
+      color: '#fff'
+    }
+  }
+}
+
+onMounted(async () => {
   if (props.patient.groupNo) {
     groupNo = props.patient.groupNo
   }
-  nextTick(() => {
-    queryTheDrugReturnForm()
-  })
+  refundTime = getFormatDatetime(await getServerDateApi(), 'YYYY-MM-DD')
+  queryTheDrugReturnForm()
+  await nextTick()
   initLodop()
 })
 
@@ -161,4 +173,18 @@ table, tr, td {
 table {
   width: 100%;
 }
+
+
+.drug_button {
+  padding: 5px;
+  border-radius: 5px;
+  margin: 5px;
+  font-size: 12px;
+  cursor: default;
+  text-align: center;
+
+  background-color: #0a84fd;
+  color: white;
+}
+
 </style>

+ 1 - 1
src/components/med-tec-mod/RefundForProjectEntry.vue

@@ -24,7 +24,7 @@
 
       <template #mainMaxContentHeight>
         <xc-table :local-data="props.list" :height="400">
-          <el-table-column fixed="'left'" label="操作">
+          <el-table-column fixed="left" label="操作">
             <template #default="scope">
               <el-button @click="deleteData(scope.row,scope.row.$index)" icon="Delete" type="danger">删除</el-button>
             </template>

+ 3 - 5
src/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/HuanZheZhenDuan.vue

@@ -21,10 +21,6 @@ export default {
   name: "HuanZheZhenDuan",
   emits: ['zhen-duan-ming', 'close'],
   props: {
-    zhenDuanLeiXing: {
-      type: Number,
-      default: 1,
-    },
     patNo: {
       type: String
     },
@@ -37,8 +33,10 @@ export default {
     const dialog = true
 
     onMounted(() => {
-      huoQuHuanZheZhuYaoZhenDuan(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, props.zhenDuanLeiXing).then((res) => {
+      huoQuHuanZheZhuYaoZhenDuan(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes).then((res) => {
         zhuYaoZhenDuanShuJu.value = res
+      }).catch(() => {
+        emit('close')
       })
     })
 

+ 2 - 6
src/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/TianJiaHuiZhenShenQing.vue

@@ -89,8 +89,7 @@
       <el-form-item label="目前主要诊断:" prop="hzZd">
         <el-input v-model="huiZhenShenQing.hzZd" :rows="3" maxlength="100" placeholder="请输入内容" show-word-limit
                   type="textarea"></el-input>
-        <el-button type="primary" @click="dianJiChaXunZhuYaoZhenDuan(1)">本院主要诊断</el-button>
-        <el-button type="primary" @click="dianJiChaXunZhuYaoZhenDuan(2)">医保主要诊断</el-button>
+        <el-button type="primary" @click="dianJiChaXunZhuYaoZhenDuan(1)">诊断</el-button>
       </el-form-item>
       <el-form-item label="会诊目的:" prop="hzMd">
         <el-input v-model="huiZhenShenQing.hzMd" :rows="3" placeholder="请输入内容" type="textarea"></el-input>
@@ -103,13 +102,11 @@
   <huan-zhe-zhen-duan v-if="huanZheZhenDuan.dialog"
                       :pat-no="huanZheXinXi.inpatientNo"
                       :times="huanZheXinXi.admissTimes"
-                      :zhen-duan-lei-xing="huanZheZhenDuan.zhenDuanLeiXing"
                       @close="huanZheZhenDuan.dialog = false"
                       @zhenDuanMing="dianJiTianJiaZhuYaoZhenDuan"/>
 </template>
 
 <script name="TianJiaHuiZhenShenQing" setup>
-import {cptSex} from "@/utils/computed";
 import {
   getConsultingDoctorInfo,
   gethuiZhenLeiBie,
@@ -252,10 +249,9 @@ const huiZhenShenQingClick = async () => {
 }
 
 // 查询主要诊断
-const dianJiChaXunZhuYaoZhenDuan = (val) => {
+const dianJiChaXunZhuYaoZhenDuan = () => {
   if (youWuXuanZheHuanZhe()) return
   huanZheZhenDuan.value.dialog = true
-  huanZheZhenDuan.value.zhenDuanLeiXing = val
 }
 
 const huanZheZhenDuan = ref({

+ 1 - 11
src/components/zhu-yuan-yi-sheng/shou-shu-shen-qing/BianJiShouShu.vue

@@ -56,15 +56,6 @@
                          code="diagBeforeCode"
                          name="diagBeforeOp"
                          :remote-method="souSuoZhenDuan"/>
-            <el-switch
-                v-model="zhenDuanLaiYuan"
-                :active-value="true"
-                :inactive-value="false"
-                active-color="#13ce66"
-                active-text="医保"
-                inactive-color="#ff4949"
-                inactive-text="本院">
-            </el-switch>
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -229,7 +220,6 @@ const emit = defineEmits(['qu-xiao'])
 
 const data = ref({});
 const dialog = ref(false)
-const zhenDuanLaiYuan = ref(1)
 const zhenDuanDangQianYe = ref(1)
 
 // 手术部位
@@ -254,7 +244,7 @@ const souSuoBuWei = (val) => {
 // 搜索诊断
 const souSuoZhenDuan = (val) => {
   if (val.length > 1) {
-    huoQuLinChuangZhenDuan(val, zhenDuanLaiYuan.value).then(res => {
+    huoQuLinChuangZhenDuan(val, 1).then(res => {
       shouShuZhenDuan.value = res
     })
   }

+ 40 - 18
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue

@@ -1,7 +1,6 @@
 <template>
   <el-container>
     <el-header>
-      <!--      <el-button icon="ArrowLeft" style="font-size: 14px" text @click="clickBack">返回</el-button>-->
       住院次数:
       <el-input-number :min="1" :max="huanZheXinXi.admissTimes" v-model="tempTimes"/>
       <el-button @click="resetData">历史记录</el-button>
@@ -16,6 +15,11 @@
       <el-button style="margin-left: 5px" type="primary" @click="openAssistant = true">
         电子助手
       </el-button>
+      <el-button-group>
+        <el-button icon="RefreshLeft" @click="clickUndo('undo')">撤销</el-button>
+        <el-button icon="RefreshRight" @click="clickUndo('redo')">重做</el-button>
+      </el-button-group>
+
       <emr-assistant v-model="openAssistant"/>
       <el-switch v-model="reviewMode" active-color="#ff4949" active-text="关闭审阅" :active-value="false"
                  inactive-color="#13ce66" inactive-text="开启审阅" :inactive-value="true">
@@ -57,7 +61,6 @@ import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue";
 import {EMRInteractive} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
-import router from '@/router'
 import EmrSnippet from "@/components/zhu-yuan-yi-sheng/emr/EmrSnippet.vue";
 import store from "@/store";
 import {onBeforeRouteLeave} from "vue-router";
@@ -121,17 +124,17 @@ const clickSaveData = async () => {
     patNo: props.huanZheXinXi.inpatientNo,
     times: props.huanZheXinXi.admissTimes,
     emrName: templateName,
-    emrDataElement: editor.getDataElements('business')
   }
-
   objectValuesCannotBeNull(data)
+  data.emrDataElement = editor.getDataElements('business')
   ElMessageBox.prompt('请输入保存的名称', '提示', {
     inputErrorMessage: '长度为2 - 20 个,汉字',
     inputPattern: /^\S{2,20}$/,
     inputValue: templateName
   }).then(({value}) => {
     data.name = value
-    currentEmr.value.saveDocument(data, () => {
+    currentEmr.value.saveDocument(data, async () => {
+
       isEditorChange = false
       emrSidebarRef.value.queryData()
       updateCaseHistoryUrl({
@@ -246,13 +249,14 @@ const nodeClick = (val, jumpOrNot, templateType) => {
   }
 }
 
-const updateCaseHistoryUrl = (val) => {
+const updateCaseHistoryUrl = async (val) => {
   loaded = true
   isEditorChange = false
   documentId = val.documentId;
   categoryCode = val.categoryCode
   templateName = val.name
   categroyId = val.categoryId
+  await queryingBasicPatientInformation()
   caseHistoryUrl = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categroyId}&patientId=${patientId}#/`
 }
 
@@ -272,12 +276,6 @@ const positioningTime = (val, code) => {
 }
 
 
-const clickBack = () => {
-  checkEmrChange(() => {
-    router.push('/inpatient/zhuYuanYiSheng/yiZhuLuRu')
-  })
-}
-
 const monitorPageRefresh = (event) => {
   if (isEditorChange) {
     event.preventDefault();
@@ -313,13 +311,14 @@ const getCurrentPersonnelInformation = (data) => {
 }
 
 const emrEvent = {
-  'loaded': (event) => {
+  'loaded': async (event) => {
     editor = currentEmr.value.getEditor()
     loaded = false
     setEditorModeFun()
     setTheProgressAnchor()
     courseSegmentLocking()
     deleteDataElement()
+    reQueryPatientInformation()
   },
 
   'contentchange': (event) => {
@@ -421,6 +420,25 @@ const deleteDataElement = () => {
   }
 }
 
+/**
+ * 重新查询患者信息
+ */
+const reQueryPatientInformation = () => {
+  editor.setValues(patientData)
+}
+
+/**
+ *  撤销或者重做
+ */
+const clickUndo = (val) => {
+  try {
+    editor.execute(val)
+  } catch (e) {
+
+  }
+
+}
+
 /**
  * 单击“提交病历”
  */
@@ -441,14 +459,18 @@ watch(() => visibility, () => {
   }
 }, {deep: true, immediate: true})
 
+
+const queryingBasicPatientInformation = async () => {
+  patientData = await getEmrInpatientData({
+    patNo: props.huanZheXinXi.inpatientNo,
+    times: props.huanZheXinXi.admissTimes
+  })
+  getCurrentPersonnelInformation(patientData)
+}
+
 onMounted(() => {
   nextTick(async () => {
-    patientData = await getEmrInpatientData({
-      patNo: props.huanZheXinXi.inpatientNo,
-      times: props.huanZheXinXi.admissTimes
-    })
     emrSidebarRef.value.queryData()
-    getCurrentPersonnelInformation(patientData)
     patientId = props.huanZheXinXi.inpatientNo
     currentEmr.value = new EMRInteractive(patientData, emrEvent);
     emrSnippetRef.value.setPatientData(patientData)

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

@@ -22,7 +22,9 @@
     </el-header>
     <el-container>
       <el-aside style="width: 450px">
-        <el-table :data="jianChaShuJu.data" :height="windowSize.h / 1.4" :row-class-name="tableRowClassName">
+        <el-table :data="jianChaShuJu.data"
+                  :height="windowSize.h / 1.4"
+                  :row-class-name="tableRowClassName">
           <el-table-column label="项目名称" prop="orderName" show-overflow-tooltip></el-table-column>
           <el-table-column label="接受" prop="receiveFlagName" show-overflow-tooltip></el-table-column>
           <el-table-column label="时间" prop="startTime">
@@ -120,6 +122,7 @@ const dianJiChaXunHuanZheJianCha = (total) => {
       jianChaShuJu.value.total = res.total
     }
     jianChaShuJu.value.data = res.records
+    console.log(res)
   })
 }
 
@@ -183,6 +186,8 @@ const tableRowClassName = ({rowIndex}) => {
     return ''
   }
 }
+
+
 watch(
     () => huanZheXinXi.value,
     () => {