示例#1
0
        public static SpecimenSurgicalDiagnosisView Parse(YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            SpecimenSurgicalDiagnosisView result = new SpecimenSurgicalDiagnosisView();

            result.SpecimenOrder = specimenOrder;

            if (accessionOrder.PanelSetOrderCollection.HasSurgical() == true)
            {
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = accessionOrder.PanelSetOrderCollection.GetSurgical();
                if (panelSetOrderSurgical.SurgicalSpecimenCollection.SpecimenOrderExists(specimenOrder.SpecimenOrderId) == true)
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId);
                    result.SurgicalSpecimen           = surgicalSpecimen;
                    result.SurgicalDiagnosisIsOrdered = true;
                }
                else
                {
                    result.SurgicalDiagnosisIsOrdered = false;
                }
            }
            else
            {
                result.SurgicalDiagnosisIsOrdered = false;
            }

            return(result);
        }
示例#2
0
        public SurgicalSpecimenAudit GetNextItem(string surgicalAuditId, YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, string amendmentId)
        {
            string surgicalSpecimenAuditId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            SurgicalSpecimenAudit surgicalSpecimenAudit = new SurgicalSpecimenAudit(surgicalSpecimenAuditId, surgicalAuditId, surgicalSpecimen, amendmentId);

            return(surgicalSpecimenAudit);
        }
		public void AddICDCode(string icd9Code, string icd10Code, YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
		{
			YellowstonePathology.Business.Billing.ICD9BillingCode icd9BillingCode = this.m_AccessionOrder.ICD9BillingCodeCollection.GetNextItem(this.m_SurgicalTestOrder.ReportNo,
							this.m_AccessionOrder.MasterAccessionNo, surgicalSpecimen.SpecimenOrderId, icd9Code, icd10Code, 1);
			icd9BillingCode.SurgicalSpecimenId = surgicalSpecimen.SurgicalSpecimenId;
			this.m_AccessionOrder.ICD9BillingCodeCollection.Add(icd9BillingCode);
		}
示例#4
0
        public override void Run()
        {
            this.m_Status = AuditStatusEnum.OK;
            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            YellowstonePathology.Business.Surgical.PQRSMeasureCollection  pqrsCollection    = YellowstonePathology.Business.Surgical.PQRSMeasureCollection.GetAll();
            int patientAge = YellowstonePathology.Business.Helper.PatientHelper.GetAge(this.m_AccessionOrder.PBirthdate.Value);

            foreach (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen in surgicalTestOrder.SurgicalSpecimenCollection)
            {
                foreach (YellowstonePathology.Business.Surgical.PQRSMeasure pqrsMeasure in pqrsCollection)
                {
                    if (pqrsMeasure.DoesMeasureApply(surgicalTestOrder, surgicalSpecimen, patientAge) == true)
                    {
                        this.m_Status = AuditStatusEnum.Failure;
                        this.m_Message.Append("A PQRS code must be applied.");
                        this.m_PQRSMeasure      = pqrsMeasure;
                        this.m_SurgicalSpecimen = surgicalSpecimen;
                        break;
                    }
                }
                if (this.m_Status == AuditStatusEnum.Failure)
                {
                    break;
                }
            }
        }
        private void BuildSurgicalSpecific(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement)
        {
            YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();
            if (panelSetOrder.PanelSetId == panelSetSurgical.PanelSetId)
            {
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder;
                List <XElement> surgicalSpecimenElements = (from item in panelSetOrderElement.Elements("SurgicalSpecimenCollection")
                                                            select item).ToList <XElement>();
                foreach (XElement surgicalSpecimenElement in surgicalSpecimenElements.Elements("SurgicalSpecimen"))
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen  = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen();
                    YellowstonePathology.Business.Persistence.XmlPropertyWriter  xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(surgicalSpecimenElement, surgicalSpecimen);
                    xmlPropertyWriter.Write();
                    BuildICD9Code(surgicalSpecimen, surgicalSpecimenElement);
                    BuildIntraoperativeConsultationResult(surgicalSpecimen, surgicalSpecimenElement);
                    BuildStainResult(surgicalSpecimen, surgicalSpecimenElement);
                    panelSetOrderSurgical.SurgicalSpecimenCollection.Add(surgicalSpecimen);
                }

                BuildSurgicalAudit(panelSetOrderSurgical, panelSetOrderElement);
                SetSurgicalAuditAmendment(panelSetOrderSurgical);
                SetSurgicalSpecimenSpecimenOrder(accessionOrder, panelSetOrderSurgical);
                SetSurgicalSpecimenAuditSpecimenOrder(accessionOrder, panelSetOrderSurgical);
                SetSurgicalSpecimenOrderItemCollection(accessionOrder, panelSetOrderSurgical);
            }
        }
        public PQRSMeasurePage(YellowstonePathology.Business.Surgical.PQRSMeasure pqrsMeasure, YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            this.m_PQRSMeasure = pqrsMeasure;
            this.m_SurgicalSpecimen = surgicalSpecimen;

            InitializeComponent();
            this.DataContext = this;
        }
