public override void ToXml(XElement document) { TCellSubsetAnalysisTestOrder panelSetOrder = (TCellSubsetAnalysisTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); this.AddHeader(document, panelSetOrder, "BAL T-Cell Subset Analysis"); this.AddNextObxElement("", document, "F"); string result = "CD3 Percent: " + panelSetOrder.CD3Percent.ToString().StringAsPercent(); this.AddNextObxElement(result, document, "F"); result = "CD4 Percent: " + panelSetOrder.CD4Percent.ToString().StringAsPercent(); this.AddNextObxElement(result, document, "F"); result = "CD8 Percent: " + panelSetOrder.CD8Percent.ToString().StringAsPercent(); this.AddNextObxElement(result, document, "F"); string value = string.Empty; if (panelSetOrder.CD4CD8Ratio.HasValue) { value = Math.Round(panelSetOrder.CD4CD8Ratio.Value, 2).ToString(); } result = "CD4/CD8 Ratio: " + value; this.AddNextObxElement(result, document, "F"); this.AddNextObxElement("Reference Range: " + panelSetOrder.ReferenceRange, document, "F"); this.AddNextObxElement("", document, "F"); this.AddAmendments(document); this.AddNextObxElement("Specimen Information:", document, "F"); YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(panelSetOrder.OrderedOn, panelSetOrder.OrderedOnId); this.AddNextObxElement("Specimen Identification: " + specimenOrder.Description, document, "F"); string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime); this.AddNextObxElement("Collection Date/Time: " + collectionDateTimeString, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Interpretation: " + panelSetOrder.Interpretation, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Method:", document, "F"); this.HandleLongString(panelSetOrder.Method, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("References:", document, "F"); this.HandleLongString(panelSetOrder.ReportReferences, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement(panelSetOrder.Disclosure, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); this.AddNextObxElement(panelSetOrder.ASRComment, document, "F"); this.AddNextObxElement(string.Empty, document, "F"); this.AddNextObxElement(panelSetOrder.GetLocationPerformedComment(), document, "F"); this.AddNextObxElement(string.Empty, document, "F"); }
public override void Render() { TCellSubsetAnalysisTestOrder testOrder = (TCellSubsetAnalysisTestOrder)this.m_PanelSetOrder; this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\TCellSubsetAnalysis.1.xml"; base.OpenTemplate(); this.SetDemographicsV2(); this.SetReportDistribution(); this.SetCaseHistory(); YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(m_PanelSetOrder.ReportNo); YellowstonePathology.Business.Document.AmendmentSection amendmentSection = new YellowstonePathology.Business.Document.AmendmentSection(); amendmentSection.SetAmendment(amendmentCollection, this.m_ReportXml, this.m_NameSpaceManager, true); this.ReplaceText("report_cd3_percent", testOrder.CD3Percent.ToString().StringAsPercent()); this.ReplaceText("report_cd4_percent", testOrder.CD4Percent.ToString().StringAsPercent()); this.ReplaceText("report_cd8_percent", testOrder.CD8Percent.ToString().StringAsPercent()); string value = string.Empty; if (testOrder.CD4CD8Ratio.HasValue) { value = Math.Round(testOrder.CD4CD8Ratio.Value, 2).ToString(); } this.ReplaceText("report_cd4cd8_ratio", value); this.ReplaceText("report_reference_range", testOrder.ReferenceRange); this.ReplaceText("report_interpretation", testOrder.Interpretation); this.ReplaceText("report_method", testOrder.Method); this.ReplaceText("report_references", testOrder.ReportReferences); this.ReplaceText("report_disclosure", testOrder.Disclosure); this.ReplaceText("asr_comment", testOrder.ASRComment); YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.m_PanelSetOrder.OrderedOn, this.m_PanelSetOrder.OrderedOnId); base.ReplaceText("specimen_description", specimenOrder.Description); string collectionDateTimeString = YellowstonePathology.Business.Helper.DateTimeExtensions.CombineDateAndTime(specimenOrder.CollectionDate, specimenOrder.CollectionTime); this.SetXmlNodeData("date_time_collected", collectionDateTimeString); this.ReplaceText("report_date", BaseData.GetShortDateString(this.m_PanelSetOrder.FinalDate)); this.ReplaceText("pathologist_signature", this.m_PanelSetOrder.Signature); this.SaveReport(); }