public static YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection GetReportDistributionCollectionByDateRangeTumorRegistry(DateTime startDate, DateTime endDate, string distributionType)
        {
            YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection result = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            string sql = "Select * from tblTestOrderReportDistribution where TimeOfLastDistribution between @StartDate and @EndDate and DistributionType = @DistributionType";

            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = sql;
            cmd.Parameters.Add("@StartDate", SqlDbType.DateTime).Value = startDate;
            cmd.Parameters.Add("@EndDate", SqlDbType.DateTime).Value = endDate;
            cmd.Parameters.Add("@DistributionType", SqlDbType.VarChar).Value = distributionType;
            cmd.CommandType = CommandType.Text;

            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(testOrderReportDistribution, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                        result.Add(testOrderReportDistribution);
                    }
                }
            }
            return result;
        }
예제 #2
0
 public static void IsDistributionValid(YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection testOrderReportDistributionCollection, BrokenRuleCollection brokenRules)
 {
     if (testOrderReportDistributionCollection.Count == 0)
     {
         Validation.BrokenRuleItem item = new BrokenRuleItem();
         item.RuleName    = "Report Distribution not set.";
         item.Severity    = "Critical";
         item.Description = "Please set the report distribution.";
         brokenRules.Add(item);
     }
 }
예제 #3
0
        public TumerRegistryDistributionDialog()
        {
            this.m_DistributionType = "WYDOH";
            this.m_StartDate        = DateTime.Parse(DateTime.Today.AddMonths(-1).Month + "/1/" + DateTime.Today.AddMonths(-1).Year);
            this.m_EndDate          = DateTime.Parse(DateTime.Today.AddMonths(-1).Month + "/" + this.m_StartDate.Value.AddMonths(1).AddDays(-1).Day + "/" + DateTime.Today.AddMonths(-1).Year);
            this.m_LocalFolderPath  = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();

            InitializeComponent();

            this.DataContext = this;
        }
        public TumerRegistryDistributionDialog()
        {
            this.m_DistributionType = "WYDOH";
            this.m_StartDate = DateTime.Parse(DateTime.Today.AddMonths(-1).Month +  "/1/" + DateTime.Today.AddMonths(-1).Year);
            this.m_EndDate = DateTime.Parse(DateTime.Today.AddMonths(-1).Month + "/" + this.m_StartDate.Value.AddMonths(1).AddDays(-1).Day + "/" + DateTime.Today.AddMonths(-1).Year);
            this.m_LocalFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();

            InitializeComponent();

            this.DataContext = this;
        }
        public DocumentCollectionTracker(YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection collection, YellowstonePathology.Business.Mongo.Server mongoServer)
        {
            this.m_MongoServer         = mongoServer;
            this.m_DocumentTrackerList = new List <DocumentTracker>();

            foreach (INotifyPropertyChanged o in collection)
            {
                DocumentTracker documentTracker = new DocumentTracker(this.m_MongoServer);
                documentTracker.Register(o);
                this.m_DocumentTrackerList.Add(documentTracker);
            }

            collection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(CollectionChanged);
        }
예제 #6
0
        public void SetReportDistribution(YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection testOrderReportDistributionCollection)
        {
            XmlNode nodeP  = m_ReportXml.SelectSingleNode("descendant::w:p[w:r/w:t='report_distribution']", this.m_NameSpaceManager);
            XmlNode nodeTc = m_ReportXml.SelectSingleNode("descendant::w:tc[w:p/w:r/w:t='report_distribution']", this.m_NameSpaceManager);

            if (testOrderReportDistributionCollection.Count != 0)
            {
                foreach (YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution in testOrderReportDistributionCollection)
                {
                    string  reportDistribution = testOrderReportDistribution.DistributionType + ": " + testOrderReportDistribution.ClientName + " - " + testOrderReportDistribution.PhysicianName;
                    XmlNode nodeAppend         = nodeP.Clone();
                    nodeAppend.SelectSingleNode("//w:r/w:t", this.m_NameSpaceManager).InnerText = reportDistribution;
                    nodeTc.AppendChild(nodeAppend);
                }
                nodeTc.RemoveChild(nodeP);
            }
            else
            {
                XmlNode nodeAppend = nodeP.Clone();
                nodeAppend.SelectSingleNode("//w:r/w:t", this.m_NameSpaceManager).InnerText = "None.";
                nodeTc.AppendChild(nodeAppend);
                nodeTc.RemoveChild(nodeP);
            }
        }
