diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V20260624__fix_menu_parent_ids.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V20260624__fix_menu_parent_ids.sql new file mode 100644 index 000000000..c4a7bf21f --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V20260624__fix_menu_parent_ids.sql @@ -0,0 +1,9 @@ +-- 修复 电子健康卡 & 电子发票 的 parent_id 为 基础数据 (211) +UPDATE sys_menu +SET parent_id = (SELECT menu_id FROM sys_menu WHERE menu_name = '基础数据' AND menu_type = 'M' LIMIT 1) +WHERE menu_name IN ('电子健康卡', '电子发票') AND (parent_id IS NULL OR parent_id NOT IN (SELECT menu_id FROM sys_menu)); + +-- 修复 传染病报卡 的 parent_id 为 院感管理 (10001) +UPDATE sys_menu +SET parent_id = (SELECT menu_id FROM sys_menu WHERE menu_name = '院感管理' AND menu_type = 'M' LIMIT 1) +WHERE menu_name = '传染病报卡' AND (parent_id IS NULL OR parent_id NOT IN (SELECT menu_id FROM sys_menu)); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index 52762a086..a0d56029e 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -748,7 +748,7 @@ T1.unit_code AS unit_code, T1.status_enum AS status_enum, '' AS method_code, - '' AS rate_code, + T1.rate_code AS rate_code, NULL AS dose, '' AS dose_unit_code, T3.id AS charge_item_id, diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/MedicalDeviceDispenseMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/MedicalDeviceDispenseMapper.xml index b8d839ecd..ca2277b8f 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/MedicalDeviceDispenseMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/MedicalDeviceDispenseMapper.xml @@ -1,6 +1,6 @@ - + select A.outpatient_no, diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml index dda4c235b..d715776be 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml @@ -1,6 +1,6 @@ - + SELECT ii.reception_time, ii.start_time, diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/SummaryDispenseMedicineMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/SummaryDispenseMedicineMapper.xml index bdda5bb22..25bf67f7e 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/SummaryDispenseMedicineMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/SummaryDispenseMedicineMapper.xml @@ -1,4 +1,4 @@ - + diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml index b8c856fda..35237c4e6 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml index d21146f1d..7a85e67ce 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml @@ -315,7 +315,7 @@ T1.unit_code AS unit_code, T1.status_enum AS status_enum, '' AS method_code, - '' AS rate_code, + T1.rate_code AS rate_code, NULL AS dose, '' AS dose_unit_code, T3.id AS charge_item_id, diff --git a/healthlink-his-ui/src/views/catalog/medicine/components/medicineDialog.vue b/healthlink-his-ui/src/views/catalog/medicine/components/medicineDialog.vue index be153885a..729dd14dd 100755 --- a/healthlink-his-ui/src/views/catalog/medicine/components/medicineDialog.vue +++ b/healthlink-his-ui/src/views/catalog/medicine/components/medicineDialog.vue @@ -1020,6 +1020,10 @@ const statusFlagOptions = ref(undefined); const domainEnumOptions = ref(undefined); const deptOptions = ref(undefined); // 部门树选项 const locationOptions = ref(undefined); // 地点树选项 +const supplierListOptions = ref(undefined); +const statusRestrictedOptions = ref(undefined); +const partAttributeEnumOptions = ref(undefined); +const tempOrderSplitPropertyOptions = ref(undefined); const activeName = ref('basic'); const data = reactive({ form: {}, diff --git a/healthlink-his-ui/src/views/doctorstation/components/prescription/prescriptionlist.vue b/healthlink-his-ui/src/views/doctorstation/components/prescription/prescriptionlist.vue index c752e90e4..48e931736 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -4877,8 +4877,8 @@ function convertValues(row, index) { row.dose = row.doseQuantity / row.partPercent; break; } + calculateTotalAmount(row, index); }); - // calculateTotalAmount(row, index); } // 单次剂量数量改变时自动计算总量 @@ -4904,8 +4904,8 @@ function convertDoseValues(row, index) { row.doseQuantity = row.dose * row.partPercent; break; } + calculateTotalAmount(row, index); }); - // calculateTotalAmount(row, index); } // 总量计算,仅适用只有两种单位的情况 @@ -4921,11 +4921,6 @@ function calculateTotalAmount(row, index) { return; } - if (row.adviceType == 2) { - calculateTotalPrice(row, index); - return; - } - if (row.adviceType != 1 && row.adviceType != 2) { return; } @@ -4937,7 +4932,7 @@ function calculateTotalAmount(row, index) { let quantity; if (row.unitCode == row.minUnitCode) { - quantity = calculateQuantityBySplitType(row.partAttributeEnum, row.doseQuantity, count); + quantity = calculateQuantityBySplitType(row.partAttributeEnum, row.doseQuantity, count, row.partPercent); row.quantity = quantity; row.totalPrice = (quantity * row.minUnitPrice).toFixed(2); } else { @@ -4972,7 +4967,7 @@ function calculateTotalAmount(row, index) { if (count) { let quantity; if (row.unitCode == row.minUnitCode) { - quantity = calculateQuantityBySplitType(row.partAttributeEnum, row.doseQuantity, count); + quantity = calculateQuantityBySplitType(row.partAttributeEnum, row.doseQuantity, count, row.partPercent); prescriptionList.value[index].quantity = quantity; prescriptionList.value[index].totalPrice = (quantity * row.minUnitPrice).toFixed(6); } else { @@ -5015,17 +5010,22 @@ function calculateTotalAmount(row, index) { * @param type 门诊拆分类型 * @param dose 单次剂量 最小单位 * @param count 用药频次和用药天数计算出的总数 + * @param partPercent 拆零比 */ -function calculateQuantityBySplitType(type, dose, count) { - switch (type) { +function calculateQuantityBySplitType(type, dose, count, partPercent) { + const percent = Number(partPercent) || 1; + const numType = Number(type); + switch (numType) { case 1: // 门诊按最小单位每次量向上取整 return Math.ceil(dose) * count; case 2: // 门诊按包装单位不可拆分 - return Math.ceil(dose * count); + return Math.ceil((dose * count) / percent) * percent; case 3: // 门诊按最小单位总量向上取整 return Math.ceil(dose * count); case 4: // 门诊按包装单位每次量向上取整 - return Math.ceil(dose) * count; + return Math.ceil(dose / percent) * count * percent; + default: + return Math.ceil(dose * count); } } @@ -5035,17 +5035,22 @@ function calculateQuantityBySplitType(type, dose, count) { * @param type 门诊拆分类型 * @param dose 单次剂量 最小单位 * @param count 用药频次和用药天数计算出的总数 + * @param partPercent 拆零比 */ function calculateQuantity(type, dose, count, partPercent) { - switch (type) { + const percent = Number(partPercent) || 1; + const numType = Number(type); + switch (numType) { case 1: // 门诊按最小单位每次量向上取整 - return Math.ceil(dose / partPercent) * count; + return Math.ceil((Math.ceil(dose) * count) / percent); case 2: // 门诊按包装单位不可拆分 - return Math.ceil(dose * count); + return Math.ceil((dose * count) / percent); case 3: // 门诊按最小单位总量向上取整 - return Math.ceil((dose / partPercent) * count); + return Math.ceil(Math.ceil(dose * count) / percent); case 4: // 门诊按包装单位每次量向上取整 - return Math.ceil(dose) * count; + return Math.ceil(dose / percent) * count; + default: + return Math.ceil((dose * count) / percent); } } diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue index bf364a764..e583f066b 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue @@ -1,6 +1,7 @@