public override void SetISHResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.m_ResultComment     = null;
            this.m_ResultDescription = "Ratio = " + this.m_HER2AmplificationByISHTestOrder.Her2Chr17Ratio;

            this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*RATIO*", this.m_HER2AmplificationByISHTestOrder.Her2Chr17Ratio.Value.ToString());
            this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*CELLSCOUNTED*", this.m_HER2AmplificationByISHTestOrder.CellCountToUse.ToString());
            if (this.m_HER2AmplificationByISHTestOrder.AverageHer2NeuSignal.HasValue == true)
            {
                this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*HER2COPY*", this.m_HER2AmplificationByISHTestOrder.AverageHer2NeuSignal.Value.ToString());
            }

            Nullable <double> her2Chr17Ratio = this.m_HER2AmplificationByISHTestOrder.AverageHer2Chr17SignalAsDouble;

            if (her2Chr17Ratio.HasValue)
            {
                if (her2Chr17Ratio < 2.0)
                {
                    this.m_Result = HER2AmplificationResultEnum.Negative;
                    this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*HER2STATUS*", this.m_Result.ToString());
                }
                else if (her2Chr17Ratio >= 2.0)
                {
                    this.m_Result = HER2AmplificationResultEnum.Positive;
                    this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*HER2STATUS*", this.m_Result.ToString());
                }
            }

            base.SetISHResults(specimenOrder);
        }
示例#2
0
        public void Sync(DataTable dataTable)
        {
            this.IsLoading = true;
            this.RemoveDeleted(dataTable);
            DataTableReader dataTableReader = new DataTableReader(dataTable);

            while (dataTableReader.Read())
            {
                string specimenOrderId = dataTableReader["SpecimenOrderId"].ToString();

                Business.Specimen.Model.SpecimenOrder specimenOrder = null;

                if (this.Exists(specimenOrderId) == true)
                {
                    specimenOrder = this.GetSpecimenOrder(specimenOrderId);
                }
                else
                {
                    specimenOrder = new Business.Specimen.Model.SpecimenOrder();
                    this.Add(specimenOrder);
                }

                YellowstonePathology.Business.Persistence.SqlDataTableReaderPropertyWriter sqlDataTableReaderPropertyWriter = new Persistence.SqlDataTableReaderPropertyWriter(specimenOrder, dataTableReader);
                sqlDataTableReaderPropertyWriter.WriteProperties();
            }

            this.IsLoading = false;
        }
示例#3
0
        public bool CanBuild(Business.Test.AccessionOrder accessionOrder, string testOrderId, string slideOrderId)
        {
            bool result = false;

            Business.Test.PanelOrder panelOrder = accessionOrder.PanelSetOrderCollection.GetPanelOrderByTestOrderId(testOrderId);
            Business.User.SystemUser orderedBy  = Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetSystemUserById(panelOrder.OrderedById);

            Business.Test.AliquotOrder    aliquotOrder = accessionOrder.SpecimenOrderCollection.GetAliquotOrderByTestOrderId(testOrderId);
            Business.Test.Model.TestOrder testOrder    = panelOrder.TestOrderCollection.Get(testOrderId);

            Business.Slide.Model.SlideOrder       slideOrder    = aliquotOrder.SlideOrderCollection.GetSlideOrderByTestOrderId(testOrderId);
            Business.Specimen.Model.SpecimenOrder specimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);

            Business.Stain.Model.Stain stain = Business.Stain.Model.StainCollection.Instance.GetStainByTestId(testOrder.TestId);
            if (stain != null)
            {
                result = true;
                if (slideOrder.UseWetProtocol == true)
                {
                    result = false;
                    if (stain.HasWetProtocol == true || stain.UseWetProtocol == true)
                    {
                        result = true;
                    }
                }
            }
            return(result);
        }