예제 #7
0
        public PanelSetOrder(string masterAccessionNo, string reportNo, string objectId, YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet, YellowstonePathology.Business.Interface.IOrderTarget orderTarget, bool distribute)
        {
            this.MasterAccessionNo = masterAccessionNo;
            this.ReportNo = reportNo;
            this.m_ObjectId = objectId;
            this.m_OrderedById = Business.User.SystemIdentity.Instance.User.UserId;
            this.m_OrderedByInitials = Business.User.SystemIdentity.Instance.User.Initials;
            this.OrderDate = DateTime.Today;
            this.OrderTime = DateTime.Now;
            this.m_CaseType = panelSet.CaseType;

            if (orderTarget != null)
            {
                this.m_OrderedOnId = orderTarget.GetId();
                this.m_OrderedOn = orderTarget.GetOrderedOnType();
            }

            this.m_PanelSetId = panelSet.PanelSetId;
            this.m_PanelSetName = panelSet.PanelSetName;

            if (panelSet.HasTechnicalComponent == true)
            {
                this.m_HasTechnicalComponent = true;
                this.m_TechnicalComponentFacilityId = panelSet.TechnicalComponentFacility.FacilityId;
                this.m_TechnicalComponentBillingFacilityId = panelSet.TechnicalComponentBillingFacility.FacilityId;
            }

            if (panelSet.HasProfessionalComponent == true)
            {
                this.m_HasProfessionalComponent = true;
                this.m_ProfessionalComponentFacilityId = panelSet.ProfessionalComponentFacility.FacilityId;
                this.m_ProfessionalComponentBillingFacilityId = panelSet.ProfessionalComponentBillingFacility.FacilityId;
            }

            this.m_ExpectedFinalTime = YellowstonePathology.Business.Helper.DateTimeExtensions.GetExpectedFinalTime(this.m_OrderTime.Value, panelSet.ExpectedDuration);
            this.m_IsBillable = panelSet.IsBillable;
            this.m_ResultDocumentSource = panelSet.ResultDocumentSource.ToString();

            this.m_Distribute = distribute;
            if (panelSet.NeverDistribute == true)
            {
                this.m_Distribute = false;
            }

            this.m_PanelOrderCollection = new PanelOrderCollection();
            this.m_PanelSetOrderCPTCodeCollection = new PanelSetOrderCPTCodeCollection();
            this.m_PanelSetOrderCPTCodeBillCollection = new PanelSetOrderCPTCodeBillCollection();
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            this.m_TestOrderReportDistributionLogCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLogCollection();

            this.m_AmendmentCollection = new YellowstonePathology.Business.Amendment.Model.AmendmentCollection();

            YellowstonePathology.Business.ClientOrder.Model.UniversalService universalService = panelSet.UniversalServiceIdCollection.GetByApplicationName(YellowstonePathology.Business.ClientOrder.Model.UniversalServiceApplicationNameEnum.EPIC);
            this.m_UniversalServiceId = universalService.UniversalServiceId;
        }
예제 #8
0
        public PanelSetOrder()
        {
            this.m_PanelOrderCollection = new PanelOrderCollection();
            this.m_PanelSetOrderCPTCodeCollection = new PanelSetOrderCPTCodeCollection();
            this.m_PanelSetOrderCPTCodeBillCollection = new PanelSetOrderCPTCodeBillCollection();
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            this.m_TestOrderReportDistributionLogCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLogCollection();

            this.m_AmendmentCollection = new YellowstonePathology.Business.Amendment.Model.AmendmentCollection();
        }
        private void TestReflectionDelagate()
        {
            YellowstonePathology.Business.Mongo.LocalServer localServer = new Business.Mongo.LocalServer("LocalLIS");
            YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection tt = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            YellowstonePathology.Business.Mongo.DocumentCollectionTracker dct = new Business.Mongo.DocumentCollectionTracker(tt, localServer);

            YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution t1 = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution();
            tt.Add(t1);
        }
