Exemple #1
0
 public TaskOrder(string taskOrderId, string objectId, string masterAccessionNo, string reportNo, Task task, YellowstonePathology.Business.Interface.IOrderTarget orderTarget, 
     string panelSetName, string acknowledgementType)
 {
     this.m_TaskOrderId = taskOrderId;
     this.m_ObjectId = objectId;
     this.m_MasterAccessionNo = masterAccessionNo;
     this.m_ReportNo = reportNo;
     this.m_TaskName = task.TaskName;
     this.m_OrderedById = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserId;
     this.m_OrderedByInitials = YellowstonePathology.Business.User.SystemIdentity.Instance.User.Initials;
     this.m_TargetId = orderTarget.GetId();
     this.m_TargetType = orderTarget.GetOrderedOnType();
     this.m_TargetDescription = orderTarget.GetDescription();
     this.m_OrderDate = DateTime.Now;
     this.m_PanelSetName = panelSetName;
     this.m_AcknowledgementType = acknowledgementType;
     this.m_Final = false;
     this.m_TaskOrderDetailCollection = new TaskOrderDetailCollection();
 }
        public PanelSetOrder(string masterAccessionNo, string reportNo, string objectId, YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet, YellowstonePathology.Business.Interface.IOrderTarget orderTarget, bool distribute)
        {
            this.MasterAccessionNo = masterAccessionNo;
            this.ReportNo = reportNo;
            this.m_ObjectId = objectId;
            this.m_OrderedById = Business.User.SystemIdentity.Instance.User.UserId;
            this.m_OrderedByInitials = Business.User.SystemIdentity.Instance.User.Initials;
            this.OrderDate = DateTime.Today;
            this.OrderTime = DateTime.Now;
            this.m_CaseType = panelSet.CaseType;

            if (orderTarget != null)
            {
                this.m_OrderedOnId = orderTarget.GetId();
                this.m_OrderedOn = orderTarget.GetOrderedOnType();
            }

            this.m_PanelSetId = panelSet.PanelSetId;
            this.m_PanelSetName = panelSet.PanelSetName;

            if (panelSet.HasTechnicalComponent == true)
            {
                this.m_HasTechnicalComponent = true;
                this.m_TechnicalComponentFacilityId = panelSet.TechnicalComponentFacility.FacilityId;
                this.m_TechnicalComponentBillingFacilityId = panelSet.TechnicalComponentBillingFacility.FacilityId;
            }

            if (panelSet.HasProfessionalComponent == true)
            {
                this.m_HasProfessionalComponent = true;
                this.m_ProfessionalComponentFacilityId = panelSet.ProfessionalComponentFacility.FacilityId;
                this.m_ProfessionalComponentBillingFacilityId = panelSet.ProfessionalComponentBillingFacility.FacilityId;
            }

            this.m_ExpectedFinalTime = YellowstonePathology.Business.Helper.DateTimeExtensions.GetExpectedFinalTime(this.m_OrderTime.Value, panelSet.ExpectedDuration);
            this.m_IsBillable = panelSet.IsBillable;
            this.m_ResultDocumentSource = panelSet.ResultDocumentSource.ToString();

            this.m_Distribute = distribute;
            if (panelSet.NeverDistribute == true)
            {
                this.m_Distribute = false;
            }

            this.m_PanelOrderCollection = new PanelOrderCollection();
            this.m_PanelSetOrderCPTCodeCollection = new PanelSetOrderCPTCodeCollection();
            this.m_PanelSetOrderCPTCodeBillCollection = new PanelSetOrderCPTCodeBillCollection();
            this.m_TestOrderReportDistributionCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionCollection();
            this.m_TestOrderReportDistributionLogCollection = new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistributionLogCollection();

            this.m_AmendmentCollection = new YellowstonePathology.Business.Amendment.Model.AmendmentCollection();

            YellowstonePathology.Business.ClientOrder.Model.UniversalService universalService = panelSet.UniversalServiceIdCollection.GetByApplicationName(YellowstonePathology.Business.ClientOrder.Model.UniversalServiceApplicationNameEnum.EPIC);
            this.m_UniversalServiceId = universalService.UniversalServiceId;
        }