Пример #1
0
 protected void search_Click(object sender, EventArgs e)
 {
     if (pidtext.Value != "")
     {
         List <Case> c_list = Case_C.GetCaseinformation(pidtext.Value);
         if (c_list != null)
         {
             int i = 0;
             foreach (Case ca in c_list)
             {
                 Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString());
                 ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>");
                 i++;
             }
         }
     }
     else
     {
         List <Case> c_list = Case_C.GetAll_Info();
         if (c_list != null)
         {
             int i = 0;
             foreach (Case ca in c_list)
             {
                 Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString());
                 ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_ID + "','" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>");
                 i++;
             }
         }
     }
 }
Пример #2
0
        protected void add_drug_Click(object sender, EventArgs e)
        {
            int    i = 0;
            String s = patient_ID.Value.ToString();

            if (int.TryParse(s, out i) == false)
            {
                Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>");
            }
            else
            {
                if (Patient_C.isExit(s) == false)
                {
                    Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>");
                }
                else
                {
                    patient1     = Patient_C.GetPatientinformation(s);
                    name1.Value  = " 姓名:" + patient1[0].P_Name + "";
                    sex1.Value   = " 性别:" + patient1[0].P_Sex + "";
                    age1.Value   = " 年龄:" + Convert.ToString(patient1[0].P_Age) + "";
                    phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + "";
                    prescript    = new Prescript();
                    if (int.TryParse(drug_ID.Value, out i) == false)
                    {
                        Response.Write("<script language=javascript>window.alert('药品ID输入格式不正确!');</script>");
                    }
                    else
                    {
                        if (Drug_C.ExistDrug(Convert.ToInt32(drug_ID.Value)) == false)
                        {
                            Response.Write("<script language=javascript>window.alert('该药品ID不存在!');</script>");
                        }
                        else
                        {
                            prescript.D_ID   = Convert.ToInt32(drug_ID.Value);
                            prescript.C_ID   = Convert.ToInt32(Case_C.GetCaseID(Convert.ToInt32(patient_ID.Value)));
                            prescript.D_Name = Drug_C.GetDrugname(Convert.ToInt32(drug_ID.Value));
                            if (int.TryParse(drug_number.Value, out i) == false)
                            {
                                Response.Write("<script language=javascript>window.alert('药品数量输入格式不正确!');</script>");
                            }
                            else
                            {
                                prescript.D_Number     = Convert.ToInt32(drug_number.Value);
                                prescript.D_Totalprice = (float)Convert.ToDouble(((Drug_C.GetSellingPrice(Convert.ToInt32(drug_ID.Value))) * (Convert.ToInt32(drug_number.Value))));
                                prescript.P_Notes      = drug_note.Value;
                                prescripts.Add(prescript);
                                drug_ID.Value     = "";
                                drug_name.Value   = "";
                                drug_number.Value = "";
                                drug_note.Value   = "";
                                Text_ID.Value     = "";
                                Text_Name.Value   = "";
                            }
                        }
                    }
                }
            }
        }
Пример #3
0
        protected void search_Click(object sender, EventArgs e)
        {
            Response.Write("<script languge='javascript'>alert('" + Patient_ID.Value + "');</script>");
            List <Patient> patients = Patient_C.GetPatientinformation(Patient_ID.Value);

            pname.Value      = patients[0].P_Name;
            patientage.Value = patients[0].P_Age.ToString();
            patientsex.Value = patients[0].P_Sex;
            pphone.Value     = patients[0].P_Phone;
            List <Case>     cases     = Case_C.GetCaseinformation(Patient_ID.Value);
            List <Employee> employees = Employee_C.Select(cases[0].E_ID.ToString());
            Department      depart    = Department_C.DE_seekname(employees[0].DE_ID.ToString());

            pdoctor.Value = employees[0].E_Name;
            pdepart.Value = depart.DE_Name;
            List <Sickbed> sb_list = Sickbed_C.SickBedInfobyde(depart.DE_ID.ToString());
            int            i       = 0;

            foreach (Sickbed sb in sb_list)
            {
                Patient patient = Patient_C.GetpInfo_bybed(sb.S_ID.ToString());
                if (patient == null)
                {
                    patient        = new Patient();
                    patient.P_Name = "*";
                }
                string dename = Department_C.DE_seekname(sb.DE_ID.ToString()).DE_Name;
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + sb.R_ID + "','" + dename + "','" + sb.S_ID + "','" + patient.P_Name + "','" + sb.S_Bool + "');</script>");
                i++;
            }
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string patientid = Session["uid"].ToString();

            patients = Patient_C.GetPatientinformation(patientid);
            if (patients[0].P_Sex == "男")
            {
                sex = "先生";
            }
            else
            {
                sex = "女士";
            }
            cases = Case_C.GetCaseinformation(patientid);
            string employeeid = cases[0].E_ID.ToString();

            employeedoctor  = Employee_C.SeekDep(employeeid);
            pcname.Value    = patients[0].P_Name;
            pcage.Value     = patients[0].P_Age.ToString();
            pcgender.Value  = patients[0].P_Sex;
            pcdoctor.Value  = employeedoctor.E_Name;
            Complain1.Value = cases[0].C_Complain;
            Diagnose1.Value = cases[0].C_Diagnose;
            Advice1.Value   = cases[0].C_Advice;
        }
