예제 #1
0
        public DataTable getRemark(PatientController pm)
        {
            DataTable dtable = new DataTable();

            try
            {
                con.command.Parameters.Clear();
                con.command.Parameters.AddWithValue("id", pm.studentId);
                con.getDataTable("getRemark");
                dtable = (con.dtable.Rows.Count > 0) ? dtable = con.dtable : dtable;
            }
            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }
            return(dtable);
        }
예제 #2
0
        public bool verifyID(PatientController pm)
        {
            DataTable dtable = new DataTable();

            try
            {
                con.command.Parameters.Clear();

                addParamVal("id", pm.studentId.ToString());
                con.getDataTable("verifyID");
                valid = (con.dtable.Rows.Count > 0) ? true: false;
            }
            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }

            return(valid);
        }
예제 #3
0
        public DataTable searchInfoArc(PatientController pc)
        {
            DataTable dtable = new DataTable();

            con.command.Parameters.Clear();
            con.command.Parameters.AddWithValue("searchClass", pc.classification);
            con.command.Parameters.AddWithValue("dept", pc.department);
            con.command.Parameters.AddWithValue("yr", pc.year);
            con.command.Parameters.AddWithValue("searchString", pc.searchString);
            if (pc.department == "vis" || pc.department == "emp")
            {
                con.getDataTable("searchEmpVis");
            }
            else
            {
                con.getDataTable("searchWOarc");
            }

            return(dtable = (con.dtable.Rows.Count > 0) ? dtable = con.dtable : dtable);
        }
예제 #4
0
        //...onhold

        public bool patientRemove(PatientController pm)
        {
            valid = false;

            try
            {
                con.getParameter("delPatient");
                if (con.command.ExecuteNonQuery() == 1)
                {
                    con.close();
                    valid = true;
                }
            }

            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }

            return(valid);
        }
예제 #5
0
        public bool updateProfile(PatientController pm)
        {
            String[] prm = new String[] { "uid", "_id", "LName", "FName", "MName", "_course", "_dept", "_year", "BDay", "_age", "_sex", "CS",
                                          "nat", "HA", "BA", "FN", "FO", "FTCN", "MN", "MO", "MTCN", "LLN", "LTCN", "ECN", "Rel", "ETCN", "_fmp", "_lmp" };
            string[] val = new string[] { pm.uid, pm.studentId.ToString(), pm.lastName, pm.firstName, pm.middleName, pm.course, pm.department, pm.year, pm.birthday, pm.age.ToString(),
                                          pm.sex, pm.civilStatus, pm.nationality, pm.homeAddress, pm.boardingAddress, pm.fatherName, pm.fatherOccupation, pm.fatherNumber, pm.motherName, pm.motherOccupation,
                                          pm.motherNumber, pm.landladyName, pm.landladyNumber, pm.emergencyCall, pm.relation, pm.emergencyNumber.ToString(), pm.firstMenstrualdate, pm.lastMenstrualdate };

            try
            {
                //if(pm.photo!="")
                //{
                //processImage(pm.photo);
                //}

                con.command.Parameters.Clear();
                int i = 0;
                for (int ctr = 0; ctr <= 27; ctr++)
                {
                    con.command.Parameters.AddWithValue(prm[ctr], val[ctr]);
                    i = ctr;
                }
                con.command.Parameters.AddWithValue("_photo", pm.photo);
                con.command.Parameters.AddWithValue("psig", pm.psig);
                con.getParameter("UpdatePatient");
                if (con.command.ExecuteNonQuery() == 1)
                {
                    con.close();
                    valid = true;
                }
            }
            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }

            return(valid);
        }
예제 #6
0
        public bool addRemark(PatientController pm)
        {
            valid = false;

            try
            {
                con.command.Parameters.Clear();
                con.command.Parameters.AddWithValue("id", pm.studentId.ToString());
                con.command.Parameters.AddWithValue("_wkg", pm.weight.ToString());
                con.command.Parameters.AddWithValue("_hcm", pm.height.ToString());
                con.command.Parameters.AddWithValue("_bmi", pm.bmi.ToString());
                con.command.Parameters.AddWithValue("_bp", pm.bp);
                con.command.Parameters.AddWithValue("_pr", pm.pr);
                con.command.Parameters.AddWithValue("_rr", pm.rr);
                con.command.Parameters.AddWithValue("_temp", pm.temp);
                con.command.Parameters.AddWithValue("_spo2", pm.spo2);
                con.command.Parameters.AddWithValue("_remarks", pm.remarks);
                con.command.Parameters.AddWithValue("sg", pm.phsig);
                con.command.Parameters.AddWithValue("dic", pm.dic);


                con.getParameter("CreateRemark");
                if (con.command.ExecuteNonQuery() == 1)
                {
                    con.close();
                    valid = true;
                }
            }

            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }

            return(valid);
        }
