public override void ToXml(XElement document) { BCellSubsetAnalysisTestOrder panelSetOrder = (BCellSubsetAnalysisTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); this.AddHeader(document, panelSetOrder, "B-Cell Subset Analysis"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Mature B-Cells 21+ 38+ : " + panelSetOrder.MatureBCellsPlusPercent, document, "F"); this.AddNextObxElement("Normal Range : 49.76 - 100", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("21 + 38 - : " + panelSetOrder.MatureBCellsMinusPercent, document, "F"); this.AddNextObxElement("Normal Range : 1.03 - 30.99", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Memory B-Cells 27+ : " + panelSetOrder.MemoryBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 1.2 – 31.48", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Non-Switched Memory B-Cells IgD+ 27+ : " + panelSetOrder.NonSwitchedMemoryBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 0 - 12.62", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Marginal Zone B-Cells IgD+ IgM+ 27+ : " + panelSetOrder.MarginalZoneBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 0 – 13.33", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Class Switched Memory B-Cells IgD- Igm- 27+ : " + panelSetOrder.ClassSwitchedMemoryBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 0 – 15.73", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Naïve B-Cells IgD+ 38++ : " + panelSetOrder.NaiveBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 42.00 – 95.91", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Transitional B-Cells IgM+ 38++ : " + panelSetOrder.TransitionalBCellPercent, document, "F"); this.AddNextObxElement("Normal Range : 0 – 4.35", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Plasmablasts 38+++ Igm- : " + panelSetOrder.PlasmaBlastsPercent, document, "F"); this.AddNextObxElement("Normal Range : 0 – 1.81", document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Total Lymphs % of Nucleated Cells : " + panelSetOrder.TotalNucleatedPercent, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("B-Cells % of Total Lymphocytes : " + panelSetOrder.TotalLymphocytesPercent, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Pathologist: " + panelSetOrder.Signature, document, "F"); if (panelSetOrder.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + panelSetOrder.FinalDate.Value.ToString("MM/dd/yyyy HH:mm"), 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("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.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() { BCellSubsetAnalysisTestOrder testOrder = (BCellSubsetAnalysisTestOrder)this.m_PanelSetOrder; this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\BCellSubsetAnalysis.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); ReferenceRanges referenceRanges = new ReferenceRanges(); ReferenceRangeValue cellType0 = referenceRanges.Get(0); this.ReplaceText("report_mature", cellType0.GetResultString(testOrder.MatureBCellsPlusPercent)); ReferenceRangeValue cellType1 = referenceRanges.Get(1); this.ReplaceText("report_mm", cellType1.GetResultString(testOrder.MatureBCellsMinusPercent)); ReferenceRangeValue cellType2 = referenceRanges.Get(2); this.ReplaceText("report_memory", cellType2.GetResultString(testOrder.MemoryBCellPercent)); ReferenceRangeValue cellType3 = referenceRanges.Get(3); this.ReplaceText("report_nonswitched", cellType3.GetResultString(testOrder.NonSwitchedMemoryBCellPercent)); ReferenceRangeValue cellType4 = referenceRanges.Get(4); this.ReplaceText("report_marginal_zone", cellType4.GetResultString(testOrder.MarginalZoneBCellPercent)); ReferenceRangeValue cellType5 = referenceRanges.Get(5); this.ReplaceText("report_class_switched", cellType5.GetResultString(testOrder.ClassSwitchedMemoryBCellPercent)); ReferenceRangeValue cellType6 = referenceRanges.Get(6); this.ReplaceText("report_naive", cellType6.GetResultString(testOrder.NaiveBCellPercent)); ReferenceRangeValue cellType7 = referenceRanges.Get(7); this.ReplaceText("report_transitional", cellType7.GetResultString(testOrder.TransitionalBCellPercent)); ReferenceRangeValue cellType8 = referenceRanges.Get(8); this.ReplaceText("report_plasmablasts", cellType8.GetResultString(testOrder.PlasmaBlastsPercent)); this.ReplaceText("report_total_nucleated", testOrder.TotalNucleatedPercent); this.ReplaceText("report_total_lymphocytes", testOrder.TotalLymphocytesPercent); this.ReplaceText("report_method", testOrder.Method); this.ReplaceText("report_references", testOrder.ReportReferences); 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(); }