示例#7
0
        public PQRSMeasurePage(YellowstonePathology.Business.Surgical.PQRSMeasure pqrsMeasure, YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            this.m_PQRSMeasure      = pqrsMeasure;
            this.m_SurgicalSpecimen = surgicalSpecimen;

            InitializeComponent();
            this.DataContext = this;
        }
        public InvasiveBreastPanelResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;

            YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest panelSetInvasiveBreastPanel = new YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelTest();
            this.m_InvasiveBreastPanel = (YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanel)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetInvasiveBreastPanel.PanelSetId);
            this.m_InvasiveBreastPanel.SetStatus(this.m_AccessionOrder.PanelSetOrderCollection);

            this.m_SpecimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_InvasiveBreastPanel.OrderedOnId);

            if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(46) == true)
            {
                this.m_PanelSetOrderHer2ByIsh = (YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(46);
                this.m_HER2ResultString = this.m_PanelSetOrderHer2ByIsh.Result;
            }

            YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest erPrSemiQuantitativeTest = new YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTest();
            if (this.m_AccessionOrder.PanelSetOrderCollection.HasSurgical() == true && this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == false)
            {
                this.m_HasSurgical = true;
                YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetSurgical.PanelSetId);
                this.m_SurgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(this.m_SpecimenOrder.SpecimenOrderId);

                YellowstonePathology.Business.Test.Model.TestOrder testOrderER = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(99);
                this.m_StainResultER = panelSetOrderSurgical.GetStainResult(testOrderER.TestOrderId);
                this.m_ERResultString = this.m_StainResultER.Result;

                YellowstonePathology.Business.Test.Model.TestOrder testOrderPR = this.m_AccessionOrder.PanelSetOrderCollection.GetTestOrderByTestId(145);
                this.m_StainResultPR = panelSetOrderSurgical.GetStainResult(testOrderPR.TestOrderId);
                this.m_PRResultString = this.m_StainResultPR.Result;

            }
            else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(erPrSemiQuantitativeTest.PanelSetId) == true)
            {
                this.m_PanelSetOrderErPrSemiQuantitative = (YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(erPrSemiQuantitativeTest.PanelSetId);
                this.m_ERResultString = this.m_PanelSetOrderErPrSemiQuantitative.ErResult;
                this.m_PRResultString = this.m_PanelSetOrderErPrSemiQuantitative.PrResult;
            }

            if (this.m_HER2ResultString == YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHTestOrder.EquivocalResult) this.m_IsHER2ByFISHRequired = true;

            YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3 panelSetHer2AmplificationByFishRetired3 = new YellowstonePathology.Business.PanelSet.Model.PanelSetHer2AmplificationByFishRetired3();
            YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest panelSetHer2AmplificationByFish = new YellowstonePathology.Business.Test.Her2AmplificationByFish.Her2AmplificationByFishTest();
            if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFishRetired3.PanelSetId) == true)
            {
                this.m_HER2ByFISHHasBeenOrdered = true;
                YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFishRetired3.PanelSetId);
                this.m_HER2ByFISHResultString = "Result in Report " + panelSetOrder.ReportNo;
            }
            else if (this.m_AccessionOrder.PanelSetOrderCollection.Exists(panelSetHer2AmplificationByFish.PanelSetId) == true)
            {
                this.m_HER2ByFISHHasBeenOrdered = true;
                YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish panelSetOrderHer2AmplificationByFish = (YellowstonePathology.Business.Test.Her2AmplificationByFish.PanelSetOrderHer2AmplificationByFish)this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetHer2AmplificationByFish.PanelSetId);
                this.m_HER2ByFISHResultString = panelSetOrderHer2AmplificationByFish.Result;
            }
            else this.m_HER2ByFISHResultString = "Not Required.";
        }
示例#9
0
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
 {
     if (surgicalSpecimen.SpecimenOrderId == this.m_AliquotOrder.SpecimenOrderId)
     {
         this.m_SurgicalSpecimen = surgicalSpecimen;
         this.HandleIC();
         this.HandleStainResult();
     }
 }