Пример #5
0
        public static string Distribute(string sid, string pid)
        {
            string cid = Case_C.GetCaseinformation(pid)[0].C_ID.ToString();

            if (Sickbed_C.DistributeBed(sid, cid))
            {
                return("1");
            }
            return("0");
        }
Пример #6
0
        protected void Button_add_text_Click(object sender, EventArgs e)
        {
            int    i = 0;
            String s = patient_ID.Value.ToString();

            if (int.TryParse(s, out i) == false)
            {
                Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>");
            }
            else
            {
                if (Patient_C.isExit(s) == false)
                {
                    Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>");
                }
                else
                {
                    patient1     = Patient_C.GetPatientinformation(s);
                    name1.Value  = " 姓名:" + patient1[0].P_Name + "";
                    sex1.Value   = " 性别:" + patient1[0].P_Sex + "";
                    age1.Value   = " 年龄:" + Convert.ToString(patient1[0].P_Age) + "";
                    phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + "";
                    if (int.TryParse(Text_ID.Value, out i) == false)
                    {
                        Response.Write("<script language=javascript>window.alert('检查项ID输入格式不正确!');</script>");
                    }
                    else
                    {
                        test = new Test();
                        if (AssessmentItem_C.ExistText(Convert.ToInt32(Text_ID.Value)) == false)
                        {
                            Response.Write("<script language=javascript>window.alert('检查项ID不存在!');</script>");
                        }
                        else
                        {
                            test.IT_ID    = Convert.ToInt32(Text_ID.Value);
                            test.C_ID     = Convert.ToInt32(Case_C.GetCaseID(Convert.ToInt32(patient_ID.Value)));
                            test.IT_Name  = AssessmentItem_C.GetTextname(Convert.ToInt32(Text_ID.Value));
                            test.IT_Price = AssessmentItem_C.GetPrice(Convert.ToInt32(Text_ID.Value));
                            tests.Add(test);
                            drug_ID.Value     = "";
                            drug_name.Value   = "";
                            drug_number.Value = "";
                            drug_note.Value   = "";
                            Text_ID.Value     = "";
                            Text_Name.Value   = "";
                        }
                    }
                }
            }
        }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //加载医嘱信息
     if (!Page.IsPostBack)
     {
         List <Case> c_list = Case_C.GetAll_Info();
         if (c_list != null)
         {
             int i = 0;
             foreach (Case ca in c_list)
             {
                 Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString());
                 ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_ID + "','" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>");
                 i++;
             }
         }
     }
 }
Пример #8
0
        protected void cashbutton_Click(object sender, EventArgs e)
        {
            bool result = Patient_C.Insert(pname.Value, psex.Value, ppage.Value, pphone.Value);

            if (result)
            {
                string          patientid  = Patient_C.GetPatientid(pname.Value);
                List <Employee> employees  = Employee_C.SelectFuzzy(doctor.SelectedValue);
                int             doctorid   = employees[0].E_ID;
                bool            resultcase = Case_C.Insert(Convert.ToInt32(patientid), doctorid, null, null, null, null);
                Response.Write("<script language=javascript>window.alert('挂号成功,您的编号为:" + patientid + "');</script>");
                bool resultuser = User_C.Insertpid(patientid);
                pname.Value  = null;
                psex.Value   = "男";
                ppage.Value  = null;
                pphone.Value = null;
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('挂号失败!');</script>");
            }
        }
Пример #9
0
        protected void Button2_Click1(object sender, EventArgs e)
        {
            int    i = 0;
            String Doctorid;
            String s = patient_ID.Value.ToString();

            if (int.TryParse(s, out i) == false)
            {
                Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>");
            }
            else
            {
                Doctorid = Session["uid"].ToString();
                if (Patient_C.isExit(s) == false)
                {
                    Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>");
                }
                else
                {
                    if (Case_C.register(s, Doctorid) == false)
                    {
                        Response.Write("<script language=javascript>window.alert('该病人挂号不成功!');</script>");
                    }
                    else
                    {
                        patient1       = Patient_C.GetPatientinformation(s);
                        name1.Value    = " 姓名:" + patient1[0].P_Name + "";
                        sex1.Value     = " 性别:" + patient1[0].P_Sex + "";
                        age1.Value     = " 年龄:" + Convert.ToString(patient1[0].P_Age) + "";
                        phone1.Value   = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + "";
                        name1.Visible  = true;
                        sex1.Visible   = true;
                        age1.Visible   = true;
                        phone1.Visible = true;
                    }
                }
            }
        }
Пример #10
0
        protected void submit_Click(object sender, EventArgs e)
        {
            string str;

            drug_ID.Value     = "";
            drug_name.Value   = "";
            drug_number.Value = "";
            drug_note.Value   = "";
            Text_ID.Value     = "";
            Text_Name.Value   = "";
            Prescript_C.AddPrescript(prescripts);
            Test_C.AddTest(tests);
            if (hospitalization.Checked == true)
            {
                str = "1";
            }
            else
            {
                str = "0";
            }
            Case_C.UpdateCase(Convert.ToInt32(patient_ID.Value), Case_Complain.Value, Case_Diagnose.Value, Case_Advice.Value, str);
            Response.Write("<script language=javascript>window.alert('病历提交成功!');</script>");
        }