Пример #1
0
 private IDockContent GetContentFromPersistString(string persistString)
 {
     if (persistString == typeof(RiskClinicFamilyHistoryView).ToString())
     {
         rcfhv = new RiskClinicFamilyHistoryView();
         return(rcfhv);
     }
     if (persistString == typeof(AdditionalCancerRiskFactorsView).ToString())
     {
         acrf = new AdditionalCancerRiskFactorsView();
         return(acrf);
     }
     else if (persistString == typeof(CancerRiskView).ToString())
     {
         crv = new CancerRiskView();
         return(crv);
     }
     else if (persistString == typeof(SimpleRiskModelView).ToString())
     {
         srmv = new SimpleRiskModelView();
         return(srmv);
     }
     //else if (persistString == typeof(RiskClinicNotesView).ToString())
     //{
     //    rcnv = new RiskClinicNotesView();
     //    rcnv.PatientHeaderVisible = false;
     //    return rcnv;
     //}
     else if (persistString == typeof(PatientCommunicationView).ToString())
     {
         pcv = new PatientCommunicationView();
         pcv.PatientHeaderVisible = false;
         return(pcv);
     }
     else if (persistString == typeof(Recommendations).ToString())
     {
         brecs = new Recommendations();
         return(brecs);
     }
     else if (persistString == typeof(TestsView).ToString())
     {
         tv = new TestsView();
         //drv.PatientHeaderVisible = false;
         return(tv);
     }
     else if (persistString == typeof(OrdersView).ToString())
     {
         ov = new OrdersView();
         return(ov);
     }
     else if (persistString == typeof(PediatricRecsView).ToString())
     {
         prv = new PediatricRecsView();
         return(prv);
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
        private void RiskClinicMainForm_Load(object sender, EventArgs e)
        {
            if (!ViewClosing)
            {
                theDockPanel.Visible = false;

                theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop;

                string configFile = SessionManager.SelectDockConfig("RiskClinicMainFormDockPanel.config");
                DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);

                if (File.Exists(configFile))
                {
                    theDockPanel.LoadFromXml(configFile, m_deserializeDockContent);

                }
                else
                {
                    rcfhv = new RiskClinicFamilyHistoryView();
                    rcfhv.Show(theDockPanel);
                    rcfhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
            /**/
                    acrf = new AdditionalCancerRiskFactorsView();
                    acrf.Show(theDockPanel);
                    acrf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    srmv = new SimpleRiskModelView();
                    srmv.Show(theDockPanel);
                    srmv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    brecs = new Recommendations();
                    brecs.Show(theDockPanel);
                    brecs.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    //rcnv = new RiskClinicNotesView();
                    //rcnv.PatientHeaderVisible = false;
                    //rcnv.Show(theDockPanel);
                    //rcnv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    pcv = new PatientCommunicationView();
                    pcv.PatientHeaderVisible = false;
                    pcv.Show(theDockPanel);
                    pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    tv = new TestsView();
                    //drv.Text = "Tests";
                    //drv.PatientHeaderVisible = false;
                    tv.Show(theDockPanel);
                    tv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    crv = new CancerRiskView();
                    crv.Show(theDockPanel);
                    crv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    ov = new OrdersView();
                    ov.Show(theDockPanel);
                    ov.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
            /*
                    prv = new PediatricRecsView();
                    prv.Show(theDockPanel);
                    prv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
            */

                    //pcv = new PatientCommunicationView();
                    //pcv.PatientHeaderVisible = false;
                    //pcv.Orientation = Orientation.Vertical;
                    //pcv.Show(theDockPanel);
                    //pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                }

                if (InitialView == typeof(RiskClinicFamilyHistoryView))
                {
                    if (rcfhv != null)
                        rcfhv.Show();
                }
                else if (InitialView == typeof(PatientCommunicationView))
                {
                    if (pcv != null)
                        pcv.Show();
                }
                //else if (InitialView == typeof(RiskClinicNotesView))
                //{
                //    if (rcnv != null)
                //        rcnv.Show();
                //}
                else if (InitialView == typeof(OrdersView))
                {
                    if (this.ov != null)
                    {
                        this.ov.Show();
                    }
                }
                //TODO implement other InitialViews as needed
                patientRecordHeader1.setPatient(SessionManager.Instance.GetActivePatient());
            }
            theDockPanel.Visible = true;
        }
Пример #3
0
 private IDockContent GetContentFromPersistString(string persistString)
 {
     if (persistString == typeof(RiskClinicFamilyHistoryView).ToString())
     {
         rcfhv = new RiskClinicFamilyHistoryView();
         return rcfhv;
     }
     if (persistString == typeof(AdditionalCancerRiskFactorsView).ToString())
     {
         acrf = new AdditionalCancerRiskFactorsView();
         return acrf;
     }
     else if (persistString == typeof(CancerRiskView).ToString())
     {
         crv = new CancerRiskView();
         return crv;
     }
     else if (persistString == typeof(SimpleRiskModelView).ToString())
     {
         srmv = new SimpleRiskModelView();
         return srmv;
     }
     //else if (persistString == typeof(RiskClinicNotesView).ToString())
     //{
     //    rcnv = new RiskClinicNotesView();
     //    rcnv.PatientHeaderVisible = false;
     //    return rcnv;
     //}
     else if (persistString == typeof(PatientCommunicationView).ToString())
     {
         pcv = new PatientCommunicationView();
         pcv.PatientHeaderVisible = false;
         return pcv;
     }
     else if (persistString == typeof(Recommendations).ToString())
     {
         brecs = new Recommendations();
         return brecs;
     }
     else if (persistString == typeof(TestsView).ToString())
     {
         tv = new TestsView();
         //drv.PatientHeaderVisible = false;
         return tv;
     }
     else if (persistString == typeof(OrdersView).ToString())
     {
         ov = new OrdersView();
         return ov;
     }
     else if (persistString == typeof(PediatricRecsView).ToString())
     {
         prv = new PediatricRecsView();
         return prv;
     }
     else
         return null;
 }
Пример #4
0
        private void RiskClinicMainForm_Load(object sender, EventArgs e)
        {
            if (!ViewClosing)
            {
                theDockPanel.Visible = false;

                theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop;

                string configFile = SessionManager.SelectDockConfig("RiskClinicMainFormDockPanel.config");
                DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);

                if (File.Exists(configFile))
                {
                    theDockPanel.LoadFromXml(configFile, m_deserializeDockContent);
                }
                else
                {
                    rcfhv = new RiskClinicFamilyHistoryView();
                    rcfhv.Show(theDockPanel);
                    rcfhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
/**/
                    acrf = new AdditionalCancerRiskFactorsView();
                    acrf.Show(theDockPanel);
                    acrf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    srmv = new SimpleRiskModelView();
                    srmv.Show(theDockPanel);
                    srmv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    brecs = new Recommendations();
                    brecs.Show(theDockPanel);
                    brecs.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    //rcnv = new RiskClinicNotesView();
                    //rcnv.PatientHeaderVisible = false;
                    //rcnv.Show(theDockPanel);
                    //rcnv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    pcv = new PatientCommunicationView();
                    pcv.PatientHeaderVisible = false;
                    pcv.Show(theDockPanel);
                    pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    tv = new TestsView();
                    //drv.Text = "Tests";
                    //drv.PatientHeaderVisible = false;
                    tv.Show(theDockPanel);
                    tv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    crv = new CancerRiskView();
                    crv.Show(theDockPanel);
                    crv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    ov = new OrdersView();
                    ov.Show(theDockPanel);
                    ov.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

/*
 *                  prv = new PediatricRecsView();
 *                  prv.Show(theDockPanel);
 *                  prv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
 */

                    //pcv = new PatientCommunicationView();
                    //pcv.PatientHeaderVisible = false;
                    //pcv.Orientation = Orientation.Vertical;
                    //pcv.Show(theDockPanel);
                    //pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
                }

                if (InitialView == typeof(RiskClinicFamilyHistoryView))
                {
                    if (rcfhv != null)
                    {
                        rcfhv.Show();
                    }
                }
                else if (InitialView == typeof(PatientCommunicationView))
                {
                    if (pcv != null)
                    {
                        pcv.Show();
                    }
                }
                //else if (InitialView == typeof(RiskClinicNotesView))
                //{
                //    if (rcnv != null)
                //        rcnv.Show();
                //}
                else if (InitialView == typeof(OrdersView))
                {
                    if (this.ov != null)
                    {
                        this.ov.Show();
                    }
                }
                //TODO implement other InitialViews as needed
                patientRecordHeader1.setPatient(SessionManager.Instance.GetActivePatient());
            }
            theDockPanel.Visible = true;
        }