示例#4
0
        public override void SetISHResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.m_Result = HER2AmplificationResultEnum.Negative;
            this.m_InterpretiveComment = InterpretiveComment;
            this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*RATIO*", this.m_HER2AmplificationByISHTestOrder.Her2Chr17Ratio.Value.ToString());
            this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*CELLSCOUNTED*", this.m_HER2AmplificationByISHTestOrder.CellCountToUse.ToString());
            this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*HER2STATUS*", this.m_Result.ToString());
            if (this.m_AverageHer2NeuSignal.HasValue == true)
            {
                this.m_InterpretiveComment = this.m_InterpretiveComment.Replace("*HER2COPY*", this.m_AverageHer2NeuSignal.Value.ToString());
            }

            base.SetISHResults(specimenOrder);
        }
        public override void SetSummaryResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.HandleIHC();

            if (this.m_HER2AmplificationRecountTestOrder != null && this.m_HER2AmplificationRecountTestOrder.Accepted == true &&
                this.m_PanelSetOrderHer2AmplificationByIHC != null && this.m_PanelSetOrderHer2AmplificationByIHC.Accepted == true)
            {
                if (this.m_PanelSetOrderHer2AmplificationByIHC.Score.Contains("2+"))
                {
                    this.m_Result = HER2AmplificationByISH.HER2AmplificationResultEnum.Negative;
                }
            }

            base.SetSummaryResults(specimenOrder);
        }
示例#6
0
        public virtual void SetSummaryResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            this.m_HER2AnalysisSummaryTestOrder.Result = this.m_Result.ToString();
            if (this.m_HER2AnalysisSummaryTestOrder.Result == HER2AmplificationResultEnum.Equivocal.ToString())
            {
                this.m_InterpretiveComment += Environment.NewLine + Environment.NewLine + "HER2 immunohistochemistry will be performed and " +
                                              "results will be issued in an addendum to the original surgical pathology report.";
            }

            if (this.m_HER2AnalysisSummaryTestOrder.GeneticHeterogeneity == HER2AmplificationByISHGeneticHeterogeneityCollection.GeneticHeterogeneityPresentInCells)
            {
                this.m_InterpretiveComment += Environment.NewLine + Environment.NewLine +
                                              "However, this tumor exhibits genetic heterogeneity in HER2 gene amplification in scattered individual cells.  The " +
                                              "clinical significance and potential clinical benefit of trastuzumab is uncertain when " +
                                              this.m_HER2AnalysisSummaryTestOrder.Indicator.ToLower() +
                                              " carcinoma demonstrates genetic heterogeneity." + Environment.NewLine + Environment.NewLine;
                this.m_ResultComment = "This tumor exhibits genetic heterogeneity in HER2 gene amplification in scattered individual cells.  The clinical " +
                                       "significance and potential clinical benefit of trastuzumab is uncertain when " +
                                       this.m_HER2AnalysisSummaryTestOrder.Indicator.ToLower() +
                                       " carcinoma demonstrates genetic heterogeneity";
            }
            else if (this.m_HER2AnalysisSummaryTestOrder.GeneticHeterogeneity == HER2AmplificationByISHGeneticHeterogeneityCollection.GeneticHeterogeneityPresentInClusters)
            {
                this.m_InterpretiveComment += Environment.NewLine + Environment.NewLine +
                                              "However, this tumor exhibits genetic heterogeneity in HER2 gene amplification in small cell clusters. The HER2/Chr17 " +
                                              "ratio in the clusters is " +
                                              this.m_HER2AnalysisSummaryTestOrder.Her2Chr17ClusterRatio +
                                              ".  The clinical significance and potential clinical benefit of trastuzumab is uncertain when " +
                                              this.m_HER2AnalysisSummaryTestOrder.Indicator.ToLower() +
                                              " carcinoma demonstrates genetic heterogeneity." + Environment.NewLine + Environment.NewLine;
                this.m_ResultComment = "This tumor exhibits genetic heterogeneity in HER2 gene amplification in small cell clusters.  The clinical significance " +
                                       "and potential clinical benefit of trastuzumab is uncertain when " +
                                       this.m_HER2AnalysisSummaryTestOrder.Indicator.ToLower() +
                                       " carcinoma demonstrates genetic heterogeneity.";
            }

            this.m_HER2AnalysisSummaryTestOrder.ResultComment       = this.m_ResultComment;
            this.m_HER2AnalysisSummaryTestOrder.InterpretiveComment = this.m_InterpretiveComment.TrimEnd();
            this.m_HER2AnalysisSummaryTestOrder.ResultDescription   = this.m_ResultDescription;
            this.m_HER2AnalysisSummaryTestOrder.CommentLabel        = null;
            this.m_HER2AnalysisSummaryTestOrder.ReportReference     = this.m_ReportReference;
            this.m_HER2AnalysisSummaryTestOrder.NoCharge            = false;

            if (specimenOrder.FixationDuration > 72 || specimenOrder.FixationDuration < 6)
            {
                specimenOrder.FixationComment = m_FixationOutOfBoundsComment;
            }
        }
