Browse Source

单位报表

bjmzak
wxd 2 years ago
parent
commit
a16416f312
  1. 879
      src/Shentun.Peis.Domain/ReportTemplates/CustomerOrgReportManager.cs

879
src/Shentun.Peis.Domain/ReportTemplates/CustomerOrgReportManager.cs

@ -32,6 +32,7 @@ namespace Shentun.Peis.ReportTemplates
private readonly IRepository<SumDiagnosis> _sumDiagnosisRepository;
private readonly IRepository<SumSuggestionHeader> _sumSuggestionHeaderRepository;
private readonly IRepository<CustomerOrg, Guid> _customerOrgRepository;
private readonly CacheService _cacheService;
private readonly string DirectoryName = System.AppDomain.CurrentDomain.BaseDirectory + @"\ReportFile";
@ -46,7 +47,8 @@ namespace Shentun.Peis.ReportTemplates
IRepository<SumSummaryHeader, Guid> sumSummaryHeaderRepository,
IRepository<SumDiagnosis> sumDiagnosisRepository,
IRepository<SumSuggestionHeader> sumSuggestionHeaderRepository,
IRepository<CustomerOrg, Guid> customerOrgRepository)
IRepository<CustomerOrg, Guid> customerOrgRepository,
CacheService cacheService)
{
_patientRegisterRepository = patientRegisterRepository;
_customerOrgManager = customerOrgManager;
@ -59,756 +61,10 @@ namespace Shentun.Peis.ReportTemplates
_sumDiagnosisRepository = sumDiagnosisRepository;
_sumSuggestionHeaderRepository = sumSuggestionHeaderRepository;
_customerOrgRepository = customerOrgRepository;
_cacheService = cacheService;
}
//public void CreateCustomerOrgPeisTemplateBak()
//{
// DocX document = DocX.Create(DirectoryName + @"\CustomerOrgTemplate\单位体检报告模板.docx");
// //第一页
// Table p1Titletable = document.AddTable(1, 2);
// p1Titletable.Design = TableDesign.TableNormal;
// p1Titletable.Alignment = Alignment.center;
// Border b = new Border();
// b.Color = Color.FromArgb(51, 153, 102);
// b.Size = BorderSize.six;
// p1Titletable.SetBorder(TableBorderType.Bottom, b);
// List<Row> rows = p1Titletable.Rows;
// Row row0 = rows[0];
// row0.Height = 65f;
// row0.Cells[0].Width = 50f;
// Xceed.Document.NET.Image logo = document.AddImage(DirectoryName + @"\CustomerOrgTemplate\logo_template.jpg");
// Formatting p1TitleFormatting = new Formatting();
// p1TitleFormatting.FontFamily = new Xceed.Document.NET.Font("宋体");
// p1TitleFormatting.FontColor = Color.FromArgb(0, 128, 0);
// row0.Cells[0].Paragraphs[0].AppendPicture(logo.CreatePicture());
// row0.Cells[0].VerticalAlignment = VerticalAlignment.Center;
// row0.Cells[1].Width = document.PageWidth - document.MarginLeft - document.MarginRight - 30f;
// row0.Cells[1].Paragraphs[0].Append("团体体检健康检查统计报告", p1TitleFormatting).FontSize(22).Alignment = Alignment.center;
// row0.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// var pTitle = document.InsertParagraph();
// pTitle.InsertTableAfterSelf(p1Titletable);
// var p1TitleSec = document.InsertParagraph();
// Formatting p1TitleSecFormatting = new Formatting();
// p1TitleSecFormatting.FontFamily = new Xceed.Document.NET.Font("楷体");
// p1TitleSecFormatting.Size = 26;
// CustomProperty org_years = new CustomProperty("org_year", "{体检年度}", p1TitleSecFormatting);
// CustomProperty org_name = new CustomProperty("org_name", "{体检单位}", p1TitleSecFormatting);
// p1TitleSec.Alignment = Alignment.right;
// p1TitleSec.AppendDocProperty(org_years, f: p1TitleSecFormatting);
// p1TitleSec.Append("年度", p1TitleSecFormatting);
// p1TitleSec.AppendDocProperty(org_name, f: p1TitleSecFormatting);
// document.InsertParagraph();
// var p1TitleSecExt = document.InsertParagraph();
// p1TitleSecFormatting.FontFamily = new Xceed.Document.NET.Font("隶书");
// p1TitleSecFormatting.Size = 26;
// p1TitleSecExt.Alignment = Alignment.right;
// p1TitleSecExt.Append("团检报告", p1TitleSecFormatting);
// document.InsertParagraph();
// Xceed.Document.NET.Image titleImg = document.AddImage(DirectoryName + @"\CustomerOrgTemplate\Page1.jpg");
// var p1TitleImg = document.InsertParagraph();
// p1TitleImg.Alignment = Alignment.center;
// p1TitleImg.AppendPicture(titleImg.CreatePicture());
// Table p1Contenttable = document.AddTable(5, 4);
// p1Contenttable.Design = TableDesign.TableNormal;
// List<Row> rowsContent = p1Contenttable.Rows;
// Row row0Content = rowsContent[0];
// Formatting p1TableContentFormatting = new Formatting();
// p1TableContentFormatting.FontFamily = new Xceed.Document.NET.Font("楷体");
// Border bTableContent = new Border();
// bTableContent.Color = Color.FromArgb(0, 128, 0);
// bTableContent.Size = BorderSize.four;
// Formatting p1TableColumn1ContentFormatting = new Formatting();
// p1TableColumn1ContentFormatting.FontFamily = new Xceed.Document.NET.Font("楷体");
// p1TableColumn1ContentFormatting.Size = 18;
// CustomProperty cell_times = new CustomProperty("times", "{体检次数}", p1TitleSecFormatting);
// CustomProperty cell_beginDt = new CustomProperty("beginDt", "{体检日期}", p1TitleSecFormatting);
// CustomProperty cell_endDt = new CustomProperty("endDt", "{结束月份}", p1TitleSecFormatting);
// CustomProperty cell_createDt = new CustomProperty("createDt", "{制表日期}", p1TitleSecFormatting);
// CustomProperty cell_printDt = new CustomProperty("printDt", "{打印日期}", p1TitleSecFormatting);
// row0Content.Cells[0].Width = 200f;
// row0Content.Cells[1].Width = 150f;
// row0Content.Cells[2].Width = 300f;
// row0Content.Cells[1].Paragraphs[0].Append("体检次数", p1TableContentFormatting).FontSize(18).Alignment = Alignment.right;
// row0Content.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// row0Content.Cells[2].Paragraphs[0].AppendDocProperty(cell_times, f: p1TableColumn1ContentFormatting).Alignment = Alignment.left;
// row0Content.Cells[2].VerticalAlignment = VerticalAlignment.Center;
// row0Content.Cells[2].SetBorder(TableCellBorderType.Bottom, bTableContent);
// Row row1Content = rowsContent[1];
// row1Content.Cells[1].Paragraphs[0].Append("体检日期", p1TableContentFormatting).FontSize(18).Alignment = Alignment.right;
// row1Content.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// row1Content.Cells[2].Paragraphs[0].AppendDocProperty(cell_beginDt, f: p1TableColumn1ContentFormatting).FontSize(18).Alignment = Alignment.left;
// row1Content.Cells[2].VerticalAlignment = VerticalAlignment.Center;
// row1Content.Cells[2].SetBorder(TableCellBorderType.Bottom, bTableContent);
// Row row2Content = rowsContent[2];
// row2Content.Cells[1].Paragraphs[0].Append("结束月份", p1TableContentFormatting).FontSize(18).Alignment = Alignment.right;
// row2Content.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// row2Content.Cells[2].Paragraphs[0].AppendDocProperty(cell_endDt, f: p1TableColumn1ContentFormatting).Alignment = Alignment.left;
// row2Content.Cells[2].VerticalAlignment = VerticalAlignment.Center;
// row2Content.Cells[2].SetBorder(TableCellBorderType.Bottom, bTableContent);
// Row row3Content = rowsContent[3];
// row3Content.Cells[1].Paragraphs[0].Append("制表日期", p1TableContentFormatting).FontSize(18).Alignment = Alignment.right;
// row3Content.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// row3Content.Cells[2].Paragraphs[0].AppendDocProperty(cell_createDt, f: p1TableColumn1ContentFormatting).Alignment = Alignment.left;
// row3Content.Cells[2].VerticalAlignment = VerticalAlignment.Center;
// Row row4Content = rowsContent[4];
// row4Content.Cells[1].Paragraphs[0].Append("打印日期", p1TableContentFormatting).FontSize(18).Alignment = Alignment.right;
// row4Content.Cells[1].VerticalAlignment = VerticalAlignment.Center;
// row4Content.Cells[2].Paragraphs[0].AppendDocProperty(cell_printDt, f: p1TableColumn1ContentFormatting).Alignment = Alignment.left;
// row4Content.Cells[2].VerticalAlignment = VerticalAlignment.Center;
// var p1Content = document.InsertParagraph();
// p1Content.InsertTableAfterSelf(p1Contenttable);
// for (int i = 0; i <= 10; i++) document.InsertParagraph();
// Table p1FootTable = document.AddTable(1, 1);
// p1FootTable.Design = TableDesign.TableNormal;
// List<Row> rowsFootTable = p1FootTable.Rows;
// Row row0Foot = rowsFootTable[0];
// row0Foot.Cells[0].Paragraphs[0].Append("医院体检中心 编制", p1TableContentFormatting).FontSize(14).Alignment = Alignment.right;
// row0Foot.Cells[0].VerticalAlignment = VerticalAlignment.Center;
// row0Foot.Cells[0].SetBorder(TableCellBorderType.Bottom, bTableContent);
// var p1Foot = document.InsertParagraph();
// p1Foot.InsertTableAfterSelf(p1FootTable);
// var p1Foot1 = document.InsertParagraph();
// p1Foot1.Append("体检中心地址:", p1TableContentFormatting).FontSize(10).Alignment = Alignment.right;
// //第二页
// p1Foot1.InsertPageBreakAfterSelf();
// Xceed.Document.NET.Font f = new Xceed.Document.NET.Font("宋体");
// var p2_1 = document.InsertParagraph("前言").Font(f).FontSize(14);
// document.InsertParagraph();
// document.InsertParagraph("这是一本针对贵单位员工体检结果的综合分析资料,希望透过本资料,让贵单位主管能够了解员工的健康状况及可以改善的方向。").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"这份报告包括五大部份:基础资料、体检异常情况统计、员工健康问题分析及保健建议、女性员工健康问题分析及保健建议、男性员工健康问题分析及保健建议、全体员工体检结果汇总。我们在每个部份都会提供重要的健康与疾病相关知识,以及后续应该如何处理等信息。让非常关心员工健康的您,知道如何再进一步改善或提倡健康促进活动。").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第一部份:参检人员构成情况").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第二部份:体检项目与体检项目的参检情况").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第三部份:全体员工体检结果汇总").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第四部份:本次体检异常结果检出统计").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第五部份: 本次体检前十大异常结果分析").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第六部份: 体检者未完成情况").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph(@"第七部分:常见体检异常结果分析及健康指导").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph();
// document.InsertParagraph(@"医院体检中心另提供完善的后续服务,包括护理咨询服务、特色医院导诊服务、营养咨询等。有任何需要,请电洽相关部门,或拨打咨询专线咨询相关事宜。").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph();
// document.InsertParagraph(@"定期健康检查对于员工健康的重要性相信您已知道,然而,更重要的是完成健康检查后,改善健康活动的开始,也就是健康促进的一级预防医学(适当的运动、均衡的饮食、身心休闲),这才是健康检查最终的目标。").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// document.InsertParagraph();
// document.InsertParagraph(@"完全依赖治疗的时代已经过去了,应定期健康检查,并落实健康促进的一级预防医学,这将是未来人类健康的不二法门。").Font(f).FontSize(12).IndentationFirstLine = 32.0f;
// //第三页
// var p2_last = document.InsertParagraph();
// p2_last.InsertPageBreakAfterSelf();
// document.InsertParagraph(@"一、参检人员构成情况").Font(f).FontSize(16);
// Table p3Contenttable = document.AddTable(5, 10);
// p3Contenttable.Design = TableDesign.TableGrid;
// List<Row> p3rowsContent = p3Contenttable.Rows;
// Row p3Row0 = p3rowsContent[0];
// p3Contenttable.MergeCellsInColumn(0, 0, 1);
// p3Row0.Cells[0].Paragraphs[0].Append("情况类型").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p3Row0.MergeCells(1, 4);
// p3Row0.Cells[1].Paragraphs[0].Append("人数").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p3Row0.MergeCells(2, 3);
// p3Row0.Cells[2].Paragraphs[0].Append("构成比率").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row0.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p3Row0.MergeCells(3, 5);
// p3Row0.Cells[3].Paragraphs[0].Append("参检比率").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row0.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p3Contenttable.SetColumnWidth(0, 35f);
// Row p3Row1 = p3rowsContent[1];
// p3Row1.Cells[1].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[2].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[3].Paragraphs[0].Append("其它").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[4].Paragraphs[0].Append("合计").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[4].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[5].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[5].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[6].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[6].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[7].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[7].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[8].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[8].FillColor = Color.FromArgb(209, 245, 203);
// p3Row1.Cells[9].Paragraphs[0].Append("平均").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row1.Cells[9].FillColor = Color.FromArgb(209, 245, 203);
// Formatting p3TableFormatting = new Formatting();
// p3TableFormatting.FontFamily = new Xceed.Document.NET.Font("宋体");
// p3TableFormatting.Size = 10.5;
// CustomProperty p3_tb_reg_man_num = new CustomProperty("regManNum", "{男性登记人数}");
// CustomProperty p3_tb_reg_woman_num = new CustomProperty("regWomanNum", "{女性登记人数}");
// CustomProperty p3_tb_reg_other_num = new CustomProperty("regOtherNum", "{其它登记人数}");
// CustomProperty p3_tb_reg_total_num = new CustomProperty("regTotalNum", "{总登记人数}");
// CustomProperty p3_tb_reg_man_rate = new CustomProperty("regManRate", "{男性登记人数占总登记人数百分比}");
// CustomProperty p3_tb_reg_woman_rate = new CustomProperty("regWomanRate", "{女性登记人数占总登记人数百分比}");
// CustomProperty p3_tb_real_man_num = new CustomProperty("realManNum", "{男性实检人数}");
// CustomProperty p3_tb_real_woman_num = new CustomProperty("realWomanNum", "{女性实检人数}");
// CustomProperty p3_tb_real_other_num = new CustomProperty("realOtherNum", "{其它实检人数}");
// CustomProperty p3_tb_real_total_num = new CustomProperty("realTotalNum", "{总实检人数}");
// CustomProperty p3_tb_real_man_rate = new CustomProperty("realManRate", "{男性实检人数占总实检人数百分比}");
// CustomProperty p3_tb_real_woman_rate = new CustomProperty("realWomanRate", "{女性实检人数占总实检人数百分比}");
// CustomProperty p3_tb_real_reg_man_rate = new CustomProperty("realRegManRate", "{男性实检人数占男性登记人数百分比}");
// CustomProperty p3_tb_real_reg_woman_rate = new CustomProperty("realRegWomanRate", "{女性实检人数占女性登记人数百分比}");
// CustomProperty p3_tb_real_reg_total_rate = new CustomProperty("realRegTotalRate", "{总实检人数占总登记人数百分比}");
// CustomProperty p3_tb_notcheck_man_num = new CustomProperty("notcheckManNum", "{男性未检人数}");
// CustomProperty p3_tb_notcheck_woman_num = new CustomProperty("notcheckWomanNum", "{女性未检人数}");
// CustomProperty p3_tb_notcheck_other_num = new CustomProperty("notcheckOtherNum", "{其他未检人数}");
// CustomProperty p3_tb_notcheck_total_num = new CustomProperty("notcheckTotalNum", "{总未检人数}");
// CustomProperty p3_tb_notcheck_man_rate = new CustomProperty("notcheckManRate", "{男性未检人数占总未检人数百分比}");
// CustomProperty p3_tb_notcheck_woman_rate = new CustomProperty("notcheckWoanRate", "{女性未检人数占总未检人数百分比}");
// CustomProperty p3_tb_notcheck_reg_man_rate = new CustomProperty("notcheckRegManRate", "{男性未检人数占男性登记人数百分比}");
// CustomProperty p3_tb_notcheck_reg_woman_rate = new CustomProperty("notcheckRegWomanRate", "{女性未检人数占女性登记人数百分比}");
// CustomProperty p3_tb_notcheck_reg_total_rate = new CustomProperty("notcheckRegTotalRate", "{总未检人数占总登记人数百分比}");
// Row p3Row2 = p3rowsContent[2];
// p3Row2.Cells[0].Paragraphs[0].Append("登记").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[1].Paragraphs[0].AppendDocProperty(p3_tb_reg_man_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[2].Paragraphs[0].AppendDocProperty(p3_tb_reg_woman_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[3].Paragraphs[0].AppendDocProperty(p3_tb_reg_other_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[4].Paragraphs[0].AppendDocProperty(p3_tb_reg_total_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[5].Paragraphs[0].AppendDocProperty(p3_tb_reg_man_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[6].Paragraphs[0].AppendDocProperty(p3_tb_reg_woman_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[7].Paragraphs[0].Append("100%").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[8].Paragraphs[0].Append("100%").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row2.Cells[9].Paragraphs[0].Append("100%").Font(f).FontSize(10.5).Alignment = Alignment.center;
// Row p3Row3 = p3rowsContent[3];
// p3Row3.Cells[0].Paragraphs[0].Append("实检").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[1].Paragraphs[0].AppendDocProperty(p3_tb_real_man_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[2].Paragraphs[0].AppendDocProperty(p3_tb_real_woman_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[3].Paragraphs[0].AppendDocProperty(p3_tb_real_other_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[4].Paragraphs[0].AppendDocProperty(p3_tb_real_total_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[5].Paragraphs[0].AppendDocProperty(p3_tb_real_man_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[6].Paragraphs[0].AppendDocProperty(p3_tb_real_woman_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[7].Paragraphs[0].AppendDocProperty(p3_tb_real_reg_man_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[8].Paragraphs[0].AppendDocProperty(p3_tb_real_reg_woman_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row3.Cells[9].Paragraphs[0].AppendDocProperty(p3_tb_real_reg_total_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// Row p3Row4 = p3rowsContent[4];
// p3Row4.Cells[0].Paragraphs[0].Append("未检").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[1].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_man_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[2].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_woman_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[3].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_other_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[4].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_total_num).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[5].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_man_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[6].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_woman_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[7].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_reg_man_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[8].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_reg_woman_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// p3Row4.Cells[9].Paragraphs[0].AppendDocProperty(p3_tb_notcheck_reg_total_rate).Font(f).FontSize(10.5).Alignment = Alignment.center;
// var p3Content = document.InsertParagraph();
// p3Content.InsertTableAfterSelf(p3Contenttable);
// document.InsertParagraph("参检百分比:").Font(f).FontSize(14).Alignment = Alignment.left;
// document.InsertParagraph().Alignment = Alignment.center;
// //var p3Chat1 = document.AddChart<PieChart>();
// //p3Chat1.AddLegend(ChartLegendPosition.Right, true);
// //var p3ChatData1 = ChartData.CreateReferenceRate();
// //// 创建饼图并绑定数据
// //var p3Chats1 = new Series("参检率");
// //p3Chats1.Bind(p3ChatData1, "Category", "Expenses");
// //p3Chat1.AddSeries(p3Chats1);
// //document.InsertChart(p3Chat1, 200f, 150f);
// //document.Paragraphs[document.Paragraphs.Count - 1].Alignment = Alignment.center;
// document.InsertParagraph("参检性别百分比:").Font(f).FontSize(14).Alignment = Alignment.left;
// document.InsertParagraph().Alignment = Alignment.center;
// //var p3Chat2 = document.AddChart<PieChart>();
// //p3Chat2.AddLegend(ChartLegendPosition.Right, true);
// //var p3ChatData2 = ChartData.CreateReferenceRateSex();
// //// 创建饼图并绑定数据
// //var p3Chats2 = new Series("参检性别百分比");
// //p3Chats2.Bind(p3ChatData2, "Category", "Expenses");
// //p3Chat2.AddSeries(p3Chats2);
// //document.InsertChart(p3Chat2, 200f, 150f);
// //document.Paragraphs[document.Paragraphs.Count - 1].Alignment = Alignment.center;
// //var p3Paragraphs1 = document.Paragraphs.Where(p => p.Text.Equals("参检百分比:")).FirstOrDefault();
// //第四页
// document.Paragraphs[document.Paragraphs.Count - 1].InsertPageBreakAfterSelf();
// document.InsertParagraph(@"二、体检项目与体检项目的参检情况").Font(f).FontSize(16);
// Table p4Contenttable = document.AddTable(3, 11);
// p4Contenttable.Design = TableDesign.TableGrid;
// List<Row> p4rowsContent = p4Contenttable.Rows;
// p4Contenttable.SetColumnWidth(0, 55f);
// p4Contenttable.SetColumnWidth(1, 85f);
// Row p4Row0 = p4rowsContent[0];
// p4Row0.MergeCells(0, 1);
// p4Row0.Cells[0].Paragraphs[0].Append("体检项目").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p4Row0.MergeCells(1, 3);
// p4Row0.Cells[1].Paragraphs[0].Append("该项参检人数").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p4Row0.MergeCells(2, 4);
// p4Row0.Cells[2].Paragraphs[0].Append("总体参检人数").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row0.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p4Row0.MergeCells(3, 5);
// p4Row0.Cells[3].Paragraphs[0].Append("该项参检百分比").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row0.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// Row p4Row1 = p4rowsContent[1];
// p4Row1.Cells[0].Paragraphs[0].Append("检查科室").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[1].Paragraphs[0].Append("项目名称").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[2].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[3].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[4].Paragraphs[0].Append("合计").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[4].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[5].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[5].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[6].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[6].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[7].Paragraphs[0].Append("合计").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[7].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[8].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[8].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[9].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[9].FillColor = Color.FromArgb(209, 245, 203);
// p4Row1.Cells[10].Paragraphs[0].Append("合计").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p4Row1.Cells[10].FillColor = Color.FromArgb(209, 245, 203);
// var p4Content = document.InsertParagraph();
// p4Content.InsertTableAfterSelf(p4Contenttable);
// //第五页
// document.InsertParagraph().InsertPageBreakAfterSelf();
// document.InsertParagraph(@"三、全体员工体检结果汇总").Font(f).FontSize(16);
// var p5Content = document.InsertParagraph(@"个人隐私请保密,仅供贵单位领导参阅").Font(f).FontSize(10.5);
// Table p5Contenttable = document.AddTable(2, 5);
// p5Contenttable.Design = TableDesign.TableGrid;
// p5Contenttable.SetColumnWidth(0, 110f);
// p5Contenttable.SetColumnWidth(1, 75f);
// p5Contenttable.SetColumnWidth(2, 35f);
// p5Contenttable.SetColumnWidth(3, 45f);
// p5Contenttable.SetColumnWidth(4, document.PageWidth - document.MarginLeft - document.MarginRight - 265f);
// List<Row> p5rowsContent = p5Contenttable.Rows;
// Row p5Row0 = p5rowsContent[0];
// p5Row0.Cells[0].Paragraphs[0].Append("档案号").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Row0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p5Row0.Cells[1].Paragraphs[0].Append("姓名").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Row0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p5Row0.Cells[2].Paragraphs[0].Append("性别").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Row0.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p5Row0.Cells[3].Paragraphs[0].Append("年龄").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Row0.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p5Row0.Cells[4].Paragraphs[0].Append("体检结果").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Row0.Cells[4].FillColor = Color.FromArgb(209, 245, 203);
// p5Content.InsertTableAfterSelf(p5Contenttable);
// document.InsertParagraph("(注: 敬请保护个人隐私, 本档案仅供贵单位负责职工健康体检的人员查阅! 未经员工本人同意, 不得外泄资料, 否则, 造成不良影响由贵单位承担, 与本中心无关!)").Font(f).FontSize(10.5);
// document.InsertParagraph();
// document.InsertParagraph(@"四、本次体检异常结果检出统计").Font(f).FontSize(16);
// var p5Content1 = document.InsertParagraph(@"贵单位此次在我中心进行员工体检,内容包括[登记组合项目][实检组合项目],现将检出的按男女综合检出数量最高的部分异常情况进行统计分析,以反映出员工的健康状况。").Font(f).FontSize(10.5);
// Table p5Contenttable2 = document.AddTable(3, 8);
// p5Contenttable2.Design = TableDesign.TableGrid;
// p5Contenttable2.SetColumnWidth(0, 95f);
// p5Contenttable2.SetColumnWidth(1, 130f);
// p5Contenttable2.SetColumnWidth(2, 40f);
// p5Contenttable2.SetColumnWidth(3, 40f);
// p5Contenttable2.SetColumnWidth(4, 40f);
// p5Contenttable2.SetColumnWidth(5, 40f);
// p5Contenttable2.SetColumnWidth(6, 40f);
// p5Contenttable2.SetColumnWidth(7, 40f);
// List<Row> p5rowsContent2 = p5Contenttable2.Rows;
// Row p5Table2Row0 = p5rowsContent2[0];
// p5Table2Row0.MergeCells(0, 1);
// p5Table2Row0.Cells[0].Paragraphs[0].Append("体检结论").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row0.MergeCells(1, 3);
// p5Table2Row0.Cells[1].Paragraphs[0].Append("人数").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row0.MergeCells(2, 4);
// p5Table2Row0.Cells[2].Paragraphs[0].Append("百分比").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row0.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// Row p5Table2Row1 = p5rowsContent2[1];
// p5Table2Row1.Cells[0].Paragraphs[0].Append("结论").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[1].Paragraphs[0].Append("人员名单").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[2].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[3].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[4].Paragraphs[0].Append("合计").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[4].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[5].Paragraphs[0].Append("男性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[5].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[6].Paragraphs[0].Append("女性").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[6].FillColor = Color.FromArgb(209, 245, 203);
// p5Table2Row1.Cells[7].Paragraphs[0].Append("平均").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p5Table2Row1.Cells[7].FillColor = Color.FromArgb(209, 245, 203);
// p5Content1.InsertTableAfterSelf(p5Contenttable2);
// //第六页
// document.InsertParagraph().InsertPageBreakAfterSelf();
// document.InsertParagraph(@"前十大异常结果柱状图:").Font(f).FontSize(16);
// document.InsertParagraph().Alignment = Alignment.center;
// //var p6Chat1 = document.AddChart<BarChart>();
// //p6Chat1.AddLegend(ChartLegendPosition.Right, false);
// //p6Chat1.BarDirection = BarDirection.Column;//指示柱状图是横向的还是纵向的:Column纵向,Bar横向
// //p6Chat1.BarGrouping = BarGrouping.Stacked;//这个不好解释,一个4个枚举值,你一一试一遍就知道了
// //p6Chat1.GapWidth = 200;//柱状图表的宽度
// //p6Chat1.GapWidth = 200;
// //var usa = ChartData.CreateDisease();
// //var p6Chats1 = new Series("疾病人数");
// //p6Chats1.Color = Color.FromArgb(79, 129, 189);
// //p6Chats1.Bind(usa, "Category", "Expenses");
// //p6Chat1.AddSeries(p6Chats1);
// //document.InsertChart(p6Chat1);
// document.InsertParagraph();
// document.InsertParagraph(@"前十大异常结果饼图:").Font(f).FontSize(16);
// document.InsertParagraph().Alignment = Alignment.center;
// //var p6Chat2 = document.AddChart<PieChart>();
// //p6Chat2.AddLegend(ChartLegendPosition.Right, true);
// //var p6ChatData2 = ChartData.CreateException();
// //// 创建饼图并绑定数据
// //var p6Chats2 = new Series("疾病人数百分比");
// //p6Chats2.Bind(p6ChatData2, "Category", "Expenses");
// //p6Chat2.AddSeries(p6Chats2);
// //document.InsertChart(p6Chat2);
// //第七页
// document.InsertParagraph().InsertPageBreakAfterSelf();
// document.InsertParagraph(@"该部分针对贵单位员工在我中心体检时,所检出的各种异常情况提供相关的分析与医疗保健建议").Font(f).FontSize(10.5);
// var p7Content = document.InsertParagraph(@"五、本次体检前十大异常结果分析").Font(f).FontSize(16);
// Table p7Contenttable = document.AddTable(2, 2);
// p7Contenttable.Design = TableDesign.TableGrid;
// p7Contenttable.SetColumnWidth(0, 130f);
// p7Contenttable.SetColumnWidth(1, document.PageWidth - document.MarginLeft - document.MarginRight - 130f);
// List<Row> p7rowsContent = p7Contenttable.Rows;
// Row p7TableRow0 = p7rowsContent[0];
// p7TableRow0.Cells[0].Paragraphs[0].Append("疾病").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7TableRow0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p7TableRow0.Cells[1].Paragraphs[0].Append("建议").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7TableRow0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p7Content.InsertTableAfterSelf(p7Contenttable);
// document.InsertParagraph();
// var p7Content1 = document.InsertParagraph(@"六、体检者未完成情况").Font(f).FontSize(16);
// Table p7Contenttable1 = document.AddTable(2, 5);
// p7Contenttable1.Design = TableDesign.TableGrid;
// p7Contenttable1.SetColumnWidth(0, 110f);
// p7Contenttable1.SetColumnWidth(1, 95f);
// p7Contenttable1.SetColumnWidth(2, 45f);
// p7Contenttable1.SetColumnWidth(3, 45f);
// p7Contenttable1.SetColumnWidth(4, document.PageWidth - document.MarginLeft - document.MarginRight - 295f);
// List<Row> p7rowsContent1 = p7Contenttable1.Rows;
// Row p7Table2Row0 = p7rowsContent1[0];
// p7Table2Row0.Cells[0].Paragraphs[0].Append("体检号").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7Table2Row0.Cells[0].FillColor = Color.FromArgb(209, 245, 203);
// p7Table2Row0.Cells[1].Paragraphs[0].Append("姓名").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7Table2Row0.Cells[1].FillColor = Color.FromArgb(209, 245, 203);
// p7Table2Row0.Cells[2].Paragraphs[0].Append("性别").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7Table2Row0.Cells[2].FillColor = Color.FromArgb(209, 245, 203);
// p7Table2Row0.Cells[3].Paragraphs[0].Append("年龄").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7Table2Row0.Cells[3].FillColor = Color.FromArgb(209, 245, 203);
// p7Table2Row0.Cells[4].Paragraphs[0].Append("部门").Font(f).FontSize(10.5).Alignment = Alignment.center;
// p7Table2Row0.Cells[4].FillColor = Color.FromArgb(209, 245, 203);
// p7Content1.InsertTableAfterSelf(p7Contenttable1);
// /*
// var numberedList = document.AddList("First List Item.", 0, ListItemType.Numbered);
// //Add a numbered list starting at 2
// document.AddListItem(numberedList, "Second List Item.");
// document.AddListItem(numberedList, "Third list item.");
// document.AddListItem(numberedList, "First sub list item", 1);
// document.AddListItem(numberedList, "Nested item.", 3);
// document.AddListItem(numberedList, "Fourth nested item.");
// var bulletedList = document.AddList("First Bulleted Item.", 0, ListItemType.Bulleted);
// document.AddListItem(bulletedList, "Second bullet item");
// document.AddListItem(bulletedList, "Sub bullet item", 1);
// document.AddListItem(bulletedList, "Second sub bullet item", 2);
// document.AddListItem(bulletedList, "Third bullet item");
// document.InsertList(numberedList);
// document.InsertList(bulletedList);
// */
// document.InsertParagraph();
// document.InsertParagraph(@"七、常见体检异常结果分析及健康指导").Font(f).FontSize(16).SpacingAfter(10d).SetLineSpacing(LineSpacingType.Line, 13.8f);
// document.InsertParagraph(@"◆ 颈椎疾病健康指导").Font(f).FontSize(14).SpacingAfter(10d).SetLineSpacing(LineSpacingType.Line, 13.8f);
// document.InsertParagraph(@"【健康指导】").Font(f).FontSize(14).SpacingAfter(10d).SetLineSpacing(LineSpacingType.Line, 13.8f);
// int index = document.Paragraphs.Count;
// Formatting p7Formatting = new Formatting();
// p7Formatting.FontFamily = new Xceed.Document.NET.Font("宋体");
// p7Formatting.Size = 14;
// ListOptions listOptions = new ListOptions();
// listOptions.ListType = ListItemType.Numbered;
// var numberedList = document.AddList(listOptions);
// numberedList.AddListItem("颈椎病是指由于各种原因所致的颈椎结构的改变,如椎间盘的变性、突出,颈椎体边缘骨质增生,黄韧带肥厚、钙化或后纵韧带钙化,颈椎曲度异 常、椎间不稳等,直接压迫、刺激或通过压迫影响血液循环,使脊髓颈段、神经根、椎动脉或交感神经的功能损害,进而 发生组织结构损害,出现一系列临床征象,又有颈椎综合征之称。概括起来就是颈椎的椎间盘突出、骨质增生等压迫颈椎周围的神经、血管等导致的各种不适表现。", 0);
// numberedList.AddListItem("哪些人易患颈椎病,从事文字、电脑工作人员及学生最易患颈椎病。颈椎病的发病,年青人主要是外因,即姿势式疲劳和损伤,主要以姿势 疲劳为主。长时间同一姿势伏案工作,颈肩部的肌肉一 下处于紧张强下状态,血液循环不畅,极易导致颈椎肌肉劳损。中学生的书包越来越重,导致姿势不适合人体正常的生理弯曲,久而久之易患颈椎病;喜欢玩电脑、打游戏机的中学生也因长时间颈部保持一个姿势而导致颈部肌肉痉挛、劳损而发生颈椎病;对于中老年人来说,颈椎病则是身体的退行性病变的表现。\n\t 家庭康复治疗法:", 3);
// numberedList.AddListItem("如果不幸得颈椎病也不要紧张,应该及时就医。俗话说“三分治疗七分养”, 养即保养、康复预防之意。对于颈椎病,不要寄托在医院检查一下,吃些药就可以痊愈,该病本身就是一个退变性且极易复发的疾病。不注意疗效的巩固,很快可以再发作,所以应加倍注意。家庭的治疗如下。", 3);
// numberedList.AddListItem("在急性期最好能够少活动。", 3);
// numberedList.AddListItem("家里可以做自我牵引,如购买牵引带,一般情况下取 4~6 千克重 量,20~30 分钟/次,1~2 次/天或再多一点。牵引治疗 2~3 天,颈部肌肉紧张多可得至缓解,疼痛减轻。 或自己双手托住头部做向上拨伸的动作,效果一 样。", 3);
// numberedList.AddListItem("头项部可以外敷中药膏药,必要时可以用中药水热敷,可以疏筋活络, 缓解疼痛, 口服消炎止痛药如扶他林、芬必得等。", 3);
// numberedList.AddListItem("同时可以配合理疗,如微波红外线、针炙等。", 3);
// numberedList.AddListItem("急性期疼痛明显,影响日常工作、生活甚至整夜难眠者,针剌或神经根封闭,不失 为 一种有效的治疗方法,但应选择正规专业医师操作,以免发生意外。", 3);
// numberedList.AddListItem("日常防范方法:“防患于末然”对任何疾病都是适合的,不管有没有出现颈椎病的症状,改变不良工作生活习惯都非常重要,千万别委屈了你的脖子。 别委屈脖子对于经常低头工作的办公室工作人员,正确的姿势是关键,首先在坐姿上尽可能保持 自然的端坐位,头部略微前倾,保持头、颈、胸的正常生理曲 线,切不可头部过度前屈、身体前趴。对于长期伏案工作者,应每隔1小时左右,让颈部向左右转动数次,转动时应轻柔、缓慢,以达到该方向的最大运动范围为准;生活习惯低枕位休息,维持正常颈曲。选择适合自己的卧具,以晨起头颈无不适为度;改正躺在床上或沙发上,用垫子或枕头抬高头部看电视、看书的不良习 惯。", 3);
// numberedList.AddListItem("避免有害的活动 对长时间下象棋、打麻将者,奉劝还是少一些“娱乐”,多一些运动,因此种“娱乐”逐渐导致颈椎病的非常多见。 颈椎保健操要防止颈椎病的发生,除了要纠正不良姿势,注意防潮、防冷外,还应积极加强锻炼, 经常活动颈部,多做伸颈运动。办公室人员没时间锻炼,最 简单的锻炼可以以颈部为笔,头部为笔尖,反复写“米”字。这种伸颈运动可以改善颈部肌肉韧带的供血,使血液循环加 快,使肌肉韧带更加强壮,预防骨质疏松,从而减少颈 椎病的发生。", 3);
// document.InsertList(numberedList);
// document.InsertParagraph(@"◆ 代谢性疾病健康指导").Font(f).FontSize(16);
// document.InsertParagraph(@" 代谢性疾病主要为生活方式病,包括超重、肥胖、血糖偏高、血压偏高、高血脂、脂 肪肝、高尿酸等。").Font(f).FontSize(14);
// document.InsertParagraph(@"【高血脂】").Font(f).FontSize(14);
// document.InsertParagraph(@" 形成原因:膳食结构不合理,食物中胆固醇和饱和脂肪酸摄入过多,总热量过高, 应酬较多;体力活动过少;就个体而言与遗传基因有关。因此防治高血脂和肥胖对减少 冠心病、脑卒中,糖尿病、脂肪肝、胆结石的患病率和心脑血管意外有重要意义。").Font(f).FontSize(14);
// document.InsertParagraph(@" 预防建议:").Font(f).FontSize(14);
// var numberedList1 = document.AddList(listOptions);
// numberedList1.AddListItem("用低脂、低热、低糖饮食、限制动物性脂肪、肥肉、禽类皮、动物内脏、浓肉汤、鱿鱼、墨斗鱼、鱼籽和蟹黄,少吃蛋黄,甜食,多吃蔬菜、水果和富含纤维素食物,提倡吃八分饱;", 1);
// numberedList1.AddListItem("持之以恒,坚持有氧运动,有氧运动有利于降低血脂,减肥, 降血压,预防糖尿病和减少血栓形成。有氧运动以运动后心率达到最大心率的 50~70% 为宜(最大心率=220-年龄)。运动方式可选择:快走、慢跑、骑车、爬楼梯和游泳等各 种可坚持的运动,每周不少于五天,每天不少于 20-40 分钟。", 1);
// document.InsertList(numberedList1);
// document.InsertParagraph(@"【超重或肥胖】").Font(f).FontSize(14);
// var numberedList2 = document.AddList(listOptions);
// numberedList2.AddListItem("概念:体重超重或肥胖是指体内脂肪积聚过多和(或)分布异常、体重增加,是由于遗 传或环境因素共同作用的结果。1999年,世界卫生组织已正式宣布肥胖为一种疾病。", 0);
// numberedList2.AddListItem("危害:", 0);
// numberedList2.AddListItem("寿命缩短:男性肥胖者的死亡率是正常人的1.5倍,女性是1.47倍。", 1);
// numberedList2.AddListItem("危害心理健康:影响美观、生活不便,会产生自卑、焦虑和抑郁等问题。", 1);
// numberedList2.AddListItem("诱发疾病:肥胖是导致2型糖尿病、心血管疾病、高血压、胆结石和癌症、内分泌、 代谢紊乱的重要危险因素。也可以引起关节痛、浮肿、活动耐力降低等。此外,肥胖还易使皮肤脆性增加,易发生皮炎、摩擦伤、并容易合并化脓性或真菌感染。 肥胖严重威胁健康,医学界称肥胖、高血压、高血脂和高血糖为“死亡四重奏”。", 1);
// numberedList2.AddListItem("原因(发病危险因素):\r\tA、遗传因素:家族史。 B、不良生活方式:偏爱高脂肪、高热量饮食,睡前或夜间用餐,体力活动少等。 C、年龄因素:男性中年以后,女性绝经期后生理功能减退,代谢减低,体力活动减少,而饮食摄入量未相应减少,造成摄入量超过消耗量而致肥胖。 D、精神因素:精神过度紧张及心理障碍,可引起食欲亢进,导致肥胖。 E、其他因素:药物、疾病等引起。", 0);
// numberedList2.AddListItem("症状与表现: A、男性肥胖多表现为“苹果型”肥胖,即内脏型或向心型肥胖脂肪沉积在腹部、臀部和背部;女性肥胖多表现为“梨型”肥胖,脂肪主要沉积在臀部、大腿。 B、中度以上肥胖者可出现活动后心悸、气短、嗜睡等症状。重度肥胖者可出现呼吸困难、浮肿、发绀、阵发性睡眠呼吸暂停综合症等。 C、合并高血压、糖尿病、血脂异常、痛风者可出现相应症状。", 0);
// numberedList2.AddListItem("防治: 非药物治疗", 0);
// numberedList2.AddListItem("认识肥胖症的危害;认识到单纯性肥胖是一种生活方式疾病;认识治疗肥胖症是一个自我控制的过程。改变生活方式,矫正饮食、行为习惯。", 1);
// numberedList2.AddListItem("控制摄入量,低脂、低热量、低嘌呤、低盐饮食,戒烟限酒。", 1);
// numberedList2.AddListItem("运动治疗,增加体力活动,加强锻炼。", 1);
// document.InsertList(numberedList2);
// document.InsertParagraph(@"【血糖偏高】").Font(f).FontSize(14);
// var numberedList3 = document.AddList(listOptions);
// numberedList3.AddListItem("糖尿病诊断标准:", 0);
// numberedList3.AddListItem("症状+随机血糖≥11.1mmol/L;", 1);
// numberedList3.AddListItem("空腹血糖(FPG)≥7.0mmol/L(非同日两次空腹血糖);", 1);
// numberedList3.AddListItem("糖耐量试验(OGTT)中2小时血浆葡萄糖(2HPG)≥11.1mmol/L。", 1);
// numberedList3.AddListItem("血糖增高预防建议:", 0);
// numberedList3.AddListItem("普及糖尿病知识,充分认识糖尿病正在我国已进入多数的严重形势和预防方法。", 1);
// numberedList3.AddListItem("合理膳食避免营养过剩,提倡用低脂,少糖,富含纤维的膳食;C 坚持有氧运动。", 1);
// numberedList3.AddListItem("避免使用影响糖代谢的药物。", 1);
// numberedList3.AddListItem("定期复查血糖。", 1);
// numberedList3.AddListItem("年龄大于40岁,有糖尿病家族史,血糖或尿糖曾经异常者,应查餐后两小时血糖。", 1);
// numberedList3.AddListItem("糖尿病综合治疗原则:", 0);
// numberedList3.AddListItem("糖尿病教育。", 1);
// numberedList3.AddListItem("合理的饮食治疗。", 1);
// numberedList3.AddListItem("坚持运动治疗。", 1);
// numberedList3.AddListItem("正规的 药物治疗。", 1);
// numberedList3.AddListItem("定期病情监测。", 1);
// document.InsertList(numberedList3);
// document.InsertParagraph(@"【高血压】").Font(f).FontSize(14);
// var numberedList4 = document.AddList(listOptions);
// numberedList4.AddListItem("诊断标准:1999 年 10 月中国高血压联盟推荐新高血压诊断标准,未服降压药的情况下:收缩压≥140mmHg 和(或)舒张压≥90mmHg,即诊断高血压。以非同日多次(二次或 以上)复测平均值为依据,偶然一次不能诊断高血压。", 0);
// numberedList4.AddListItem("危害:患了高血压病,如果不加以控制,可导致脑卒中或冠心病等,将严重影响生 活质量,甚至威胁到生命。", 0);
// numberedList4.AddListItem("高血压病存在患病率高、致残率高、死亡率高,知晓率低、治疗率低、控制率低的 现象,也就是人们通常所说的“三高”、“三低”。", 0);
// numberedList4.AddListItem("病因或发病危险因素:", 0);
// numberedList4.AddListItem("体重超重或肥胖:体重超重和体重增加过快,是高血压病的危险因素。尤其内脏型肥胖,同时也是糖尿病和血脂异常的危险因素。", 1);
// numberedList4.AddListItem("饮酒:长期饮白酒达 50ml/每天以上,也是高血压病发病的危险因素;少量饮些红 葡萄酒可有预防冠心病的作用。", 1);
// numberedList4.AddListItem("长期高盐、低镁、低钙、低动物蛋白质饮食;膳食钠盐的摄入量与血压水平有显著 的相关性。", 1);
// numberedList4.AddListItem("长期精神紧张或超负荷工作,也是高血压病的危险因素。", 1);
// numberedList4.AddListItem("高血压的防治:", 0);
// numberedList4.AddListItem("增强自我保健意识,学会自我保健知识。", 1);
// numberedList4.AddListItem("定期监测:35岁以上人群至少每年要检查一次血压,以利早期发现血压增高,降低 人群高血压的发病率和患病率。", 1);
// numberedList4.AddListItem("预防超重和肥胖,保持理想体重,其中饮食(低盐、高钾、高钙、高动物蛋白质饮 食如奶类、动制品、鱼类、菜果类)、运动疗法(保持规律有氧运动非常重要),运动降压效 果最直接。", 1);
// numberedList4.AddListItem("讲究精神卫生;E、不吸烟;F、药物治疗原则。", 1);
// document.InsertList(numberedList4);
// document.InsertParagraph(@"【脂肪肝】").Font(f).FontSize(14);
// var numberedList5 = document.AddList(listOptions);
// numberedList5.AddListItem("病因:目前我国脂肪肝发病率有增高趋势,多数与肥胖、高脂血症(以甘油三脂增 高关系更密切)、糖尿病、肝炎病史及嗜酒有关。", 0);
// numberedList5.AddListItem("建议:脂肪肝可双向发展,有效控制或消除上述促发因素,脂肪肝可明改善,因此建议: A 用低脂膳食,治疗高血脂症;B 坚持有氧运动,控制体重; C 限酒; D 避免对肝脏有害的药物; E 药物治疗:目前尚无明显有效治疗脂肪肝的药物,若肝 功能明显异常可选用保肝药物。", 0);
// document.InsertList(numberedList5);
// document.InsertParagraph(@"【高尿酸】").Font(f).FontSize(14);
// var numberedList6 = document.AddList(listOptions);
// numberedList6.AddListItem("何谓高尿酸血症:\r\t嘌呤代谢物为尿酸,男性每 100 毫升血液中尿酸值在 8.7 毫克以上,女性 8 毫克以 上时,则称为高尿酸血症。", 0);
// numberedList6.AddListItem("建议:", 0);
// numberedList6.AddListItem("每天至少 2000mI 液体,多摄取低嘌呤、碱性食物,例如蔬菜。", 1);
// numberedList6.AddListItem("避免高嘌呤食物。", 1);
// numberedList6.AddListItem("避免喝酒、油炸食物。", 1);
// numberedList6.AddListItem("避免摄取肉汤或高汤。", 1);
// numberedList6.AddListItem("食欲不佳时,须注意补充含糖液体,以避免身体组织快速分解,诱发痛风。", 1);
// numberedList6.AddListItem("避免暴饮暴食。", 1);
// numberedList6.AddListItem("避免饥饿,因为肌肉被分解,致尿酸排出。", 1);
// numberedList6.AddListItem("避免使用阿司匹林类药物,以免妨碍尿酸排出。", 1);
// numberedList6.AddListItem("急性期:应去医院看病,选择药物治疗。", 1);
// numberedList6.AddListItem("缓解期:促进身体活动,应酌量选择(表二)食物,平时可多选择表一食物,少用高嘌 呤食物(表三)。", 1);
// numberedList6.AddListItem("维持理想体重:理想体重(公斤)=22×身高 2 (平方公尺)。", 1);
// numberedList6.AddListItem("痛风石的部位应注意保护皮肤,维持完整性。", 1);
// document.InsertList(numberedList6);
// document.InsertParagraph(@"◆ 眼科疾病").Font(f).FontSize(14);
// var numberedList7 = document.AddList(listOptions);
// numberedList7.AddListItem("眼病体检的目的:", 0);
// numberedList7.AddListItem("及早发现眼病隐患:如青光眼、糖尿病视网膜病变。", 1);
// numberedList7.AddListItem("眼病咨询:如白内障是否需手术?视力不好是否需配镜?", 1);
// numberedList7.AddListItem("对全身健康状况评估,眼底是全身情况的缩印,高血压、高血糖、高血脂造成器官损害之前,在眼底会有所表现。我们在眼病筛查中对每一个受检者都进行了解释。", 1);
// numberedList7.AddListItem("建议:", 0);
// numberedList7.AddListItem("结膜炎,请注意用眼卫生,如症状明显,可局部 治疗。", 1);
// numberedList7.AddListItem("眼底杯盘比,建议到专科医院,测眼压,查视 野等。", 1);
// numberedList7.AddListItem("视网膜动脉硬化,建议低盐、清淡饮食,并请关注 血压、血脂、血糖及动脉硬化的防治。", 1);
// numberedList7.AddListItem("青光眼或可疑青光眼,需到医院青光眼专科复查。", 1);
// numberedList7.AddListItem("白内障需,考虑手术治疗。", 1);
// numberedList7.AddListItem("糖尿病性视网膜病变,Ⅲ期以下者需要控制血糖并每半年或一年观察眼底,Ⅲ 期及以上者应尽快到医院就诊。", 1);
// numberedList7.AddListItem("视网膜病变,需要监测血压和血糖情况并做相应治疗。", 1);
// numberedList7.AddListItem("黄斑病变,视力小于 0.3 时到医院就诊(陈旧性者不必复诊)。", 1);
// numberedList7.AddListItem("视网膜血管病变,监测血压和血糖情况做相应处理,非陈旧性者需医院就诊。", 1);
// numberedList7.AddListItem("视神经病变(萎缩/缺血性),需要检测血压血糖,每年随诊观察。", 1);
// document.InsertList(numberedList7);
// document.InsertParagraph(@"◆ 耳鼻喉疾病").Font(f).FontSize(14);
// var numberedList8 = document.AddList(listOptions);
// numberedList8.AddListItem("过敏性鼻炎:建议查找过敏原,并避免与其接触,必要时专科治疗,平时注意加强锻炼, 增强机体免疫力,预防感冒。", 0);
// numberedList8.AddListItem("慢性咽炎:若症状明显,请专科治疗,平时少吃辛辣食物,少作长谈,避免有害气体及 粉尘的刺激。", 0);
// numberedList8.AddListItem("慢性鼻炎:请专科治疗,平时注意增强体质,提高机体抵抗力,预防感冒,祛除诱因。", 0);
// numberedList8.AddListItem("慢性扁桃体炎:请注意锻炼身体,增强体质,防止感冒,如反复发作请专科进一步治疗。", 0);
// document.InsertList(numberedList8);
// document.InsertParagraph(@"◆ 肝胆疾病").Font(f).FontSize(14);
// document.InsertParagraph(@"【肝功异常】").Font(f).FontSize(14);
// document.InsertParagraph(@"转氨酶除在肝脏外,还可分布在心、肾、骨骼肌、胰等组织中,当这些组织有病时, 也会引起血清转氨酶活性升高。如心肌炎、急性心肌梗塞时,血清转氨酶活性均会升高,除此之外,如胆石症、甲状腺机能亢进、伤寒、疟疾、感冒、大量服用阿斯匹林等,都可使血 清转氨酶升高,甚至在某些生理条件下如剧烈运动等,也会使转氨酶升高。").Font(f).FontSize(14);
// document.InsertParagraph(@"因此我们绝对不能一看到转氨酶升高就诊断为肝炎,而必须结合病人具体情况如症状 体征及其他检查综合分析,做出诊断,应注意以下几个问题:").Font(f).FontSize(14);
// var numberedList9 = document.AddList(listOptions);
// numberedList9.AddListItem("血清转氨酶升高,仍以病毒性肝炎最为常见,而且转氨酶升高的幅度大(在正常值4 倍以上),且持续时间很长(大于 1 个月)。", 0);
// numberedList9.AddListItem("肝病时,转氨酶升高,只表示肝细胞受损,不能区别肝病的性质。如病毒性肝炎、 药物性肝炎等,都能使转氨酶升高。", 0);
// numberedList9.AddListItem("在临床上如发现转氨酶(特别是 ALT)下降,而胆红素反升高,往往说明病人病情严重,预后不良。如急性或亚急性重症肝炎。", 0);
// numberedList9.AddListItem("某些慢性肝炎或肝炎恢复期,转氨酶可以正常。", 0);
// numberedList9.AddListItem("总之,不能单靠转氨酶来诊断或否定肝炎,必须结合其他化验结果和临床表现进行全方面分析,方能诊断。", 0);
// document.InsertList(numberedList9);
// document.InsertParagraph(@"【肝囊肿、肝血管瘤】").Font(f).FontSize(14);
// document.InsertParagraph(@"应该定期复查,动态观察变化,必要专科时治疗,平时注意不要受外力撞击,以免破裂").Font(f).FontSize(14);
// document.InsertParagraph(@"【胆囊结石】").Font(f).FontSize(14);
// var numberedList10 = document.AddList(listOptions);
// numberedList10.AddListItem("预防肠道寄生虫和细菌感染;", 0);
// numberedList10.AddListItem("饮食控制,少吃动物内脏鱼籽,蛋黄等高胆固醇膳食,增加膳食中纤维素含量。", 0);
// numberedList10.AddListItem("控制体重;", 0);
// numberedList10.AddListItem("纠正久坐少动的生活习惯。", 0);
// numberedList10.AddListItem("治疗:无并发症的胆结石,可根据个体情况选择;", 0);
// numberedList10.AddListItem("利胆排石综合治疗。", 1);
// numberedList10.AddListItem("药物溶石。", 1);
// numberedList10.AddListItem("体外碎石。", 1);
// numberedList10.AddListItem("内窥镜取石。", 1);
// numberedList10.AddListItem("腹腔镜手术。", 1);
// numberedList10.AddListItem("外科胆囊切除术等治疗。", 1);
// document.InsertList(numberedList10);
// document.InsertParagraph(@"【胆囊息肉】").Font(f).FontSize(14);
// document.InsertParagraph(@"胆囊息肉主要由慢性炎症引起,如息肉进一步增大,和/或合并胆囊多发结石,考虑手术治 疗;一般情况定期复查。").Font(f).FontSize(14);
// document.InsertParagraph(@"◆ 心血管疾病").Font(f).FontSize(14);
// var numberedList11 = document.AddList(listOptions);
// numberedList11.AddListItem("T 波、ST-T 改变引起 T 波、ST-T 段改变的原因很多,需结合有关临床资料,综合分析做出诊断。有冠心病危险因素的人(A、有冠心病家庭史;B、高胆固醇血症;C、高血 压;D、糖尿病;E 吸烟;F 肥胖)近期出现上述心电图改变,与心肌缺血有关,可疑者需 专科医院进一步检查。", 0);
// numberedList11.AddListItem( "完全性右束支传导阻滞 可见于有器质性心脏病(冠心病、高血压性心脏病)者,偶 见于正常人。应注意复查心电图,有症状及时专科诊治。", 0);
// numberedList11.AddListItem( "房室传导阻滞:是比较常见的心律失常,在正常人群中的检出率约为 2%-5%,在器质 性心脏病患者中约占 20%-30%。它是心脏传导阻滞中最常见,也是很重要的一种。应注意 复查心电图,有症状及时专科诊治。", 0);
// numberedList11.AddListItem( "心脏早搏:无心脏病背景者,多为生理性原因,可半年复查;如频发早搏,请及时就 医;有心脏病者伴有早搏,建议专科治疗。", 0);
// numberedList11.AddListItem( "房颤:是一种十分常见的心律失常。据统计,60 岁以上人群中,房颤发生率 1%,并 随年龄而增加。有症状请专科就诊。", 0);
// numberedList11.AddListItem( "由于人们饮食习惯、生活习惯的改变,造成高脂血症患者增加, 若血脂质过高不加以 控制,再加上高血压、抽烟等因素的影响,使脂质沉淀物沉积在血管壁上,越积越厚,以致 血管管腔狭小,血流不通,使组织缺氧与营养缺乏, 这种情形发生在心脏冠状动脉时,首 先,引起心绞痛。若不积极治疗最后会造成心肌梗塞。", 0);
// numberedList11.AddListItem( "所以一旦出了问题应及早治疗並纠正不良饮食习惯,防止病情恶化,即使进行药物治 疗或医疗手术改善病情,仍然要配合饮食控制才能减少再复发的机会。", 0);
// numberedList11.AddListItem( "心血管疾病饮食原则:", 0);
// numberedList11.AddListItem( "维持理想体重。", 1);
// numberedList11.AddListItem( "控制脂质总摄入量。烹调时应注意用油量,宜多采用清蒸、 水煮、凉拌、燉、滷 等方式,禁用油炸的烹调方式,並少吃肥肉、鸡皮等油脂含量高的食物。", 1);
// numberedList11.AddListItem( "炒菜用油宜选用单元不饱和脂肪酸高者(如:橄榄油、菜籽 油、花生油);少用 饱和脂肪酸高者(如:猪油)。少吃胆固醇含量高的食物,如内脏类、蝦卵、鱼卵等,蛋可以吃但每周不超过二 到三个蛋黄为原则。", 1);
// numberedList11.AddListItem( "避免富含精制糖的食物(如蛋糕、甜食)。(见附表:富含 精制糖的食物)。", 1);
// numberedList11.AddListItem( "攝取富含 W-3 脂肪酸的鱼类(秋刀鱼、鲑鱼、鳗鱼等)。", 1);
// numberedList11.AddListItem( "减少钠量攝取。罐头、醃制食品及各种加工食品含钠量高, 应忌食。宜选择新鲜 食物自行制作,烹调时减少食盐的用量,其它含钠量高的调味品(味精、酱油、乌醋等)应 减少或避免使用。", 1);
// numberedList11.AddListItem( "多摄取含纤维质的食物(全穀类、蔬菜类、水果)。", 1);
// numberedList11.AddListItem( "避免烟、酒、含咖啡因饮料及其他刺激性食品。", 1);
// numberedList11.AddListItem( "有服用抗凝血剂的病患,要减少含维生素 K 多的食物,如绿色蔬菜(菠菜、甘蓝菜、萵苣、绿花椰菜)、肝脏。", 1);
// document.InsertList(numberedList11);
// document.InsertParagraph(@"◆ 肾脏疾病").Font(f).FontSize(14);
// var numberedList12 = document.AddList(listOptions);
// numberedList12.AddListItem("肾结石\n建议平时多饮水,少吃高草酸食物,可做蹦跳运动,避免感染,请定期复查,必要时排石治疗。", 0);
// numberedList12.AddListItem( "肾囊肿", 0);
// numberedList12.AddListItem( "请定期复查,观察变化,若有症状专科治疗。", 1);
// numberedList12.AddListItem( "肾功能异常:建议控制膳食中蛋白质比例,近期复查,必要时专科诊治。如有肾脏病史,请及时肾内科诊治。", 1);
// numberedList12.AddListItem( "肾错构瘤\n属良性肿瘤,请定期复查,如有症状专科治疗", 0);
// numberedList12.AddListItem( "肾萎缩、肾盂增大\n建议专科进一步诊治", 0);
// document.InsertList(numberedList12);
// for (int i = index; i < document.Paragraphs.Count; i++)
// {
// document.Paragraphs[i].SpacingAfter(10d).SetLineSpacing(LineSpacingType.Line, 13.8f);
// ///document.Paragraphs[i].Alignment = Alignment.both;
// }
// //结束语页
// document.InsertParagraph().InsertPageBreakAfterSelf();
// document.InsertParagraph(@"结束语").Font(f).FontSize(14).Bold(true);
// document.InsertParagraph();
// document.InsertParagraph(@"影响健康的因素很多,包括遗传基因、日常生活习惯、社会环境、医疗资源等等,其中,与一般民众息息相关的医疗资源,仅占影响健康因素的10%,最大的影响因素还是日常生活习惯及社会环境。根据世界卫生组织(WHO)的估计,75%的癌症是已知的环境因素所引起,而这些因素都是可以预防的,例如抽烟、酗酒。").Font(f).FontSize(10.5).IndentationFirstLine = 32.0f;
// document.InsertParagraph();
// document.InsertParagraph(@"世界卫生组织(WHO)指出:“二十一世纪的医学不应该继续以疾病为主要研究对象,而应该以人类健康作为医学研究的主要方向。” 这个精神旨在宣告预防医学和健康保健将成为医学的主导。").Font(f).FontSize(10.5).IndentationFirstLine = 32f;
// document.InsertParagraph();
// document.InsertParagraph(@"我中心愿以卓越的服务、优质的技术继续为贵单位提供医疗保健服务,从体检中发现健康问题,从保健中解决健康问题。").Font(f).FontSize(10.5).IndentationFirstLine = 32f;
// document.InsertParagraph();
// document.InsertParagraph(@"最后,感谢您对国宾的支持,别忘了定期为员工安排健康检查。您的任何意见,都是我们成长的来源!敬请不吝指教。").Font(f).FontSize(10.5).IndentationFirstLine = 32f;
// document.InsertParagraph().InsertPageBreakAfterSelf();
// //检后服务
// Xceed.Document.NET.Font f1 = new Xceed.Document.NET.Font("黑体");
// Xceed.Document.NET.Font f2 = new Xceed.Document.NET.Font("楷体");
// Formatting pBottomFirstFormatting = new Formatting();
// pBottomFirstFormatting.FontFamily = new Xceed.Document.NET.Font("黑体");
// pBottomFirstFormatting.Size = 14;
// Formatting pBottomLastFormatting = new Formatting();
// pBottomLastFormatting.FontFamily = new Xceed.Document.NET.Font("黑体");
// pBottomLastFormatting.Size = 10.5;
// document.InsertParagraph(@"检后服务").Font(f1).FontSize(18);
// document.InsertParagraph(@"健康体检后,您需要健康维护和管理:").Font(f1).FontSize(10.5);
// var svr1 = document.InsertParagraph().Font(f1).FontSize(10.5);
// svr1.InsertText("1.", false, pBottomLastFormatting);
// svr1.InsertText("检后就诊", false, pBottomFirstFormatting);
// svr1.InsertText("--体检中发现的疾病由国内著名、省内著名的专家为您对接就诊,真正起到早发现、早诊断、早治疗。", false, pBottomLastFormatting);
// var svr2 = document.InsertParagraph().Font(f1).FontSize(10.5);
// svr2.InsertText("2.", false, pBottomLastFormatting);
// svr2.InsertText("常见病、疑难病预约就诊服务", false, pBottomFirstFormatting);
// svr2.InsertText("--请拨打健康服务热线。我们可以帮您用最短的时间预约上最合适您病情的专家,他们为国内著名、省内著名的专家在您需要时我们还可以通过绿色通道帮您预约外省外院著名专家。", false, pBottomLastFormatting);
// document.InsertParagraph("3.体检报告电话咨询服务。").Font(f1).FontSize(10.5);
// document.InsertParagraph("4.特殊检查预约服务(CT、MR等大型检查设备)。").Font(f1).FontSize(10.5);
// document.InsertParagraph("5.住院预约服务。").Font(f1).FontSize(10.5);
// document.InsertParagraph("6.外院就诊指导。").Font(f1).FontSize(10.5);
// document.InsertParagraph("您 健 康 的 管 家").Font(f1).FontSize(18).Italic(true).Alignment = Alignment.center;
// document.InsertParagraph("人生中偶然的病痛--有我们的关怀").Font(f2).FontSize(18).Bold(true).Italic(true).Alignment = Alignment.center;
// document.InsertParagraph("健康体检中心").Font(f).FontSize(16).Alignment = Alignment.center;
// document.InsertParagraph("团体体检汇总报告").Font(f).FontSize(16).Alignment = Alignment.center;
// document.InsertParagraph("企业员工健康检查统计报告").Font(f1).FontSize(22).Alignment = Alignment.center;
// document.InsertParagraph("【版权所有,翻印必究】").Font(f).FontSize(10.5).Alignment = Alignment.center;
// document.Save();
//}
/// <summary>
/// 根据模板创建报告
/// </summary>
@ -1979,28 +1235,26 @@ namespace Shentun.Peis.ReportTemplates
/// <returns></returns>
public async Task CreateMedicalItemExamineSituationData(UnitPhysicalExaminationReportExportWordData documentData, CreateInspectionPersonnelPara customerOrgs)
{
var query = from a in await _patientRegisterRepository.GetQueryableAsync()
join b in await _registerCheckRepository.GetQueryableAsync() on a.Id equals b.PatientRegisterId
join c in await _registerAsbitemRepository.GetQueryableAsync() on b.Id equals c.RegisterCheckId
join d in await _asbitemRepository.GetQueryableAsync() on c.AsbitemId equals d.Id
join e in await _itemTypeRepository.GetQueryableAsync() on d.ItemTypeId equals e.Id into ee
from ae in ee.DefaultIfEmpty()
join f in await _sexRepository.GetQueryableAsync() on a.SexId equals f.Id into ff
from af in ff.DefaultIfEmpty()
var query = from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
join registerAsbitem in await _registerAsbitemRepository.GetQueryableAsync() on registerCheck.Id equals registerAsbitem.RegisterCheckId
join asbitem in await _asbitemRepository.GetQueryableAsync() on registerAsbitem.AsbitemId equals asbitem.Id
join itemType in await _itemTypeRepository.GetQueryableAsync() on asbitem.ItemTypeId equals itemType.Id into itemTypeTemp
from itemTypeHaveEmpty in itemTypeTemp.DefaultIfEmpty()
where registerCheck.CompleteFlag != RegisterCheckCompleteFlag.UnChecked
select new
{
CustomerOrgGroupId = a.CustomerOrgGroupId,
CustomerOrgRegisterId = a.CustomerOrgRegisterId,
CustomerOrgId = a.CustomerOrgId,
PatientRegisterId = a.Id,
CreationTime = a.CreationTime,
MedicalStartDate = a.MedicalStartDate,
SummaryDate = a.SummaryDate,
SexId = a.SexId,
SexName = af != null ? af.DisplayName : "",
ItemTypeName = ae != null ? ae.DisplayName : "",
AsbitemName = d.DisplayName,
c
CustomerOrgGroupId = patientRegister.CustomerOrgGroupId,
CustomerOrgRegisterId = patientRegister.CustomerOrgRegisterId,
CustomerOrgId = patientRegister.CustomerOrgId,
PatientRegisterId = patientRegister.Id,
CreationTime = patientRegister.CreationTime,
MedicalStartDate = patientRegister.MedicalStartDate,
SummaryDate = patientRegister.SummaryDate,
SexId = patientRegister.SexId,
ItemTypeName = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.DisplayName : "",
AsbitemName = asbitem.DisplayName,
registerAsbitem
};
@ -2031,25 +1285,70 @@ namespace Shentun.Peis.ReportTemplates
m.SummaryDate.Value < Convert.ToDateTime(customerOrgs.EndDate).AddDays(1));
}
var medicalItemExamineSituations = query.GroupBy(g => g.PatientRegisterId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalItemExamineSituation
List<UnitPhysicalExaminationReportExportWordData_MedicalItemExamineSituation> medicalItemExamineSituations = new List<UnitPhysicalExaminationReportExportWordData_MedicalItemExamineSituation>();
foreach (var item in query.ToList().GroupBy(g => g.registerAsbitem.AsbitemId))
{
AsbitemName = s.FirstOrDefault().AsbitemName,
ItemTypeName = s.FirstOrDefault().ItemTypeName,
MaleAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Male).Count(),
FemaleAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Female).Count(),
TotalAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Male || m.SexId == SexFlag.Female).Count(),
MaleSumCheckNumber = documentData.CheckedDetail.MaleNumber,
FemaleSumCheckNumber = documentData.CheckedDetail.FemaleNumber,
TotalSumCheckNumber = documentData.CheckedDetail.MaleNumber + documentData.CheckedDetail.FemaleNumber,
MaleAsbitemCheckRatio = documentData.CheckedDetail.MaleNumber != 0 ?
Math.Round(s.Where(m => m.SexId == SexFlag.Male).Count() * 100M / documentData.CheckedDetail.MaleNumber, 2) + "%" : "0%",
FemaleAsbitemCheckRatio = documentData.CheckedDetail.FemaleNumber != 0 ?
Math.Round(s.Where(m => m.SexId == SexFlag.Female).Count() * 100M / documentData.CheckedDetail.FemaleNumber, 2) + "%" : "0%",
TotalAsbitemCheckRatio = Math.Round(
((documentData.CheckedDetail.MaleNumber != 0 ? Math.Round(s.Where(m => m.SexId == SexFlag.Male).Count() * 100M / documentData.CheckedDetail.MaleNumber, 2) : 0)
+ (documentData.CheckedDetail.FemaleNumber != 0 ? Math.Round(s.Where(m => m.SexId == SexFlag.Female).Count() * 100M / documentData.CheckedDetail.FemaleNumber, 2) : 0)) / 2, 2
) + "%"
});
string AsbitemName = item.FirstOrDefault().AsbitemName;
string ItemTypeName = item.FirstOrDefault().ItemTypeName;
int MaleAsbitemCheckNumber = item.Where(m => m.SexId == SexFlag.Male).Count();
int FemaleAsbitemCheckNumber = item.Where(m => m.SexId == SexFlag.Female).Count();
int TotalAsbitemCheckNumber = item.Where(m => m.SexId == SexFlag.Male || m.SexId == SexFlag.Female).Count();
int MaleSumCheckNumber = documentData.CheckedDetail.MaleNumber;
int FemaleSumCheckNumber = documentData.CheckedDetail.FemaleNumber;
int TotalSumCheckNumber = MaleSumCheckNumber + FemaleSumCheckNumber;
decimal MaleAsbitemCheckRatioValue = 0M;
if (MaleSumCheckNumber != 0)
{
MaleAsbitemCheckRatioValue = Math.Round(MaleAsbitemCheckNumber * 100M / MaleSumCheckNumber, 2);
}
decimal FemaleAsbitemCheckRatioValue = 0M;
if (FemaleSumCheckNumber != 0)
{
FemaleAsbitemCheckRatioValue = Math.Round(FemaleAsbitemCheckNumber * 100M / FemaleSumCheckNumber, 2);
}
string MaleAsbitemCheckRatio = MaleAsbitemCheckRatioValue + "%";
string FemaleAsbitemCheckRatio = FemaleAsbitemCheckRatioValue + "%";
string TotalAsbitemCheckRatio = Math.Round((MaleAsbitemCheckRatioValue + FemaleAsbitemCheckRatioValue) / 2) + "%";
medicalItemExamineSituations.Add(new UnitPhysicalExaminationReportExportWordData_MedicalItemExamineSituation
{
AsbitemName = AsbitemName,
FemaleAsbitemCheckNumber = FemaleAsbitemCheckNumber,
FemaleAsbitemCheckRatio = FemaleAsbitemCheckRatio,
FemaleSumCheckNumber = FemaleSumCheckNumber,
ItemTypeName = ItemTypeName,
MaleAsbitemCheckNumber = MaleAsbitemCheckNumber,
MaleAsbitemCheckRatio = MaleAsbitemCheckRatio,
MaleSumCheckNumber = MaleSumCheckNumber,
TotalAsbitemCheckNumber = TotalAsbitemCheckNumber,
TotalAsbitemCheckRatio = TotalAsbitemCheckRatio,
TotalSumCheckNumber = TotalSumCheckNumber
});
}
//var medicalItemExamineSituations = query.ToList().GroupBy(g => g.registerAsbitem.AsbitemId)
// .Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalItemExamineSituation
// {
// AsbitemName = s.FirstOrDefault().AsbitemName,
// ItemTypeName = s.FirstOrDefault().ItemTypeName,
// MaleAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Male).Count(),
// FemaleAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Female).Count(),
// TotalAsbitemCheckNumber = s.Where(m => m.SexId == SexFlag.Male || m.SexId == SexFlag.Female).Count(),
// MaleSumCheckNumber = documentData.CheckedDetail.MaleNumber,
// FemaleSumCheckNumber = documentData.CheckedDetail.FemaleNumber,
// TotalSumCheckNumber = documentData.CheckedDetail.MaleNumber + documentData.CheckedDetail.FemaleNumber,
// MaleAsbitemCheckRatio = documentData.CheckedDetail.MaleNumber != 0 ?
// Math.Round(s.Where(m => m.SexId == SexFlag.Male).Count() * 100M / documentData.CheckedDetail.MaleNumber, 2) + "%" : "0%",
// FemaleAsbitemCheckRatio = documentData.CheckedDetail.FemaleNumber != 0 ?
// Math.Round(s.Where(m => m.SexId == SexFlag.Female).Count() * 100M / documentData.CheckedDetail.FemaleNumber, 2) + "%" : "0%",
// TotalAsbitemCheckRatio = Math.Round(
// ((documentData.CheckedDetail.MaleNumber != 0 ? Math.Round(s.Where(m => m.SexId == SexFlag.Male).Count() * 100M / documentData.CheckedDetail.MaleNumber, 2) : 0)
// + (documentData.CheckedDetail.FemaleNumber != 0 ? Math.Round(s.Where(m => m.SexId == SexFlag.Female).Count() * 100M / documentData.CheckedDetail.FemaleNumber, 2) : 0)) / 2, 2
// ) + "%"
// });
documentData.MedicalItemExamineSituations = medicalItemExamineSituations.ToList();
}
@ -2114,7 +1413,7 @@ namespace Shentun.Peis.ReportTemplates
}
#endregion
var medicalResultSummarys = query.GroupBy(g => g.PatientRegisterId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalResultSummary
var medicalResultSummarys = query.ToList().GroupBy(g => g.PatientRegisterId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalResultSummary
{
Age = s.FirstOrDefault().Age != null ? s.FirstOrDefault().Age.ToString() : "",
PatientName = s.FirstOrDefault().PatientName,
@ -2183,7 +1482,7 @@ namespace Shentun.Peis.ReportTemplates
}
#endregion
var medicalAbnormalResultStatistics = query.GroupBy(g => g.DiagnosisId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalAbnormalResultStatistics
var medicalAbnormalResultStatistics = query.ToList().GroupBy(g => g.DiagnosisId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalAbnormalResultStatistics
{
DiagnosisName = s.FirstOrDefault().DiagnosisName,
PatientDetail = string.Join("、", s.Select(ss => ss.PatientName)),
@ -2260,7 +1559,7 @@ namespace Shentun.Peis.ReportTemplates
}
#endregion
var medicalTenAbnormalResults = query.GroupBy(g => g.DiagnosisId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalTenAbnormalResult
var medicalTenAbnormalResults = query.ToList().GroupBy(g => g.DiagnosisId).Select(s => new UnitPhysicalExaminationReportExportWordData_MedicalTenAbnormalResult
{
DiagnosisName = s.FirstOrDefault().DiagnosisName,
DiagnosisSuggestion = DataHelper.SetSumSuggestionInReport(s.Select(ss => ss.ac).ToList())

Loading…
Cancel
Save