|
@@ -1,16 +1,5 @@
|
|
|
<template>
|
|
|
- <!-- 上传信息提示 -->
|
|
|
- <bao-cun-xin-xi v-show="showErrorMessage"
|
|
|
- @clickError="clickError"
|
|
|
- :currentKey="yiZhuData.id"
|
|
|
- @openOrCloseErrorMsg="openOrCloseErrorMsg"
|
|
|
- ref="baoCunXinXiRef"/>
|
|
|
- <!-- 这里是获取模板的 -->
|
|
|
- <huo-qu-mu-ban v-if="muBanDuiHuaKuang"
|
|
|
- @close="muBanDuiHuaKuang = false"
|
|
|
- @muBanShuJu="muBanShuJu"/>
|
|
|
- <!-- 保存模板用 -->
|
|
|
- <bao-cun-mu-ban v-if="baoCunMuBanRef" v-model="baoCunMuBanRef" :list="yiZhuList"></bao-cun-mu-ban>
|
|
|
+
|
|
|
<div class="prompt" v-if="tiShiBiaoTi?.length > 0">
|
|
|
<div style="margin-right: 5px">
|
|
|
提示信息:
|
|
@@ -21,12 +10,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-button icon="ArrowLeft" style="font-size: 14px" text type="primary" @click="router.go(-1)">返回</el-button>
|
|
|
+ <el-button icon="ArrowLeft" style="font-size: 14px" text type="primary" @click="cloneWindow">返回</el-button>
|
|
|
<el-button type="primary" @click="muBanDuiHuaKuang = true">获取模板</el-button>
|
|
|
<el-button :disabled="yiZhuList.length === 0" type="primary" @click="baoCunMuBanClick">保存模板</el-button>
|
|
|
<el-button icon="Check" type="success" @click="baoCunYiZhuClick">确认医嘱</el-button>
|
|
|
{{ count }}
|
|
|
- <el-button @click="showErrorMessage = true">打开错误信息</el-button>
|
|
|
+ <el-button @click="openErrorDialog">打开错误信息</el-button>
|
|
|
<el-divider direction="vertical"/>
|
|
|
<el-button :disabled="yiZhuData.serial === '00' || stringIsBlank(yiZhuData.serial)"
|
|
|
icon="View"
|
|
@@ -79,7 +68,7 @@
|
|
|
:min="0"
|
|
|
ref="doseRef"
|
|
|
id="yz_dose"
|
|
|
- :precision="2"
|
|
|
+ :precision="yiZhuData.doseUnitName === yiZhuData.miniUnitName ? 0 : 2"
|
|
|
style="width: 110px"
|
|
|
@change="jiSuanLingLiang"/>
|
|
|
<XcSelect v-model="yiZhuData"
|
|
@@ -93,7 +82,15 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
- <el-form-item label="领量:"> {{ yiZhuData.drugQuan }} {{ yiZhuData.miniUnitName }}</el-form-item>
|
|
|
+ <el-form-item label="领量:">
|
|
|
+ <el-input-number v-model="yiZhuData.drugQuan"
|
|
|
+ :min="minimumPickingQuantity"
|
|
|
+ placeholder="请输入领量">
|
|
|
+ {{ yiZhuData.drugQuan }}
|
|
|
+ </el-input-number>
|
|
|
+
|
|
|
+ {{ yiZhuData.miniUnitName }}
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="给药方式:" prop="supplyCode">
|
|
@@ -280,8 +277,7 @@
|
|
|
:value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
- <span>{{ item.name }}</span></el-option
|
|
|
- >
|
|
|
+ <span>{{ item.name }}</span></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -361,7 +357,8 @@
|
|
|
<sou-suo-yi-zhu v-if="yiZhuMingDialog" @close="closeTheDoctorSOrderSearchBox()"
|
|
|
@xuanZhongFeiYong="xuanZhongFeiYong"></sou-suo-yi-zhu>
|
|
|
<!-- 这个是过敏源的 -->
|
|
|
- <AllergenEntry v-if="allergenDialog" :pat-no="huanZheXinXi.inpatientNo"
|
|
|
+ <AllergenEntry v-if="allergenDialog"
|
|
|
+ :pat-no="props.patientInfo.inpatientNo"
|
|
|
@close="allergenDialog = false"></AllergenEntry>
|
|
|
<yao-ping-xiang-qing v-if="drugProblem.dialog"
|
|
|
:url="drugProblem.url"
|
|
@@ -369,6 +366,19 @@
|
|
|
<yao-ping-xiang-qing v-if="synopsisDialog.dialog"
|
|
|
:code="synopsisDialog.code"
|
|
|
@close="synopsisDialog.dialog = false"/>
|
|
|
+
|
|
|
+ <!-- 上传信息提示 -->
|
|
|
+ <bao-cun-xin-xi @clickError="clickError"
|
|
|
+ :data="errorMessageData"
|
|
|
+ :currentKey="yiZhuData.id"
|
|
|
+ ref="baoCunXinXiRef"/>
|
|
|
+ <!-- 这里是获取模板的 -->
|
|
|
+ <huo-qu-mu-ban v-if="muBanDuiHuaKuang"
|
|
|
+ @close="muBanDuiHuaKuang = false"
|
|
|
+ @muBanShuJu="muBanShuJu"/>
|
|
|
+ <!-- 保存模板用 -->
|
|
|
+ <bao-cun-mu-ban v-if="baoCunMuBanRef" v-model="baoCunMuBanRef" :list="yiZhuList"/>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script name="TianJiaYiZhu" setup="props,context">
|
|
@@ -377,15 +387,12 @@ import {
|
|
|
huoQuGeiYaoFangShi,
|
|
|
huoQuZhiXinKeShi,
|
|
|
huoQuZhuYuanPinLv,
|
|
|
- jiaoYan, saveTheDoctorSOrder,
|
|
|
- shangChuanYiZhu, singleDataCheck
|
|
|
+ saveTheDoctorSOrder,
|
|
|
+ singleDataCheck
|
|
|
} from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
|
|
|
import {
|
|
|
- cuoWuXinXi,
|
|
|
fuZhiYiZhu,
|
|
|
getSelfBuy,
|
|
|
- huanZheXinXi,
|
|
|
- youWuXuanZheHuanZhe,
|
|
|
zkList
|
|
|
} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
|
|
|
import store from '../../../../store'
|
|
@@ -396,7 +403,7 @@ import {clone} from '@/utils/clone'
|
|
|
import HuoQuMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue'
|
|
|
import {uuid} from '@/utils/getUuid'
|
|
|
import BaoCunMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue'
|
|
|
-import {getServerDateApi, whetherThePatientHasAllergens, yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
|
|
|
+import {getServerDateApi, whetherThePatientHasAllergens} from '@/api/public-api'
|
|
|
import router from '@/router'
|
|
|
import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
|
|
|
import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
|
|
@@ -409,6 +416,14 @@ import XcTableV3 from "@/components/xiao-chan/table-v3/XcTableV3.vue";
|
|
|
import sleep from "@/utils/sleep";
|
|
|
import BaoCunXinXi from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunXinXi.vue";
|
|
|
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ patientInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
const windowSize = computed(() => {
|
|
|
return store.state.app.windowSize
|
|
|
})
|
|
@@ -499,11 +514,11 @@ let yiZhuMingDialog = $ref(false)
|
|
|
const xuanZhongFeiYong = async (row) => {
|
|
|
fuYiZhuClick()
|
|
|
qingKong()
|
|
|
- await Sleep(600)
|
|
|
+ await Sleep(200)
|
|
|
closeTheDoctorSOrderSearchBox()
|
|
|
yiZhuData.value = row
|
|
|
if (row.serial !== '00') {
|
|
|
- huoQuFeiYongXinXi(row.orderCode, row.serial, huanZheXinXi.value.smallDept)
|
|
|
+ huoQuFeiYongXinXi(row.orderCode, row.serial, props.patientInfo.smallDept)
|
|
|
.then((res) => {
|
|
|
yiZhuData.value.drugFlag = row.drugFlag ? row.drugFlag : row.orderType
|
|
|
// 判断是否 是皮试的药 如果是就只能有这些 给药方式
|
|
@@ -528,7 +543,7 @@ const xuanZhongFeiYong = async (row) => {
|
|
|
yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
|
|
|
yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
|
|
|
jiLiangValue.value = yaoPinJiLiangData.value[0].value
|
|
|
- jiSuanLingLiang(yaoPinJiLiangData.value[0].value)
|
|
|
+ jiSuanLingLiang(yiZhuData.value.dose)
|
|
|
}
|
|
|
// 加载默认频率 如果已经填写了 就用有的
|
|
|
if (stringIsBlank(row.frequCode)) {
|
|
@@ -556,7 +571,7 @@ const xuanZhongFeiYong = async (row) => {
|
|
|
})
|
|
|
} else {
|
|
|
yiZhuData.value.kjywFlag = 0
|
|
|
- huoQuFeiYongXinXi(row.orderCode, '00', huanZheXinXi.value.smallDept)
|
|
|
+ huoQuFeiYongXinXi(row.orderCode, '00', props.patientInfo.smallDept)
|
|
|
.then((res) => {
|
|
|
yiZhuData.value.drugFlag = row.drugFlag ? row.drugFlag : row.orderType
|
|
|
if (stringNotBlank(res.prompt)) {
|
|
@@ -582,13 +597,13 @@ const xuanZhongFeiYong = async (row) => {
|
|
|
})
|
|
|
// 用来加载默认的执行科室
|
|
|
if (stringIsBlank(row.execUnit)) {
|
|
|
- if (stringNotBlank(huanZheXinXi.value.smallDept)) {
|
|
|
- yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
|
|
|
- yiZhuData.value.execUnitName = huanZheXinXi.value.smallDeptName
|
|
|
+ if (stringNotBlank(props.patientInfo.smallDept)) {
|
|
|
+ yiZhuData.value.execUnit = props.patientInfo.smallDept
|
|
|
+ yiZhuData.value.execUnitName = props.patientInfo.smallDeptName
|
|
|
}
|
|
|
- } else if (huanZheXinXi.value.smallDept && row.execUnit.startsWith("8")) {
|
|
|
- yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
|
|
|
- yiZhuData.value.execUnitName = huanZheXinXi.value.smallDeptName
|
|
|
+ } else if (props.patientInfo.smallDept && row.execUnit.startsWith("8")) {
|
|
|
+ yiZhuData.value.execUnit = props.patientInfo.smallDept
|
|
|
+ yiZhuData.value.execUnitName = props.patientInfo.smallDeptName
|
|
|
}
|
|
|
if (stringIsBlank(row.id)) {
|
|
|
yiZhuData.value.id = uuid(8, 10)
|
|
@@ -624,15 +639,29 @@ const jiLiangValue = ref(0)
|
|
|
const xuanZheJiLiang = (val) => {
|
|
|
jiLiangValue.value = val.value
|
|
|
yiZhuData.value.dose = val.value
|
|
|
- yiZhuData.value.drugQuan = 1
|
|
|
+ jiSuanLingLiang(yiZhuData.value.dose)
|
|
|
}
|
|
|
/*计算领量*/
|
|
|
const jiSuanLingLiang = (val) => {
|
|
|
- if (jiLiangValue.value > 0) {
|
|
|
- yiZhuData.value.drugQuan = Math.ceil(val / jiLiangValue.value)
|
|
|
+
|
|
|
+ if (jiLiangValue.value <= 0) return
|
|
|
+ let temp = Math.ceil(val / jiLiangValue.value);
|
|
|
+
|
|
|
+ minimumPickingQuantity = temp
|
|
|
+
|
|
|
+ if (!yiZhuData.value.drugQuan) {
|
|
|
+ yiZhuData.value.drugQuan = temp
|
|
|
}
|
|
|
+
|
|
|
+ if (yiZhuData.value.drugQuan < temp) {
|
|
|
+ yiZhuData.value.drugQuan = temp
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+let minimumPickingQuantity = $ref(0)
|
|
|
+
|
|
|
+
|
|
|
/* 给药方式 */
|
|
|
const geiYaoFangShiData = ref([])
|
|
|
const geiYaoFangShiRemoteMethod = (val) => {
|
|
@@ -688,9 +717,9 @@ const tianJiaYiZhu = () => {
|
|
|
}
|
|
|
|
|
|
let data = {
|
|
|
- inpatientNo: huanZheXinXi.value.inpatientNo,
|
|
|
- admissTimes: huanZheXinXi.value.admissTimes,
|
|
|
- deptCode: huanZheXinXi.value.smallDept,
|
|
|
+ inpatientNo: props.patientInfo.inpatientNo,
|
|
|
+ admissTimes: props.patientInfo.admissTimes,
|
|
|
+ deptCode: props.patientInfo.smallDept,
|
|
|
list: [yiZhuData.value],
|
|
|
}
|
|
|
singleDataCheck(data).then((res) => {
|
|
@@ -717,7 +746,8 @@ const tianJiaYiZhu = () => {
|
|
|
yiZhuList.value.splice(index, 1)
|
|
|
ElMessage.error('重复添加,老记录已删除。')
|
|
|
}
|
|
|
- baoCunXinXiRef.value.clearKey(yiZhuData.value.id)
|
|
|
+ // 在这里要删除指定的 错误信息 key
|
|
|
+ delete errorMessageData[yiZhuData.value.id]
|
|
|
yiZhuList.value.push(res.data)
|
|
|
qingKong()
|
|
|
}
|
|
@@ -767,7 +797,7 @@ const expandChange = (row, expandedRows) => {
|
|
|
if (feeInformation.has(row.id)) {
|
|
|
return
|
|
|
}
|
|
|
- huoQuFeiYongXinXi(row.orderCode, row.serial, huanZheXinXi.value.smallDept).then((res) => {
|
|
|
+ huoQuFeiYongXinXi(row.orderCode, row.serial, props.patientInfo.smallDept).then((res) => {
|
|
|
if (res.prompt) {
|
|
|
feeInformation.set(row.id, res.prompt)
|
|
|
}
|
|
@@ -791,13 +821,15 @@ const synopsis = (val) => {
|
|
|
/* 保存信息 */
|
|
|
const baoCunYiZhuClick = () => {
|
|
|
disableShortcutKeys()
|
|
|
- if (youWuXuanZheHuanZhe()) return
|
|
|
+
|
|
|
+ if (props.patientInfo === null) return ElMessage.error('请先选择患者')
|
|
|
+
|
|
|
if (listIsBlank(yiZhuList.value)) {
|
|
|
return ElMessage.error('请先选择数据')
|
|
|
}
|
|
|
let data = {
|
|
|
- inpatientNo: huanZheXinXi.value.inpatientNo,
|
|
|
- admissTimes: huanZheXinXi.value.admissTimes,
|
|
|
+ inpatientNo: props.patientInfo.inpatientNo,
|
|
|
+ admissTimes: props.patientInfo.admissTimes,
|
|
|
list: yiZhuList.value,
|
|
|
}
|
|
|
ElMessageBox.confirm('是否确认医嘱?', '提示', {
|
|
@@ -806,24 +838,27 @@ const baoCunYiZhuClick = () => {
|
|
|
}).then(() => {
|
|
|
saveTheDoctorSOrder(data).then((res) => {
|
|
|
ElMessage.success('医嘱确认成功')
|
|
|
- router.go(-1)
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log(e)
|
|
|
+ errorMessageData = e
|
|
|
+ openErrorDialog()
|
|
|
}).finally(() => {
|
|
|
enableShortcutKeys()
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
})
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/* 医嘱错误信息 */
|
|
|
-let showErrorMessage = $ref(false)
|
|
|
-const baoCunXinXiRef = ref(null)
|
|
|
-// 打开或者关闭
|
|
|
-const openOrCloseErrorMsg = (val) => {
|
|
|
- showErrorMessage = val
|
|
|
+let errorMessageData = $ref({})
|
|
|
+
|
|
|
+const openErrorDialog = () => {
|
|
|
+ baoCunXinXiRef.value.open()
|
|
|
}
|
|
|
|
|
|
+const baoCunXinXiRef = ref(null)
|
|
|
+
|
|
|
const clickError = (value) => {
|
|
|
if (yiZhuData.value.orderCode) {
|
|
|
ElMessage.warning({
|
|
@@ -833,7 +868,7 @@ const clickError = (value) => {
|
|
|
grouping: true,
|
|
|
})
|
|
|
} else {
|
|
|
- xuanZhongFeiYong(value)
|
|
|
+ xuanZhongFeiYong(value.data)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -890,7 +925,10 @@ const baoCunMuBanClick = () => {
|
|
|
|
|
|
// 医嘱限制时间不能在之前
|
|
|
const disabledDate = (time) => {
|
|
|
- return time.getTime() < new Date(huanZheXinXi.value.admissDate).getTime() - 8.64e7
|
|
|
+ if (props.patientInfo?.admissDate) {
|
|
|
+ return time.getTime() < new Date(props.patientInfo?.admissDate).getTime() - 8.64e7
|
|
|
+ }
|
|
|
+ return true
|
|
|
}
|
|
|
|
|
|
const xuanZhongShuJu = ref([])
|
|
@@ -911,7 +949,6 @@ const dianJiXiuGaiZhiXingKeShi = () => {
|
|
|
}
|
|
|
|
|
|
const qingKong = () => {
|
|
|
- cuoWuXinXi.value = ''
|
|
|
yaoPinJiLiangData.value = []
|
|
|
jiLiangValue.value = 0
|
|
|
tiShiBiaoTi.value = []
|
|
@@ -1158,8 +1195,6 @@ const enterToJumpInput = async (val) => {
|
|
|
/* 回车按下 跳转到下一个 input , 暂时未启用 end */
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- // huanZheXinXi.value.inpatientNo = '0409327'
|
|
|
- // huanZheXinXi.value.admissTimes = 1
|
|
|
xcHotKey(shortcutKeyRegistration)
|
|
|
yiZhuList.value = clone(fuZhiYiZhu.value)
|
|
|
let serverTime = await getServerDateApi();
|
|
@@ -1171,29 +1206,37 @@ onMounted(async () => {
|
|
|
yiZhuList.value[i].frequCodeName = '一次'
|
|
|
yiZhuList.value[i].frequCode = 'ONCE'
|
|
|
}
|
|
|
- if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
|
|
|
+ if (stringIsBlank(props.patientInfo.inpatientNo)) {
|
|
|
+ document.title = '医嘱模板编辑'
|
|
|
ElMessage.warning('您现在进入的是医嘱模板编辑')
|
|
|
} else {
|
|
|
+ document.title = `医嘱录入:【${props.patientInfo.name}】`
|
|
|
ElMessage.warning('您现在进入的是医嘱编辑模块,' + '您的编辑时间有 30 分钟,你准备好了吗?')
|
|
|
kaiQiDaoJiShi()
|
|
|
- whetherThePatientHasAllergens(huanZheXinXi.value.inpatientNo).then((res) => {
|
|
|
+ whetherThePatientHasAllergens(props.patientInfo.inpatientNo).then((res) => {
|
|
|
allergenDialog = res
|
|
|
})
|
|
|
}
|
|
|
- if (stringNotBlank(huanZheXinXi.value.inpatientNo)) {
|
|
|
+ if (stringNotBlank(props.patientInfo.inpatientNo)) {
|
|
|
zhiXingKeShiData.value = [
|
|
|
{
|
|
|
- value: huanZheXinXi.value.smallDept,
|
|
|
- label: huanZheXinXi.value.smallDeptName,
|
|
|
- code: huanZheXinXi.value.smallDept,
|
|
|
- name: huanZheXinXi.value.smallDeptName,
|
|
|
+ value: props.patientInfo.smallDept,
|
|
|
+ label: props.patientInfo.smallDeptName,
|
|
|
+ code: props.patientInfo.smallDept,
|
|
|
+ name: props.patientInfo.smallDeptName,
|
|
|
},
|
|
|
]
|
|
|
}
|
|
|
fuZhiYiZhu.value = []
|
|
|
-
|
|
|
+ testData()
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+const cloneWindow = () => {
|
|
|
+ window.opener = null
|
|
|
+ window.close()
|
|
|
+}
|
|
|
+
|
|
|
const testData = () => {
|
|
|
yiZhuList.value = [
|
|
|
{
|
|
@@ -1219,8 +1262,8 @@ const testData = () => {
|
|
|
"discription": "70.00元 次(自费项目)",
|
|
|
"delFlag": "0",
|
|
|
"serial": "01",
|
|
|
- "execUnit": "8010100",
|
|
|
- "execUnitName": "七病室",
|
|
|
+ "execUnit": "1010100",
|
|
|
+ "execUnitName": "普外科",
|
|
|
"newActOrderNo": 0,
|
|
|
"currentPage": 0,
|
|
|
"parentNo": 14798,
|
|
@@ -1258,7 +1301,7 @@ const testData = () => {
|
|
|
"discription": "400.00元 每个部位(自费项目)",
|
|
|
"delFlag": "0",
|
|
|
"serial": "01",
|
|
|
- "execUnit": "1010100",
|
|
|
+ "execUnit": "8000007",
|
|
|
"execUnitName": "七病室",
|
|
|
"newActOrderNo": 0,
|
|
|
"currentPage": 0,
|
|
@@ -1276,8 +1319,8 @@ const testData = () => {
|
|
|
{
|
|
|
"actOrderNo": 1111111,
|
|
|
"orderCode": "01192",
|
|
|
- "frequCode": "001",
|
|
|
- "frequCodeName": "口服",
|
|
|
+ // "frequCode": "001",
|
|
|
+ // "frequCodeName": "口服",
|
|
|
"drugFlag": "i",
|
|
|
"supplyCode": "025",
|
|
|
"supplyCodeName": "接瓶续滴",
|
|
@@ -1296,7 +1339,7 @@ const testData = () => {
|
|
|
"discription": "400.00元 每个部位(自费项目)",
|
|
|
"delFlag": "0",
|
|
|
"serial": "01",
|
|
|
- "execUnit": "1010100",
|
|
|
+ "execUnit": "8000007",
|
|
|
"execUnitName": "七病室",
|
|
|
"newActOrderNo": 0,
|
|
|
"currentPage": 0,
|