示例#7
0
        public MPNExtendedReflexPage(YellowstonePathology.Business.Test.MPNExtendedReflex.PanelSetOrderMPNExtendedReflex testOrder,
                                     YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                     YellowstonePathology.Business.User.SystemIdentity systemIdentity) : base(testOrder, accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_SystemIdentity = systemIdentity;
            this.m_PanelSetOrder  = testOrder;
            Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByOrderTarget(this.m_PanelSetOrder.OrderedOnId);
            this.m_OrderedOnDescription = specimenOrder.Description;
            this.m_PageHeaderText       = this.m_PanelSetOrder.PanelSetName + " for: " + this.m_AccessionOrder.PatientDisplayName;

            InitializeComponent();

            this.DataContext = this;

            this.m_ControlsNotDisabledOnFinal.Add(this.ButtonBack);
            this.m_ControlsNotDisabledOnFinal.Add(this.ButtonFinish);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockShowDocument);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockUnfinalResults);
        }
示例#8
0
        public static Business.Rules.MethodResult RemovePanelSet(string reportNo, Business.Test.AccessionOrder accessionOrder, object writer)
        {
            YellowstonePathology.Business.Rules.MethodResult methodResult = new Business.Rules.MethodResult();
            if (accessionOrder.PanelSetOrderCollection.Count > 1)
            {
                Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);

                if ((accessionOrder.PLastName.ToUpper() == "MOUSE" && accessionOrder.PFirstName.ToUpper() == "MICKEY") ||
                    panelSetOrder.Final == false)
                {
                    if (panelSetOrder.PanelSetId == 15)
                    {
                        //delete the thinprep slide;
                        if (accessionOrder.SpecimenOrderCollection.HasThinPrepFluidSpecimen() == true)
                        {
                            Business.Specimen.Model.SpecimenOrder specimenOrder = accessionOrder.SpecimenOrderCollection.GetThinPrep();
                            if (specimenOrder.AliquotOrderCollection.HasThinPrepSlide() == true)
                            {
                                Business.Test.AliquotOrder aliquotOrder = specimenOrder.AliquotOrderCollection.GetThinPrepSlide();
                                specimenOrder.AliquotOrderCollection.Remove(aliquotOrder);
                            }
                        }
                    }

                    accessionOrder.PanelSetOrderCollection.Remove(panelSetOrder);
                    accessionOrder.TaskOrderCollection.RemoveTaskOrdersForDeletedTestOrder(reportNo);
                    YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(accessionOrder, writer);
                }
                else
                {
                    methodResult.Success = false;
                    methodResult.Message = "Unable to remove a Panel Set that has been finaled.";
                }
            }
            else
            {
                methodResult.Success = false;
                methodResult.Message = "Unable to remove the only Panel Set for the Accession.";
            }
            return(methodResult);
        }
        public ErPrSemiQuantitativeResultPage(YellowstonePathology.Business.Test.ErPrSemiQuantitative.ErPrSemiQuantitativeTestOrder testOrder,
                                              YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                              YellowstonePathology.Business.User.SystemIdentity systemIdentity,
                                              YellowstonePathology.UI.Navigation.PageNavigator pageNavigator) : base(testOrder, accessionOrder)
        {
            this.m_PanelSetOrder  = testOrder;
            this.m_AccessionOrder = accessionOrder;
            this.m_SystemIdentity = systemIdentity;
            this.m_PageNavigator  = pageNavigator;

            this.m_PageHeaderText = "Er/Pr Semi Quantitative Results For: " + this.m_AccessionOrder.PatientDisplayName + " (" + this.m_PanelSetOrder.ReportNo + ")";
            this.m_SpecimenOrder  = this.m_AccessionOrder.SpecimenOrderCollection.GetByAliquotOrderId(this.m_PanelSetOrder.OrderedOnId);
            YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetAliquotOrder(this.m_PanelSetOrder.OrderedOnId);
            this.m_OrderedOnDescription = this.m_SpecimenOrder.Description + ": " + aliquotOrder.Label;

            InitializeComponent();

            DataContext = this;

            this.m_ControlsNotDisabledOnFinal.Add(this.ButtonNext);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockShowDocument);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockUnfinalResults);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockSetResults);
        }
