Esempio n. 1
0
        public void readBasicInfoById(string lid)
        {
            MySqlConnection con = CommonFunc.getConnection();

            if (con == null)
            {
                flag = false;
                return;
            }
            else
            {
                con.Open();
                MySqlCommand    command = new MySqlCommand("select * from basic_info where log_id='" + lid + "'", con);
                MySqlDataReader reader  = command.ExecuteReader();

                if (reader.Read())
                {
                    log_id     = reader.GetString(0);
                    p_name     = reader.GetString(1);
                    p_sex      = reader.GetChar(2);
                    p_age      = reader.GetInt32(3);
                    p_married  = reader.GetChar(4);
                    p_radical  = reader.GetString(5);
                    hos_id     = reader.GetInt32(6);
                    p_home     = reader.GetString(7);
                    p_born     = reader.GetString(8);
                    p_jobaddr  = reader.GetString(9);
                    p_job      = reader.GetString(10);
                    p_addr     = reader.GetString(11);
                    p_tel      = reader.GetString(12);
                    p_email    = reader.GetString(13);
                    p_contact  = reader.GetString(14);
                    p_relation = reader.GetString(15);
                }
                else
                {
                    flag = false;
                }
                reader.Close();
                con.Close();
                return;
            }
        }
Esempio n. 2
0
        public bool readPhysicalInspect(string lid)
        {
            MySqlConnection con = CommonFunc.getConnection();

            if (con == null)
            {
                return(false);
            }
            else
            {
                con.Open();
                MySqlCommand    command = new MySqlCommand("select * from physical_inspect where log_id='" + lid + "'", con);
                MySqlDataReader reader  = command.ExecuteReader();

                if (reader.Read())
                {
                    thyroid_inspect = reader.GetString(1);
                    thyroid_bigger  = reader.GetInt32(2);
                    thyroid_left    = reader.GetInt32(3);
                    thyroid_right   = reader.GetInt32(4);
                    heart_rate      = reader.GetInt32(5);
                    heart_inspect   = reader.GetString(6);
                    noise_level     = reader.GetInt32(7);
                    blood_lpressure = reader.GetInt32(8);
                    blood_hpressure = reader.GetInt32(9);
                    eye_inspect     = reader.GetString(10);
                    left_eye_out    = reader.GetDouble(11);
                    right_eye_out   = reader.GetDouble(12);
                    eye_distance    = reader.GetDouble(13);
                    else_inspect    = reader.GetString(14);
                    reader.Close();
                    con.Close();
                    return(true);
                }
                else
                {
                    reader.Close();
                    con.Close();
                    return(false);
                }
            }
        }
Esempio n. 3
0
        public bool readCurePlan(string lid)
        {
            MySqlConnection con = CommonFunc.getConnection();

            if (con == null)
            {
                return(false);
            }
            else
            {
                con.Open();
                MySqlCommand    command = new MySqlCommand("select * from cure_plan where log_id='" + lid + "'", con);
                MySqlDataReader reader  = command.ExecuteReader();

                if (reader.Read())
                {
                    twoh_rate        = reader.GetDouble(1);
                    twentyfourh_rate = reader.GetDouble(2);
                    rate_level       = reader.GetInt32(3);
                    recom_dose       = reader.GetDouble(4);
                    cal_dose         = reader.GetDouble(5);
                    real_dose        = reader.GetDouble(6);
                    ef_factor        = reader.GetString(7);
                    ef_else          = reader.GetString(8);
                    else_things      = reader.GetString(9);
                    plan_dose        = reader.GetDouble(10);
                    illness_course   = reader.GetInt32(11);
                    illness_states   = reader.GetInt32(12);
                    reader.Close();
                    con.Close();
                    return(true);
                }
                else
                {
                    reader.Close();
                    con.Close();
                    return(false);
                }
            }
        }