Ejemplo n.º 1
0
    protected void ThreadsRepeater_ItemCreated(object sender, RepeaterItemEventArgs e)
    {
        ExtensionGridView tasks = e.Item.FindControl("egvTasks") as ExtensionGridView;

        if (tasks != null)
        {
            tasks.DataSource = (e.Item.DataItem as TaskThread).Tasks;
            tasks.DataBind();
        }
    }
Ejemplo n.º 2
0
        // Open Patient information
        private void btnOpen_Click(object sender, EventArgs e)
        {
            try
            {
                if (selectedPatient != null)
                {
                    CloseCurrentOpenView(currentViewOpened);
                    string message = selectedPatient.FirstName + selectedPatient.LastName + " Record is now open. ID : " + selectedPatient.PatientID;
                    Status(message, Color.Transparent);
                    patientInfoRibbonController     = new PatientInfoRibbonController(this, new frmPatientInfoRibbon());
                    patientRecordTabsViewController = new PatientRecordTabsViewController(this, new frmPatientRecordTabs());
                    AddToContainer(patientRecordTabsViewController, MIDDLE);
                    AddToContainer(patientInfoRibbonController, RIGHT);
                    patienRibbon   = patientInfoRibbonController.ribbon;
                    frmPatientTabs = patientRecordTabsViewController.frmPatientRecordTabs;
                    // Disable Tabs
                    frmPatientTabs.tabPatientRecord.TabPages.Remove(frmPatientTabs.tabOrderTests);
                    frmPatientTabs.tabPatientRecord.TabPages.Remove(frmPatientTabs.tabDiagnosis);

                    //add patient ribbon
                    AddPatientRibonInfo(selectedPatient);
                    patienRibbon.btnSearchPatient.Click += new EventHandler(btnSearchPatient_Click);

                    //Fill View appointments
                    selectedPatientAppointments = eClinicalsController.GetAllAppointmentsByPatientID(selectedPatientID);
                    frmPatientTabs.dgViewAppointments_ViewAppointments.DataSource = selectedPatientAppointments;

                    patientRecordTabsViewController.fillPatientInfo(selectedPatient);
                    frmPatientTabs.dgTestResults_TestResults.DataSource = eClinicalsController.GetTestResults(selectedPatientID);


                    ExtensionGridView.RemoveAppointmentIdColumns(frmPatientTabs.dgViewAppointments_ViewAppointments);
                }
                else
                {
                    Status("No Patient Selected", Color.Yellow);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " Error in  : " + ex.TargetSite);
                Status(ex.Message + " Error in  : " + ex.TargetSite, Color.Red);
            }


            try
            {
                currentNurse = eClinicalsController.GetNurseByID(currentUser.ContactID);
                Status("Current Nures: " + currentNurse.FirstName, Color.Yellow);
            }
            catch (Exception ex)
            {
                Status(ex.Message + " Error in  : " + ex.TargetSite, Color.Red);
            }
        }
Ejemplo n.º 3
0
        // Search for patient
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                lblStatus.BackColor = Color.Transparent;
                List <Patient> myPatientsList = null;
                DateTime       DOB            = DateTime.Parse(patientSearchViewController.frmPatientSearch.dtpDate.Value.ToShortDateString());
                string         FirstName      = patientSearchViewController.frmPatientSearch.txtFirstName.Text;
                string         LastName       = patientSearchViewController.frmPatientSearch.txtLastName.Text;
                switch (patientSearchViewController.frmPatientSearch.cbSearch.SelectedIndex)
                {
                case BY_DOB_NAME:
                    myPatientsList = eClinicalsController.SearchPatientByLastNameAndDOB(LastName, DOB);
                    lblStatus.Text = "DOB and Last Name Selected for search";
                    break;

                case BY_DOB:
                    lblStatus.Text = "DOB Selected for search";
                    myPatientsList = eClinicalsController.SearchPatientByDOB(DOB);
                    break;

                case BY_NAME:
                    lblStatus.Text = "First and Last name Selected for search";
                    myPatientsList = eClinicalsController.SearchPatientByFirstAndLastName(FirstName, LastName);
                    break;

                default:
                    break;
                }
                if (myPatientsList.Count < 1)
                {
                    string title   = "No Patient Found";
                    string message = "\n+ Check your search parameters for mistakes. \n";
                    message += "+ You may have to register a new patient.";
                    title.ToUpper();



                    noUser          = new DispatcherTimer();
                    noUser.Interval = TimeSpan.FromSeconds(3);
                    noUser.Tick    += new EventHandler(noUser_Tick);
                    noUser.Start();
                    patientSearchViewController.frmPatientSearch.NoPatientFound(true, title, message);
                }


                patientSearchViewController.frmPatientSearch.dgvSearchResults.DataSource = myPatientsList;
                ExtensionGridView.RemoveEmptyColumns(patientSearchViewController.frmPatientSearch.dgvSearchResults);
            }
            catch (Exception ex)
            {
                Status(ex.Message, Color.Red);
            }
        }