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 ComprehensiveColonCancerProfileResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, ComprehensiveColonCancerProfile comprehensiveColonCancerProfile) { this.m_SpecimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); this.m_PanelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_SurgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); bool restrictToOrderedOn = !comprehensiveColonCancerProfile.IncludeTestsPerformedOnOtherBlocks; YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest panelSetLynchSyndromeIHCPanel = new YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_LSEIHCIsOrdered = true; this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest panelSetMLH1 = new YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_MLHIsOrdered = true; this.m_PanelSetOrderMLH1MethylationAnalysis = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_BRAFV600EKTest = new YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_BRAFV600EKIsOrdered = true; this.m_BRAFV600EKTestOrder = (YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASStandardTest = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASStandardIsOrdered = true; this.m_KRASStandardTestOrder = (YellowstonePathology.Business.Test.KRASStandard.KRASStandardTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon23MutationTest = new KRASExon23Mutation.KRASExon23MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon23MutationIsOrdered = true; this.m_KRASExon23MutationTestOrder = (KRASExon23Mutation.KRASExon23MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon4MutationTest = new KRASExon4Mutation.KRASExon4MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon4MutationIsOrdered = true; this.m_KRASExon4MutationTestOrder = (KRASExon4Mutation.KRASExon4MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_NRASMutationAnalysisTest = new NRASMutationAnalysis.NRASMutationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_NRASMutationAnalysisIsOrdered = true; this.m_NRASMutationAnalysisTestOrder = (NRASMutationAnalysis.NRASMutationAnalysisTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_RASRAFPanelTest = new RASRAFPanel.RASRAFPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_RASRAFIsOrdered = true; this.m_RASRAFPanelTestOrder = (RASRAFPanel.RASRAFPanelTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } }
public ComprehensiveColonCancerProfileResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, ComprehensiveColonCancerProfile comprehensiveColonCancerProfile) { this.m_SpecimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); this.m_PanelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_SurgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); bool restrictToOrderedOn = !comprehensiveColonCancerProfile.IncludeTestsPerformedOnOtherBlocks; YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest panelSetLynchSyndromeIHCPanel = new YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_LSEIHCIsOrdered = true; this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } else { YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId); if(patientHistory.PanelSetIdExists(102) == true) { YellowstonePathology.Business.Domain.PatientHistoryResult patientHistoryResult = patientHistory.GetByPanelSetId(102); YellowstonePathology.Business.Test.AccessionOrder lseIHCAccessionOrder = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo(patientHistoryResult.MasterAccessionNo); this.m_LSEIHCIsOrdered = true; this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)lseIHCAccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } } YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest panelSetMLH1 = new YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_MLHIsOrdered = true; this.m_PanelSetOrderMLH1MethylationAnalysis = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_BRAFV600EKTest = new YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_BRAFV600EKIsOrdered = true; this.m_BRAFV600EKTestOrder = (YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASStandardTest = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASStandardIsOrdered = true; this.m_KRASStandardTestOrder = (YellowstonePathology.Business.Test.KRASStandard.KRASStandardTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon23MutationTest = new KRASExon23Mutation.KRASExon23MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon23MutationIsOrdered = true; this.m_KRASExon23MutationTestOrder = (KRASExon23Mutation.KRASExon23MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon4MutationTest = new KRASExon4Mutation.KRASExon4MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon4MutationIsOrdered = true; this.m_KRASExon4MutationTestOrder = (KRASExon4Mutation.KRASExon4MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_NRASMutationAnalysisTest = new NRASMutationAnalysis.NRASMutationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_NRASMutationAnalysisIsOrdered = true; this.m_NRASMutationAnalysisTestOrder = (NRASMutationAnalysis.NRASMutationAnalysisTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_RASRAFPanelTest = new RASRAFPanel.RASRAFPanelTest(); if(accessionOrder.PanelSetOrderCollection.Exists(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_RASRAFIsOrdered = true; this.m_RASRAFPanelTestOrder = (RASRAFPanel.RASRAFPanelTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_SurgicalSpecimenCollection = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenCollection(); foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection) { YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId); if (surgicalSpecimen != null) { this.m_SurgicalSpecimenCollection.Add(surgicalSpecimen); } } this.m_PanelSetOrderLynchSyndromeIHCCollection = new Collection<LynchSyndrome.PanelSetOrderLynchSyndromeIHC>(); this.m_MolecularTestOrderCollection = new PanelSetOrderCollection(); foreach(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder in accessionOrder.PanelSetOrderCollection) { if(panelSetOrder is YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC) { this.m_PanelSetOrderLynchSyndromeIHCCollection.Add((YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)panelSetOrder); } else { if(panelSetOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis || panelSetOrder is KRASStandard.KRASStandardTestOrder || panelSetOrder is KRASExon23Mutation.KRASExon23MutationTestOrder || panelSetOrder is KRASExon4Mutation.KRASExon4MutationTestOrder || panelSetOrder is BRAFV600EK.BRAFV600EKTestOrder || panelSetOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder || panelSetOrder is RASRAFPanel.RASRAFPanelTestOrder) { this.m_MolecularTestOrderCollection.Add(panelSetOrder); } } } }
public ComprehensiveColonCancerProfileResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, ComprehensiveColonCancerProfile comprehensiveColonCancerProfile) { this.m_SpecimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); this.m_PanelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_SurgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); bool restrictToOrderedOn = !comprehensiveColonCancerProfile.IncludeTestsPerformedOnOtherBlocks; YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest panelSetLynchSyndromeIHCPanel = new YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_LSEIHCIsOrdered = true; this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest panelSetMLH1 = new YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_MLHIsOrdered = true; this.m_PanelSetOrderMLH1MethylationAnalysis = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_BRAFV600EKTest = new YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_BRAFV600EKIsOrdered = true; this.m_BRAFV600EKTestOrder = (YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASStandardTest = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASStandardIsOrdered = true; this.m_KRASStandardTestOrder = (YellowstonePathology.Business.Test.KRASStandard.KRASStandardTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon23MutationTest = new KRASExon23Mutation.KRASExon23MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon23MutationIsOrdered = true; this.m_KRASExon23MutationTestOrder = (KRASExon23Mutation.KRASExon23MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon4MutationTest = new KRASExon4Mutation.KRASExon4MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon4MutationIsOrdered = true; this.m_KRASExon4MutationTestOrder = (KRASExon4Mutation.KRASExon4MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_NRASMutationAnalysisTest = new NRASMutationAnalysis.NRASMutationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_NRASMutationAnalysisIsOrdered = true; this.m_NRASMutationAnalysisTestOrder = (NRASMutationAnalysis.NRASMutationAnalysisTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_RASRAFPanelTest = new RASRAFPanel.RASRAFPanelTest(); if(accessionOrder.PanelSetOrderCollection.Exists(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_RASRAFIsOrdered = true; this.m_RASRAFPanelTestOrder = (RASRAFPanel.RASRAFPanelTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } }
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 ComprehensiveColonCancerProfileResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, ComprehensiveColonCancerProfile comprehensiveColonCancerProfile) { this.m_SpecimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(comprehensiveColonCancerProfile.OrderedOnId); this.m_PanelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetSurgical(); this.m_SurgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId); bool restrictToOrderedOn = !comprehensiveColonCancerProfile.IncludeTestsPerformedOnOtherBlocks; YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest panelSetLynchSyndromeIHCPanel = new YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeIHCPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_LSEIHCIsOrdered = true; this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } else { YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId); if (patientHistory.PanelSetIdExists(102) == true) { YellowstonePathology.Business.Domain.PatientHistoryResult patientHistoryResult = patientHistory.GetByPanelSetId(102); YellowstonePathology.Business.Test.AccessionOrder lseIHCAccessionOrder = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo(patientHistoryResult.MasterAccessionNo); this.m_LSEIHCIsOrdered = true; if (this.m_PanelSetOrderSurgical.MasterAccessionNo == patientHistoryResult.MasterAccessionNo) { this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)lseIHCAccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } else { this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)lseIHCAccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(102); } this.m_IHCResult = YellowstonePathology.Business.Test.LynchSyndrome.IHCResult.CreateResultFromResultCode(this.m_PanelSetOrderLynchSyndromeIHC.ResultCode); } } YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest panelSetMLH1 = new YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_MLHIsOrdered = true; this.m_PanelSetOrderMLH1MethylationAnalysis = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetMLH1.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_BRAFV600EKTest = new YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_BRAFV600EKIsOrdered = true; this.m_BRAFV600EKTestOrder = (YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_BRAFV600EKTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASStandardTest = new YellowstonePathology.Business.Test.KRASStandard.KRASStandardTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASStandardIsOrdered = true; this.m_KRASStandardTestOrder = (YellowstonePathology.Business.Test.KRASStandard.KRASStandardTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASStandardTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon23MutationTest = new KRASExon23Mutation.KRASExon23MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon23MutationIsOrdered = true; this.m_KRASExon23MutationTestOrder = (KRASExon23Mutation.KRASExon23MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon23MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_KRASExon4MutationTest = new KRASExon4Mutation.KRASExon4MutationTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_KRASExon4MutationIsOrdered = true; this.m_KRASExon4MutationTestOrder = (KRASExon4Mutation.KRASExon4MutationTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_KRASExon4MutationTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_NRASMutationAnalysisTest = new NRASMutationAnalysis.NRASMutationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_NRASMutationAnalysisIsOrdered = true; this.m_NRASMutationAnalysisTestOrder = (NRASMutationAnalysis.NRASMutationAnalysisTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_NRASMutationAnalysisTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_RASRAFPanelTest = new RASRAFPanel.RASRAFPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == true) { this.m_RASRAFIsOrdered = true; this.m_RASRAFPanelTestOrder = (RASRAFPanel.RASRAFPanelTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_RASRAFPanelTest.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn); } this.m_SurgicalSpecimenCollection = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenCollection(); foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection) { YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = this.m_PanelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId); if (surgicalSpecimen != null) { this.m_SurgicalSpecimenCollection.Add(surgicalSpecimen); } } this.m_PanelSetOrderLynchSyndromeIHCCollection = new Collection <LynchSyndrome.PanelSetOrderLynchSyndromeIHC>(); this.m_MolecularTestOrderCollection = new PanelSetOrderCollection(); foreach (YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder in accessionOrder.PanelSetOrderCollection) { if (panelSetOrder is YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC) { this.m_PanelSetOrderLynchSyndromeIHCCollection.Add((YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)panelSetOrder); } else { if (panelSetOrder is LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis || panelSetOrder is KRASStandard.KRASStandardTestOrder || panelSetOrder is KRASExon23Mutation.KRASExon23MutationTestOrder || panelSetOrder is KRASExon4Mutation.KRASExon4MutationTestOrder || panelSetOrder is BRAFV600EK.BRAFV600EKTestOrder || panelSetOrder is NRASMutationAnalysis.NRASMutationAnalysisTestOrder || panelSetOrder is RASRAFPanel.RASRAFPanelTestOrder) { this.m_MolecularTestOrderCollection.Add(panelSetOrder); } } } if (accessionOrder.PanelSetOrderCollection.Exists(panelSetLynchSyndromeIHCPanel.PanelSetId, comprehensiveColonCancerProfile.OrderedOnId, restrictToOrderedOn) == false) { YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId); if (patientHistory.PanelSetIdExists(102) == true) { YellowstonePathology.Business.Domain.PatientHistoryResult patientHistoryResult = patientHistory.GetByPanelSetId(102); YellowstonePathology.Business.Test.AccessionOrder lseIHCAccessionOrder = Business.Persistence.DocumentGateway.Instance.GetAccessionOrderByMasterAccessionNo(patientHistoryResult.MasterAccessionNo); this.m_PanelSetOrderLynchSyndromeIHC = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeIHC)lseIHCAccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(102); this.m_PanelSetOrderLynchSyndromeIHCCollection.Add(m_PanelSetOrderLynchSyndromeIHC); } } }
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"); } }