Ejemplo n.º 1
0
        public override bool IsRequired(Business.Test.AccessionOrder accessionOrder)
        {
            bool result = false;

            YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapTest panelSetThinPrep = new YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapTest();
            if (accessionOrder.PanelSetOrderCollection.Exists(panelSetThinPrep.PanelSetId) == true)
            {
                YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology panelSetOrderCytology = (YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetThinPrep.PanelSetId);
                if (panelSetOrderCytology.Final == true)
                {
                    if (YellowstonePathology.Business.Cytology.Model.CytologyResultCode.IsDiagnosisAscusAgusLsilHsil(panelSetOrderCytology.ResultCode) == true)
                    {
                        if (accessionOrder.PBirthdate < DateTime.Today.AddYears(-20))
                        {
                            YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId);
                            Nullable <DateTime> dateOfLastHPV = patientHistory.GetDateOfPreviousHpv(accessionOrder.AccessionDate.Value);

                            if (dateOfLastHPV.HasValue == true)
                            {
                                if (dateOfLastHPV < DateTime.Today.AddDays(-330))
                                {
                                    result = true;
                                }
                            }
                            else
                            {
                                result = true;
                            }
                        }
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public override bool IsRequired(Business.Test.AccessionOrder accessionOrder)
        {
            bool result = false;

            if (accessionOrder.PanelSetOrderCollection.Exists(15) == true)
            {
                YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology panelSetOrderCytology = (YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(15);
                if (panelSetOrderCytology.Final == true)
                {
                    if (YellowstonePathology.Business.Cytology.Model.CytologyResultCode.IsDiagnosisAscusLsil(panelSetOrderCytology.ResultCode) == true)
                    {
                        result = true;
                        YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId);
                        Nullable <DateTime> dateOfLastHPV = patientHistory.GetDateOfPreviousHpv(accessionOrder.AccessionDate.Value);

                        if (dateOfLastHPV.HasValue == true)
                        {
                            if (dateOfLastHPV >= DateTime.Today.AddDays(-330))
                            {
                                List <string> priorResults = patientHistory.GetPriorHPVResult(accessionOrder.MasterAccessionNo, DateTime.Today.AddDays(-330));
                                foreach (string hpvResult in priorResults)
                                {
                                    if (hpvResult == YellowstonePathology.Business.Test.HPV.HPVResult.OveralResultCodePositive)
                                    {
                                        result = false;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(result);
        }
        public WomensHealthProfilePage(YellowstonePathology.Business.Test.WomensHealthProfile.WomensHealthProfileTestOrder womensHealthProfileTestOrder,
                                       YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                       YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder,
                                       System.Windows.Visibility backButtonVisibility) : base(womensHealthProfileTestOrder, accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;

            this.m_HPVReflexOrderCollection       = YellowstonePathology.Business.Client.Model.ReflexOrderCollection.GetHPVRequisitionReflexOrders();
            this.m_HPVStandingOrderCollection     = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPVStandingOrders();
            this.m_HPV1618ReflexOrderCollection   = YellowstonePathology.Business.Client.Model.ReflexOrderCollection.GetHPV1618ReflexOrders();
            this.m_HPV1618StandingOrderCollection = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPV1618StandingOrders();

            this.m_ClientOrder = clientOrder;
            this.m_WomensHealthProfileTestOrder = womensHealthProfileTestOrder;
            this.m_SystemIdentity       = Business.User.SystemIdentity.Instance;
            this.m_BackButtonVisibility = backButtonVisibility;

            this.m_Physician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId);

            this.m_PanelSetOrderCytology = (YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(15);

            this.m_AuditCollection = new Business.Audit.Model.IsWHPAllDoneAuditCollection(this.m_AccessionOrder);
            this.m_AuditCollection.Run();

            if (string.IsNullOrEmpty(accessionOrder.PatientId) == false)
            {
                YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId);
                this.m_DateOfLastHPV = patientHistory.GetDateOfPreviousHpv(this.m_AccessionOrder.AccessionDate.Value);
            }

            YellowstonePathology.Business.Client.Model.StandingOrder standingOrder = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetByStandingOrderCode(this.m_WomensHealthProfileTestOrder.HPVStandingOrderCode);
            this.m_HPVStandingOrderDescription = standingOrder.ToString();

            InitializeComponent();

            this.DataContext = this;

            this.m_ParentWindow = Window.GetWindow(this);

            this.m_ControlsNotDisabledOnFinal.Add(this.ButtonClose);
            this.m_ControlsNotDisabledOnFinal.Add(this.ButtonBack);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockShowDocument);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockUnfinalize);
            this.m_ControlsNotDisabledOnFinal.Add(this.TextBlockNext);

            this.m_ControlsNotEnabledOnUnFinal.Add(this.CheckBoxAccepted);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.CheckBoxFinal);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.ComboBoxStandingOrderDescription);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBlockLastHPVDate);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBlockPatientAge);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBlockScreeningImpression);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBlockStandingOrderDescription);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBoxAcceptedBy);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBoxAcceptedTime);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBoxFinalTime);
            this.m_ControlsNotEnabledOnUnFinal.Add(this.TextBoxSignaure);
        }
