public YellowstonePathology.Business.Validation.ValidationResult IsAccountNoValid()
        {
            YellowstonePathology.Business.Validation.ValidationResult validationResult = new Business.Validation.ValidationResult();
            validationResult.IsValid = true;

            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection westParkHospitalGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(36);
            if (westParkHospitalGroup.ClientIdExists(this.m_ClientId) == true)
            {
                if (string.IsNullOrEmpty(this.m_SvhAccount) == false)
                {
                    if (this.SvhAccount.Length != 9)
                    {
                        validationResult.IsValid = false;
                        validationResult.Message = "West Park Hostpital account numbers must be 9 characters long.";
                    }
                    else if (this.SvhAccount.StartsWith("A") == false && this.SvhAccount.StartsWith("CC") == false)
                    {
                        validationResult.IsValid = false;
                        validationResult.Message = "West Park Hostpital account numbers must start with the letter A or CC.";
                    }
                }
                else
                {
                    validationResult.IsValid = false;
                    validationResult.Message = "The West Park Hostpital account number must not be blank.";
                }
            }
            return(validationResult);
        }
        public YellowstonePathology.Business.Validation.ValidationResult IsMedicalRecordNoValid()
        {
            YellowstonePathology.Business.Validation.ValidationResult validationResult = new Business.Validation.ValidationResult();
            validationResult.IsValid = true;

            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection westParkHospitalGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(36);
            if (westParkHospitalGroup.ClientIdExists(this.m_ClientId) == true)
            {
                if (string.IsNullOrEmpty(this.m_SvhMedicalRecord) == false)
                {
                    if (this.SvhMedicalRecord.Length != 8)
                    {
                        validationResult.IsValid = false;
                        validationResult.Message = "West Park Hostpital medical record numbers must be 8 characters long.";
                    }
                    else if (this.SvhMedicalRecord.StartsWith("W") == false)
                    {
                        validationResult.IsValid = false;
                        validationResult.Message = "West Park Hostpital medical record numbers must start with the letter W.";
                    }
                }
                else
                {
                    validationResult.IsValid = false;
                    validationResult.Message = "West Park Hostpital medical record number must not be blank.";
                }
            }
            return(validationResult);
        }
예제 #3
0
        public static bool IsMountainViewNeo(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            bool result = false;

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection mountainViewGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("44");
            if (mountainViewGroup.ClientIdExists(accessionOrder.ClientId) == true)
            {
                YellowstonePathology.Business.Facility.Model.Facility neogenomicsIrvine = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId("NEOGNMCIRVN");
                if (panelSetOrder.TechnicalComponentFacilityId == neogenomicsIrvine.FacilityId)
                {
                    //exclude flow performed by NEO
                    if (panelSetOrder.PanelSetId == 248)
                    {
                        result = false;
                    }
                    //Exclude Outpatient Medicaid
                    else if (accessionOrder.PatientType == "OP" && accessionOrder.PrimaryInsurance == "Medicaid")
                    {
                        result = false;
                    }
                    else if (accessionOrder.PatientType == "OP" && accessionOrder.SecondaryInsurance == "Medicaid")
                    {
                        result = false;
                    }
                    else
                    {
                        result = true;
                    }
                }
            }
            return(result);
        }