示例#10
0
 private void ButtonAddIcd9Code_Click(object sender, RoutedEventArgs args)
 {
     YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen)((Button)sender).Tag;
     YellowstonePathology.Business.Billing.ICD9BillingCode        icd9BillingCode  = this.AccessionOrder.ICD9BillingCodeCollection.GetNextItem(this.PanelSetOrderSurgical.ReportNo,
                                                                                                                                               this.AccessionOrder.MasterAccessionNo, surgicalSpecimen.SpecimenOrderId, null, null, 1);
     icd9BillingCode.SurgicalSpecimenId = surgicalSpecimen.SurgicalSpecimenId;
     this.AccessionOrder.ICD9BillingCodeCollection.Add(icd9BillingCode);
     this.RefreshBillingSpecimenViewCollection();
 }
示例#11
0
 public BillingSpecimenView(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen,
                            YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder,
                            YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeCollection,
                            YellowstonePathology.Business.Billing.Model.ICD9BillingCodeCollection icd9BillingCodeCollection)
 {
     this.m_SurgicalSpecimen = surgicalSpecimen;
     this.m_SpecimenOrder    = specimenOrder;
     this.m_PanelSetOrderCPTCodeCollection = panelSetOrderCPTCodeCollection;
     this.m_ICD9BillingCodeCollection      = icd9BillingCodeCollection;
 }
        public BillingSpecimenView(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen,
			YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder,
			YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeCollection,
			YellowstonePathology.Business.Billing.ICD9BillingCodeCollection icd9BillingCodeCollection)
        {
            this.m_SurgicalSpecimen = surgicalSpecimen;
            this.m_SpecimenOrder = specimenOrder;
            this.m_PanelSetOrderCPTCodeCollection = panelSetOrderCPTCodeCollection;
            this.m_ICD9BillingCodeCollection = icd9BillingCodeCollection;
            this.m_SpecimenCollection = YellowstonePathology.Business.Specimen.Model.SpecimenCollection.GetAll();
        }
示例#13
0
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
 {
     if (surgicalSpecimen.StainResultItemCollection.Exists(this.m_TestOrder.TestOrderId) == true)
     {
         this.m_StainResultHasBeenAdded = true;
     }
     if (surgicalSpecimen.IntraoperativeConsultationResultCollection.Exists(this.m_TestOrder.TestOrderId) == true)
     {
         this.m_ICHasBeenAdded = true;
     }
 }
示例#14
0
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder)
 {
     YellowstonePathology.Business.Specimen.Model.Specimen thinPrepFluid = YellowstonePathology.Business.Specimen.Model.SpecimenCollection.Instance.GetSpecimen("SPCMNTHNPRPFLD"); // Definition.ThinPrepFluid();
     if (this.m_SpecimenOrder.SpecimenId != thinPrepFluid.SpecimenId)
     {
         if (surgicalTestOrder.SurgicalSpecimenCollection.SpecimenOrderExists(this.m_SpecimenOrder.SpecimenOrderId) == false)
         {
             YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = surgicalTestOrder.SurgicalSpecimenCollection.Add(surgicalTestOrder.ReportNo);
             surgicalSpecimen.FromSpecimenOrder(this.m_SpecimenOrder);
         }
     }
 }
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder)
 {
     YellowstonePathology.Business.Specimen.Model.SpecimenDefinition.ThinPrepFluid thinPrepFluid = new YellowstonePathology.Business.Specimen.Model.SpecimenDefinition.ThinPrepFluid();
     if (this.m_SpecimenOrder.SpecimenId != thinPrepFluid.SpecimenId)
     {
         if (surgicalTestOrder.SurgicalSpecimenCollection.Exists(this.m_SpecimenOrder.SpecimenOrderId) == false)
         {
             YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = surgicalTestOrder.SurgicalSpecimenCollection.Add(surgicalTestOrder.ReportNo);
             surgicalSpecimen.FromSpecimenOrder(this.m_SpecimenOrder);
         }
     }
 }
示例#16
0
        private void BuildICD9Code(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, XElement surgicalSpecimenElement)
        {
            List <XElement> collectionElements = (from item in surgicalSpecimenElement.Elements("ICD9BillingCodeCollection")
                                                  select item).ToList <XElement>();

            foreach (XElement icd9BillingElement in collectionElements.Elements("ICD9BillingCode"))
            {
                YellowstonePathology.Business.Billing.ICD9BillingCode       icd9Billing       = new YellowstonePathology.Business.Billing.ICD9BillingCode();
                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(icd9BillingElement, icd9Billing);
                xmlPropertyWriter.Write();
                surgicalSpecimen.ICD9BillingCodeCollection.Add(icd9Billing);
            }
        }
