feat: 对接合理用药

This commit is contained in:
huxuejian 2026-09-04 09:55:04 +08:00
parent bb760e2aa4
commit 4adc9a4561
4 changed files with 28 additions and 11 deletions

View File

@ -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 // extension
const formattedExtension = computed(() => { const formattedExtension = computed(() => {
const pl = payload.value || {}; const pl = payload.value || {};
@ -68,6 +79,8 @@ const formattedExtension = computed(() => {
if (record && (record.doctorText || record.patientText)) { if (record && (record.doctorText || record.patientText)) {
return flow === "in" ? record.patientText : record.doctorText; return flow === "in" ? record.patientText : record.doctorText;
} }
const reason = parseSystemReason(ext);
if (reason !== null) return reason;
// JSON // JSON
return ext; return ext;
}); });

View File

@ -1,21 +1,18 @@
<template> <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"> <el-scrollbar v-if="visible" wrap-class="el-dialog-body-full-scroll">
<div class="px-15px py-12px"> <div class="px-15px py-12px">
<div class="text-16px"> <div class="text-16px">
当前处方存在以下问题请确认: 当前处方存在以下问题请确认:
</div> </div>
<div v-for="(item, idx) in advices" :key="idx" <div class="mt-12px p-12px rounded bg-gray-100 text-15px text-dark-500 ">
class="mt-12px p-12px rounded bg-gray-100 text-15px text-dark-500 "> {{ advices[0] }}
<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> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
<template #footer> <template #footer>
<div text-center> <div text-center>
<el-button size="large" plain class="w-140px" type="primary" @click="close()">返回修改</el-button> <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>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>

View File

@ -719,6 +719,13 @@ async function submit() {
limitUsageScope: typeof i.usage_restriction_desc === 'string' && i.usage_restriction_desc.trim() ? 'Y' : 'N' 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); const { success, data, message } = await addConsultDiagnosis(params);
loading.value = false loading.value = false
if (success) { if (success) {

View File

@ -301,10 +301,10 @@ async function loginSuccess(user) {
const path = firstMenu ? firstMenu.path : ""; const path = firstMenu ? firstMenu.path : "";
sessionStorage.setItem("doctorNo", user.doctorNo || ""); sessionStorage.setItem("doctorNo", user.doctorNo || "");
sessionStorage.setItem("isLogin", true); sessionStorage.setItem("isLogin", true);
if (import.meta.env.VITE_NEED_CA && (user.doctorNo || user.workNo)) { // if (import.meta.env.VITE_NEED_CA && (user.doctorNo || user.workNo)) {
sessionStorage.setItem("uniqueId", user.doctorNo || user.workNo); // sessionStorage.setItem("uniqueId", user.doctorNo || user.workNo);
caStore().getUserCaInfo(); // caStore().getUserCaInfo();
} // }
if (user.doctorNo) { if (user.doctorNo) {
const { imLogin } = useImStore(); const { imLogin } = useImStore();
await imLogin(); await imLogin();