예제 #4
0
        public void Publish(string basePath)
        {
            XElement document = new XElement("HL7Message");

            Hl7Client client = null;

            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection hrhGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("2");
            if (hrhGroup.ClientIdExists(this.m_AccessionOrder.ClientId) == true)
            {
                client = new EPICHRHClient();
            }
            else
            {
                client = new EPICHl7Client();
            }

            DFTP03 messageType = new DFTP03();

            YellowstonePathology.Business.Domain.Physician orderingPhysician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId);

            string locationCode = "YPIIBILLINGS";

            if (this.m_PanelSetOrderCPTCodeBill.MedicalRecord.StartsWith("A") == true)
            {
                throw new Exception("Cant send CDM for an A Number: " + this.m_AccessionOrder.SvhMedicalRecord);
            }

            EPICMshView msh = new EPICMshView(client, messageType, locationCode);

            msh.ToXml(document);

            EpicPidView pid = new EpicPidView(this.m_PanelSetOrderCPTCodeBill.MedicalRecord, this.m_AccessionOrder.PLastName, this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PBirthdate,
                                              this.m_AccessionOrder.PSex, this.m_PanelSetOrderCPTCodeBill.Account, this.m_AccessionOrder.PSSN);

            pid.ToXml(document);

            Business.Billing.Model.CptCode cptCode = Store.AppDataStore.Instance.CPTCodeCollection.GetClone(this.m_PanelSetOrderCPTCodeBill.CPTCode, this.m_PanelSetOrderCPTCodeBill.Modifier);

            DateTime transactionDate        = m_AccessionOrder.CollectionDate.Value;
            DateTime transactionPostingDate = this.m_PanelSetOrderCPTCodeBill.PostDate.Value;

            EPICFT1View epicFT1View = new EPICFT1View(cptCode, transactionDate, transactionPostingDate, this.m_PanelSetOrderCPTCodeBill.Quantity.ToString(), orderingPhysician, this.m_AccessionOrder.MasterAccessionNo);

            epicFT1View.ToXml(document, 1);

            string fileName = System.IO.Path.Combine(basePath, this.m_PanelSetOrderCPTCodeBill.PanelSetOrderCPTCodeBillId + "." + cptCode.Code + ".hl7.xml");

            using (System.IO.StreamWriter sw = new System.IO.StreamWriter(fileName))
            {
                document.Save(sw);
            }
        }
예제 #5
0
        public static bool IsMountainViewNeo(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo)
        {
            bool result = false;

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection mountainViewGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(44);
            if (mountainViewGroup.ClientIdExists(accessionOrder.ClientId) == true)
            {
                YellowstonePathology.Business.Facility.Model.NeogenomicsIrvine neogenomicsIrvine = new YellowstonePathology.Business.Facility.Model.NeogenomicsIrvine();
                if (panelSetOrder.TechnicalComponentFacilityId == neogenomicsIrvine.FacilityId)
                {
                    result = true;
                }
            }

            return(result);
        }
예제 #6
0
        public ClientBillingFacilityCollection()
        {
            Facility neogenomicsIrvine  = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId("NEOGNMCIRVN");
            Facility neogenomicsFlorida = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId("NEOGNMCINC");

            Facility ypii = YellowstonePathology.Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId("YPIBLGS");

            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupStVincent  = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("1");
            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupAllClients = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollection();

            this.Add(new ClientBillingFacility(neogenomicsIrvine, ypii, clientGroupStVincent, "Technical"));
            this.Add(new ClientBillingFacility(neogenomicsFlorida, ypii, clientGroupStVincent, "Technical"));

            this.Add(new ClientBillingFacility(neogenomicsIrvine, neogenomicsIrvine, clientGroupAllClients, "Professional"));
            this.Add(new ClientBillingFacility(neogenomicsFlorida, neogenomicsFlorida, clientGroupAllClients, "Professional"));

            this.Add(new ClientBillingFacility(ypii, ypii, clientGroupAllClients, "Technical"));
            this.Add(new ClientBillingFacility(ypii, ypii, clientGroupAllClients, "Professional"));
        }
        public ClientBillingFacilityCollection()
        {
            NeogenomicsIrvine  neogenomicsIrvine  = new NeogenomicsIrvine();
            NeogenomicsFlorida neogenomicsFlorida = new NeogenomicsFlorida();

            YellowstonePathologyInstituteBillings ypii = new YellowstonePathologyInstituteBillings();

            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupStVincent  = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(1);
            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupAllClients = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollection();

            this.Add(new ClientBillingFacility(neogenomicsIrvine, ypii, clientGroupStVincent, "Technical"));
            this.Add(new ClientBillingFacility(neogenomicsFlorida, ypii, clientGroupStVincent, "Technical"));

            this.Add(new ClientBillingFacility(neogenomicsIrvine, neogenomicsIrvine, clientGroupAllClients, "Professional"));
            this.Add(new ClientBillingFacility(neogenomicsFlorida, neogenomicsFlorida, clientGroupAllClients, "Professional"));

            this.Add(new ClientBillingFacility(ypii, ypii, clientGroupAllClients, "Technical"));
            this.Add(new ClientBillingFacility(ypii, ypii, clientGroupAllClients, "Professional"));
        }
