public FedexShipmentRequest(Business.Facility.Model.Facility shipTofacility, FedexAccount fedexAccount, string paymentType, Business.Task.Model.TaskOrderDetailFedexShipment taskOrderDetail) { this.m_ShipToFacility = shipTofacility; this.m_FedexAccount = fedexAccount; this.m_PaymentType = paymentType; this.m_TaskOrderDetail = taskOrderDetail; this.OpenShipmentRequestFile(); this.SetShipementRequestData(); }
public virtual void SetBillingType() { YellowstonePathology.Business.Client.Model.Client client = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(this.m_AccessionOrder.ClientId); YellowstonePathology.Business.Billing.Model.BillingRuleSet billingRuleSet = YellowstonePathology.Business.Billing.Model.BillingRuleSetCollection.GetRuleSetByRuleSetId(client.BillingRuleSetId2); Business.Facility.Model.Facility technicalComponentFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(this.m_PanelSetOrder.TechnicalComponentFacilityId); YellowstonePathology.Business.Billing.Model.BillingTypeEnum billingType = billingRuleSet.GetBillingType(this.m_AccessionOrder.PatientType, this.m_AccessionOrder.PrimaryInsurance, this.m_AccessionOrder.SecondaryInsurance, this.m_PanelSetOrder.Ordered14DaysPostDischarge, this.m_PanelSetOrder.PanelSetId, technicalComponentFacility.IsReferenceLab); this.m_PanelSetOrder.BillingType = billingType.ToString(); }
private void ComboboxFromFacility_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.ComboboxFromFacility.SelectedItem != null) { Business.Facility.Model.Facility facility = (Business.Facility.Model.Facility) this.ComboboxFromFacility.SelectedItem; if (this.m_MaterialTrackingBatch.FromFacilityName != facility.FacilityName) { this.m_MaterialTrackingBatch.FromFacilityName = facility.FacilityName; } } }
private void SetShipTo(Business.Facility.Model.Facility facility) { this.m_ShipToName = facility.FacilityName; this.m_ShipToAddress1 = facility.Address1; this.m_ShipToAddress2 = facility.Address2; this.m_ShipToCity = facility.City; this.m_ShipToState = facility.State; this.m_ShipToZip = facility.ZipCode; this.m_ShipToPhone = facility.PhoneNumber; this.m_PaymentType = facility.FedexPaymentType; this.m_AccountNo = facility.FedexAccountNo; this.NotifyPropertyChanged(string.Empty); }
private void ComboboxShipToFacility_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.IsLoaded == true) { ComboBox comboBox = (ComboBox)sender; if (comboBox.SelectionBoxItem != null) { Business.Facility.Model.Facility facility = (Business.Facility.Model.Facility)comboBox.SelectedItem; if (facility != null) { Business.Task.Model.TaskOrderDetailFedexShipment taskOrderDetail = this.m_TaskOrder.TaskOrderDetailCollection.GetFedexShipment(); taskOrderDetail.SetShipTo(facility); } } this.NotifyPropertyChanged(string.Empty); } }
public FedexReturnLabelRequest(string shipperName, string shipperPhone, string shipperAddress1, string shipperAddress2, string shipperCity, string shipperState, string shipperZip, FedexAccount fedexAccount) { this.m_ShipToFacility = Facility.Model.FacilityCollection.Instance.GetByFacilityId("YPIBLGS"); this.m_ShipperName = shipperName; this.m_ShipperPhone = shipperPhone; this.m_ShipperAddress1 = shipperAddress1; this.m_ShipperAddress2 = shipperAddress2; this.m_ShipperCity = shipperCity; this.m_ShipperState = shipperState; this.m_ShipperZip = shipperZip; this.m_FedexAccount = fedexAccount; this.OpenShipmentRequestFile(); this.SetShipmentRequestData(); }
public void HandlePathGroup(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { Business.Client.Model.Client client = Business.Gateway.PhysicianClientGateway.GetClientByClientId(accessionOrder.ClientId); if (client.PathologyGroupId != "YPBLGS") { Business.Facility.Model.Facility pathFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(client.PathologyGroupId); Business.Client.Model.Client pathClient = Business.Gateway.PhysicianClientGateway.GetClientByClientId(pathFacility.ClientId); PhysicianClientDistributionListItem physicianClientDistribution = YellowstonePathology.Business.Client.Model.PhysicianClientDistributionFactory.GetPhysicianClientDistribution(client.DistributionType); physicianClientDistribution.ClientId = pathClient.ClientId; physicianClientDistribution.ClientName = pathClient.ClientName; physicianClientDistribution.PhysicianId = 728; physicianClientDistribution.PhysicianName = "Staff Pathologist"; physicianClientDistribution.DistributionType = pathClient.DistributionType; physicianClientDistribution.FaxNumber = pathClient.Fax; this.Add(physicianClientDistribution); } }
public override void Render() { base.m_TemplateName = @"\\CFileServer\Documents\ReportTemplates\XmlTemplates\AdditionalTestingNotification.4.xml"; base.OpenTemplate(); this.SetDemographicsV2(); this.SetXmlNodeData("test_name", this.m_PanelSetOrder.PanelSetName); Business.Facility.Model.Facility facility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(this.m_PanelSetOrder.TechnicalComponentFacilityId); this.SetXmlNodeData("facility_name", facility.FacilityName); if (string.IsNullOrEmpty(this.m_SendToName) == false) { this.ReplaceText("send_to", this.m_SendToName); } else { this.DeleteRow("send_to"); } YellowstonePathology.Business.OrderIdParser orderIdParser = new YellowstonePathology.Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); this.m_SaveFileName = Business.Document.CaseDocument.GetCaseFileNameXMLNotify(orderIdParser); this.m_ReportXml.Save(this.m_SaveFileName); }
private void HyperLinkGetTrackingNumber_Click(object sender, RoutedEventArgs e) { Business.Task.Model.TaskOrderDetailFedexShipment taskOrderDetail = this.m_TaskOrder.TaskOrderDetailCollection.GetFedexShipment(); taskOrderDetail.ValidateObject(); if (taskOrderDetail.ValidationErrors.Count == 0) { if (this.IsOKToGetTrackingNumber(taskOrderDetail) == true) { string masterAccessionNo = taskOrderDetail.TaskOrderDetailId.Split(new char[] { '.' })[0]; Business.Facility.Model.Facility facility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(taskOrderDetail.ShipToFacilityId); Business.MaterialTracking.Model.FedexAccountProduction fedExAccount = new Business.MaterialTracking.Model.FedexAccountProduction(); Business.MaterialTracking.Model.FedexShipmentRequest shipmentRequest = new Business.MaterialTracking.Model.FedexShipmentRequest(fedExAccount, masterAccessionNo, taskOrderDetail.PaymentType, taskOrderDetail.ServiceType, taskOrderDetail.TrackingNumber, taskOrderDetail.ShipToName, taskOrderDetail.ShipToPhone, taskOrderDetail.ShipToAddress1, taskOrderDetail.ShipToAddress2, taskOrderDetail.ShipToCity, taskOrderDetail.ShipToState, taskOrderDetail.ShipToZip, taskOrderDetail.AccountNo); Business.MaterialTracking.Model.FedexProcessShipmentReply result = shipmentRequest.RequestShipment(); if (result.RequestWasSuccessful == true) { taskOrderDetail.TrackingNumber = result.TrackingNumber; taskOrderDetail.ZPLII = Business.Label.Model.ZPLPrinterTCP.DecodeZPLFromBase64(result.ZPLII); } else { MessageBox.Show(result.Message); } } else { MessageBox.Show("We are unable to get the tracking number at this point because there are problems with the data."); } } else { string message = "We are unable to get the tracking number at this point because" + Environment.NewLine + taskOrderDetail.Errors; MessageBox.Show(message); } }
private void SetShipmentRequestData() { XmlNamespaceManager namespaces = new XmlNamespaceManager(new NameTable()); namespaces.AddNamespace("soapenv", "http://schemas.xmlsoap.org/soap/envelope/"); namespaces.AddNamespace("v19", "http://fedex.com/ws/ship/v19"); this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:WebAuthenticationDetail/v19:UserCredential/v19:Key", namespaces).Value = this.m_FedexAccount.Key; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:WebAuthenticationDetail/v19:UserCredential/v19:Password", namespaces).Value = this.m_FedexAccount.Password; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:ClientDetail/v19:AccountNumber", namespaces).Value = this.m_FedexAccount.AccountNo; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:ClientDetail/v19:MeterNumber", namespaces).Value = this.m_FedexAccount.MeterNo; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ServiceType", namespaces).Value = this.m_ServiceType; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShipTimestamp", namespaces).Value = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss"); //2016-08-25T16:30:12 this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Contact/v19:PersonName", namespaces).Value = string.Empty; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Contact/v19:CompanyName", namespaces).Value = this.m_ShipToName; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Contact/v19:PhoneNumber", namespaces).Value = this.m_ShipToPhone; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Contact/v19:EMailAddress", namespaces).Value = string.Empty; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:StreetLines[1]", namespaces).Value = this.m_ShipToAddress1; if (string.IsNullOrEmpty(this.m_ShipToAddress2) == false) { this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:StreetLines[2]", namespaces).Value = this.m_ShipToAddress2; } this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:City", namespaces).Value = this.m_ShipToCity; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:StateOrProvinceCode", namespaces).Value = this.m_ShipToState; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:PostalCode", namespaces).Value = this.m_ShipToZip; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:Recipient/v19:Address/v19:CountryCode", namespaces).Value = "US"; string userName = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserName; if (userName.Length > 6) { userName = userName.Substring(0, 6); } this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:RequestedPackageLineItems/v19:CustomerReferences/v19:Value", namespaces).Value = userName + ": " + m_MasterAccessionNo; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:PaymentType", namespaces).Value = this.m_PaymentType; if (this.m_PaymentType == "THIRD_PARTY" || this.m_PaymentType == "RECIPIENT") { this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:AccountNumber", namespaces).Value = this.m_AccountNo; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Contact/v19:CompanyName", namespaces).Value = this.m_ShipToName; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Contact/v19:PhoneNumber", namespaces).Value = this.m_ShipToPhone; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StreetLines[1]", namespaces).Value = this.m_ShipToAddress1; if (string.IsNullOrEmpty(this.m_ShipToAddress2) == false) { this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StreetLines[2]", namespaces).Value = this.m_ShipToAddress2; } this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:City", namespaces).Value = this.m_ShipToCity; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StateOrProvinceCode", namespaces).Value = this.m_ShipToState; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:PostalCode", namespaces).Value = this.m_ShipToZip; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:CountryCode", namespaces).Value = "US"; } else if (this.m_PaymentType == "SENDER") { this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:AccountNumber", namespaces).Value = this.m_FedexAccount.AccountNo; Business.Facility.Model.Facility ypi = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId("YPIBLGS"); this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Contact/v19:CompanyName", namespaces).Value = ypi.FacilityName; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Contact/v19:PhoneNumber", namespaces).Value = ypi.PhoneNumber; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StreetLines[1]", namespaces).Value = ypi.Address1; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StreetLines[2]", namespaces).Value = ypi.Address2; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:City", namespaces).Value = ypi.City; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:StateOrProvinceCode", namespaces).Value = ypi.State; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:PostalCode", namespaces).Value = ypi.ZipCode; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment/v19:Payor/v19:ResponsibleParty/v19:Address/v19:CountryCode", namespaces).Value = "US"; } else { throw new Exception("Payment Type not supported."); } if (DateTime.Today.DayOfWeek == DayOfWeek.Friday && this.m_ServiceType.Contains("OVERNIGHT") == true) { XNamespace v19 = "http://fedex.com/ws/ship/v19"; this.m_ProcessShipmentRequest.XPathSelectElement("//soapenv:Envelope/soapenv:Body/v19:ProcessShipmentRequest/v19:RequestedShipment/v19:ShippingChargesPayment", namespaces) .AddAfterSelf(new XElement(v19 + "SpecialServicesRequested", new XElement(v19 + "SpecialServiceTypes", "SATURDAY_DELIVERY"))); } }
public CanSaveFacilityAudit(Business.Facility.Model.Facility facility) { this.m_Facility = facility; }