private void SetSpecimen(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode diagnosisTableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager); XmlNode rowSpecimenNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager); XmlNode rowDiagnosisNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_diagnosis']", this.m_NameSpaceManager); XmlNode insertAfterRow = rowSpecimenNode; foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in comprehensiveColonCancerProfileResult.SurgicalSpecimenCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(surgicalSpecimen.SpecimenOrderId); StringBuilder specimenDescription = new StringBuilder(); specimenDescription.Append(specimenOrder.Description); //Removed by SH 11/7/2017 may need to put it back. //foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection) //{ // specimenDescription.Append(aliquotOrder.Label + ", "); //} //specimenDescription.Remove(specimenDescription.Length - 2, 2); XmlNode rowSpecimenNodeClone = rowSpecimenNode.Clone(); rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_description']/w:t", this.m_NameSpaceManager).InnerText = specimenDescription.ToString(); rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='surgical_reportno']/w:t", this.m_NameSpaceManager).InnerText = comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo; diagnosisTableNode.InsertAfter(rowSpecimenNodeClone, insertAfterRow); XmlNode rowDiagnosisNodeClone = rowDiagnosisNode.Clone(); this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeClone, "specimen_diagnosis", surgicalSpecimen.Diagnosis); diagnosisTableNode.InsertAfter(rowDiagnosisNodeClone, rowSpecimenNodeClone); insertAfterRow = rowDiagnosisNodeClone; } diagnosisTableNode.RemoveChild(rowSpecimenNode); diagnosisTableNode.RemoveChild(rowDiagnosisNode); }
private void SetIHC(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='mlh1_result']", this.m_NameSpaceManager); XmlNode rowmlh1Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='mlh1_result']", this.m_NameSpaceManager); XmlNode rowmsh2Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='msh2_result']", this.m_NameSpaceManager); XmlNode rowmsh6Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='msh6_result']", this.m_NameSpaceManager); XmlNode rowpms2Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='pms2_result']", this.m_NameSpaceManager); XmlNode insertAfterRow = rowmlh1Node; foreach (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC testOrder in comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = specimenOrder.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); YellowstonePathology.Business.Test.LynchSyndrome.IHCResult ihcResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(testOrder.ResultCode); XmlNode rowmlh1NodeClone = rowmlh1Node.Clone(); rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='mlh1_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MLH1Result.Description; rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='ihc_reportno']/w:t", this.m_NameSpaceManager).InnerText = testOrder.ReportNo; rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='ihc_block_label']/w:t", this.m_NameSpaceManager).InnerText = aliquotOrder.Label; tableNode.InsertAfter(rowmlh1NodeClone, insertAfterRow); XmlNode rowmsh2NodeClone = rowmsh2Node.Clone(); rowmsh2NodeClone.SelectSingleNode("descendant::w:r[w:t='msh2_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MSH2Result.Description; tableNode.InsertAfter(rowmsh2NodeClone, rowmlh1NodeClone); XmlNode rowmsh6NodeClone = rowmsh6Node.Clone(); rowmsh6NodeClone.SelectSingleNode("descendant::w:r[w:t='msh6_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MSH6Result.Description; tableNode.InsertAfter(rowmsh6NodeClone, rowmsh2NodeClone); XmlNode rowpms2NodeClone = rowpms2Node.Clone(); rowpms2NodeClone.SelectSingleNode("descendant::w:r[w:t='pms2_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.PMS2Result.Description; tableNode.InsertAfter(rowpms2NodeClone, rowmsh6NodeClone); insertAfterRow = rowpms2NodeClone; } if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection.Count > 0) { this.DeleteRow("mlh1_result"); this.DeleteRow("msh2_result"); this.DeleteRow("msh6_result"); this.DeleteRow("pms2_result"); } else { base.ReplaceText("ihc_reportno", "Not Included"); base.ReplaceText("mlh1_result", "Not Included"); base.ReplaceText("msh2_result", "Not Included"); base.ReplaceText("msh6_result", "Not Included"); base.ReplaceText("pms2_result", "Not Included"); } }
public override void Render() { this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ComprehensiveColonCancerProfile.3.xml"; this.OpenTemplate(); this.SetDemographicsV2(); this.SetReportDistribution(); ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); base.ReplaceText("report_interpretation", comprehensiveColonCancerProfile.Interpretation); base.ReplaceText("ajcc_stage", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage); this.SetSpecimen(comprehensiveColonCancerProfileResult); this.SetIHC(comprehensiveColonCancerProfileResult); this.SetMolecularResults(comprehensiveColonCancerProfileResult); base.ReplaceText("pathologist_signature", comprehensiveColonCancerProfile.Signature); this.SaveReport(); }
public override void Render() { this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ComprehensiveColonCancerProfile.1.xml"; this.OpenTemplate(); this.SetDemographicsV2(); this.SetReportDistribution(); ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); base.ReplaceText("report_interpretation", comprehensiveColonCancerProfile.Interpretation); base.ReplaceText("ajcc_stage", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage); this.SetSpecimen(comprehensiveColonCancerProfileResult); this.SetIHC(comprehensiveColonCancerProfileResult); this.SetMolecularResults(comprehensiveColonCancerProfileResult); base.ReplaceText("pathologist_signature", comprehensiveColonCancerProfile.Signature); this.SaveReport(); }
public override void ToXml(XElement document) { ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); this.AddHeader(document, comprehensiveColonCancerProfile, "Comprehensive Colon Cancer Profile"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Interpretation:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfile.Interpretation, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Pathologist: " + comprehensiveColonCancerProfile.Signature, document, "F"); if (comprehensiveColonCancerProfile.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + comprehensiveColonCancerProfile.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F"); } this.AddNextObxElement("", document, "F"); this.AddAmendments(document); string specimenDescription = comprehensiveColonCancerProfileResult.SpecimenOrder.GetSpecimenDescriptionString(); this.HandleLongString("Specimen:", document, "F"); this.HandleLongString(specimenDescription, document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("Diagnosis:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.SurgicalSpecimen.Diagnosis, document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("AJCC Pathologic Staging:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Mismatch Repair Protein Expression by Immunohistochemistry: ", document, "F"); this.AddNextObxElement("MLH1: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MLH1Result, document, "F"); this.AddNextObxElement("MSH2: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MSH2Result, document, "F"); this.AddNextObxElement("MSH6: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MSH6Result, document, "F"); this.AddNextObxElement("PMS2: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.PMS2Result, document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); if (comprehensiveColonCancerProfileResult.BRAFV600EKIsOrdered == true || comprehensiveColonCancerProfileResult.KRASStandardIsOrderd == true || comprehensiveColonCancerProfileResult.MLHIsOrdered == true) { this.AddNextObxElement("Molecular Analysis", document, "F"); this.AddNextObxElement("", document, "F"); } if (comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis != null) { this.AddNextObxElement("MLH1 Promoter Methylation Analysis: " + comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.Result, document, "F"); this.AddNextObxElement("", document, "F"); } if (comprehensiveColonCancerProfileResult.RASRAFIsOrdered == true) { this.AddNextObxElement("KRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.KRASResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("BRAF V600E/K Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.BRAFResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("NRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.NRASResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("HRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.HRASResult, document, "F"); this.AddNextObxElement("", document, "F"); } }
private void SetSpecimen(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode diagnosisTableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager); XmlNode rowSpecimenNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_description']", this.m_NameSpaceManager); XmlNode rowDiagnosisNode = diagnosisTableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='specimen_diagnosis']", this.m_NameSpaceManager); XmlNode insertAfterRow = rowSpecimenNode; foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in comprehensiveColonCancerProfileResult.SurgicalSpecimenCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(surgicalSpecimen.SpecimenOrderId); StringBuilder specimenDescription = new StringBuilder(); specimenDescription.Append(specimenOrder.Description + ": "); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection) { specimenDescription.Append(aliquotOrder.Label + ", "); } specimenDescription.Remove(specimenDescription.Length - 2, 2); XmlNode rowSpecimenNodeClone = rowSpecimenNode.Clone(); rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='specimen_description']/w:t", this.m_NameSpaceManager).InnerText = specimenDescription.ToString(); rowSpecimenNodeClone.SelectSingleNode("descendant::w:r[w:t='surgical_reportno']/w:t", this.m_NameSpaceManager).InnerText = comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo; diagnosisTableNode.InsertAfter(rowSpecimenNodeClone, insertAfterRow); XmlNode rowDiagnosisNodeClone = rowDiagnosisNode.Clone(); this.SetXMLNodeParagraphDataNode(rowDiagnosisNodeClone, "specimen_diagnosis", surgicalSpecimen.Diagnosis); diagnosisTableNode.InsertAfter(rowDiagnosisNodeClone, rowSpecimenNodeClone); insertAfterRow = rowDiagnosisNodeClone; } diagnosisTableNode.RemoveChild(rowSpecimenNode); diagnosisTableNode.RemoveChild(rowDiagnosisNode); }
private void SetMolecularResults(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode tableNode = null; XmlNode rowResultNode = null; XmlNode insertAfterRow = null; foreach (YellowstonePathology.Business.Test.PanelSetOrder testOrder in comprehensiveColonCancerProfileResult.MolecularTestOrderCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimen = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquot = specimen.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); if (testOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='mlh1promoter_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='mlh1promoter_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("mlh1promoter", ((LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASStandard.KRASStandardTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASStandard.KRASStandardTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASExon23Mutation.KRASExon23MutationTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASExon23Mutation.KRASExon23MutationTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASExon4Mutation.KRASExon4MutationTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASExon4Mutation.KRASExon4MutationTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is BRAFV600EK.BRAFV600EKTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("braf", ((BRAFV600EK.BRAFV600EKTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("nras", ((NRASMutationAnalysis.NRASMutationAnalysisTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is RASRAFPanel.RASRAFPanelTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).KRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("braf", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).BRAFResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("nras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).NRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='hras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='hras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("hras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).HRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } } this.DeleteRow("mlh1promoter_result"); this.DeleteRow("braf_result"); this.DeleteRow("kras_result"); this.DeleteRow("nras_result"); this.DeleteRow("hras_result"); if(comprehensiveColonCancerProfileResult.MolecularTestOrderCollection.Count > 0) { this.DeleteRow("None Performed"); } }
public override void Render() { this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ComprehensiveColonCancerProfile.1.xml"; this.OpenTemplate(); this.SetDemographicsV2(); this.SetReportDistribution(); ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(comprehensiveColonCancerProfile.OrderedOnId); string specimenDescription = specimenOrder.Description; if (aliquotOrder != null) { specimenDescription += ": " + aliquotOrder.Label; } base.ReplaceText("report_interpretation", comprehensiveColonCancerProfile.Interpretation); base.ReplaceText("specimen_description", specimenDescription); base.ReplaceText("surgical_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo); base.ReplaceText("specimen_diagnosis", comprehensiveColonCancerProfileResult.SurgicalSpecimen.Diagnosis); base.ReplaceText("ajcc_stage", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage); if (comprehensiveColonCancerProfileResult.IHCResult != null) { base.ReplaceText("mlh1_result", comprehensiveColonCancerProfileResult.IHCResult.MLH1Result.Description); base.ReplaceText("msh2_result", comprehensiveColonCancerProfileResult.IHCResult.MSH2Result.Description); base.ReplaceText("msh6_result", comprehensiveColonCancerProfileResult.IHCResult.MSH6Result.Description); base.ReplaceText("pms2_result", comprehensiveColonCancerProfileResult.IHCResult.PMS2Result.Description); } else { base.ReplaceText("mlh1_result", "Not Included"); base.ReplaceText("msh2_result", "Not Included"); base.ReplaceText("msh6_result", "Not Included"); base.ReplaceText("pms2_result", "Not Included"); } if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC != null) { base.ReplaceText("ihc_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.ReportNo); } else { base.ReplaceText("ihc_reportno", "Not Included"); } if (comprehensiveColonCancerProfileResult.RASRAFIsOrdered == true) { base.ReplaceText("braf_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.BRAFResult); base.ReplaceText("braf_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("kras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.KRASResult); base.ReplaceText("kras_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("nras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.NRASResult); base.ReplaceText("nras_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("hras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.HRASResult); base.ReplaceText("hras_reportno", comprehensiveColonCancerProfile.ReportNo); } if (comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis != null) { base.ReplaceText("mlh1promoter_result", comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.Result); base.ReplaceText("mlh1promoter_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.ReportNo); } else { this.DeleteRow("mlh1promoter_result"); } /* * if (comprehensiveColonCancerProfileResult.KRASStandardIsOrderd == true) * { * base.ReplaceText("kras_result", comprehensiveColonCancerProfileResult.KRASStandardTestOrder.Result); * base.ReplaceText("kras_report_no", comprehensiveColonCancerProfileResult.KRASStandardTestOrder.ReportNo); * } * else * { * this.DeleteRow("kras_result"); * } * * if (comprehensiveColonCancerProfileResult.BRAFV600EKIsOrdered == true) * { * base.ReplaceText("braf_result", comprehensiveColonCancerProfileResult.BRAFV600EKTestOrder.Result); * base.ReplaceText("braf_report_no", comprehensiveColonCancerProfileResult.BRAFV600EKTestOrder.ReportNo); * } * else * { * this.DeleteRow("braf_result"); * } * * if (comprehensiveColonCancerProfileResult.KRASExon23MutationIsOrdered == true) * { * base.ReplaceText("kras23_result", comprehensiveColonCancerProfileResult.KRASExon23MutationTestOrder.Result); * base.ReplaceText("kras23_report_no", comprehensiveColonCancerProfileResult.KRASExon23MutationTestOrder.ReportNo); * } * else * { * this.DeleteRow("kras23_result"); * } * * if (comprehensiveColonCancerProfileResult.KRASExon4MutationIsOrdered == true) * { * base.ReplaceText("kras4_result", comprehensiveColonCancerProfileResult.KRASExon4MutationTestOrder.Result); * base.ReplaceText("kras4_report_no", comprehensiveColonCancerProfileResult.KRASExon4MutationTestOrder.ReportNo); * } * else * { * this.DeleteRow("kras4_result"); * } * * if (comprehensiveColonCancerProfileResult.NRASMutationAnalysisIsOrdered == true) * { * base.ReplaceText("nras_result", comprehensiveColonCancerProfileResult.NRASMutationAnalysisTestOrder.Result); * base.ReplaceText("nras_report_no", comprehensiveColonCancerProfileResult.NRASMutationAnalysisTestOrder.ReportNo); * } * else * { * this.DeleteRow("nras_result"); * } */ base.ReplaceText("pathologist_signature", comprehensiveColonCancerProfile.Signature); this.SaveReport(); }
public override void ToXml(XElement document) { ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); this.AddHeader(document, comprehensiveColonCancerProfile, "Comprehensive Colon Cancer Profile"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Interpretation:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfile.Interpretation, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Pathologist: " + comprehensiveColonCancerProfile.Signature, document, "F"); if (comprehensiveColonCancerProfile.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + comprehensiveColonCancerProfile.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F"); } this.AddNextObxElement("", document, "F"); this.AddAmendments(document); string specimenDescription = comprehensiveColonCancerProfileResult.SpecimenOrder.GetSpecimenDescriptionString(); this.HandleLongString("Specimen:", document, "F"); this.HandleLongString(specimenDescription, document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("Diagnosis:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.SurgicalSpecimen.Diagnosis, document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("AJCC Pathologic Staging:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Mismatch Repair Protein Expression by Immunohistochemistry: ", document, "F"); this.AddNextObxElement("MLH1: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MLH1Result, document, "F"); this.AddNextObxElement("MSH2: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MSH2Result, document, "F"); this.AddNextObxElement("MSH6: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.MSH6Result, document, "F"); this.AddNextObxElement("PMS2: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.PMS2Result, document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); if (comprehensiveColonCancerProfileResult.BRAFV600EKIsOrdered == true || comprehensiveColonCancerProfileResult.KRASStandardIsOrderd == true || comprehensiveColonCancerProfileResult.MLHIsOrdered == true) { this.AddNextObxElement("Molecular Analysis", document, "F"); this.AddNextObxElement("", document, "F"); } if (comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis != null) { this.AddNextObxElement("MLH1 Promoter Methylation Analysis: " + comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.Result, document, "F"); this.AddNextObxElement("", document, "F"); } if (comprehensiveColonCancerProfileResult.RASRAFIsOrdered == true) { this.AddNextObxElement("KRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.KRASResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("BRAF V600E/K Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.BRAFResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("NRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.NRASResult, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("HRAS Mutation Analysis: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.ReportNo, document, "F"); this.AddNextObxElement("Result: " + comprehensiveColonCancerProfileResult.RASRAFTestOrder.HRASResult, document, "F"); this.AddNextObxElement("", document, "F"); } }
public override void Render() { this.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\ComprehensiveColonCancerProfile.1.xml"; this.OpenTemplate(); this.SetDemographicsV2(); this.SetReportDistribution(); ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(comprehensiveColonCancerProfile.OrderedOnId); string specimenDescription = specimenOrder.Description; if (aliquotOrder != null) specimenDescription += ": " + aliquotOrder.Label; base.ReplaceText("report_interpretation", comprehensiveColonCancerProfile.Interpretation); base.ReplaceText("specimen_description", specimenDescription); base.ReplaceText("surgical_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo); base.ReplaceText("specimen_diagnosis", comprehensiveColonCancerProfileResult.SurgicalSpecimen.Diagnosis); base.ReplaceText("ajcc_stage", comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage); if (comprehensiveColonCancerProfileResult.IHCResult != null) { base.ReplaceText("mlh1_result", comprehensiveColonCancerProfileResult.IHCResult.MLH1Result.Description); base.ReplaceText("msh2_result", comprehensiveColonCancerProfileResult.IHCResult.MSH2Result.Description); base.ReplaceText("msh6_result", comprehensiveColonCancerProfileResult.IHCResult.MSH6Result.Description); base.ReplaceText("pms2_result", comprehensiveColonCancerProfileResult.IHCResult.PMS2Result.Description); } else { base.ReplaceText("mlh1_result", "Not Included"); base.ReplaceText("msh2_result", "Not Included"); base.ReplaceText("msh6_result", "Not Included"); base.ReplaceText("pms2_result", "Not Included"); } if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC != null) { base.ReplaceText("ihc_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHC.ReportNo); } else { base.ReplaceText("ihc_reportno", "Not Included"); } if (comprehensiveColonCancerProfileResult.RASRAFIsOrdered == true) { base.ReplaceText("braf_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.BRAFResult); base.ReplaceText("braf_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("kras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.KRASResult); base.ReplaceText("kras_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("nras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.NRASResult); base.ReplaceText("nras_reportno", comprehensiveColonCancerProfile.ReportNo); base.ReplaceText("hras_result", comprehensiveColonCancerProfileResult.RASRAFTestOrder.HRASResult); base.ReplaceText("hras_reportno", comprehensiveColonCancerProfile.ReportNo); } if (comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis != null) { base.ReplaceText("mlh1promoter_result", comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.Result); base.ReplaceText("mlh1promoter_reportno", comprehensiveColonCancerProfileResult.PanelSetOrderMLH1MethylationAnalysis.ReportNo); } else { this.DeleteRow("mlh1promoter_result"); } /* if (comprehensiveColonCancerProfileResult.KRASStandardIsOrderd == true) { base.ReplaceText("kras_result", comprehensiveColonCancerProfileResult.KRASStandardTestOrder.Result); base.ReplaceText("kras_report_no", comprehensiveColonCancerProfileResult.KRASStandardTestOrder.ReportNo); } else { this.DeleteRow("kras_result"); } if (comprehensiveColonCancerProfileResult.BRAFV600EKIsOrdered == true) { base.ReplaceText("braf_result", comprehensiveColonCancerProfileResult.BRAFV600EKTestOrder.Result); base.ReplaceText("braf_report_no", comprehensiveColonCancerProfileResult.BRAFV600EKTestOrder.ReportNo); } else { this.DeleteRow("braf_result"); } if (comprehensiveColonCancerProfileResult.KRASExon23MutationIsOrdered == true) { base.ReplaceText("kras23_result", comprehensiveColonCancerProfileResult.KRASExon23MutationTestOrder.Result); base.ReplaceText("kras23_report_no", comprehensiveColonCancerProfileResult.KRASExon23MutationTestOrder.ReportNo); } else { this.DeleteRow("kras23_result"); } if (comprehensiveColonCancerProfileResult.KRASExon4MutationIsOrdered == true) { base.ReplaceText("kras4_result", comprehensiveColonCancerProfileResult.KRASExon4MutationTestOrder.Result); base.ReplaceText("kras4_report_no", comprehensiveColonCancerProfileResult.KRASExon4MutationTestOrder.ReportNo); } else { this.DeleteRow("kras4_result"); } if (comprehensiveColonCancerProfileResult.NRASMutationAnalysisIsOrdered == true) { base.ReplaceText("nras_result", comprehensiveColonCancerProfileResult.NRASMutationAnalysisTestOrder.Result); base.ReplaceText("nras_report_no", comprehensiveColonCancerProfileResult.NRASMutationAnalysisTestOrder.ReportNo); } else { this.DeleteRow("nras_result"); } */ base.ReplaceText("pathologist_signature", comprehensiveColonCancerProfile.Signature); this.SaveReport(); }
public override void ToXml(XElement document) { ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); this.AddHeader(document, comprehensiveColonCancerProfile, "Comprehensive Colon Cancer Profile"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Interpretation:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfile.Interpretation, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Pathologist: " + comprehensiveColonCancerProfile.Signature, document, "F"); if (comprehensiveColonCancerProfile.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + comprehensiveColonCancerProfile.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F"); } this.AddNextObxElement("", document, "F"); this.AddAmendments(document); foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in comprehensiveColonCancerProfileResult.SurgicalSpecimenCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(surgicalSpecimen.SpecimenOrderId); StringBuilder specimenDescription = new StringBuilder(); specimenDescription.Append(specimenOrder.Description + ": "); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection) { specimenDescription.Append(aliquotOrder.Label + ", "); } specimenDescription.Remove(specimenDescription.Length - 2, 2); this.AddNextObxElement("Specimen:", document, "F"); this.HandleLongString(specimenDescription.ToString(), document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("Diagnosis:", document, "F"); this.HandleLongString(surgicalSpecimen.Diagnosis, document, "F"); this.AddNextObxElement("", document, "F"); } this.HandleLongString("AJCC Pathologic Staging:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Mismatch Repair Protein Expression by Immunohistochemistry: ", document, "F"); if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection.Count > 0) { foreach (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC testOrder in comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection) { this.AddNextObxElement("MLH1: " + testOrder.MLH1Result, document, "F"); this.AddNextObxElement("PMS2: " + testOrder.PMS2Result, document, "F"); this.AddNextObxElement("MSH2: " + testOrder.MSH2Result, document, "F"); this.AddNextObxElement("MSH6: " + testOrder.MSH6Result, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } } else { this.AddNextObxElement("MLH1: " + "Not Included", document, "F"); this.AddNextObxElement("PMS2: " + "Not Included", document, "F"); this.AddNextObxElement("MSH2: " + "Not Included", document, "F"); this.AddNextObxElement("MSH6: " + "Not Included", document, "F"); this.AddNextObxElement("", document, "F"); } this.AddNextObxElement("Molecular Analysis", document, "F"); if (comprehensiveColonCancerProfileResult.MolecularTestOrderCollection.Count > 0) { foreach (YellowstonePathology.Business.Test.PanelSetOrder testOrder in comprehensiveColonCancerProfileResult.MolecularTestOrderCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimen = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquot = specimen.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); if (testOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis) { this.AddNextObxElement("MLH1 Promoter Methylation Analysis: " + ((LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASStandard.KRASStandardTestOrder) { this.AddNextObxElement("KRAS Mutation Analysis: " + ((KRASStandard.KRASStandardTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASExon23Mutation.KRASExon23MutationTestOrder) { this.AddNextObxElement("KRAS Exon 23 Mutation Analysis: " + ((KRASExon23Mutation.KRASExon23MutationTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASExon4Mutation.KRASExon4MutationTestOrder) { this.AddNextObxElement("KRAS Exon 4 Mutation Analysis: " + ((KRASExon4Mutation.KRASExon4MutationTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is BRAFV600EK.BRAFV600EKTestOrder) { this.AddNextObxElement("BRAF V600E Mutation Analysis: " + ((BRAFV600EK.BRAFV600EKTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder) { this.AddNextObxElement("NRAS Mutation Analysis: " + ((NRASMutationAnalysis.NRASMutationAnalysisTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is RASRAFPanel.RASRAFPanelTestOrder) { this.AddNextObxElement("KRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).KRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("BRAF V600E/K Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).BRAFResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("NRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).NRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("HRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).HRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } } } else { this.AddNextObxElement("None Performed", document, "F"); this.AddNextObxElement("", document, "F"); } }
private void SetIHC(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='mlh1_result']", this.m_NameSpaceManager); XmlNode rowmlh1Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='mlh1_result']", this.m_NameSpaceManager); XmlNode rowmsh2Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='msh2_result']", this.m_NameSpaceManager); XmlNode rowmsh6Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='msh6_result']", this.m_NameSpaceManager); XmlNode rowpms2Node = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='pms2_result']", this.m_NameSpaceManager); XmlNode insertAfterRow = rowmlh1Node; foreach (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC testOrder in comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = null; if (testOrder.MasterAccessionNo == this.m_AccessionOrder.MasterAccessionNo) { specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); } else { YellowstonePathology.Business.Test.AccessionOrder lseIHCAccessionOrder = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo(testOrder.MasterAccessionNo); specimenOrder = lseIHCAccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); } YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = specimenOrder.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); YellowstonePathology.Business.Test.LynchSyndrome.IHCResult ihcResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(testOrder.ResultCode); XmlNode rowmlh1NodeClone = rowmlh1Node.Clone(); rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='mlh1_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MLH1Result.Description; rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='ihc_reportno']/w:t", this.m_NameSpaceManager).InnerText = testOrder.ReportNo; rowmlh1NodeClone.SelectSingleNode("descendant::w:r[w:t='ihc_block_label']/w:t", this.m_NameSpaceManager).InnerText = aliquotOrder.Label; tableNode.InsertAfter(rowmlh1NodeClone, insertAfterRow); XmlNode rowpms2NodeClone = rowpms2Node.Clone(); rowpms2NodeClone.SelectSingleNode("descendant::w:r[w:t='pms2_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.PMS2Result.Description; tableNode.InsertAfter(rowpms2NodeClone, rowmlh1NodeClone); XmlNode rowmsh2NodeClone = rowmsh2Node.Clone(); rowmsh2NodeClone.SelectSingleNode("descendant::w:r[w:t='msh2_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MSH2Result.Description; tableNode.InsertAfter(rowmsh2NodeClone, rowpms2NodeClone); XmlNode rowmsh6NodeClone = rowmsh6Node.Clone(); rowmsh6NodeClone.SelectSingleNode("descendant::w:r[w:t='msh6_result']/w:t", this.m_NameSpaceManager).InnerText = ihcResult.MSH6Result.Description; tableNode.InsertAfter(rowmsh6NodeClone, rowmsh2NodeClone); insertAfterRow = rowmsh6NodeClone; } if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection.Count > 0) { this.DeleteRow("mlh1_result"); this.DeleteRow("msh2_result"); this.DeleteRow("msh6_result"); this.DeleteRow("pms2_result"); } else { base.ReplaceText("ihc_reportno", "Not Included"); base.ReplaceText("mlh1_result", "Not Included"); base.ReplaceText("msh2_result", "Not Included"); base.ReplaceText("msh6_result", "Not Included"); base.ReplaceText("pms2_result", "Not Included"); } }
private void SetMolecularResults(ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult) { XmlNode tableNode = null; XmlNode rowResultNode = null; XmlNode insertAfterRow = null; foreach (YellowstonePathology.Business.Test.PanelSetOrder testOrder in comprehensiveColonCancerProfileResult.MolecularTestOrderCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimen = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquot = specimen.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); if (testOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='mlh1promoter_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='mlh1promoter_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("mlh1promoter", ((LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASStandard.KRASStandardTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASStandard.KRASStandardTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASExon23Mutation.KRASExon23MutationTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASExon23Mutation.KRASExon23MutationTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is KRASExon4Mutation.KRASExon4MutationTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((KRASExon4Mutation.KRASExon4MutationTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is BRAFV600EK.BRAFV600EKTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("braf", ((BRAFV600EK.BRAFV600EKTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("nras", ((NRASMutationAnalysis.NRASMutationAnalysisTestOrder)testOrder).Result, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } else if (testOrder is RASRAFPanel.RASRAFPanelTestOrder) { tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='kras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("kras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).KRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='braf_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("braf", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).BRAFResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='nras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("nras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).NRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); tableNode = this.m_ReportXml.SelectSingleNode("descendant::w:tbl[w:tr/w:tc/w:p/w:r/w:t='hras_result']", this.m_NameSpaceManager); rowResultNode = tableNode.SelectSingleNode("descendant::w:tr[w:tc/w:p/w:r/w:t='hras_result']", this.m_NameSpaceManager); insertAfterRow = rowResultNode; this.SetTestResults("hras", ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).HRASResult, testOrder.ReportNo, aliquot.Label, tableNode, rowResultNode, insertAfterRow); } } this.DeleteRow("mlh1promoter_result"); this.DeleteRow("braf_result"); this.DeleteRow("kras_result"); this.DeleteRow("nras_result"); this.DeleteRow("hras_result"); if (comprehensiveColonCancerProfileResult.MolecularTestOrderCollection.Count > 0) { this.DeleteRow("None Performed"); } }
public override void ToXml(XElement document) { ComprehensiveColonCancerProfile comprehensiveColonCancerProfile = (ComprehensiveColonCancerProfile)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_ReportNo); ComprehensiveColonCancerProfileResult comprehensiveColonCancerProfileResult = new ComprehensiveColonCancerProfileResult(this.m_AccessionOrder, comprehensiveColonCancerProfile); this.AddHeader(document, comprehensiveColonCancerProfile, "Comprehensive Colon Cancer Profile"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Interpretation:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfile.Interpretation, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Pathologist: " + comprehensiveColonCancerProfile.Signature, document, "F"); if (comprehensiveColonCancerProfile.FinalTime.HasValue == true) { this.AddNextObxElement("E-signed " + comprehensiveColonCancerProfile.FinalTime.Value.ToString("MM/dd/yyyy HH:mm"), document, "F"); } this.AddNextObxElement("", document, "F"); this.AddAmendments(document); foreach(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in comprehensiveColonCancerProfileResult.SurgicalSpecimenCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(surgicalSpecimen.SpecimenOrderId); StringBuilder specimenDescription = new StringBuilder(); specimenDescription.Append(specimenOrder.Description + ": "); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection) { specimenDescription.Append(aliquotOrder.Label + ", "); } specimenDescription.Remove(specimenDescription.Length - 2, 2); this.AddNextObxElement("Specimen:", document, "F"); this.HandleLongString(specimenDescription.ToString(), document, "F"); this.AddNextObxElement("", document, "F"); this.HandleLongString("Diagnosis:", document, "F"); this.HandleLongString(surgicalSpecimen.Diagnosis, document, "F"); this.AddNextObxElement("", document, "F"); } this.HandleLongString("AJCC Pathologic Staging:", document, "F"); this.HandleLongString(comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.AJCCStage, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Reference Report: " + comprehensiveColonCancerProfileResult.PanelSetOrderSurgical.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("Mismatch Repair Protein Expression by Immunohistochemistry: ", document, "F"); if (comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection.Count > 0) { foreach (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC testOrder in comprehensiveColonCancerProfileResult.PanelSetOrderLynchSyndromeIHCCollection) { this.AddNextObxElement("MLH1: " + testOrder.MLH1Result, document, "F"); this.AddNextObxElement("MSH2: " + testOrder.MSH2Result, document, "F"); this.AddNextObxElement("MSH6: " + testOrder.MSH6Result, document, "F"); this.AddNextObxElement("PMS2: " + testOrder.PMS2Result, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } } else { this.AddNextObxElement("MLH1: " + "Not Included", document, "F"); this.AddNextObxElement("MSH2: " + "Not Included", document, "F"); this.AddNextObxElement("MSH6: " + "Not Included", document, "F"); this.AddNextObxElement("PMS2: " + "Not Included", document, "F"); this.AddNextObxElement("", document, "F"); } this.AddNextObxElement("Molecular Analysis", document, "F"); if (comprehensiveColonCancerProfileResult.MolecularTestOrderCollection.Count > 0) { foreach (YellowstonePathology.Business.Test.PanelSetOrder testOrder in comprehensiveColonCancerProfileResult.MolecularTestOrderCollection) { YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimen = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(testOrder.OrderedOnId); YellowstonePathology.Business.Test.AliquotOrder aliquot = specimen.AliquotOrderCollection.GetByAliquotOrderId(testOrder.OrderedOnId); if (testOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis) { this.AddNextObxElement("MLH1 Promoter Methylation Analysis: " + ((LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASStandard.KRASStandardTestOrder) { this.AddNextObxElement("KRAS Mutation Analysis: " + ((KRASStandard.KRASStandardTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASExon23Mutation.KRASExon23MutationTestOrder) { this.AddNextObxElement("KRAS Exon 23 Mutation Analysis: " + ((KRASExon23Mutation.KRASExon23MutationTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is KRASExon4Mutation.KRASExon4MutationTestOrder) { this.AddNextObxElement("KRAS Exon 4 Mutation Analysis: " + ((KRASExon4Mutation.KRASExon4MutationTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is BRAFV600EK.BRAFV600EKTestOrder) { this.AddNextObxElement("BRAF V600E Mutation Analysis: " + ((BRAFV600EK.BRAFV600EKTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder) { this.AddNextObxElement("NRAS Mutation Analysis: " + ((NRASMutationAnalysis.NRASMutationAnalysisTestOrder)testOrder).Result, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } else if (testOrder is RASRAFPanel.RASRAFPanelTestOrder) { this.AddNextObxElement("KRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).KRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("BRAF V600E/K Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).BRAFResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("NRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).NRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); this.AddNextObxElement("HRAS Mutation Analysis: " + ((RASRAFPanel.RASRAFPanelTestOrder)testOrder).HRASResult, document, "F"); this.AddNextObxElement("Specimen: " + aliquot.Label, document, "F"); this.AddNextObxElement("Reference Report: " + testOrder.ReportNo, document, "F"); this.AddNextObxElement("", document, "F"); } } } else { this.AddNextObxElement("None Performed", document, "F"); this.AddNextObxElement("", document, "F"); } }