示例#10
0
        public string Build(Business.Test.AccessionOrder accessionOrder, string testOrderId, string slideOrderId)
        {
            //protoc -I d:/protogen --csharp_out d:/protogen/result d:/protogen/ventana.proto --grpc_out d:/protogen/result --plugin=protoc-gen-grpc=grpc_csharp_plugin.exe

            Channel channel = new Channel("10.1.2.70:30051", ChannelCredentials.Insecure);

            //Channel channel = new Channel("10.1.1.54:50051", ChannelCredentials.Insecure);

            Ventana.VentanaService.VentanaServiceClient ventanaServiceClient = new Ventana.VentanaService.VentanaServiceClient(channel);
            Ventana.OrderRequest orderRequest = new Ventana.OrderRequest();

            Business.Test.PanelOrder panelOrder = accessionOrder.PanelSetOrderCollection.GetPanelOrderByTestOrderId(testOrderId);
            Business.User.SystemUser orderedBy  = Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection.GetSystemUserById(panelOrder.OrderedById);

            Business.Test.AliquotOrder    aliquotOrder = accessionOrder.SpecimenOrderCollection.GetAliquotOrderByTestOrderId(testOrderId);
            Business.Test.Model.TestOrder testOrder    = panelOrder.TestOrderCollection.Get(testOrderId);

            Business.Slide.Model.SlideOrder       slideOrder    = aliquotOrder.SlideOrderCollection.Get(slideOrderId);
            Business.Specimen.Model.SpecimenOrder specimenOrder = accessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);

            Business.Stain.Model.Stain stain = Business.Stain.Model.StainCollection.Instance.GetStainByTestId(testOrder.TestId);
            string ventanaBarcode            = stain.VentanaBenchMarkId.ToString();
            string ventanaProtocolName       = stain.VentanaBenchMarkProtocolName;

            if (slideOrder.UseWetProtocol == true)
            {
                if (stain.HasWetProtocol == true)
                {
                    ventanaBarcode      = stain.VentanaBenchMarkWetId.ToString();
                    ventanaProtocolName = stain.VentanaBenchMarkWetProtocolName;
                }
            }

            orderRequest.Msh = new Ventana.msh();
            orderRequest.Msh.SendingApplication   = "YPILIS";
            orderRequest.Msh.SendingFacility      = "YPI";
            orderRequest.Msh.ReceivingApplication = "Ventana";
            orderRequest.Msh.ReceivingFacility    = "YPI";
            orderRequest.Msh.DateTimeOfMessage    = DateTime.Now.ToString("yyyyMMddHHmmss");
            orderRequest.Msh.MessageType          = "OML^O21";
            orderRequest.Msh.MessageControlId     = MongoDB.Bson.ObjectId.GenerateNewId().ToString();

            orderRequest.Pid           = new Ventana.pid();
            orderRequest.Pid.FirstName = accessionOrder.PFirstName;
            orderRequest.Pid.LastName  = accessionOrder.PLastName;

            orderRequest.Pid.MiddleInitial = string.IsNullOrEmpty(accessionOrder.PMiddleInitial) ? string.Empty : accessionOrder.PMiddleInitial;
            orderRequest.Pid.Birthdate     = accessionOrder.PBirthdate.Value.ToString("yyyyMMdd");
            orderRequest.Pid.Sex           = accessionOrder.PSex;

            orderRequest.Pv1 = new Ventana.pv1();
            orderRequest.Pv1.RequestingPhysicianFirstname = orderedBy.FirstName;
            orderRequest.Pv1.RequestingPhysicianLastname  = orderedBy.LastName;
            orderRequest.Pv1.RequestingPhysicianNpi       = string.IsNullOrEmpty(orderedBy.NationalProviderId) ? "NOTAPPLICABLE" : orderedBy.NationalProviderId;

            orderRequest.Sac = new Ventana.sac();
            orderRequest.Sac.RegistrationDateTime = accessionOrder.AccessionTime.Value.ToString("yyyyMMddHHmm");

            Ventana.stain_order stainOrder = new Ventana.stain_order();
            Ventana.orc         orc        = new Ventana.orc();
            orc.OrderControl      = "NW";
            orc.PlacerOrderNumber = accessionOrder.MasterAccessionNo;
            orc.SiteName          = "YPI";
            orc.SiteDescription   = "Yellowstone Pathology";
            orc.FacilityCode      = "YPI";
            orc.FacilityName      = "Yellowstone Pathology";
            stainOrder.Orc        = orc;

            Ventana.obr obr = new Ventana.obr();
            obr.OrderSequenceId     = "1";
            obr.PlacerOrderNumber   = accessionOrder.MasterAccessionNo;
            obr.ProtocolNumber      = ventanaBarcode;
            obr.ProtocolName        = ventanaProtocolName;
            obr.OrderType           = "STAIN";
            obr.ObservationDateTime = DateTime.Now.ToString("yyyyMMddHHmm");

            if (string.IsNullOrEmpty(specimenOrder.SpecimenId) == false)
            {
                obr.SpecimenName = specimenOrder.SpecimenId;
            }
            else
            {
                obr.SpecimenName = "NONE";
            }

            obr.SpecimenDescription   = specimenOrder.Description;
            obr.SurgicalProcedureName = "Surgical Pathology";
            obr.PathologistNpi        = string.IsNullOrEmpty(orderedBy.NationalProviderId) ? "NOTAPPLICABLE" : orderedBy.NationalProviderId;
            obr.PathologistLastname   = orderedBy.LastName;
            obr.PathologistFirstname  = orderedBy.FirstName;
            obr.SlideId          = "HSLD" + slideOrder.SlideOrderId;
            obr.SlideSequence    = Business.Specimen.Model.Slide.GetSlideNumber(slideOrder.Label);
            obr.Blockid          = aliquotOrder.AliquotOrderId;
            obr.BlockSequence    = Business.Specimen.Model.Block.GetBlockLetter(aliquotOrder.Label);
            obr.SpecimenId       = specimenOrder.SpecimenOrderId;
            obr.SpecimenSequence = specimenOrder.SpecimenNumber.ToString();
            stainOrder.Obr       = obr;
            orderRequest.StainOrders.Add(stainOrder);

            Ventana.OrderReply orderReply = ventanaServiceClient.buildOrder(orderRequest);
            return(orderReply.Message);
        }
