/// <summary>method write interpretation reference table to document grid, if it is needed /// </summary> /// <param name="reportData">report XML data object</param> private void WriteInterpretationRefTable(CysticFibrosisReportData reportData) { if (reportData.IsInterpretationRefTableVisible) { int i, j; string cellText; double fontSize = m_FontSize - 0.5; IEnumerable <XElement> colHeaders = reportData.InterpretationRefTableColHeaders; int colCount = colHeaders.Count(); int rowCount = reportData.InterpretationRefTableRowsCount + 1; Grid grid = XPSHelper.GetGridWithEqualColumns(rowCount, colCount, 2.0 * m_LeftMargin, m_TopMargin); WriteSimpleSection(reportData.InterpretationRefTableHeaderText, fontSize); for (j = 0; j < colCount; j++) { XPSHelper.WriteTextBlockToGrid(colHeaders.ElementAt(j).Value, grid, 0, j, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold); } for (i = 1; i < rowCount; i++) { for (j = 0; j < colCount; j++) { cellText = reportData.GetInterpretationRefTableCellText(i - 1, j); XPSHelper.WriteTextBlockToGrid(cellText, grid, i, j, HorizontalAlignment.Left, VerticalAlignment.Top, new Thickness(0, -2, 0, 0), fontSize); } } m_ReportDocument.WriteRowContent(grid); } }
/// <summary>constructor /// </summary> /// <param name="data">report XML data</param> public OruCysticFibrosis(CysticFibrosisReportData data) : base(CysticFibrosisReport.ReportName, data.PageHeader) { m_Data = data; AddCustomObxSegments(); AddObxSegmentsForStandardTrailerSections(data.OtherReportsText, data.ReportDistributionList, CysticFibrosisReport.DisclaimerIndex); }
/// <summary>constructor with XML input data /// </summary> /// <param name="reportData">report XML data object</param> public CysticFibrosisReport(CysticFibrosisReportData reportData) : base(ReportName, reportData.PageHeader) { m_ReportData = reportData; WriteMainBoxSections(m_ReportData.PathologistSignatureText); WriteAmendments(m_ReportData.Amendments, true); WriteSimpleSectionWithTitle(SpecimenLabel, m_ReportData.SpecimenText); WriteSimpleSectionWithTitle(InterpretationLabel, m_ReportData.InterpretationText); WriteInterpretationRefTable(reportData); WriteSimpleSectionWithTitle(MethodLabel, m_ReportData.MethodText); WriteSimpleSectionWithTitle(MutationsTestedLabel, m_ReportData.MutationsTestedText); WriteSimpleSectionWithTitle(ReferencesLabel, m_ReportData.ReferencesText); WriteStandardTrailerSections(reportData.OtherReportsText, reportData.ReportDistributionList, DisclaimerIndex); }