const fs = require('fs'); const path = 'D:\\new_project\\plus-ui\\src\\views\\health\\pharmacy\\index.vue'; const content = ` 全市药房药物分析 通过门诊发药、住院发药、药房进销存、药库进销存监控药房药库的情况 一、门诊发药 1. 发药工作量维度 {{ stats.outpatientPrescriptionCount ?? '---' }} 处方总数 {{ stats.validPrescriptionCount ?? '---' }} 有效发药处方数 {{ stats.returnPrescriptionCount ?? '---' }} 退方处方数 {{ stats.avgPrescriptionPerWindow ?? '---' }} 窗口人均调配处方量 2. 时效服务维度 {{ stats.avgWaitTime ?? '---' }}分钟 平均候药时长 {{ stats.overtimeWaitCount ?? '---' }} 超时候药处方数量 3. 药品消耗维度 - 西药/中成药/中药饮片调配金额占比 4. 处方异常维度 - 退方原因统计占比 二、住院发药 1. 药品消耗维度 {{ stats.inpatientDrugAmount ?? '---' }}万元 住院发药总金额 {{ stats.inpatientDrugCount ?? '---' }} 住院发药数量 2. 摆药/发药工作量维度 {{ stats.avgDailyBatch ?? '---' }} 日均摆药批次 {{ stats.avgDailyBag ?? '---' }} 日均摆药袋数 {{ stats.ivMixBagCount ?? '---' }} 静配输液调配袋数 3. 退药管控维度 {{ stats.inpatientReturnCount ?? '---' }} 住院退药次数 {{ stats.inpatientReturnAmount ?? '---' }}万元 住院退药金额 {{ stats.inpatientReturnRate ?? '---' }}% 住院退药率 三、药房进销存 1. 入库维度 {{ stats.pharmacyInAmount ?? '---' }}万元 药房申领入库金额 {{ stats.pharmacyInCount ?? '---' }} 入库数量 {{ stats.pharmacyWesternInRate ?? '---' }}% 西药入库占比 {{ stats.pharmacyChinesePatentInRate ?? '---' }}% 中成药入库占比 {{ stats.pharmacyHerbalInRate ?? '---' }}% 中药饮片入库占比 2. 出库消耗维度 {{ stats.outpatientConsumeCount ?? '---' }} 门诊发药消耗量 {{ stats.inpatientConsumeCount ?? '---' }} 住院摆药消耗量 {{ stats.internalTransferCount ?? '---' }} 药房内部调拨数量 3. 库存现状维度 {{ stats.currentStockAmount ?? '---' }}万元 当前库存总金额 {{ stats.westernStockAmount ?? '---' }}万元 西药库存金额 {{ stats.chinesePatentStockAmount ?? '---' }}万元 中成药库存金额 {{ stats.herbalStockAmount ?? '---' }}万元 中药饮片库存金额 药房库存类型占比 四、药库进销存 1. 采购入库维度 {{ stats.purchaseAmount ?? '---' }}万元 药品采购入库金额 {{ stats.purchaseBatchCount ?? '---' }} 入库批次 各供应商采购金额占比 2. 调拨出库维度 - 向各药房调拨金额 3. 库存现状维度 {{ stats.drugStoreStockAmount ?? '---' }}万元 药库当前库存总金额 {{ stats.drugStoreWesternAmount ?? '---' }}万元 西药库存金额 {{ stats.drugStoreChinesePatentAmount ?? '---' }}万元 中成药库存金额 {{ stats.drugStoreHerbalAmount ?? '---' }}万元 中药饮片库存金额 药库库存类型占比 4. 效期与损耗维度 {{ stats.expiredBatchCount ?? '---' }} 过期药品批次数 {{ stats.expiredLossAmount ?? '---' }}万元 过期药品报损金额 `; fs.writeFileSync(path, content, 'utf8'); console.log('File written successfully, size:', fs.statSync(path).size);
通过门诊发药、住院发药、药房进销存、药库进销存监控药房药库的情况