private YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection HandleEPICLookup(string keyValue) { YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection result = new Business.ClientOrder.Model.ClientOrderCollection(); if (this.IsTheEnteredKeyAnMrn(keyValue) == true) { result = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersBySvhMedicalRecord(keyValue); } else { result = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersBySvhAccountNo(keyValue); } return(result); }
public void MatchAccessionOrdersToADT(object sender, System.ComponentModel.DoWorkEventArgs e) { this.m_BackgroundWorker.ReportProgress(1, "Starting matching SVH ADT: " + DateTime.Now.ToLongTimeString()); List <Business.Billing.Model.AccessionListItem> accessionList = Business.Gateway.AccessionOrderGateway.GetSVHNotPosted(); foreach (Business.Billing.Model.AccessionListItem accessionListItem in accessionList) { this.m_BackgroundWorker.ReportProgress(1, "Looking for a match for: " + accessionListItem.MasterAccessionNo); Business.ClientOrder.Model.ClientOrderCollection clientOrdersNeedingRegistration = Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(accessionListItem.MasterAccessionNo); Business.ClientOrder.Model.ClientOrder clientOrderNeedingRegistration = clientOrdersNeedingRegistration[0]; Business.ClientOrder.Model.ClientOrderCollection possibleNewClientOrders = Business.Gateway.ClientOrderGateway.GetClientOrdersByPatientName(accessionListItem.PFirstName, accessionListItem.PLastName); foreach (Business.ClientOrder.Model.ClientOrder clientOrder in possibleNewClientOrders) { if (clientOrder.OrderDate > clientOrderNeedingRegistration.OrderDate && clientOrder.PBirthdate == clientOrderNeedingRegistration.PBirthdate && clientOrder.ProviderName == "ANGELA DURDEN" && clientOrder.SvhMedicalRecord.StartsWith("V")) { Business.Test.AccessionOrder ao = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(accessionListItem.MasterAccessionNo, this); Business.Test.PanelSetOrder pso = ao.PanelSetOrderCollection.GetPanelSetOrder(accessionListItem.ReportNo); foreach (Business.Test.PanelSetOrderCPTCodeBill psocb in pso.PanelSetOrderCPTCodeBillCollection) { this.m_BackgroundWorker.ReportProgress(1, "Found a match for: " + accessionListItem.MasterAccessionNo); if (psocb.BillTo == "Client") { psocb.MedicalRecord = clientOrder.SvhMedicalRecord; psocb.Account = clientOrder.SvhAccountNo; } if (psocb.PostDate.HasValue == false) { psocb.PostDate = this.m_PostDate; } } Business.Persistence.DocumentGateway.Instance.Push(ao, this); break; } } } this.m_BackgroundWorker.ReportProgress(1, "Completed SVH ADT Matching: " + DateTime.Now.ToLongTimeString()); Business.Gateway.BillingGateway.UpdateBillingEODProcess(this.m_PostDate, "ADTMatch"); }
private YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection GetClientOrdersForExternalOrderIds() { YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection result = null; if (this.ListViewClientOrders.SelectedItems.Count == 0) { MessageBox.Show("Select one or more Client Orders from the Recent Client Orders List."); } else { result = new Business.ClientOrder.Model.ClientOrderCollection(); foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder in this.ListViewClientOrders.SelectedItems) { if (string.IsNullOrEmpty(clientOrder.ExternalOrderId) == false) { if (clientOrder.PanelSetId.HasValue && result.PanelSetIdExists(clientOrder.PanelSetId.Value) == true) { MessageBox.Show("Only one Client Order for " + clientOrder.OrderType + "may be used. Choose one of the Client Orders to use."); result = null; break; } else if (result.ExternalOrderIdExists(clientOrder.ExternalOrderId) == false) { result.Add(clientOrder); } } else { result.Add(clientOrder); } } } if (result != null && this.SelectedClientOrders != null) { this.SelectedClientOrders(this, new CustomEventArgs.ClientOrderCollectionReturnEventArgs(result)); } return(result); }
private YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection HandleEPICLookup(string keyValue) { YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection result = new Business.ClientOrder.Model.ClientOrderCollection(); if (this.IsTheEnteredKeyAnMrn(keyValue) == true) { result = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersBySvhMedicalRecord(keyValue); } else { result = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersBySvhAccountNo(keyValue); } return result; }
private void GetClientOrderByKeyValue() { string keyValue = this.TextBoxKey.Text; if (string.IsNullOrEmpty(keyValue) == false) { YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = new Business.ClientOrder.Model.ClientOrderCollection(); switch (this.m_ExpectedOrderType) { case OrderTypeEnum.EPIC: case OrderTypeEnum.YPICONNECT: clientOrderCollection = this.HandleEPICLookup(keyValue); break; case OrderTypeEnum.ECLINICALWORKS: clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByExternalOrderId(keyValue); break; } if (clientOrderCollection.Count == 0) { MessageBox.Show("No order was found."); } else if (clientOrderCollection.Count == 1) { this.ReturnClientOrder(clientOrderCollection[0]); } else if (clientOrderCollection.Count > 1) { this.ReturnClientOrderCollection(clientOrderCollection); } } else { MessageBox.Show("The value entered is not valid."); } }
private void GetClientOrderByKeyValue() { string keyValue = this.TextBoxKey.Text; if (string.IsNullOrEmpty(keyValue) == false) { YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = new Business.ClientOrder.Model.ClientOrderCollection(); switch (this.m_ExpectedOrderType) { case OrderTypeEnum.EPIC: case OrderTypeEnum.YPICONNECT: clientOrderCollection = this.HandleEPICLookup(keyValue); break; case OrderTypeEnum.ECLINICALWORKS: clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByExternalOrderId(keyValue); break; } if (clientOrderCollection.Count == 0) { MessageBox.Show("No order was found."); } else if (clientOrderCollection.Count == 1) { this.ReturnClientOrder(clientOrderCollection[0]); } else if (clientOrderCollection.Count > 1) { this.ReturnClientOrderCollection(clientOrderCollection); } } else { MessageBox.Show("The value entered is not valid."); } }