示例#17
0
        private void BuildIntraoperativeConsultationResult(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, XElement surgicalSpecimenElement)
        {
            List <XElement> collectionElements = (from item in surgicalSpecimenElement.Elements("IntraoperativeConsultationResultCollection")
                                                  select item).ToList <XElement>();

            foreach (XElement intraoperativeConsultationResultElement in collectionElements.Elements("IntraoperativeConsultationResult"))
            {
                YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult intraoperativeConsultationResult = new YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult();
                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(intraoperativeConsultationResultElement, intraoperativeConsultationResult);
                xmlPropertyWriter.Write();
                surgicalSpecimen.IntraoperativeConsultationResultCollection.Add(intraoperativeConsultationResult);
            }
        }
示例#18
0
        private void BuildStainResult(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, XElement surgicalSpecimenElement)
        {
            List <XElement> collectionElements = (from item in surgicalSpecimenElement.Elements("StainResultItemCollection")
                                                  select item).ToList <XElement>();

            foreach (XElement stainResultElement in collectionElements.Elements("StainResultItem"))
            {
                YellowstonePathology.Business.SpecialStain.StainResultItem  stainResultItem   = new SpecialStain.StainResultItem();
                YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(stainResultElement, stainResultItem);
                xmlPropertyWriter.Write();
                surgicalSpecimen.StainResultItemCollection.Add(stainResultItem);
            }
        }
示例#19
0
		public CodeSelectionV2(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
			YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
			this.m_AccessionOrder = accessionOrder;
            this.m_SurgicalSpecimen = surgicalSpecimen;
			this.m_SurgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
			this.m_TypingCptCodeList = new YellowstonePathology.Business.Billing.TypingCptCodeList();

            InitializeComponent();

            this.ListViewCptCodes.ItemsSource = this.m_TypingCptCodeList;
            this.Loaded += new RoutedEventHandler(CptCodeSelection_Loaded);
        }
示例#20
0
        public CodeSelectionV2(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
			YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_SurgicalSpecimen = surgicalSpecimen;
            this.m_SurgicalTestOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();
            this.m_TypingCptCodeList = new YellowstonePathology.Business.Billing.Model.TypingCptCodeList();

            InitializeComponent();

            this.ListViewCptCodes.ItemsSource = this.m_TypingCptCodeList;
            this.Loaded += new RoutedEventHandler(CptCodeSelection_Loaded);
        }
示例#21
0
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder)
 {
     foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in this.m_AccessionOrder.SpecimenOrderCollection)
     {
         if (this.m_PanelSet.OrderTargetTypeCollectionExclusions.Exists(specimenOrder) == false)
         {
             if (surgicalTestOrder.SurgicalSpecimenCollection.Exists(specimenOrder.SpecimenOrderId) == false)
             {
                 YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = surgicalTestOrder.SurgicalSpecimenCollection.Add(this.m_ReportNo);
                 surgicalSpecimen.FromSpecimenOrder(specimenOrder);
             }
         }
     }
 }
        public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            if (surgicalSpecimen.StainResultItemCollection.Exists(this.m_TestOrderId) == true)
            {
                YellowstonePathology.Business.SpecialStain.StainResultItem stainResult = surgicalSpecimen.StainResultItemCollection.GetStainResult(this.m_TestOrderId);
                surgicalSpecimen.StainResultItemCollection.Remove(stainResult);
            }

            if (surgicalSpecimen.IntraoperativeConsultationResultCollection.Exists(this.m_TestOrderId) == true)
            {
                YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult icResult = surgicalSpecimen.IntraoperativeConsultationResultCollection.GetIntraoperativeConsultationResult(this.m_TestOrderId);
                surgicalSpecimen.IntraoperativeConsultationResultCollection.Remove(icResult);
            }
        }
 private void HandlePQRS()
 {
     this.SetWindowButtonVisibility();
     Business.Audit.Model.PQRSIsRequiredAudit pqrsIsRequiredAudit = this.m_PathologistSignoutAuditCollection.GetPQRSIsRequiredAudit();
     YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = pqrsIsRequiredAudit.SurgicalSpecimen;
     YellowstonePathology.Business.Surgical.PQRSMeasure           pqrsMeasure      = pqrsIsRequiredAudit.PQRSMeasure;
     if (this.m_PQRSSignoutPage == null)
     {
         this.m_PQRSSignoutPage        = new PQRSSignoutPage(pqrsMeasure, surgicalSpecimen, this.m_SurgicalTestOrder, this.m_AccessionOrder, this.m_BackButtonVisibility, this.m_NextButtonVisibility);
         this.m_PQRSSignoutPage.Next  += this.MoveForward;
         this.m_PQRSSignoutPage.Back  += this.MoveBack;
         this.m_PQRSSignoutPage.Close += this.CloseDialog;
     }
     this.m_PathologistSignoutDialog.PageNavigator.Navigate(this.m_PQRSSignoutPage);
 }
