public ClientOrderEditDialog(ClientOrder clientOrder) { this.m_NextButtonVisibility = Visibility.Visible; this.m_BackButtonVisibility = Visibility.Collapsed; this.m_DoneButtonVisibility = Visibility.Collapsed; this.m_ClientOrder = clientOrder; this.m_ClientOrderClone = clientOrder.Clone(); if (this.m_ClientOrder.ClientOrderDetailCollection.Count == 1) { this.m_ClientOrderDetail = this.m_ClientOrder.ClientOrderDetailCollection[0]; } this.m_EthnicityDictionary = new EthnicityDictionary(); this.m_RaceDictionary = new RaceDictionary(); this.m_StateCollection = StateCollection.Instance; this.m_PhysicianCollection = PhysicianCollection.Instance; this.m_PhysicianClientCollection = PhysicianClientCollection.Instance; this.m_AthenticatedUser = AuthenticatedUser.Instance; InitializeComponent(); this.DataContext = this; this.Closing += ClientOrderEditDialog_Closing; this.Loaded += ClientOrderEditDialog_Loaded; }
public static ClientOrder GetNew() { ClientOrder result = new ClientOrder(); result.RowOperationType = RowOperationTypeEnum.Insert; result.ClientOrderId = ObjectId.GenerateNewId().ToString(); result.OrderedBy = AuthenticatedUser.Instance.DisplayName; result.OrderDate = DateTime.Today; result.OrderTime = DateTime.Now; result.OrderStatus = "NEW"; result.OrderType = "SARS-CoV-2"; result.PanelSetId = 400; result.CollectionDate = DateTime.Now; result.SystemInitiatingOrder = "YPIILIS"; result.PCounty = "Yellowstone"; result.ClientId = AuthenticatedUser.Instance.PrimaryClientId; Client client = ClientCollection.GetByClientId(result.ClientId); result.ClientName = client.ClientName; result.PState = "MT"; if (PhysicianCollection.Instance.Count == 1) { Physician physician = PhysicianCollection.Instance[0]; result.ProviderId = physician.Npi; result.ProviderName = physician.DisplayName; } ClientOrderDetail clientOrderDetail = result.ClientOrderDetailCollection.GetNextItem(result.ClientOrderId, AuthenticatedUser.Instance.DisplayName); result.ClientOrderDetailCollection.Add(clientOrderDetail); List <string> ypiCovidCollectionSiteHosts = new List <string>(); ypiCovidCollectionSiteHosts.Add("COVA"); ypiCovidCollectionSiteHosts.Add("COVB"); if (ypiCovidCollectionSiteHosts.Exists(e => e == Environment.MachineName) == true) { result.CollectionFacilityId = "YPICOVID"; clientOrderDetail.CollectionLocation = "YPICOVID"; } else { result.CollectionFacilityId = "CLIENT"; clientOrderDetail.CollectionLocation = "CLIENT"; } return(result); }
public static ClientOrderDetail ClientOrderDetailGetNew(string clientOrderId) { ClientOrderDetail result = new ClientOrderDetail(); result.RowOperationType = RowOperationTypeEnum.Insert; result.ClientOrderDetailId = ObjectId.GenerateNewId().ToString(); result.ClientOrderId = clientOrderId; result.ClientAccessioned = false; result.CollectionDate = DateTime.Now; result.ContainerId = null; result.DateReceived = null; result.m_OrderDate = DateTime.Today; result.m_OrderTime = DateTime.Now; result.m_OrderedBy = AuthenticatedUser.Instance.DisplayName; return(result); }