Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            ConnectDB EMRDatabase   = new ConnectDB();
            Boolean   patientExists = EMRDatabase.PatientExists(SSN);

            EMRDatabase.AddAllergies(SSN, Allergy, AllergyDate);
        }
Exemplo n.º 2
0
        private void ButtonSubmit_Click(object sender, EventArgs e)
        {
            ConnectDB EMRDatabase   = new ConnectDB();
            Boolean   patientExists = EMRDatabase.PatientExists(SSN);

            //if the SSN is already in the DB
            if (patientExists == true)
            {
                Console.WriteLine("patient already exists!");
                EMRDatabase.UpdatePatient(SSN, Fname, Lname, Address, Email, Phone, Sex, Birthday, BloodType, PrimaryPhysician, InsProvider, InsNum);
                EMRDatabase.AddAllergiesExisting(SSN, Allergy, AllergyDate);
            }
            else
            {
                Console.WriteLine("patient doesn't exist, adding to DB...");
                EMRDatabase.InsertPatient(SSN, Fname, Lname, Address, Email, Phone, Sex, Birthday, BloodType, PrimaryPhysician, InsProvider, InsNum);
                EMRDatabase.AddAllergies(SSN, Allergy, AllergyDate);
            }
            confirmationBox.Visible = false;
            labelConfirm.Visible    = false;
            buttonCancel.Visible    = false;
            buttonSubmit.Visible    = false;
            button2.Visible         = true;
            button3.Visible         = true;
        }
Exemplo n.º 3
0
        private void saveAllergyBtn_Click(object sender, EventArgs e)
        {
            ConnectDB EMRDatabase = new ConnectDB();

            EMRDatabase.AddAllergies(textSetSSN.Text, allergyText.Text, allergyDate.Value.ToString("yyyy-MM-dd"));
            loadData(textSetSSN.Text);
            panel1.Show();
            allergy.Hide();
        }