예제 #7
0
        public bool patientAdd(PatientController pm)
        {
            String[] prm = new String[] { "uid", "id", "LName", "FName", "MName", "_course", "_dept", "_year", "BDay", "_age", "_sex", "CS",
                                          "nat", "HA", "BA", "FN", "FO", "FTCN", "MN", "MO", "MTCN", "LLN", "LTCN", "ECN", "Rel", "ETCN", "_fmp", "_lmp" };
            string[] val = new string[] { pm.uid, pm.studentId.ToString(), pm.lastName, pm.firstName, pm.middleName, pm.course, pm.department, pm.year, pm.birthday, pm.age.ToString(),
                                          pm.sex, pm.civilStatus, pm.nationality, pm.homeAddress, pm.boardingAddress, pm.fatherName, pm.fatherOccupation, pm.fatherNumber, pm.motherName, pm.motherOccupation,
                                          pm.motherNumber, pm.landladyName, pm.landladyNumber, pm.emergencyCall, pm.relation, pm.emergencyNumber.ToString(), pm.firstMenstrualdate, pm.lastMenstrualdate };

            valid = false;

            try
            {
                //int i = 0;
                con.command.Parameters.Clear();
                for (int ctr = 0; ctr <= 27; ctr++)
                {
                    con.command.Parameters.AddWithValue(prm[ctr], val[ctr]);
                    //i = ctr;
                }
                con.command.Parameters.AddWithValue("_photo", pm.photo);
                con.command.Parameters.AddWithValue("sig", pm.psig);
                con.command.Parameters.AddWithValue("BCG", pm.BGC);
                con.command.Parameters.AddWithValue("DPT", pm.DPT);
                con.command.Parameters.AddWithValue("OPV", pm.OPV);
                con.command.Parameters.AddWithValue("MMR", pm.MMR);
                con.command.Parameters.AddWithValue("HEPAB", pm.HB);
                con.command.Parameters.AddWithValue("HEPAA", pm.HA);
                con.command.Parameters.AddWithValue("OTHERS", pm.Others);
                con.command.Parameters.AddWithValue("OTHERSDescription", pm.othersDesc);
                con.command.Parameters.AddWithValue("olddesc", pm.olddesc);

                con.command.Parameters.AddWithValue("hospi", pm.hospiDesc);
                con.command.Parameters.AddWithValue("injury", pm.indescription);
                con.command.Parameters.AddWithValue("psych", pm.psychodescription);
                con.command.Parameters.AddWithValue("allergy", pm.allergyDesc);
                con.command.Parameters.AddWithValue("physDefects", pm.phydefdescription);
                con.command.Parameters.AddWithValue("med", pm.medcondescription);
                con.command.Parameters.AddWithValue("currentMed", pm.currentMed);

                con.command.Parameters.AddWithValue("_wkg", pm.weight.ToString());
                con.command.Parameters.AddWithValue("_hcm", pm.height.ToString());
                con.command.Parameters.AddWithValue("_bmi", pm.bmi.ToString());
                con.command.Parameters.AddWithValue("_bp", pm.bp);
                con.command.Parameters.AddWithValue("_pr", pm.pr);
                con.command.Parameters.AddWithValue("_rr", pm.rr);
                con.command.Parameters.AddWithValue("_temp", pm.temp);
                con.command.Parameters.AddWithValue("_spo2", pm.spo2);
                con.command.Parameters.AddWithValue("psig", pm.phsig);
                con.command.Parameters.AddWithValue("remarks", pm.remarks);

                con.command.Parameters.AddWithValue("cc", pm.tCC);
                con.command.Parameters.AddWithValue("dt", pm.tDiag);
                con.command.Parameters.AddWithValue("dic", pm.dic);
                con.command.Parameters.AddWithValue("refe", pm.refe);

                con.getParameter("CreatePatient");
                if (con.command.ExecuteNonQuery() == 1)
                {
                    con.close();
                    valid = true;
                }
            }
            catch (MySqlException ex)
            {
                MessageBox.Show("" + ex);
            }

            return(valid);
        }