Example #1
0
        /**************************************************************************************************/
        private void FillControls()
        {
            if (setup == false)
            {
                List <string> types = new List <string>();
                foreach (MasterParagraph mp in m_MasterParagraphList)
                {
                    //Console.WriteLine(mp.impression);
                    if (!types.Contains(mp.Type))
                    {
                        if (mp.Type.Length > 0)
                        {
                            types.Add(mp.Type);
                        }
                    }
                    foreach (ProviderParagraph pp in m_DefaultParagraphList)
                    {
                        if (pp.paragraphID == mp.paragraphID)
                        {
                            mp.DefaultPatientParagraph  = pp.patientParagraph;
                            mp.DefaultProviderParagraph = pp.paragraph;
                        }
                    }

                    foreach (ProviderParagraph pp in m_ProviderParagraphList)
                    {
                        if (pp.paragraphID == mp.paragraphID)
                        {
                            mp.providerSpecific = pp;
                        }
                    }
                }

                foreach (string t in types)
                {
                    TabPage tp = new TabPage(t);
                    EditParagraphControl epc = new EditParagraphControl(t);
                    if (t == "Risk")
                    {
                        epc.DefaultOnly = true;
                    }
                    foreach (MasterParagraph mp in m_MasterParagraphList)
                    {
                        if (mp.Type == t)
                        {
                            epc.AddParagraph(mp);
                        }
                    }
                    epc.Dock = DockStyle.Fill;
                    tp.Controls.Add(epc);
                    tabControl1.TabPages.Add(tp);
                }

                setup = true;
            }
            loadingCircle1.Active  = false;
            loadingCircle1.Visible = false;
        }
Example #2
0
        /**************************************************************************************************/
        private void FillControls()
        {
            if (setup == false)
            {
                List<string> types = new List<string>();
                foreach (MasterParagraph mp in m_MasterParagraphList)
                {
                    //Console.WriteLine(mp.impression);
                    if (!types.Contains(mp.Type))
                    {
                        if (mp.Type.Length > 0)
                            types.Add(mp.Type);
                    }
                    foreach (ProviderParagraph pp in m_DefaultParagraphList)
                    {
                        if (pp.paragraphID == mp.paragraphID)
                        {
                            mp.DefaultPatientParagraph = pp.patientParagraph;
                            mp.DefaultProviderParagraph = pp.paragraph;
                        }
                    }

                    foreach (ProviderParagraph pp in m_ProviderParagraphList)
                    {
                        if (pp.paragraphID == mp.paragraphID)
                        {
                            mp.providerSpecific = pp;
                        }
                    }
                }

                foreach (string t in types)
                {
                    TabPage tp = new TabPage(t);
                    EditParagraphControl epc = new EditParagraphControl(t);
                    if (t == "Risk")
                    {
                        epc.DefaultOnly = true;
                    }
                    foreach (MasterParagraph mp in m_MasterParagraphList)
                    {
                        if (mp.Type == t)
                        {
                            epc.AddParagraph(mp);
                        }
                    }
                    epc.Dock = DockStyle.Fill;
                    tp.Controls.Add(epc);
                    tabControl1.TabPages.Add(tp);
                }

                setup = true;
            }
            loadingCircle1.Active = false;
            loadingCircle1.Visible = false;
        }