예제 #8
0
        private bool HandleAddMEDITECHDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH) == false)
            {
                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection westParkHospitalGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("36");
                if (westParkHospitalGroup.ClientIdExists(accessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(accessionOrder.SvhAccount) == true || string.IsNullOrEmpty(accessionOrder.SvhMedicalRecord) == true)
                    {
                        this.HandleAddFaxDistribution(panelSetOrder);
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH, this.FaxNumber);
                        }
                        else
                        {
                            this.HandleAddFaxDistribution(panelSetOrder);
                        }
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
예제 #9
0
        private bool HandleAddAthenaDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA) == false)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                {
                    YellowstonePathology.Business.Client.Model.ClientGroupClientCollection cmmcGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("3");
                    if (cmmcGroup.ClientIdExists(this.ClientId) == true)
                    {
                        this.AddTestOrderReportDistribution(panelSetOrder, this.m_PhysicianId, this.m_PhysicianName, this.m_ClientId, this.m_ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA, this.FaxNumber);
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
예제 #10
0
        public static MultiTestDistributionHandler GetHandler(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            MultiTestDistributionHandler result = null;

            if (accessionOrder.PanelSetOrderCollection.HasWomensHealthProfileOrder() == true)
            {
                WHPHoldList holdList = new WHPHoldList();
                if (holdList.Exists(accessionOrder.PhysicianId) == true)
                {
                    result = new MultiTestDistributionHandlerWHPHold(accessionOrder);
                }
                else
                {
                    YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupStVincent = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(1);
                    if (clientGroupStVincent.ClientIdExists(accessionOrder.ClientId) == true)
                    {
                        result = new MultiTestDistributionHandlerWHPSVH(accessionOrder);
                    }
                    else
                    {
                        result = new MultiTestDistributionHandlerWHPStandard(accessionOrder);
                    }
                }
            }
            else
            {
                result = new MultiTestDistributionHandler(accessionOrder);
            }
            return(result);
        }
예제 #11
0
        private void ProcessSVHCDMFiles(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            this.m_BackgroundWorker.ReportProgress(1, "Starting processing SVH CDM files.");
            YellowstonePathology.Business.Client.Model.ClientGroupClientCollection hrhGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("2");
            YellowstonePathology.Business.ReportNoCollection reportNoCollection             = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetReportNumbersBySVHProcess(this.m_PostDate);
            string workingFolder = System.IO.Path.Combine(this.m_BaseWorkingFolderPathSVH, this.m_PostDate.ToString("MMddyyyy"));

            if (Directory.Exists(workingFolder) == false)
            {
                Directory.CreateDirectory(workingFolder);
                Directory.CreateDirectory(System.IO.Path.Combine(workingFolder, "ft1"));
                Directory.CreateDirectory(System.IO.Path.Combine(workingFolder, "ft1", "done"));
                Directory.CreateDirectory(System.IO.Path.Combine(workingFolder, "result"));
                Directory.CreateDirectory(System.IO.Path.Combine(workingFolder, "result", "done"));
            }

            int rowCount = 0;

            foreach (YellowstonePathology.Business.ReportNo reportNo in reportNoCollection)
            {
                this.m_BackgroundWorker.ReportProgress(1, "Processing: " + reportNo.Value);

                string masterAccessionNo = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetMasterAccessionNoFromReportNo(reportNo.Value);
                YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(masterAccessionNo, this);

                YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo.Value);
                foreach (Business.Test.PanelSetOrderCPTCodeBill panelSetOrderCPTCodeBill in panelSetOrder.PanelSetOrderCPTCodeBillCollection)
                {
                    if (panelSetOrderCPTCodeBill.BillTo == "Client" && panelSetOrderCPTCodeBill.PostDate == this.m_PostDate)
                    {
                        if (YellowstonePathology.Business.Billing.Model.CDMCollection.Instance.Exists(panelSetOrderCPTCodeBill.CPTCode, "SVH") == true)
                        {
                            if (panelSetOrderCPTCodeBill.PostedToClient == false)
                            {
                                if (string.IsNullOrEmpty(panelSetOrderCPTCodeBill.MedicalRecord) == false && string.IsNullOrEmpty(panelSetOrderCPTCodeBill.Account) == false)
                                {
                                    if (panelSetOrderCPTCodeBill.MedicalRecord.StartsWith("V") == true || panelSetOrderCPTCodeBill.MedicalRecord.StartsWith("R") == true)
                                    {
                                        this.m_BackgroundWorker.ReportProgress(1, "Writing File: " + reportNo.Value + " - " + panelSetOrderCPTCodeBill.CPTCode);
                                        Business.HL7View.EPIC.EPICFT1ResultView epicFT1ResultView = new Business.HL7View.EPIC.EPICFT1ResultView(accessionOrder, panelSetOrderCPTCodeBill);
                                        epicFT1ResultView.Publish(System.IO.Path.Combine(workingFolder, "ft1"));
                                        panelSetOrderCPTCodeBill.PostedToClient     = true;
                                        panelSetOrderCPTCodeBill.PostedToClientDate = DateTime.Now;
                                        rowCount += 1;
                                    }
                                    else
                                    {
                                        throw new Exception("The MRN for this charge doesn't start with a V");
                                    }
                                }
                                else
                                {
                                    throw new Exception("This MRN or ACCT is null.");
                                }
                            }
                        }
                        else
                        {
                            this.m_BackgroundWorker.ReportProgress(1, "There is no CDM for ReportNo/Code: " + reportNo.Value + " - " + panelSetOrderCPTCodeBill.CPTCode);
                            Business.Billing.Model.SVHNoCDMMailMessage.SendMessage(panelSetOrderCPTCodeBill.CPTCode);
                        }
                    }
                }
            }
            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(this);
            this.m_BackgroundWorker.ReportProgress(1, "Wrote " + rowCount + " SVH CDM files.");
            Business.Gateway.BillingGateway.UpdateBillingEODProcess(this.m_PostDate, "ProcessSVHCDMFiles");
        }
        private YellowstonePathology.Business.Rules.MethodResult CanAddEpicDistribution(YellowstonePathology.Business.Client.Model.PhysicianClientDistributionListItem physicianClientDistribution)
        {
            YellowstonePathology.Business.Rules.MethodResult result = new Business.Rules.MethodResult();
            result.Success = true;
            if (this.m_PanelSetOrder.TestOrderReportDistributionCollection.DistributionTypeExists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC) == false)
            {
                List <string> clientGroupIds = new List <string>();
                clientGroupIds.Add("1");
                clientGroupIds.Add("2");

                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection stVincentAndHRHGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(clientGroupIds);
                if (stVincentAndHRHGroup.ClientIdExists(this.m_AccessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(this.m_AccessionOrder.SvhAccount) == true || string.IsNullOrEmpty(this.m_AccessionOrder.SvhMedicalRecord) == true)
                    {
                        result.Success = false;
                        result.Message = "Unable to add an EPIC distribution as the MRN or Account No is missing.";
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(this.m_PanelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource != YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            YellowstonePathology.Business.Client.Model.Client client = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientByClientId(physicianClientDistribution.ClientId);
                            physicianClientDistribution.DistributionType = client.AlternateDistributionType;
                            result.Success = true;
                        }
                    }
                }
            }
            else
            {
                result.Success = false;
                result.Message = "Only one EPIC distribution is needed.";
            }
            return(result);
        }
        private bool HandleAddMEDITECHDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.Exists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH) == false)
            {
                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection westParkHospitalGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(36);
                if (westParkHospitalGroup.ClientIdExists(accessionOrder.ClientId) == true)
                {
                    this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH, this.FaxNumber, this.LongDistance);
                }
            }
            return(result);
        }
        private bool HandleAddEPICDistribution(YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            bool result = true;

            if (panelSetOrder.TestOrderReportDistributionCollection.Exists(YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC) == false)
            {
                List <int> clientGroupIds = new List <int>();
                clientGroupIds.Add(1);
                clientGroupIds.Add(2);

                YellowstonePathology.Business.Client.Model.ClientGroupClientCollection stVincentAndHRHGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId(clientGroupIds);
                if (stVincentAndHRHGroup.ClientIdExists(accessionOrder.ClientId) == true)
                {
                    if (string.IsNullOrEmpty(accessionOrder.SvhAccount) == true || string.IsNullOrEmpty(accessionOrder.SvhMedicalRecord) == true)
                    {
                        this.HandleAddFaxDistribution(panelSetOrder);
                    }
                    else
                    {
                        YellowstonePathology.Business.PanelSet.Model.PanelSetCollection panelSetCollection = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll();
                        YellowstonePathology.Business.PanelSet.Model.PanelSet           panelSet           = panelSetCollection.GetPanelSet(panelSetOrder.PanelSetId);
                        if (panelSet.ResultDocumentSource == YellowstonePathology.Business.PanelSet.Model.ResultDocumentSourceEnum.YPIDatabase)
                        {
                            this.AddTestOrderReportDistribution(panelSetOrder, accessionOrder.PhysicianId, accessionOrder.PhysicianName, accessionOrder.ClientId, accessionOrder.ClientName, YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC, this.FaxNumber, this.LongDistance);
                        }
                        else
                        {
                            this.HandleAddFaxDistribution(panelSetOrder);
                        }
                    }
                }
                else
                {
                    this.HandleAddFaxDistribution(panelSetOrder);
                }
            }
            return(result);
        }