示例#24
0
        public virtual bool DoesMeasureApply(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder,
                                             YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, int patientAge)
        {
            bool result = false;

            if (this.m_PQRIKeyWordCollection.WordsExistIn(surgicalSpecimen.SpecimenOrder.Description) == true)
            {
                YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeCollectionForThisSpecimen = surgicalTestOrder.PanelSetOrderCPTCodeCollection.GetSpecimenOrderCollection(surgicalSpecimen.SpecimenOrder.SpecimenOrderId);
                if (panelSetOrderCPTCodeCollectionForThisSpecimen.DoesCollectionHaveCodes(this.m_CptCodeCollection) == true)
                {
                    result = true;
                }
            }
            return(result);
        }
示例#25
0
        public override bool DoesMeasureApply(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder,
                                              YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, int patientAge)
        {
            bool result = false;

            if (this.CancerSummaryApplies(surgicalTestOrder) == true || this.DiagnosisApplies(surgicalSpecimen) == true)
            {
                YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeCollectionForThisSpecimen = surgicalTestOrder.PanelSetOrderCPTCodeCollection.GetSpecimenOrderCollection(surgicalSpecimen.SpecimenOrder.SpecimenOrderId);
                if (panelSetOrderCPTCodeCollectionForThisSpecimen.DoesCollectionHaveCodes(this.m_CptCodeCollection) == true)
                {
                    result = true;
                }
            }
            return(result);
        }
示例#26
0
 private void ButtonAddCptCode_Click(object sender, RoutedEventArgs args)
 {
     YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen     = (YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen)((Button)sender).Tag;
     YellowstonePathology.Business.Specimen.Model.SpecimenOrder   specimenOrder        = this.AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderById(surgicalSpecimen.SpecimenOrderId);
     YellowstonePathology.Business.Test.PanelSetOrderCPTCode      panelSetOrderCPTCode = this.PanelSetOrderSurgical.PanelSetOrderCPTCodeCollection.GetNextItem(this.PanelSetOrderSurgical.ReportNo);
     panelSetOrderCPTCode.Quantity            = 1;
     panelSetOrderCPTCode.CPTCode             = null;
     panelSetOrderCPTCode.Modifier            = null;
     panelSetOrderCPTCode.CodeableDescription = "Specimen " + specimenOrder.SpecimenNumber + ": " + this.PanelSetOrderSurgical.PanelSetName;
     panelSetOrderCPTCode.CodeableType        = "Surgical Diagnosis";
     panelSetOrderCPTCode.EntryType           = YellowstonePathology.Business.Billing.Model.PanelSetOrderCPTCodeEntryType.ManualEntry;
     panelSetOrderCPTCode.SpecimenOrderId     = specimenOrder.SpecimenOrderId;
     panelSetOrderCPTCode.ClientId            = this.AccessionOrder.ClientId;
     this.PanelSetOrderSurgical.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode);
     this.RefreshBillingSpecimenViewCollection();
 }
示例#27
0
        public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            if (surgicalSpecimen.StainResultItemCollection.TestOrderExists(this.m_TestOrderId) == true)
            {
                List <YellowstonePathology.Business.SpecialStain.StainResultItem> stainResults = surgicalSpecimen.StainResultItemCollection.GetStainResults(this.m_TestOrderId);
                for (int i = stainResults.Count - 1; i >= 0; i--)
                {
                    surgicalSpecimen.StainResultItemCollection.Remove(stainResults[i]);
                }
            }

            if (surgicalSpecimen.IntraoperativeConsultationResultCollection.TestOrderIdExists(this.m_TestOrderId) == true)
            {
                YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult icResult = surgicalSpecimen.IntraoperativeConsultationResultCollection.GetIntraoperativeConsultationResult(this.m_TestOrderId);
                surgicalSpecimen.IntraoperativeConsultationResultCollection.Remove(icResult);
            }
        }
