public YellowstonePathology.Business.Rules.MethodResult Post() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_PanelSetOrder.HoldBilling == false) { this.PostPQRICodes(); BillingComponent billingComponent = BillingComponent.GetBillingComponent(this.m_PanelSetOrder); billingComponent.Post(this); this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.SetPostDate(DateTime.Today); if (this.IsOkToSetPostDate() == true) { this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.SetPostDate(DateTime.Today); } this.m_PanelSetOrder.IsPosted = true; methodResult.Success = true; } else { methodResult.Success = false; methodResult.Message = "This case cannot be posted because it is on hold."; } return(methodResult); }
public static BillingComponent GetBillingComponent(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder) { BillingComponent result = null; YellowstonePathology.Business.Facility.Model.Facility technicalComponentBillingFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(panelSetOrder.TechnicalComponentBillingFacilityId); YellowstonePathology.Business.Facility.Model.Facility professionalComponentBillingFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(panelSetOrder.ProfessionalComponentBillingFacilityId); if (panelSetOrder.HasTechnicalComponent == true && panelSetOrder.HasProfessionalComponent == true) { if (YellowstonePathology.Business.Facility.Model.FacilityCollection.IsAYellowstonePathologyFacility(technicalComponentBillingFacility) && YellowstonePathology.Business.Facility.Model.FacilityCollection.IsAYellowstonePathologyFacility(professionalComponentBillingFacility) == true) { result = new BillingComponentGlobal(panelSetOrder); } else if (technicalComponentBillingFacility.IsReferenceLab == true && professionalComponentBillingFacility.IsReferenceLab == true) { result = new BillingComponentNoBilling(panelSetOrder); } else if (YellowstonePathology.Business.Facility.Model.FacilityCollection.IsAYellowstonePathologyFacility(technicalComponentBillingFacility) == true) { result = new BillingComponentTechnicalOnly(panelSetOrder); } else if (YellowstonePathology.Business.Facility.Model.FacilityCollection.IsAYellowstonePathologyFacility(professionalComponentBillingFacility) == true) { result = new BillingComponentProfessionalOnly(panelSetOrder); } else { result = new BillingComponentNoBilling(panelSetOrder); } } else if (panelSetOrder.HasTechnicalComponent == true && panelSetOrder.HasProfessionalComponent == false) { if (technicalComponentBillingFacility.IsReferenceLab == false) { result = new BillingComponentTechnicalOnly(panelSetOrder); } else { result = new BillingComponentNoBilling(panelSetOrder); } } else if (panelSetOrder.HasTechnicalComponent == false && panelSetOrder.HasProfessionalComponent == true) { if (professionalComponentBillingFacility.IsReferenceLab == false) { result = new BillingComponentProfessionalOnly(panelSetOrder); } else { result = new BillingComponentNoBilling(panelSetOrder); } } else if (panelSetOrder.HasTechnicalComponent == false && panelSetOrder.HasProfessionalComponent == false) { result = new BillingComponentNoBilling(panelSetOrder); } return(result); }