feat: 对接合理用药
This commit is contained in:
parent
bb760e2aa4
commit
4adc9a4561
@ -56,6 +56,17 @@ function parseVideoRecordExtension(ext) {
|
||||
}
|
||||
}
|
||||
|
||||
function parseSystemReason(ext) {
|
||||
try {
|
||||
const message = JSON.parse(ext);
|
||||
return message && typeof message === "object" && typeof message.reason === "string"
|
||||
? message.reason
|
||||
: null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 解析并格式化系统提示消息的 extension 字段
|
||||
const formattedExtension = computed(() => {
|
||||
const pl = payload.value || {};
|
||||
@ -68,6 +79,8 @@ const formattedExtension = computed(() => {
|
||||
if (record && (record.doctorText || record.patientText)) {
|
||||
return flow === "in" ? record.patientText : record.doctorText;
|
||||
}
|
||||
const reason = parseSystemReason(ext);
|
||||
if (reason !== null) return reason;
|
||||
// 不是JSON或解析失败,直接返回原文本
|
||||
return ext;
|
||||
});
|
||||
|
||||
@ -1,21 +1,18 @@
|
||||
<template>
|
||||
<el-dialog :model-value="visible" :width="width" title="医保审核提示" @close="close()">
|
||||
<el-dialog :model-value="visible" :width="width" title="合理用药提示" @close="close()">
|
||||
<el-scrollbar v-if="visible" wrap-class="el-dialog-body-full-scroll">
|
||||
<div class="px-15px py-12px">
|
||||
<div class="text-16px">
|
||||
当前处方存在以下问题,请确认:
|
||||
</div>
|
||||
<div v-for="(item, idx) in advices" :key="idx"
|
||||
class="mt-12px p-12px rounded bg-gray-100 text-15px text-dark-500 ">
|
||||
<div class="text-16px font-bold text-dark-500 leading-24px">{{ idx + 1 }}、{{ item.name }}</div>
|
||||
<div class="mt-4px text-15px text-dark-500 leading-24px">{{ item.text }}</div>
|
||||
<div class="mt-12px p-12px rounded bg-gray-100 text-15px text-dark-500 ">
|
||||
{{ advices[0] }}
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<div text-center>
|
||||
<el-button size="large" plain class="w-140px" type="primary" @click="close()">返回修改</el-button>
|
||||
<el-button size="large" class="w-140px" type="primary" @click="confirm()">忽略并继续提交</el-button>
|
||||
<el-button size="large" plain class="w-140px" type="primary" @click="close()">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@ -719,6 +719,13 @@ async function submit() {
|
||||
limitUsageScope: typeof i.usage_restriction_desc === 'string' && i.usage_restriction_desc.trim() ? 'Y' : 'N'
|
||||
}))
|
||||
}
|
||||
const result = await getYbReviewResult(params);
|
||||
if (!result || !result.success) {
|
||||
adviceList.value = [result?.message || '查询合理用药结果失败']
|
||||
loading.value = false;
|
||||
showAdviceModal()
|
||||
return
|
||||
}
|
||||
const { success, data, message } = await addConsultDiagnosis(params);
|
||||
loading.value = false
|
||||
if (success) {
|
||||
|
||||
@ -301,10 +301,10 @@ async function loginSuccess(user) {
|
||||
const path = firstMenu ? firstMenu.path : "";
|
||||
sessionStorage.setItem("doctorNo", user.doctorNo || "");
|
||||
sessionStorage.setItem("isLogin", true);
|
||||
if (import.meta.env.VITE_NEED_CA && (user.doctorNo || user.workNo)) {
|
||||
sessionStorage.setItem("uniqueId", user.doctorNo || user.workNo);
|
||||
caStore().getUserCaInfo();
|
||||
}
|
||||
// if (import.meta.env.VITE_NEED_CA && (user.doctorNo || user.workNo)) {
|
||||
// sessionStorage.setItem("uniqueId", user.doctorNo || user.workNo);
|
||||
// caStore().getUserCaInfo();
|
||||
// }
|
||||
if (user.doctorNo) {
|
||||
const { imLogin } = useImStore();
|
||||
await imLogin();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user