示例#11
0
 public override void SetSummaryResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
 {
     this.m_ResultComment     = null;
     this.m_ResultDescription = "Ratio = " + this.m_HER2AnalysisSummaryTestOrder.Her2Chr17Ratio;
     base.SetSummaryResults(specimenOrder);
 }
示例#12
0
 public override void SetISHResults(Business.Specimen.Model.SpecimenOrder specimenOrder)
 {
     this.m_ResultComment     = null;
     this.m_ResultDescription = "Ratio = " + this.m_HER2AmplificationByISHTestOrder.Her2Chr17Ratio;
     base.SetISHResults(specimenOrder);
 }
        public void SetResults(ErPrSemiQuantitativeTestOrder panelSetOrderErPrSemiQuantitative, Business.Specimen.Model.SpecimenOrder specimenOrder)
        {
            panelSetOrderErPrSemiQuantitative.ResultCode       = this.m_ResultCode;
            panelSetOrderErPrSemiQuantitative.ReportReferences = this.m_ReportReferences;
            panelSetOrderErPrSemiQuantitative.Method           = this.m_Method;
            panelSetOrderErPrSemiQuantitative.Interpretation   = this.m_Interpretation;

            if (specimenOrder.FixationDuration > 72 || specimenOrder.FixationDuration < 6)
            {
                specimenOrder.FixationComment = m_FixationOutOfBoundsComment;
            }
        }