public PatientInfoForm(int id, Home _owner)
        {
            InitializeComponent();
            owner = _owner;
            var service = new PatientService();
            patient = service.getPatientById(id);
            name_txt.Text = patient.name;
            id_txt.Text = patient.id.ToString();
            age_txt.Text = patient.dateOfBirth != DateTime.MinValue ?
                service.dateofBirthToAge(patient.dateOfBirth).ToString() : "";
            gender_txt.Text = patient.gender;
            phone_txt.Text = patient.phone;
            if (patient.medical_history != null)
            {
               medicalHistory_txt.Text = patient.medical_history + ".";
            }
            else
            {
               medicalHistory_txt.Text = "None.";
            }

            fillGridView();
            edit_visit_btn.Enabled = true;
        }
        private void fillFormFromPatient(int id)
        {
            var service = new PatientService();
            Patient patient = service.getPatientById(id);
            fillCheckBoxList();
            name_txt.Text = patient.name;
            phone_txt.Text = patient.phone;
            age_text.Text = patient.dateOfBirth != DateTime.MinValue ?
                service.dateofBirthToAge(patient.dateOfBirth).ToString() : "";

            if(patient.gender=="Male")gender_ComboBox.SelectedIndex = 0;
            else gender_ComboBox.SelectedIndex = 1;

            String history = patient.medical_history;
            if (history != null)
            {
                var splitted = history.Split(new[] { ", " },StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < disease_checklist.Items.Count; i++)
                {
                    foreach (String disease in splitted)
                    {
                        if (disease == (string)disease_checklist.Items[i])
                        {
                            disease_checklist.SetItemChecked(i, true);
                            break;
                        }
                    }
                }
            }
        }