Ejemplo n.º 4
0
        public override bool SatisfiesCondition(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = false;

            YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId);
            Nullable <DateTime> dateOfLastHPV = patientHistory.GetDateOfPreviousHpv(accessionOrder.AccessionDate.Value);

            if (dateOfLastHPV.HasValue == true)
            {
                if (dateOfLastHPV < accessionOrder.AccessionDate.Value.AddDays(-330))
                {
                    result = true;
                }
            }
            else
            {
                result = true;
            }
            return(result);
        }
        public WomensHealthProfilePage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
                                       YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder,
                                       System.Windows.Visibility backButtonVisibility)
        {
            this.m_AccessionOrder = accessionOrder;

            this.m_HPVReflexOrderCollection       = YellowstonePathology.Business.Client.Model.ReflexOrderCollection.GetHPVRequisitionReflexOrders();
            this.m_HPVStandingOrderCollection     = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPVStandingOrders();
            this.m_HPV1618ReflexOrderCollection   = YellowstonePathology.Business.Client.Model.ReflexOrderCollection.GetHPV1618ReflexOrders();
            this.m_HPV1618StandingOrderCollection = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetHPV1618StandingOrders();

            this.m_ClientOrder = clientOrder;
            this.m_WomensHealthProfileTestOrder = (YellowstonePathology.Business.Test.WomensHealthProfile.WomensHealthProfileTestOrder) this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(116);
            this.m_SystemIdentity       = Business.User.SystemIdentity.Instance;
            this.m_BackButtonVisibility = backButtonVisibility;

            this.m_Physician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId);

            this.m_PanelSetOrderCytology = (YellowstonePathology.Business.Test.ThinPrepPap.PanelSetOrderCytology)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(15);

            this.m_AuditCollection = new Business.Audit.Model.IsWHPAllDoneAuditCollection(this.m_AccessionOrder);
            this.m_AuditCollection.Run();

            if (string.IsNullOrEmpty(accessionOrder.PatientId) == false)
            {
                YellowstonePathology.Business.Domain.PatientHistory patientHistory = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetPatientHistory(accessionOrder.PatientId);
                this.m_DateOfLastHPV = patientHistory.GetDateOfPreviousHpv(this.m_AccessionOrder.AccessionDate.Value);
            }

            YellowstonePathology.Business.Client.Model.StandingOrder standingOrder = YellowstonePathology.Business.Client.Model.StandingOrderCollection.GetByStandingOrderCode(this.m_WomensHealthProfileTestOrder.HPVStandingOrderCode);
            this.m_HPVStandingOrderDescription = standingOrder.ToString();

            InitializeComponent();

            this.DataContext = this;

            this.m_ParentWindow = Window.GetWindow(this);
        }