private void BuildPanelOrder(Test.PanelSetOrder panelSetOrder, XElement panelSetOrderElement) { List <XElement> panelOrderElements = (from poc in panelSetOrderElement.Elements("PanelOrderCollection") select poc).ToList <XElement>(); YellowstonePathology.Business.Panel.Model.PanelCollection panelCollection = YellowstonePathology.Business.Panel.Model.PanelCollection.GetAll(); foreach (XElement panelOrderElement in panelOrderElements.Elements("PanelOrder")) { int panelId = Convert.ToInt32(panelOrderElement.Element("PanelId").Value); YellowstonePathology.Business.Panel.Model.Panel panel = panelCollection.GetPanel(panelId); Test.PanelOrder panelOrder = Test.PanelOrderFactory.GetPanelOrder(panel); YellowstonePathology.Business.Persistence.XmlPropertyWriter xmlPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyWriter(panelOrderElement, panelOrder); xmlPropertyWriter.Write(); BuildTestOrderRightSide(panelOrder, panelOrderElement); panelSetOrder.PanelOrderCollection.Add(panelOrder); } }
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); } } }
public PanelOrder(string reportNo, string objectId, string panelOrderId, YellowstonePathology.Business.Panel.Model.Panel panel, int orderedById) { this.m_ReportNo = reportNo; this.m_ObjectId = objectId; this.m_PanelOrderId = panelOrderId; this.m_PanelId = panel.PanelId; this.m_PanelName = panel.PanelName; this.m_OrderedById = orderedById; this.m_OrderDate = DateTime.Today; this.m_OrderTime = DateTime.Now; this.m_ResultCode = panel.ResultCode; if (panel.AcknowledgeOnOrder == true) { this.m_Acknowledged = true; this.m_AcknowledgedById = orderedById; this.m_AcknowledgedDate = DateTime.Today; this.m_AcknowledgedTime = DateTime.Now; } this.m_TestOrderCollection = new YellowstonePathology.Business.Test.Model.TestOrderCollection(); this.NotifyPropertyChanged(string.Empty); }
public PanelOrderAcidWash(string reportNo, string objectId, string panelOrderId, YellowstonePathology.Business.Panel.Model.Panel panel, int orderedById, string orderedByInitials) : base(reportNo, objectId, panelOrderId, panel, orderedById, orderedByInitials) { }
public static PanelOrder GetPanelOrder(string reportNo, string objectId, string panelOrderId, YellowstonePathology.Business.Panel.Model.Panel panel, int orderedById) { Type panelOrderType = Type.GetType(panel.PanelOrderClassName); return((PanelOrder)Activator.CreateInstance(panelOrderType, reportNo, objectId, panelOrderId, panel, orderedById)); }
public static PanelOrder GetPanelOrder(YellowstonePathology.Business.Panel.Model.Panel panel) { Type panelOrderType = Type.GetType(panel.PanelOrderClassName); return((PanelOrder)Activator.CreateInstance(panelOrderType)); }