示例#28
0
        private bool DiagnosisApplies(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
        {
            bool result = false;

            if (string.IsNullOrEmpty(surgicalSpecimen.Diagnosis) == false)
            {
                foreach (string keyWord in this.m_KeyWords)
                {
                    if (surgicalSpecimen.Diagnosis.ToUpper().Contains(keyWord.ToUpper()) == true)
                    {
                        result = true;
                        break;
                    }
                }
            }
            return(result);
        }
示例#29
0
        public FrozenFinalDialog(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                 YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult intraoperativeConsultation,
                                 YellowstonePathology.UI.TypingShortcutUserControl typingShortcutUserControl)
        {
            this.m_PathologistUsers           = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetUsersByRole(YellowstonePathology.Business.User.SystemUserRoleDescriptionEnum.Pathologist, true);
            this.m_AccessionOrder             = accessionOrder;
            this.m_IntraoperativeConsultation = intraoperativeConsultation;
            this.m_TypingShortcutUserControl  = typingShortcutUserControl;

            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)accessionOrder.PanelSetOrderCollection.GetSurgical();
            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen  surgicalSpecimen      = (from ssr in panelSetOrderSurgical.SurgicalSpecimenCollection
                                                                                                   where ssr.SurgicalSpecimenId == intraoperativeConsultation.SurgicalSpecimenId
                                                                                                   select ssr).Single <YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen>();
            this.m_SpecimenOrder = surgicalSpecimen.SpecimenOrder;
            InitializeComponent();

            this.DataContext = this;
            Closing         += new System.ComponentModel.CancelEventHandler(FrozenFinalDialog_Closing);
        }
示例#30
0
        private void ButtonAddSurgicalDiagnosis_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewSpecimenSurgicalDiagnosis.SelectedItem != null)
            {
                YellowstonePathology.Business.View.SpecimenSurgicalDiagnosisView specimenSurgicalDiagnosisView = (YellowstonePathology.Business.View.SpecimenSurgicalDiagnosisView) this.ListViewSpecimenSurgicalDiagnosis.SelectedItem;
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder    panelSetOrderSurgical         = this.m_AccessionOrder.PanelSetOrderCollection.GetSurgical();

                if (panelSetOrderSurgical.SurgicalSpecimenCollection.SpecimenOrderExists(specimenSurgicalDiagnosisView.SpecimenOrder.SpecimenOrderId) == false)
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = panelSetOrderSurgical.SurgicalSpecimenCollection.GetNextItem(panelSetOrderSurgical.ReportNo);
                    surgicalSpecimen.SpecimenOrderId = specimenSurgicalDiagnosisView.SpecimenOrder.SpecimenOrderId;
                    surgicalSpecimen.DiagnosisId     = specimenSurgicalDiagnosisView.SpecimenOrder.SpecimenNumber;
                    panelSetOrderSurgical.SurgicalSpecimenCollection.Add(surgicalSpecimen);
                }

                this.m_SpecimenSurgicalDiagnosisViewCollection.Refresh(this.m_AccessionOrder);
                this.NotifyPropertyChanged("SpecimenSurgicalDiagnosisViewCollection");
                MessageBox.Show("The surgical diagnosis has been added.");
            }
        }
