예제 #1
0
        public virtual void HandlePanelOrders()
        {
            foreach (YellowstonePathology.Business.Panel.Model.Panel panel in this.m_PanelSet.PanelCollection)
            {
                string panelOrderId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                YellowstonePathology.Business.Test.PanelOrder panelOrder = YellowstonePathology.Business.Test.PanelOrderFactory.GetPanelOrder(this.m_ReportNo, panelOrderId, panelOrderId, panel, YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserId, YellowstonePathology.Business.User.SystemIdentity.Instance.User.Initials);
                this.m_PanelSetOrder.PanelOrderCollection.Add(panelOrder);

                if (panel.AcknowledgeOnOrder == true)
                {
                    panelOrder.Acknowledged     = true;
                    panelOrder.AcknowledgedById = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserId;
                    panelOrder.AcknowledgedDate = DateTime.Today;
                    panelOrder.AcknowledgedTime = DateTime.Now;
                }

                this.HandleTestOrders(panel, panelOrder);
            }
        }
예제 #2
0
        public virtual void HandleTestOrders(YellowstonePathology.Business.Panel.Model.Panel panel, YellowstonePathology.Business.Test.PanelOrder panelOrder)
        {
            if (this.m_OrderTarget is YellowstonePathology.Business.Test.AliquotOrder)
            {
                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder) this.m_OrderTarget;
                foreach (YellowstonePathology.Business.Test.Model.Test test in panel.TestCollection)
                {
                    string testOrderObjectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                    YellowstonePathology.Business.Test.Model.TestOrder testOrder = panelOrder.TestOrderCollection.Add(panelOrder.PanelOrderId, testOrderObjectId, aliquotOrder.AliquotOrderId, test, test.OrderComment);

                    aliquotOrder.TestOrderCollection.Add(testOrder);
                    aliquotOrder.SetLabelPrefix(testOrder, true);
                }
            }
            else
            {
                foreach (YellowstonePathology.Business.Test.Model.Test test in panel.TestCollection)
                {
                    string testOrderObjectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                    YellowstonePathology.Business.Test.Model.TestOrder testOrder = panelOrder.TestOrderCollection.Add(panelOrder.PanelOrderId, testOrderObjectId, null, test, test.OrderComment);
                }
            }
        }