Пример #1
0
        public ucTempraute(InPatientInfo info)//string pid,string medicare_no, string id, string bedNo, string name, string sex, string age, string section, string ward, string in_time)
        {
            InitializeComponent();
            currentPatient = info;
            string age       = currentPatient.Age;
            string Age_Child = DataInit.GetAge(currentPatient.Id.ToString());

            if (string.IsNullOrEmpty(age) || age.Equals("0岁"))
            {
                Age = Age_Child;
            }
            if (currentPatient.PId.Contains("_"))
            {
                IsChild = true;
            }
            else
            {
                if (Age_Child.Contains("天"))
                {
                    Age_Child = Age_Child.Replace("天", "");
                }

                if (Age_Child.Contains("小时") || Age_Child.Contains("分") || (App.IsNumeric(Age_Child) && Convert.ToInt32(Age_Child) < 28))
                {
                    IsChild = true;
                }
                else
                {
                    IsChild = false;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 普通体温单打印构造函数
        /// </summary>
        public ucTemperPrintDataLoad(InPatientInfo info)
        {
            InitializeComponent();

            //Comm.startini(); //体温单初始化

            string age = info.Age + info.Age_unit;
            string sex = info.Gender_Code;

            if (string.IsNullOrEmpty(age) || age.Equals("0岁"))
            {
                age = DataInit.GetAge(info.Id.ToString());
            }
            if (sex == "0" || sex == "男")
            {
                sex = "男";
            }
            else
            {
                sex = "女";
            }
            ph.Hospital = App.HospitalTittle;
            //ph.Bingqu = info.Sick_Area_Name;
            ph.TextName = "体 温 记 录 单";
            ph.User.Add("姓名:", info.Patient_Name);
            ph.User.Add("年龄:", age);
            ph.User.Add("性别:", sex);
            ph.User.Add("病房:", info.Sick_Area_Name);
            ph.User.Add("床号:", info.Sick_Bed_Name);
            ph.User.Add("入院日期:", Convert.ToDateTime(info.In_Time).ToString("yyyy-MM-dd HH:mm"));
            ph.User.Add("住院号:", info.PId);
            ph.User.Add("ID:", info.Id.ToString());
            ph.User.Add("诊断:", "");

            ph.Init(info.Id.ToString(), info.In_Time.ToString("yyyy-MM-dd HH:mm"));
            this.id      = info.Id.ToString();//App.ReadSqlVal("select id from t_in_patient where pid='" + pid + "'", 0, "id");
            this.in_date = info.In_Time.ToString("yyyy-MM-dd HH:mm");
            temperInit();
        }
Пример #3
0
        /// <summary>
        /// 普通体温单打印构造函数 新方法
        /// </summary>
        /// <param name="name">姓名</param>
        /// <param name="bedNo">床号</param>
        /// <param name="sex">性别</param>
        /// <param name="in_time">出生时间</param>
        /// <param name="pid">住院号</param>
        public ucTemperPrint(InPatientInfo info)//string pid, string medicare_no, string id, string bedNo, string name, string sex, string age, string section, string ward, string in_time, string out_time)
        {
            InitializeComponent();

            string age = info.Age;
            string sex = info.Gender_Code;

            this.id      = info.Id.ToString();//App.ReadSqlVal("select id from t_in_patient where pid='" + pid + "'", 0, "id");
            this.in_date = info.In_Time.ToString("yyyy-MM-dd HH:mm");
            this.pid     = info.PId;

            this.bedNo      = info.Sick_Bed_Name;
            this.medicareNo = info.Medicare_no;
            string Age_Child = DataInit.GetAge(info.Id.ToString());

            if (string.IsNullOrEmpty(age) || age.Equals("0岁"))
            {
                age = Age_Child;
            }
            if (pid.Contains("_"))
            {
                this.isChild = true;
            }
            else
            {
                if (Age_Child.Contains("天"))
                {
                    Age_Child = Age_Child.Replace("天", "");
                }

                if (Age_Child.Contains("小时") || Age_Child.Contains("分") || (App.IsNumeric(Age_Child) && Convert.ToInt32(Age_Child) < 28))
                {
                    this.isChild = true;
                }
                else
                {
                    this.isChild = false;
                }
            }
            if (isChild)
            {
                if (sex == "0" || sex == "男")
                {
                    sex = "男";
                }
                else
                {
                    sex = "女";
                }
                phChild.Hospital = App.HospitalTittle;
                phChild.Bingqu   = info.Sick_Area_Name;
                phChild.TextName = "体 温 记 录 单";
                phChild.User.Add("姓名:", info.Patient_Name);
                phChild.User.Add("性别:", sex);
                phChild.User.Add("病区:", info.Sick_Area_Name);
                phChild.User.Add("年龄:", age);
                phChild.User.Add("床号:", bedNo);
                phChild.User.Add("入院日期:", in_date);
                phChild.User.Add("登记号:", medicareNo);
                phChild.User.Add("住院号:", pid);
                phChild.User.Add("转入日期:", "");
                string diagnose = "新生儿";
                phChild.User.Add("诊断:", "");
                phChild.User.Add("编号:", id);// App.ReadSqlVal("select id from t_in_patient where pid='" + pid + "' and to_char(in_time,'yyyy-MM-dd HH24:mi')='" + phChild.User["入院日期:"] + "' ", 0, "id"));
                phChild.User.Add("科室:", TemperatureMethod.GetSection(phChild.User["编号:"], phChild.PageIndex.ToString()));
                //if (out_time.Trim()!="")
                //  ph.User.Add("出院日期:", Convert.ToDateTime(out_time).ToString("yyyy-MM-dd HH:mm"));
                //else
                //  ph.User.Add("出院日期:","");

                //DataSet ds = App.GetDataSet("select t.happen_time from t_inhospital_action t where t.next_id=0 and t.action_type='出区' and t.patient_id=" + id + "");
                //DataSet ds = App.GetDataSet("select t.happen_time from t_inhospital_action t inner join t_in_patient a on t.pid=a.id where t.next_id=0 and t.action_type='出区' and t.patient_id=" + id + " and a.die_flag<>1");
                //if (ds.Tables[0].Rows.Count > 0)
                //    phChild.User.Add("出院日期:", Convert.ToDateTime(ds.Tables[0].Rows[0][0]).ToString("yyyy-MM-dd HH:mm"));
                //else
                //    phChild.User.Add("出院日期:", "");

                phChild.Init(id, in_date);
            }
            else
            {
                if (sex == "0" || sex == "男")
                {
                    sex = "男";
                }
                else
                {
                    sex = "女";
                }
                ph.Hospital = App.HospitalTittle;
                ph.Bingqu   = info.Sick_Area_Name;
                ph.TextName = "体 温 记 录 单";
                ph.User.Add("姓名:", info.Patient_Name);
                ph.User.Add("性别:", sex);
                ph.User.Add("病区:", info.Sick_Area_Name);
                ph.User.Add("年龄:", age);
                ph.User.Add("床号:", bedNo);
                ph.User.Add("入院日期:", in_date);
                ph.User.Add("登记号:", medicareNo);
                ph.User.Add("住院号:", pid);
                ph.User.Add("转入日期:", "");
                ph.User.Add("编号:", id);//App.ReadSqlVal("select id from t_in_patient where pid='" + pid + "' and to_char(in_time,'yyyy-MM-dd HH24:mi')='" + ph.User["入院日期:"] + "'", 0, "id"));
                ph.User.Add("科室:", TemperatureMethod.GetSection(ph.User["编号:"], ph.PageIndex.ToString()));
                string diagnose     = "";
                string sql_diagnose = "select a.diagnose_name from t_diagnose_item a where a.patient_id=" + id + " order by a.diagnose_sort asc ";
                sql_diagnose = "select distinct a.diagnose_name,a.diagnose_sort from t_diagnose_item a where a.patient_id = " + id + " and a.diagnose_type = '403' order by a.diagnose_sort";
                DataTable dtdiagnose = App.GetDataSet(sql_diagnose).Tables[0];
                if (dtdiagnose != null)
                {
                    for (int i = 0; i < dtdiagnose.Rows.Count; i++)
                    {
                        if (i == 0)
                        {
                            diagnose = Convert.ToString(i + 1) + "." + dtdiagnose.Rows[i][0].ToString();
                        }
                        else if (i >= 3)
                        {
                            break;
                        }
                        else
                        {
                            diagnose += "," + Convert.ToString(i + 1) + "." + dtdiagnose.Rows[i][0].ToString();
                        }
                    }
                }
                ph.User.Add("诊断:", diagnose);
                //if (out_time.Trim()!="")
                //  ph.User.Add("出院日期:", Convert.ToDateTime(out_time).ToString("yyyy-MM-dd HH:mm"));
                //else
                //  ph.User.Add("出院日期:","");

                //DataSet ds = App.GetDataSet("select t.happen_time from t_inhospital_action t where t.next_id=0 and t.action_type='出区' and t.patient_id=" + id + "");
                DataSet ds = App.GetDataSet("select t.happen_time from t_inhospital_action t inner join t_in_patient a on t.pid=a.id where t.next_id=0 and t.action_type='出区' and t.patient_id=" + id + " and a.die_flag<>1");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ph.User.Add("出院日期:", Convert.ToDateTime(ds.Tables[0].Rows[0][0]).ToString("yyyy-MM-dd HH:mm"));
                }
                else
                {
                    ph.User.Add("出院日期:", "");
                }

                ph.Init(id, in_date);
            }

            temperInit();
        }
Пример #4
0
        public ucTempratureEdit_Child(string pid, string medicare_no, string id, string bedNo, string name, string sex, string age, string section, string ward, string in_time)
        {
            InitializeComponent();
            if (sex == "0" || sex == "男")
            {
                sex = "男";
            }
            else
            {
                sex = "女";
            }
            if (string.IsNullOrEmpty(age) || age.Equals("0岁"))
            {
                age = DataInit.GetAge(id);
            }
            ph.Hospital = App.HospitalTittle;
            ph.Bingqu   = ward;
            this.bedno  = bedNo;
            //this.id = id;
            ph.TextName = "体 温 记 录 单";
            ph.User.Add("姓名:", name);
            ph.User.Add("性别:", sex);
            ph.User.Add("病区:", section);
            ph.User.Add("年龄:", age);
            ph.User.Add("床号:", bedNo);
            ph.User.Add("入院日期:", Convert.ToDateTime(in_time).ToString("yyyy-MM-dd HH:mm"));
            ph.User.Add("登记号:", medicare_no);
            ph.User.Add("住院号:", pid);
            ph.User.Add("转入日期:", "");
            ph.User.Add("编号:", id);//App.ReadSqlVal("select id from t_in_patient where pid='" + pid + "'  and to_char(in_time,'yyyy-MM-dd HH24:mi')='" + ph.User["入院日期:"] + "'", 0, "id"));
            string diagnose     = "";
            string sql_diagnose = "select a.diagnose_name from t_diagnose_item a where a.patient_id=" + id + " order by a.diagnose_sort asc ";

            sql_diagnose = "select distinct a.diagnose_name,a.diagnose_sort from t_diagnose_item a where a.patient_id = " + id + " and a.diagnose_type = '403' order by a.diagnose_sort";
            DataTable dtdiagnose = App.GetDataSet(sql_diagnose).Tables[0];

            if (dtdiagnose != null)
            {
                for (int i = 0; i < dtdiagnose.Rows.Count; i++)
                {
                    if (i == 0)
                    {
                        diagnose = Convert.ToString(i + 1) + "." + dtdiagnose.Rows[i][0].ToString();
                    }
                    else if (i >= 3)
                    {
                        break;
                    }
                    else
                    {
                        diagnose += "," + Convert.ToString(i + 1) + "." + dtdiagnose.Rows[i][0].ToString();
                    }
                }
            }
            ph.User.Add("诊断:", diagnose);
            //DataSet ds = App.GetDataSet("select t.happen_time from t_inhospital_action t where t.next_id=0 and t.action_type='出区' and t.patient_id=" + id + "");
            DataSet ds = App.GetDataSet(" select a.leave_time from t_in_patient a where a.id='" + id + "' and a.leave_time is not null");

            if (ds.Tables[0].Rows.Count > 0)
            {
                ph.User.Add("出院日期:", Convert.ToDateTime(ds.Tables[0].Rows[0][0]).ToString("yyyy-MM-dd HH:mm"));
            }
            else
            {
                ph.User.Add("出院日期:", "");
            }
            ph.Init(id, in_time);
            this.in_date       = in_time;
            this.id            = id;
            this.pid           = pid;
            pictureBox1.Left   = 0;
            pictureBox1.Top    = 0;
            pictureBox1.Width  = ph.pWidth;
            pictureBox1.Height = ph.pHeight;

            panel1.MouseWheel += new MouseEventHandler(panel_MouseWheel);
            pictureBox1.Click += new EventHandler(panel_Click);
            panel1.Click      += new EventHandler(panel_Click);

            panel1.Focus();
            loadTree();
        }