示例#31
0
        public PQRSSignoutPage(YellowstonePathology.Business.Surgical.PQRSMeasure pqrsMeasure,
                               YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen,
                               YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder,
                               YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                               System.Windows.Visibility backButtonVisibility,
                               System.Windows.Visibility nextButtonVisibility)
        {
            this.m_PQRSMeasure          = pqrsMeasure;
            this.m_SurgicalSpecimen     = surgicalSpecimen;
            this.m_SurgicalTestOrder    = surgicalTestOrder;
            this.m_AccessionOrder       = accessionOrder;
            this.m_BackButtonVisibility = backButtonVisibility;
            this.m_NextButtonVisibility = nextButtonVisibility;

            this.m_SurgicalTestOrder.PQRSIsIndicated = true;

            InitializeComponent();
            this.DataContext = this;
            this.Loaded     += PQRSSignoutPage_Loaded;
            Unloaded        += PQRSSignoutPage_Unloaded;
        }
        public PQRSSignoutPage(YellowstonePathology.Business.Surgical.PQRSMeasure pqrsMeasure,
            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen,
            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder,
            YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
            System.Windows.Visibility backButtonVisibility,
            System.Windows.Visibility nextButtonVisibility)
        {
            this.m_PQRSMeasure = pqrsMeasure;
            this.m_SurgicalSpecimen = surgicalSpecimen;
            this.m_SurgicalTestOrder = surgicalTestOrder;
            this.m_AccessionOrder = accessionOrder;
            this.m_BackButtonVisibility = backButtonVisibility;
            this.m_NextButtonVisibility = nextButtonVisibility;

            this.m_SurgicalTestOrder.PQRSIsIndicated = true;

            InitializeComponent();
            this.DataContext = this;
            this.Loaded += PQRSSignoutPage_Loaded;
            Unloaded += PQRSSignoutPage_Unloaded;
        }
        public static StainSpecimenCollection GetCollection(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            StainSpecimenCollection result = new StainSpecimenCollection();

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection)
            {
                YellowstonePathology.Business.Test.Model.TestOrderCollection testOrderCollection = panelSetOrder.GetTestOrderCollection(specimenOrder.AliquotOrderCollection);

                if (panelSetOrder.PanelSetId == 13)
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder;
                    YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen  surgicalSpecimen      = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId);
                    if (surgicalSpecimen != null)
                    {
                        YellowstonePathology.Business.SpecialStain.StainResultItemCollection stainResultCollection = surgicalSpecimen.StainResultItemCollection;
                        SurgicalStainSpecimen surgicalStainSpecimen = new SurgicalStainSpecimen(specimenOrder, testOrderCollection, stainResultCollection);
                        result.Add(surgicalStainSpecimen);
                    }
                }
                else
                {
                    if (panelSetOrder is YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation)
                    {
                        if (result.HasLSEIHCSpecimen() == false)
                        {
                            LSEIHCStainSpecimen lseIHCStainSpecimen = new LSEIHCStainSpecimen();
                            result.Add(lseIHCStainSpecimen);
                        }
                    }
                    else
                    {
                        StainSpecimen stainSpecimen = new StainSpecimen(specimenOrder, testOrderCollection);
                        result.Add(stainSpecimen);
                    }
                }
            }
            return(result);
        }
示例#34
0
        public override bool DoesMeasureApply(YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder surgicalTestOrder,
                                              YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen, int patientAge)
        {
            bool result = false;

            if (string.IsNullOrEmpty(surgicalSpecimen.SpecimenOrder.Description) == false)
            {
                if (this.m_PQRIKeyWordCollection.WordsExistIn(surgicalSpecimen.SpecimenOrder.Description) == true)
                {
                    string diagnosisKeyWord = "Carcinoma";
                    if (string.IsNullOrEmpty(surgicalSpecimen.Diagnosis) == false && surgicalSpecimen.Diagnosis.ToUpper().Contains(diagnosisKeyWord.ToUpper()) == true)
                    {
                        YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection panelSetOrderCPTCodeCollectionForThisSpecimen = surgicalTestOrder.PanelSetOrderCPTCodeCollection.GetSpecimenOrderCollection(surgicalSpecimen.SpecimenOrder.SpecimenOrderId);
                        if (panelSetOrderCPTCodeCollectionForThisSpecimen.DoesCollectionHaveCodes(this.m_CptCodeCollection) == true)
                        {
                            result = true;
                        }
                    }
                }
            }
            return(result);
        }
