处方预览
| 药品名称 | '; + medicineHtml += '规格 | '; + medicineHtml += '单价 | '; + medicineHtml += '数量 | '; + medicineHtml += '金额 | '; + medicineHtml += '用法用量 | '; + medicineHtml += '
|---|---|---|---|---|---|
| ' + (item.medicineName || item.itemName || 'N/A') + ' | '; + medicineHtml += '' + (item.totalVolume || item.spec || '') + ' | '; + medicineHtml += '' + (item.unitPrice || item.price || '0.00') + ' | '; + medicineHtml += '' + (item.quantity || 'N/A') + ' ' + (item.unitCode_dictText || item.unit || '') + ' | '; + medicineHtml += '' + (item.totalPrice || '0.00') + ' | '; + + // 组合用法用量信息 + const usageInfo = []; + if (item.dose && item.doseUnitCode_dictText) usageInfo.push(item.dose + item.doseUnitCode_dictText); + if (item.methodCode_dictText || item.usage) usageInfo.push(item.methodCode_dictText || item.usage); + if (item.frequency) usageInfo.push(item.frequency); + medicineHtml += '' + usageInfo.join(' ') + ' | ';
+ medicineHtml += '
| 总计: | '; + medicineHtml += '' + (prescription.medTotalAmount || '0.00') + ' | '; + medicineHtml += '||||
暂无药品信息
'; + } - // 添加处方内容 - html += prescriptionData; + // 分页符(最后一个处方除外) + if (index < result.length - 1) { + medicineHtml += ''; + } - html += '