예제 #15
0
        public static MultiTestDistributionHandler GetHandler(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            MultiTestDistributionHandler result = null;

            if (accessionOrder.PanelSetOrderCollection.HasWomensHealthProfileOrder() == true)
            {
                YellowstonePathology.Business.Domain.Physician physician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(accessionOrder.PhysicianId);
                if (physician != null && physician.DistributeWHPOnly == true)
                {
                    result = new MultiTestDistributionHandlerWHPOnly(accessionOrder);
                }
                else if (physician != null && physician.HoldForWHP == true)
                {
                    result = new MultiTestDistributionHandlerWHPHold(accessionOrder);
                }
                else
                {
                    YellowstonePathology.Business.Client.Model.ClientGroupClientCollection clientGroupStVincent = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("1");
                    if (accessionOrder.ClientId == 1565) //Midwifery
                    {
                        result = new MultiTestDistributionHandlerNoWHP(accessionOrder);
                    }
                    else if (clientGroupStVincent.ClientIdExists(accessionOrder.ClientId) == true)
                    {
                        result = new MultiTestDistributionHandlerWHPSVH(accessionOrder);
                    }
                    else
                    {
                        result = new MultiTestDistributionHandlerWHPStandard(accessionOrder);
                    }
                }
            }
            else
            {
                result = new MultiTestDistributionHandler(accessionOrder);
            }
            return(result);
        }