|
@@ -235,6 +235,18 @@
|
|
|
<el-button type="success" icon="Check" @click="confirmSelectDismissOrderDate">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="出院预审有可疑数据" v-model="showPreDischargeErrors" width="600px">
|
|
|
+ <el-table :data="preDischargeErrors" empty-text=" " max-height="300">
|
|
|
+ <el-table-column property="dept_name" label="科室" width="120"></el-table-column>
|
|
|
+ <el-table-column property="doctor_name" label="医生" width="120"></el-table-column>
|
|
|
+ <el-table-column property="return_code_message" label="描述" ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+ 是否继续为患者办理出院?
|
|
|
+ <el-button type="primary" @click="executeDismissCalculate(false, null)">继续办理</el-button>
|
|
|
+ <el-button @click="cancelDischarge">取消办理</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<charge-list v-if="showChargeList" :pat-no="patient.inpatientNo" :times="patient.admissTimes"
|
|
|
@close="showChargeList = false"></charge-list>
|
|
|
</div>
|
|
@@ -245,7 +257,7 @@ import {computed, onActivated, onDeactivated, onMounted, reactive, ref, watchEff
|
|
|
import store from '@/store'
|
|
|
import {cptOperation, cptSex} from '@/utils/computed'
|
|
|
import {genDismissActOrder, getDisDiag, receiveAndRecalculateCost} from '@/api/inpatient/patient'
|
|
|
-import {dismissCalculate, getActOrders, selfPayDismiss} from '@/api/inpatient/dismiss'
|
|
|
+import {powersiPreDischarge, dismissCalculate, getActOrders, selfPayDismiss} from '@/api/inpatient/dismiss'
|
|
|
import {formatDatetime, getDatetime} from '@/utils/date'
|
|
|
import {nullPatient} from '@/utils/validate'
|
|
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
|
@@ -380,13 +392,14 @@ const closeActOrder = () => {
|
|
|
dismissCalMsg.value = ''
|
|
|
showActOrders.value = false
|
|
|
}
|
|
|
-const executeDismissCalculate = (midSetl, setlDatetime) => {
|
|
|
+const executeDismissCalculate = (midSetl, disdate) => {
|
|
|
+ showPreDischargeErrors.value = false
|
|
|
dismissCalculate(patient.value).then(() => {
|
|
|
settleApply.value.patNo = patient.value.inpatientNo
|
|
|
settleApply.value.times = patient.value.admissTimes
|
|
|
settleApply.value.ledgerSn = patient.value.ledgerSn
|
|
|
settleApply.value.type = midSetl ? 2 : 1
|
|
|
- settleApply.value.settleDatetime = setlDatetime
|
|
|
+ settleApply.value.settleDatetime = disdate || setlDatetime.value
|
|
|
settleApply.value.acctUsedFlag = '0'
|
|
|
settleApply.value.deathFlag = patient.value.deathFlag
|
|
|
settleApply.value.inputComment = midSetl ? null : '医嘱离院。'
|
|
@@ -406,6 +419,36 @@ const executeDismissCalculate = (midSetl, setlDatetime) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const preDischargeErrors = ref([])
|
|
|
+const showPreDischargeErrors = ref(false)
|
|
|
+const setlDatetime = ref('')
|
|
|
+
|
|
|
+const cancelDischarge = () => {
|
|
|
+ showPreDischargeErrors.value = false
|
|
|
+ preDischargeErrors.value = []
|
|
|
+ setlDatetime.value = ''
|
|
|
+}
|
|
|
+
|
|
|
+const preDischarge = (midSetl, settleDatetime) => {
|
|
|
+ if (midSetl) {
|
|
|
+ executeDismissCalculate(midSetl, settleDatetime)
|
|
|
+ } else {
|
|
|
+ powersiPreDischarge(makeVisitId()).then(() => {
|
|
|
+ executeDismissCalculate(midSetl, settleDatetime)
|
|
|
+ }).catch((e) => {
|
|
|
+ setlDatetime.value = settleDatetime
|
|
|
+ preDischargeErrors.value = e.data
|
|
|
+ showPreDischargeErrors.value = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const makeVisitId = () => {
|
|
|
+ return patient.value.inpatientNo + '_'
|
|
|
+ + patient.value.admissTimes + '_'
|
|
|
+ + patient.value.ledgerSn
|
|
|
+}
|
|
|
+
|
|
|
const beforeSettle = (midSetl) => {
|
|
|
if (nullPatient()) {
|
|
|
return
|
|
@@ -424,11 +467,11 @@ const beforeSettle = (midSetl) => {
|
|
|
closeOnPressEscape: false
|
|
|
}).then(() => {
|
|
|
patient.value.deathFlag = false
|
|
|
- executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
+ preDischarge(midSetl, res.settleDatetime)
|
|
|
}).catch((action) => {
|
|
|
if (action === 'cancel') {
|
|
|
patient.value.deathFlag = true
|
|
|
- executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
+ preDischarge(midSetl, res.settleDatetime)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -503,26 +546,24 @@ const negativeFees = ref([])
|
|
|
|
|
|
const doCalFee = () => {
|
|
|
patient.value.sid = store.getters['user/sid']
|
|
|
- dismissCalculate(patient.value)
|
|
|
- .then((res) => {
|
|
|
- dismissCalMsg.value = 'done'
|
|
|
- ElMessageBox.alert('计算成功。', '提示', {
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
- })
|
|
|
- .catch((res) => {
|
|
|
- if (res.code && res.code === 1004) {
|
|
|
- negativeFees.value = res.data
|
|
|
- dismissCalMsg.value = res.message
|
|
|
- showNegativeFee.value = true
|
|
|
- } else if (res.code && res.code === 1104) {
|
|
|
- negativeFees.value = res.data
|
|
|
- dismissCalMsg.value = res.message
|
|
|
- showUnhandledDrugOrder.value = true
|
|
|
- } else {
|
|
|
- dismissCalMsg.value = res.toString()
|
|
|
- }
|
|
|
- })
|
|
|
+ dismissCalculate(patient.value).then((res) => {
|
|
|
+ dismissCalMsg.value = 'done'
|
|
|
+ ElMessageBox.alert('计算成功。', '提示', {
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ }).catch((res) => {
|
|
|
+ if (res.code && res.code === 1004) {
|
|
|
+ negativeFees.value = res.data
|
|
|
+ dismissCalMsg.value = res.message
|
|
|
+ showNegativeFee.value = true
|
|
|
+ } else if (res.code && res.code === 1104) {
|
|
|
+ negativeFees.value = res.data
|
|
|
+ dismissCalMsg.value = res.message
|
|
|
+ showUnhandledDrugOrder.value = true
|
|
|
+ } else {
|
|
|
+ dismissCalMsg.value = res.toString()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
const excuteDismiss = () => {
|
|
|
if (dismissCalMsg.value !== 'done') {
|
|
@@ -551,15 +592,13 @@ const excuteDismiss = () => {
|
|
|
}
|
|
|
|
|
|
const injuryDismiss = () => {
|
|
|
- injurySettlement(patient.value)
|
|
|
- .then((res) => {
|
|
|
- ElMessageBox.alert(dismissBtnText.value + '成功。', '提示', {
|
|
|
- type: 'success',
|
|
|
- })
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- afterDismiss()
|
|
|
- })
|
|
|
+ injurySettlement(patient.value).then((res) => {
|
|
|
+ ElMessageBox.alert(dismissBtnText.value + '成功。', '提示', {
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ }).then(() => {
|
|
|
+ afterDismiss()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const ziFeiDismiss = () => {
|
|
@@ -637,26 +676,24 @@ const confirmRetractConventions = () => {
|
|
|
type: 'warning',
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '放弃',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- let orders = []
|
|
|
- selectedConventions.value.forEach((item) => {
|
|
|
- orders.push(item.actOrderNo)
|
|
|
- })
|
|
|
- retractConventions(orders).then(() => {
|
|
|
- ElMessage({
|
|
|
- message: '撤销成功。',
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
- showConventions()
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ }).then(() => {
|
|
|
+ let orders = []
|
|
|
+ selectedConventions.value.forEach((item) => {
|
|
|
+ orders.push(item.actOrderNo)
|
|
|
+ })
|
|
|
+ retractConventions(orders).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '撤销成功。',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
})
|
|
|
+ showConventions()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
const closeThreeConventions = () => {
|
|
|
roughConventions.value = conventionDetails.value = []
|
|
|
conventionsVisible.value = false
|
|
@@ -673,30 +710,27 @@ const cancelDismiss = () => {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '放弃',
|
|
|
type: 'warning',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- if (injuryMode.value) {
|
|
|
- revokeInjurySettlement(patient.value).then(() => {
|
|
|
- ElMessage({
|
|
|
- message: '取消医保结算成功。',
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- revokeSettlement(patient.value).then(() => {
|
|
|
- ElMessage({
|
|
|
- message: '取消医保结算成功。',
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ }).then(() => {
|
|
|
+ if (injuryMode.value) {
|
|
|
+ revokeInjurySettlement(patient.value).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '取消医保结算成功。',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
+ } else {
|
|
|
+ revokeSettlement(patient.value).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '取消医保结算成功。',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
})
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
|
|
|
const showDismissOrderDate = ref(false)
|
|
@@ -711,23 +745,18 @@ const confirmSelectDismissOrderDate = () => {
|
|
|
type: 'warning',
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- patient.value.dismissOrderDate = formatDatetime(patient.value.dismissOrderDate)
|
|
|
- genDismissActOrder(patient.value)
|
|
|
- .then((res) => {
|
|
|
- ElMessageBox.alert('生成出院医嘱成功!医嘱号为:' + res, '提示', {
|
|
|
- type: 'success',
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- showDismissOrderDate.value = false
|
|
|
- fecthDisDiags()
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ }).then(() => {
|
|
|
+ patient.value.dismissOrderDate = formatDatetime(patient.value.dismissOrderDate)
|
|
|
+ genDismissActOrder(patient.value).then((res) => {
|
|
|
+ ElMessageBox.alert('生成出院医嘱成功!医嘱号为:' + res, '提示', {
|
|
|
+ type: 'success',
|
|
|
+ confirmButtonText: '确定',
|
|
|
})
|
|
|
+ }).then(() => {
|
|
|
+ showDismissOrderDate.value = false
|
|
|
+ fecthDisDiags()
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
|
|
|
const makeDismissOrder = () => {
|
|
@@ -759,11 +788,8 @@ const rejectNotGeneratedMedicationListClick = () => {
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
onMounted(() => {
|
|
|
if (patient.value.inpatientNo) {
|
|
|
fecthDisDiags()
|