public DataTable GetPatientIndtfoBybednum(int bednum)
        {
            string sql = "select DISTINCT PatientBodyInfo.PatientBodyInfotime,PatientBodyInfo.BloodO2,PatientBodyInfo.Pluse,PatientBodyInfo.Flux,PatientBodyInfo.Model,PatientBodyInfo.Error,PatientBodyInfo.GetO2time,PatientBodyInfo.GetO2totaltime from PatientBodyInfo, Patients where  PatientBodyInfo.PatientBednum = {0} and Patients.PatientBednum = {1}  and Patients.UseFlag = {2} and PatientBodyInfo.UseFlag={3}  group  by  PatientBodyInfo.PatientBodyInfotime";

            sql = string.Format(sql, bednum, bednum, 0, 0);
            return(SQLiteHelper.getDt(sql));
        }
Exemplo n.º 2
0
        public DataTable  GetPatientHisInfo()
        {
            string sql = "select Time,Mode,Bloodo2,Pluse,Flow,Error,GetO2Time,GetO2AllTime from PatientSaveData";

            sql = string.Format(sql);
            return(SQLiteHelper.getDt(sql));
        }
        /// <summary>
        /// 查询信息返回数据集用于导出数据
        /// </summary>
        /// <param name="bednum"></param>
        /// <returns></returns>
        public DataTable GetPatientInfoBybednum(int bednum, string stime, string etime)
        {
            string sql = "select DISTINCT PatientBodyInfo.PatientBodyInfotime,PatientBodyInfo.BloodO2,PatientBodyInfo.Pluse,PatientBodyInfo.GetO2time,PatientBodyInfo.Flux,Model,PatientBodyInfo.Error,PatientBodyInfo.GetO2totaltime from PatientBodyInfo, Patients where  PatientBodyInfo.PatientBednum = {0} and PatientBodyInfotime between  '{1}' and  '{2}' and Patients.PatientBednum = {3}  group  by  PatientBodyInfo.PatientBodyInfotime";

            sql = string.Format(sql, bednum, stime, etime, bednum);
            return(SQLiteHelper.getDt(sql));
        }
        /// <summary>
        /// 查询历史病人信息
        /// </summary>
        /// <returns></returns>
        public DataTable GetPabienthisInfo()
        {
            string sql = "select PatientName,PatientBednum,PatientGender,PatientAge,PatientNum, " +
                         "PatientDepartment,Patientstarttime,Patientendtime from Patients where UseFlag=1";

            DataTable ds = SQLiteHelper.getDt(sql);

            return(ds);
        }
        public DataTable GetOnePabientInfo(int bednum)
        {
            string sql = "select PatientName,PatientBednum,PatientGender,PatientAge,PatientNum, " +
                         "PatientDepartment,Patientstarttime,Patientendtime from Patients where UseFlag=0 and PatientBednum={0}";

            sql = string.Format(sql, bednum);
            DataTable ds = SQLiteHelper.getDt(sql);

            return(ds);
        }