예제 #10
0
        public PanelSetOrder(string masterAccessionNo, string reportNo, string objectId, YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet, bool distribute)
        {
            this.MasterAccessionNo = masterAccessionNo;
            this.ReportNo = reportNo;
            this.m_ObjectId = objectId;
            this.m_OrderedById = Business.User.SystemIdentity.Instance.User.UserId;
            this.m_OrderedByInitials = Business.User.SystemIdentity.Instance.User.Initials;
            this.OrderDate = DateTime.Today;
            this.OrderTime = DateTime.Now;
            this.m_ResearchTesting = panelSet.ResearchTesting;
            this.m_PanelSetId = panelSet.PanelSetId;
            this.m_CaseType = panelSet.CaseType;
            this.m_PanelSetName = panelSet.PanelSetName;

            this.m_HasTechnicalComponent = false;
            if (panelSet.HasTechnicalComponent == true)
            {
                this.m_HasTechnicalComponent = true;
                this.m_TechnicalComponentFacilityId = panelSet.TechnicalComponentFacility.FacilityId;
                this.m_TechnicalComponentBillingFacilityId = panelSet.TechnicalComponentBillingFacility.FacilityId;
            }

            this.m_HasProfessionalComponent = false;
            if (panelSet.HasProfessionalComponent == true)
            {
                this.m_HasProfessionalComponent = true;
                this.m_ProfessionalComponentFacilityId = panelSet.ProfessionalComponentFacility.FacilityId;
                this.m_ProfessionalComponentBillingFacilityId = panelSet.ProfessionalComponentBillingFacility.FacilityId;
            }

            this.m_ResultDocumentSource = panelSet.ResultDocumentSource.ToString();
            this.m_IsBillable = panelSet.IsBillable;
            this.m_ExpectedFinalTime = YellowstonePathology.Business.Helper.DateTimeExtensions.GetEndDateConsideringWeekends(this.m_OrderTime.Value, panelSet.ExpectedDuration);

            this.m_Distribute = distribute;
            if (panelSet.NeverDistribute == true)
            {
                this.m_Distribute = false;
            }

            this.m_PanelOrderCollection = new PanelOrderCollection();
            this.m_PanelSetOrderCPTCodeCollection = new PanelSetOrderCPTCodeCollection();
            this.m_PanelSetOrderCPTCodeBillCollection = new PanelSetOrderCPTCodeBillCollection();
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            this.m_TestOrderReportDistributionLogCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLogCollection();

            this.m_AmendmentCollection = new YellowstonePathology.Business.Amendment.Model.AmendmentCollection();

            YellowstonePathology.Business.ClientOrder.Model.UniversalService universalService = panelSet.UniversalServiceIdCollection.GetByApplicationName(YellowstonePathology.Business.ClientOrder.Model.UniversalServiceApplicationNameEnum.EPIC);
            this.m_UniversalServiceId = universalService.UniversalServiceId;

            this.m_Final = false;
            this.m_Accepted = false;
            this.m_HoldBilling = false;
            this.m_Audited = false;
            this.m_Published = false;
            this.m_PublishNotificationSent = false;
            this.m_NoCharge = false;
            this.m_Ordered14DaysPostDischarge = false;
            this.m_IsPosted = false;
            this.m_IsDelayed = false;
            this.m_HoldForPeerReview = false;
            this.m_HoldDistribution = false;
            this.m_AdditionalTestingEmailSent = false;
        }
예제 #11
0
        public static YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection GetReportDistributionCollectionByDateRangeTumorRegistry(DateTime startDate, DateTime endDate, string distributionType)
        {
            YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection result = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            string sql = "Select * from tblTestOrderReportDistribution where TimeOfLastDistribution between @StartDate and @EndDate and " +
                         "DistributionType = @DistributionType;";

            MySqlCommand cmd = new MySqlCommand();

            cmd.CommandText = sql;
            cmd.Parameters.AddWithValue("@StartDate", startDate);
            cmd.Parameters.AddWithValue("@EndDate", endDate);
            cmd.Parameters.AddWithValue("@DistributionType", distributionType);
            cmd.CommandType = CommandType.Text;

            using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (MySqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(testOrderReportDistribution, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                        result.Add(testOrderReportDistribution);
                    }
                }
            }
            return(result);
        }
예제 #12
0
 private void ButtonGetDistributions_Click(object sender, RoutedEventArgs e)
 {
     this.m_TestOrderReportDistributionCollection = YellowstonePathology.Business.Gateway.ReportDistributionGateway.GetReportDistributionCollectionByDateRangeTumorRegistry(this.m_StartDate.Value, this.m_EndDate.Value, this.m_DistributionType);
     this.NotifyPropertyChanged("TestOrderReportDistributionCollection");
 }
 private void ButtonGetDistributions_Click(object sender, RoutedEventArgs e)
 {
     this.m_TestOrderReportDistributionCollection = YellowstonePathology.Business.Gateway.ReportDistributionGateway.GetReportDistributionCollectionByDateRangeTumorRegistry(this.m_StartDate.Value, this.m_EndDate.Value, this.m_DistributionType);
     this.NotifyPropertyChanged("TestOrderReportDistributionCollection");
 }