diff --git a/apps/web-antd/src/components/modal/CheckChineseMedicineConflict.vue b/apps/web-antd/src/components/modal/CheckChineseMedicineConflict.vue new file mode 100644 index 00000000..85a3da0f --- /dev/null +++ b/apps/web-antd/src/components/modal/CheckChineseMedicineConflict.vue @@ -0,0 +1,32 @@ + + diff --git a/apps/web-antd/src/views/business/express/express-company/config/form.ts b/apps/web-antd/src/views/business/express/express-company/config/form.ts index e3112078..a065cf47 100644 --- a/apps/web-antd/src/views/business/express/express-company/config/form.ts +++ b/apps/web-antd/src/views/business/express/express-company/config/form.ts @@ -55,15 +55,15 @@ export const modalFormProps: VbenFormProps = { // label: 'LOGO', // rules: 'required', // }, - { - component: 'Textarea', - componentProps: { - placeholder: '请输入快递公司介绍', - }, - fieldName: 'introduce', - label: '快递公司介绍', - rules: 'required', - }, + // { + // component: 'Textarea', + // componentProps: { + // placeholder: '请输入快递公司介绍', + // }, + // fieldName: 'introduce', + // label: '快递公司介绍', + // rules: 'required', + // }, ], showDefaultActions: false, }; diff --git a/apps/web-antd/src/views/business/order/product-order/index.vue b/apps/web-antd/src/views/business/order/product-order/index.vue index 2708579c..ef306ccd 100644 --- a/apps/web-antd/src/views/business/order/product-order/index.vue +++ b/apps/web-antd/src/views/business/order/product-order/index.vue @@ -260,7 +260,7 @@ const openPrescriptionDetail = (values) => { type: 'link', icon: 'ri:send-plane-fill', // auth: ['超级订单', 'sys:user:save'], - onClick: openPrescriptionDetail.bind(null, row.prescription), + onClick: openPrescriptionDetail.bind(null, row.p_id), }, ]" /> diff --git a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts index 70e68141..32995a83 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts +++ b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts @@ -99,3 +99,20 @@ export async function addWestPrescription(data: any) { export async function switchStoreApi(data: any) { return requestClient.post(`${prefix}switch-store`, data); } + +/** + * 获取患者详情 + * @param id + */ +export async function getPrescriptionInfoApi(id: number) { + return requestClient.get('prescription/detail', { params: { id } }); +} + + +/** + * 检查是否有药物相冲 + * @param data + */ +export async function checkChineseMedicineConflictApi(data: any) { + return requestClient.post(`${prefix}check-chinese-medicine-conflict`, data); +} diff --git a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue index 6a889f82..28cb140c 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue @@ -5,6 +5,8 @@ import { Page, useVbenModal } from '@vben/common-ui'; import { Button } from 'ant-design-vue'; +import { getPrescriptionInfoApi } from '#/views/doctor/doctor-reception/api'; + const item = ref>({}); const [Modal, modalApi] = useVbenModal({ @@ -16,7 +18,15 @@ const [Modal, modalApi] = useVbenModal({ onOpenChange(isOpen: boolean) { if (isOpen) { const { values } = modalApi.getData>(); - if (values) item.value = values; + if (values) { + if (typeof values === 'number') { + getPrescriptionInfoApi(values).then((res) => { + item.value = res; + }); + } else { + item.value = values; + } + } } }, }); @@ -125,7 +135,12 @@ const decrypt = (str: string) => str; // 简单base64解码示例 >
-
+
{{ @@ -133,7 +148,13 @@ const decrypt = (str: string) => str; // 简单base64解码示例 }} {{ drug?.number }} /g
-
煎服方法: {{ drug.use_way?.name || '煎服' }}
+ +
+ 方法: + {{ + drug.use_way?.name || '煎服' + }} +

@@ -186,23 +207,63 @@ const decrypt = (str: string) => str; // 简单base64解码示例

- {{ item.content?.doctor.name }} + 签名 + {{ item.content?.doctor.name }}
- {{ item?.first_view_info?.name || '' }} + 签名 + {{ item.pharmacist_info?.name }}
- {{ item.content?.doctor.name }} + 签名 + {{ item.content?.doctor.name }}
- {{ item?.again_view_info?.name || '' }} + 签名 + {{ item.pharmacist_info?.name }}
- {{ item.content?.doctor.name }} + 签名 + {{ item.content?.doctor.name }}
@@ -212,7 +273,12 @@ const decrypt = (str: string) => str; // 简单base64解码示例
总价: ¥{{ item.total_pay_price }}
-
处方有效期: {{ item.valid_hours }}小时
+
+ 处方有效期: {{ item.valid_hours }}小时 +
+
+ {{ item.auro_expire_txt }} +
diff --git a/apps/web-antd/src/views/doctor/doctor-reception/index.vue b/apps/web-antd/src/views/doctor/doctor-reception/index.vue index 0b3e981f..921a1960 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/index.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/index.vue @@ -28,13 +28,13 @@ import { Tag, Textarea, Timeline, - TimelineItem, + TimelineItem, notification, } from 'ant-design-vue'; import {debounce} from 'lodash-es'; // 或者使用自定义防抖函数 import {getRegisterStatus} from '#/util/tool'; import { - addWestPrescription, + addWestPrescription, checkChineseMedicineConflictApi, endOfDiagnosisApi, getDrugUseList, getMyStoreListApi, @@ -381,6 +381,40 @@ const getCurrentDrugs = () => { ); }; getCurrentDrugs(); + +const doctorSecondSign = ref(0); +const checkData = ref([]); +/** + * 检查中药的相冲 + */ +const checkChineseMedicineConflict = () => { + if (activeCategory.value === 2) { + // eslint-disable-next-line no-use-before-define + sendPrescription(); + return; + } + notification.info({ + message: '正在检查药物相冲', + duration: 1, + description: '正在检查药物相冲,请稍等...', + }) + const names = currentDrugs.value.map((item) => item.drug_name); + checkChineseMedicineConflictApi({names: names}).then((res) => { + if (res.is_exist === true) { + checkData.value.message = res.message; + doctorSecondSignModal.value = true; + } else { + notification.success({ + message: '检查成功', + duration: 3, + description: '暂无相冲药品', + }) + // eslint-disable-next-line no-use-before-define + sendPrescription(); + } + }) + return; +} /** * 发送处方 */ @@ -455,6 +489,8 @@ const sendPrescription = () => { dosage: dosage.value, // 每日用药次数 day_dosage: dayDosage.value, + // 是否二次签名 + doctor_second_sign: doctorSecondSign.value, }).then(() => { message.success('处方已发送'); // 清空当前数据 @@ -702,7 +738,10 @@ function updateChineseNumber() { updateLocalStorage(); } +// 新药品确认弹窗 const showNewDrugModal = ref(false); +// 二次签名确认弹窗 +const doctorSecondSignModal = ref(false); /** * 在新的药品数量框失去焦点后弹出新药品弹窗 @@ -718,6 +757,12 @@ function newDrugModalOk() { showNewDrugModal.value = false; } +function doctorSecondSignModalOk() { + doctorSecondSign.value = 1; + doctorSecondSignModal.value = false; + sendPrescription(); +} + function updateChineseNumberGoNewDrug(event: KeyboardEvent) { if (event.key === 'Enter') { updateLocalStorage(); @@ -773,7 +818,6 @@ const getDrugListByWesternModal = debounce(async (searchText = '') => { /** * 选择药品 - * @param id */ function selectNewDrugInfo() { // 如果是新药品输入框,调用添加新药品方法 @@ -893,7 +937,6 @@ function searchOption(inputValue) { /** * 添加中药 - * @param inputValue */ function addDrugByChinese() { // 如果是新药品输入框,调用添加新药品方法 @@ -1247,16 +1290,22 @@ watch( {{ item.prescription_no }} - {{ item.created_at }} - + {{ item.prescription_type === 1 ? '中药处方' : '西药处方' }} / {{ item.category === 1 ? '自费' : '医保' }} + + 待审核 + 已通过 + 未通过 + 无需审核(服务包) + 处方ID:{{ item.id }} @@ -1821,7 +1870,7 @@ watch(
总计:¥{{ totalCost.toFixed(2) }}
- @@ -1836,10 +1885,26 @@ watch( 要把【{{ newDrugInfo.name }}】添加到清单吗? + +
有毒:
+

【{{ item }}】

+
十八反:
+

【{{ item }}】

+
十九畏:
+

【{{ item }}】

+

如需继续开方需要二次签名,确认要二次签名吗?

+