private void ButtonSetProvider_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewProviders.SelectedItem != null)
     {
         Physician physician = (Physician)this.ListViewProviders.SelectedItem;
         this.m_ClientOrderClone.SetPhysician(physician);
     }
     else
     {
         MessageBox.Show("Please select a Provider to set.");
     }
 }
Beispiel #2
0
        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);
        }