public NewAppointment(CalendarItem item, string providerID, Calendar calendar1, SchedulingCalendar schedulingCalendar)
        {
            InitializeComponent();

            this.calendarItem = item;
            this.providerID   = providerID;
            this.calendar1    = calendar1;

            this.scheduleForm = schedulingCalendar;


            if (this.scheduleForm.Type == "Provider")
            {
                ChooseProviderLabel.Hide();
                ProviderForPatientList.Hide();
            }
            if (this.scheduleForm.Type == "Scheduler")
            {
                if (PatientListView.Rows.Count > 0)
                {
                    int rowIndex = PatientListView.CurrentRow.Index;
                    var selectedPatientIDCell = this.PatientListView["PatientID", rowIndex];
                    selectedPatientID = (Int32)selectedPatientIDCell.Value;
                    ProviderForPatientList.DataSource    = patientProviderRelationTableAdapter.GetDataByPatientID(selectedPatientID);
                    ProviderForPatientList.ValueMember   = "ProviderID";
                    ProviderForPatientList.DisplayMember = "ProviderInfo";
                }
            }
        }
예제 #2
0
        public NewAppointmentFromPatientView(int patientID, string providerID, CalendarItem calendarItem, Calendar calendar1, List <CalendarItem> items, SchedulingCalendar schedulingCalendar, PatientHomePage patientHome)
        {
            InitializeComponent();

            this.thisPatientID      = patientID;
            this.providerID         = providerID;
            this.calendarItem       = calendarItem;
            this.calendar1          = calendar1;
            this.items              = items;
            this.schedulingCalendar = schedulingCalendar;
            this.patientHome        = patientHome;
        }
        private void ExistingAppointments_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["SchedulingCalendar"] as SchedulingCalendar == null)
            {
                SchedulingCalendar schedulingCalendar = new SchedulingCalendar(this.schedulerID, this)
                {
                    MdiParent   = this,
                    WindowState = FormWindowState.Maximized
                };

                Center(schedulingCalendar);
                schedulingCalendar.Show();
            }
        }
        private void AddNewAppointmentButton_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["SchedulingCalendar"] as SchedulingCalendar == null)
            {
                SchedulingCalendar schedulingCalendar = new SchedulingCalendar(thisPatientID, (ProviderMain)this.MdiParent, this)
                {
                };
                schedulingCalendar.WindowState = FormWindowState.Normal;
                Center(schedulingCalendar);
                schedulingCalendar.Show();
            }

            InvokeLostFocus(this, e);
        }
        public PatientHomePage(string name, string number, string gender, string maritalStatus, string age, DateTime DOB, int selectedPatientID, ProviderMain providerMain, SchedulingCalendar schedulingCalendar, CalendarItem item)
        {
            InitializeComponent();
            this.PatientNameLabel.Text   = name;
            this.PhoneNumberLabel.Text   = "Phone Number: " + number;
            this.PatientGenderLabel.Text = gender;
            this.PatientAgeLabel.Text    = "Age: " + age;
            this.DOBLabel.Text           = "DOB: " + DOB.ToShortDateString();
            this.MaritalStatusLabel.Text = "Marital Status: " + maritalStatus;

            SetVitals(selectedPatientID);

            thisPatientID           = selectedPatientID;
            this.thisProviderMain   = providerMain;
            this.schedulingCalendar = schedulingCalendar;
            this.FinishVisitButton.Show();

            this.NoteHistoryTable.AutoGenerateColumns            = false;
            this.LabsTable.AutoGenerateColumns                   = false;
            this.AllergiesTable.AutoGenerateColumns              = false;
            this.VitalHistoryTable.AutoGenerateColumns           = false;
            this.ScansTable.AutoGenerateColumns                  = false;
            this.ProblemListView.AutoGenerateColumns             = false;
            this.MedicationsListDataGridView.AutoGenerateColumns = false;

            thisGenerateReport            = new ToolStripMenuItem("Generate Report");
            thisGenerateReport.Click     += new System.EventHandler(GenerateReportClick);
            thisPrintPrescriptions        = new ToolStripMenuItem("Print Prescriptions");
            thisPrintPrescriptions.Click += new System.EventHandler(PrintPrescriptionsClick);
            thisPrintLabs                   = new ToolStripMenuItem("Print Lab Orders");
            thisPrintLabs.Click            += new System.EventHandler(PrintLabs);
            thisPrintScansProcedures        = new ToolStripMenuItem("Print Procedure Orders");
            thisPrintScansProcedures.Click += new System.EventHandler(PrintScansProcedures);


            thisProviderMain.menuStrip2.Items.Add(thisGenerateReport);
            thisProviderMain.menuStrip2.Items.Add(thisPrintPrescriptions);
            thisProviderMain.menuStrip2.Items.Add(thisPrintLabs);
            thisProviderMain.menuStrip2.Items.Add(thisPrintScansProcedures);

            this.thisProviderID = providerMain.GetProviderID();

            this.item = item;

            this.WindowState = FormWindowState.Maximized;
        }
        private void Button3_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["SchedulingCalendar"] as SchedulingCalendar != null)
            {
                SchedulingCalendar s = (SchedulingCalendar)Application.OpenForms["SchedulingCalendar"];
                s.Close();
            }


            if (Application.OpenForms["NewPatient"] as NewPatient == null)
            {
                NewPatient newPatient = new NewPatient(this)
                {
                    MdiParent = this
                };
                Center(newPatient);
                newPatient.Show();
            }
        }
예제 #7
0
        public void Button2_Click(object sender, EventArgs e)
        {
            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                if (Application.OpenForms[i] != this && Application.OpenForms[i].Name != "WelcomeHomePage")
                {
                    Application.OpenForms[i].Close();
                }
            }

            if (Application.OpenForms["SchedulingCalendar"] as SchedulingCalendar == null)
            {
                SchedulingCalendar schedulingCalendar = new SchedulingCalendar(thisProviderID, this)
                {
                    MdiParent   = this,
                    WindowState = FormWindowState.Maximized
                };

                Center(schedulingCalendar);
                schedulingCalendar.Show();
            }
        }
        public NewAppointment(bool isUpdated, CalendarItem item, string providerID, Calendar calendar1, SchedulingCalendar schedulingCalendar)
        {
            InitializeComponent();

            this.calendarItem = item;
            this.providerID   = providerID;
            this.calendar1    = calendar1;
            this.scheduleForm = schedulingCalendar;
            this.isUpdated    = isUpdated;


            Console.WriteLine(PatientIDNum.Text);
            firstNameFromAppt = calendarItem.PatientFirstName;
            lastNameFromAppt  = calendarItem.PatientLastName;

            string[] text = calendarItem.Text.Split('\n');
            AppointmentDetails.Text = text[2];

            if (this.scheduleForm.Type == "Provider")
            {
                ChooseProviderLabel.Hide();
                ProviderForPatientList.Hide();
            }
            if (this.scheduleForm.Type == "Scheduler")
            {
                if (PatientListView.Rows.Count > 0)
                {
                    int rowIndex = PatientListView.CurrentRow.Index;
                    var selectedPatientIDCell = this.PatientListView["PatientID", rowIndex];
                    selectedPatientID = (Int32)selectedPatientIDCell.Value;
                    ProviderForPatientList.DataSource    = patientProviderRelationTableAdapter.GetDataByPatientID(selectedPatientID);
                    ProviderForPatientList.ValueMember   = "ProviderID";
                    ProviderForPatientList.DisplayMember = "ProviderInfo";
                }
            }
        }