Ejemplo n.º 1
0
        private bool HasChargeableClientPostDateInRange(XElement panelSetOrderElement)
        {
            bool            result = false;
            List <XElement> panelSetOrderCPTCodeBillElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeBillCollection", "PanelSetOrderCPTCodeBill");

            foreach (XElement panelSetOrderCPTCodeBillElement in panelSetOrderCPTCodeBillElements)
            {
                string postDateString = XMLHelper.GetString(panelSetOrderCPTCodeBillElement, "PostDate");
                if (string.IsNullOrEmpty(postDateString) == false)
                {
                    DateTime postDate = DateTime.Parse(postDateString);
                    if (YellowstonePathology.Document.XMLHelper.IsDateElementInRange(postDate, this.m_PostDateStart, this.m_PostDateEnd) == true)
                    {
                        string billTo = XMLHelper.GetString(panelSetOrderCPTCodeBillElement, "BillTo");
                        if (billTo == "Client")
                        {
                            string noCharge = YellowstonePathology.Document.XMLHelper.GetString(panelSetOrderElement, "NoCharge");
                            if (noCharge == "0")
                            {
                                result = true;
                                break;
                            }
                        }
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        private void WriteDocument()
        {
            foreach (XElement accessionElement in this.m_ReportData.Elements("AccessionOrder"))
            {
                List <XElement> panelSetOrderElements = XMLHelper.GetElementList(accessionElement, "PanelSetOrderCollection", "PanelSetOrder");
                foreach (XElement panelSetOrderElement in panelSetOrderElements)
                {
                    Grid accessionGrid = this.GetFirstLineGrid(accessionElement, panelSetOrderElement);
                    this.m_ReportDocument.WriteRowContent(accessionGrid);

                    Grid panelSetGrid = this.GetSecondLineGrid(accessionElement, panelSetOrderElement);
                    this.m_ReportDocument.WriteRowContent(panelSetGrid);

                    List <XElement> panelSetOrderCPTCodeElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeCollection", "PanelSetOrderCPTCode");
                    if (panelSetOrderCPTCodeElements.Count > 0)
                    {
                        Grid cptHeaderGrid = this.GetCodeSectionHeader("CPT Codes");
                        this.m_ReportDocument.WriteRowContent(cptHeaderGrid);
                    }
                    foreach (XElement panelSetOrderCPTCodeElement in panelSetOrderCPTCodeElements)
                    {
                        Grid panelSetOrderCPTCodeGrid = this.GetPanelSetOrderCPTCodeGrid(panelSetOrderCPTCodeElement);
                        this.m_ReportDocument.WriteRowContent(panelSetOrderCPTCodeGrid);
                    }

                    List <XElement> PanelSetOrderCPTCodeBillNonCLNTElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeBillNonCLNTCollection", "PanelSetOrderCPTCodeBill");
                    if (PanelSetOrderCPTCodeBillNonCLNTElements.Count > 0)
                    {
                        Grid nonClientHeaderGrid = this.GetCodeSectionHeader("CPT Summary");
                        this.m_ReportDocument.WriteRowContent(nonClientHeaderGrid);
                    }
                    foreach (XElement panelSetOrderCPTCodeBillElement in PanelSetOrderCPTCodeBillNonCLNTElements)
                    {
                        Grid nonClientPanelSetOrderCPTCodeBillGrid = this.GetPanelSetOrderCPTCodeBillGrid(panelSetOrderCPTCodeBillElement);
                        this.m_ReportDocument.WriteRowContent(nonClientPanelSetOrderCPTCodeBillGrid);
                    }

                    List <XElement> PanelSetOrderCPTCodeBillCLNTElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeBillCLNTCollection", "PanelSetOrderCPTCodeBill");
                    if (PanelSetOrderCPTCodeBillCLNTElements.Count > 0)
                    {
                        Grid medicareHeaderGrid = this.GetCodeSectionHeader("Medicare Codes");
                        this.m_ReportDocument.WriteRowContent(medicareHeaderGrid);
                    }
                    foreach (XElement panelSetOrderCPTCodeBillElement in PanelSetOrderCPTCodeBillCLNTElements)
                    {
                        Grid medicarePanelSetOrderCPTCodeBillGrid = this.GetPanelSetOrderCPTCodeBillGrid(panelSetOrderCPTCodeBillElement);
                        this.m_ReportDocument.WriteRowContent(medicarePanelSetOrderCPTCodeBillGrid);
                    }

                    Grid blankGrid = new Grid();
                    blankGrid.Height = 30;
                    this.m_ReportDocument.WriteRowContent(blankGrid);
                }
            }
        }
Ejemplo n.º 3
0
        private void WriteDocument()
        {
            foreach (XElement accessionElement in this.m_ReportData.Elements("AccessionOrder"))
            {
                List <XElement> panelSetOrderElements = XMLHelper.GetElementList(accessionElement, "PanelSetOrderCollection", "PanelSetOrder");
                foreach (XElement panelSetOrderElement in panelSetOrderElements)
                {
                    if (this.OKToIncludePanelSetOnReport(panelSetOrderElement) == true)
                    {
                        Grid accessionGrid = this.GetFirstLineGrid(accessionElement, panelSetOrderElement);
                        this.m_MultiPageDocument.WriteRowContent(accessionGrid);

                        Grid panelSetGrid = this.GetSecondLineGrid(accessionElement, panelSetOrderElement);
                        this.m_MultiPageDocument.WriteRowContent(panelSetGrid);

                        List <XElement> panelSetOrderCPTCodeElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeCollection", "PanelSetOrderCPTCode");

                        foreach (XElement panelSetOrderCPTCodeElement in panelSetOrderCPTCodeElements)
                        {
                            Grid panelSetOrderCPTCodeGrid = this.GetPanelSetOrderCPTCodeGrid(panelSetOrderCPTCodeElement);
                            this.m_MultiPageDocument.WriteRowContent(panelSetOrderCPTCodeGrid);
                        }

                        List <XElement> PanelSetOrderCPTCodeBillElements = XMLHelper.GetElementList(panelSetOrderElement, "PanelSetOrderCPTCodeBillCollection", "PanelSetOrderCPTCodeBill");
                        if (PanelSetOrderCPTCodeBillElements.Count > 0)
                        {
                            Grid cptSummaryHeaderGrid = this.GetCodeSectionHeader("CPT Summary");
                            this.m_MultiPageDocument.WriteRowContent(cptSummaryHeaderGrid);
                        }

                        foreach (XElement panelSetOrderCPTCodeBillElement in PanelSetOrderCPTCodeBillElements)
                        {
                            string billTo = XMLHelper.GetString(panelSetOrderCPTCodeBillElement, "BillTo");
                            if (billTo == "Client")
                            {
                                DateTime postDate = DateTime.Parse(panelSetOrderCPTCodeBillElement.Element("PostDate").Value);
                                if (YellowstonePathology.Document.XMLHelper.IsDateElementInRange(postDate, this.m_PostDateStart, this.m_PostDateEnd) == true)
                                {
                                    Grid nonClientPanelSetOrderCPTCodeBillGrid = this.GetPanelSetOrderCPTCodeBillGrid(panelSetOrderCPTCodeBillElement);
                                    this.m_MultiPageDocument.WriteRowContent(nonClientPanelSetOrderCPTCodeBillGrid);
                                }
                            }
                        }

                        Grid blankGrid = new Grid();
                        blankGrid.Height = 30;
                        this.m_MultiPageDocument.WriteRowContent(blankGrid);
                    }
                }
            }
        }