示例#35
0
        private void BuildCollection(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            foreach (YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection)
            {
                SpecimenSurgicalDiagnosisView item = new SpecimenSurgicalDiagnosisView();
                item.SpecimenOrder = specimenOrder;

                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = accessionOrder.PanelSetOrderCollection.GetSurgical();
                YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen  surgicalSpecimen      = panelSetOrderSurgical.SurgicalSpecimenCollection.GetBySpecimenOrderId(specimenOrder.SpecimenOrderId);
                if (surgicalSpecimen != null)
                {
                    item.SurgicalSpecimen           = surgicalSpecimen;
                    item.SurgicalDiagnosisIsOrdered = true;
                }
                else
                {
                    item.SurgicalDiagnosisIsOrdered = false;
                }

                this.Add(item);
            }
        }
        private void BuildSurgicalSpecific(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement)
        {
            YellowstonePathology.Business.Test.Surgical.SurgicalTest panelSetSurgical = new YellowstonePathology.Business.Test.Surgical.SurgicalTest();
            if (panelSetOrder.PanelSetId == panelSetSurgical.PanelSetId)
            {
                YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder panelSetOrderSurgical = (YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder)panelSetOrder;
                List<XElement> surgicalSpecimenElements = (from item in panelSetOrderElement.Elements("SurgicalSpecimenCollection")
                                                                     select item).ToList<XElement>();
                foreach (XElement surgicalSpecimenElement in surgicalSpecimenElements.Elements("SurgicalSpecimen"))
                {
                    YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen();
                    YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(surgicalSpecimenElement, surgicalSpecimen);
                    xmlPropertyWriter.Write();
                    BuildICD9Code(surgicalSpecimen, surgicalSpecimenElement);
                    BuildIntraoperativeConsultationResult(surgicalSpecimen, surgicalSpecimenElement);
                    BuildStainResult(surgicalSpecimen, surgicalSpecimenElement);
                    panelSetOrderSurgical.SurgicalSpecimenCollection.Add(surgicalSpecimen);
                }

                BuildSurgicalAudit(panelSetOrderSurgical, panelSetOrderElement);
                SetSurgicalAuditAmendment(panelSetOrderSurgical);
                SetSurgicalSpecimenSpecimenOrder(accessionOrder, panelSetOrderSurgical);
                SetSurgicalSpecimenAuditSpecimenOrder(accessionOrder, panelSetOrderSurgical);
                SetSurgicalSpecimenOrderItemCollection(accessionOrder, panelSetOrderSurgical);
            }
        }
示例#37
0
 public override void Visit(YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen surgicalSpecimen)
 {
     if (surgicalSpecimen.SpecimenOrderId == this.m_AliquotOrder.SpecimenOrderId)
     {
         this.m_SurgicalSpecimen = surgicalSpecimen;
         this.HandleIC();
         this.HandleStainResult();
     }
 }
        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);
                    }
                }
            }
        }
        private void WriteAssemblyQualifiedTypeSQL()
        {
            YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder psos = new YellowstonePathology.Business.Test.Surgical.SurgicalTestOrder();
            Console.WriteLine(psos.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.PanelSetOrderCPTCodeCollection psocptc = new Business.Test.PanelSetOrderCPTCodeCollection();
            Console.WriteLine(psocptc.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBill psocptb = new Business.Test.PanelSetOrderCPTCodeBill();
            Console.WriteLine(psocptb.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.PanelSetOrderCPTCodeBillCollection psocptbc = new Business.Test.PanelSetOrderCPTCodeBillCollection();
            Console.WriteLine(psocptbc.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen ssr = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimen();
            Console.WriteLine(ssr.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenCollection ssrc = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenCollection();
            Console.WriteLine(ssrc.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult ic = new YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResult();
            Console.WriteLine(ic.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResultCollection icc = new YellowstonePathology.Business.Test.Surgical.IntraoperativeConsultationResultCollection();
            Console.WriteLine(icc.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalAudit sra = new YellowstonePathology.Business.Test.Surgical.SurgicalAudit();
            Console.WriteLine(sra.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalAuditCollection srac = new YellowstonePathology.Business.Test.Surgical.SurgicalAuditCollection();
            Console.WriteLine(srac.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit ssra = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAudit();
            Console.WriteLine(ssra.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAuditCollection ssrac = new YellowstonePathology.Business.Test.Surgical.SurgicalSpecimenAuditCollection();
            Console.WriteLine(ssrac.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.SpecialStain.StainResultItem sri = new Business.SpecialStain.StainResultItem();
            Console.WriteLine(sri.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.SpecialStain.StainResultItemCollection sric = new Business.SpecialStain.StainResultItemCollection();
            Console.WriteLine(sric.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Billing.Model.ICD9BillingCode icd = new Business.Billing.Model.ICD9BillingCode();
            Console.WriteLine(icd.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Billing.Model.ICD9BillingCodeCollection icdc = new Business.Billing.Model.ICD9BillingCodeCollection();
            Console.WriteLine(icdc.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Billing.Model.CptBillingCodeItem cpt = new Business.Billing.Model.CptBillingCodeItem();
            Console.WriteLine(cpt.GetType().AssemblyQualifiedName);

            YellowstonePathology.Business.Billing.Model.CptBillingCodeItemCollection cptc = new Business.Billing.Model.CptBillingCodeItemCollection();
            Console.WriteLine(cptc.GetType().AssemblyQualifiedName);

            //foreach (YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet in panelSetCollection)
            //{
            //    Console.WriteLine("Update tblPanelSet set AssemblyQualifiedTypeName = '" + panelSet.GetType().AssemblyQualifiedName + "' where panelsetId = " + panelSet.PanelSetId);
            //}
        }