Ejemplo n.º 1
0
        /// <summary>
        /// 查询已候诊的病人Old
        /// </summary>
        /// <param name="ksdm">科室代码</param>
        /// <param name="rq1">开始日期</param>
        /// <param name="rq2">结束日期</param>
        /// <param name="klx">卡类型</param>
        /// <param name="kh">卡号</param>
        /// <param name="blh">病历号</param>
        /// <param name="_DataBase"></param>
        /// <returns></returns>
        public static DataSet Select_yhzbr(int ksdm, string rq1, string rq2, int klx, string kh, string blh, RelationalDatabase _DataBase)
        {
            try
            {
                ParameterEx[] parameters = new ParameterEx[6];

                parameters[0].Text  = "@ksdm";
                parameters[0].Value = ksdm;

                parameters[1].Text  = "@rq1";
                parameters[1].Value = rq1;

                parameters[2].Text  = "@rq2";
                parameters[2].Value = rq2;

                parameters[3].Text  = "@klx";
                parameters[3].Value = klx;

                parameters[4].Text  = "@kh";
                parameters[4].Value = kh;

                parameters[5].Text  = "@blh";
                parameters[5].Value = blh;

                DataSet dset = new DataSet();
                _DataBase.AdapterFillDataSet("SP_mzys_fz_yhzbr", parameters, dset, "sfmx", 30);
                return(dset);
            }
            catch (System.Exception err)
            {
                throw new System.Exception(err.ToString());
            }
        }
        private void buttj_Click(object sender, EventArgs e)
        {
            try
            {
                ParameterEx[] parameter = new ParameterEx[2];
                parameter[0].Text  = "@StratTime";
                parameter[0].Value = StartTime.Value.ToString();
                parameter[1].Text  = "@EndTime";
                parameter[1].Value = EndTime.Value.ToString();

                DataSet ds = new DataSet();
                db.AdapterFillDataSet("SP_ZZ_CCB_TJ", parameter, ds, "dztj", 30);
                Fun.AddRowtNo(ds.Tables[0]);
                dataGridView1.DataSource = ds.Tables[0];

                /*
                 * //如果医院端与银行端数据不符合,标红显示
                 * if (this.dataGridView1.Rows[0].Cells["交易总金额"].ToString() != this.dataGridView1.Rows[1].Cells["交易总金额"].ToString())
                 * {
                 *  this.dataGridView1.Columns["交易总金额"].DefaultCellStyle.BackColor = System.Drawing.Color.Red;
                 * }
                 * if (this.dataGridView1.Rows[0].Cells["交易笔数"].ToString() != this.dataGridView1.Rows[1].Cells["交易笔数"].ToString())
                 * {
                 *  this.dataGridView1.Columns["交易笔数"].DefaultCellStyle.BackColor = System.Drawing.Color.Red;
                 * }
                 * */
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Ejemplo n.º 3
0
        public static DataSet GetFpResult(string fpid, out int err_code, out string err_text, RelationalDatabase _DataBase)
        {
            try
            {
                ParameterEx[] parameters = new ParameterEx[3];

                parameters[0].Text  = "@fpid";
                parameters[0].Value = fpid;

                parameters[1].Text          = "@err_code";
                parameters[1].ParaDirection = ParameterDirection.Output;
                parameters[1].DataType      = System.Data.DbType.Int32;
                parameters[1].ParaSize      = 100;

                parameters[2].Text          = "@err_text";
                parameters[2].ParaDirection = ParameterDirection.Output;
                parameters[2].ParaSize      = 100;

                DataSet dset = new DataSet();
                _DataBase.AdapterFillDataSet("SP_MZSF_GetFpResult_Htdw", parameters, dset, "sfmx", 30);

                err_code = Convert.ToInt32(parameters[1].Value);
                err_text = Convert.ToString(parameters[2].Value);
                return(dset);
            }
            catch (System.Exception err)
            {
                throw new System.Exception(err.Message);
            }
        }
        public void CcbMxTj(string startTime, string endTime, Guid tjId)
        {
            try
            {
                bDateTime = startTime;
                eDateTime = endTime;

                ParameterEx[] parameters = new ParameterEx[3];
                parameters[0].Text  = "@StartTime";
                parameters[0].Value = Convert.ToDateTime(startTime).ToString("yyyy-MM-dd HH:mm:ss");

                parameters[1].Text  = "@EndTime";
                parameters[1].Value = Convert.ToDateTime(endTime).ToString("yyyy-MM-dd HH:mm:ss");

                parameters[2].Text  = "@TJID";
                parameters[2].Value = tjId;

                DataSet ds = new DataSet();
                db.AdapterFillDataSet("SP_ZZ_CCB_TJMX", parameters, ds, "tjmx", 30);
                Fun.AddRowtNo(ds.Tables[0]);
                Fun.AddRowtNo(ds.Tables[1]);
                this.dataGridView1.DataSource = ds.Tables[0];
                this.dataGridView2.DataSource = ds.Tables[1];

                lblyhzs.Text = ds.Tables[0].Rows.Count.ToString();
                lblyhje.Text = ds.Tables[0].Compute("SUM(银行交易金额)", "").ToString();

                lblyyzs.Text = ds.Tables[1].Rows.Count.ToString();
                lblyyje.Text = ds.Tables[1].Compute("SUM(医院交易金额)", "").ToString();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Ejemplo n.º 5
0
        public xsClass(string zqip, RelationalDatabase database)
        {
            _GetGroupName  = new string[] { "科室" };
            _GetColumnName = new string[] { "姓名", "就诊时间" };
            _PanelColCount = 3;
            _PanelRowCount = 2;

            string ssql = @"select dbo.fun_getdeptname(fzks) 科室,dbo.fun_getghjb(ghjb) 级别,brxm 姓名,pdxh 候诊号,
                        yysd 候诊时段 ,dbo.fun_getzsmc(zsid) 诊室,'' 备注 from mz_ghxx a inner join mzhs_fzjl b on a.ghxxid=b.ghxxid 
                        inner join yy_brxx c on a.brxxid=c.brxxid 
                         where fzsj>='2013-01-26 00:00:00' and fzsj<='2013-01-31 23:00:00'";

            _Dset = new DataSet();
            database.AdapterFillDataSet(ssql, Dset, "ghxx", 30);

            //计算分组
            DataTable tb = Dset.Tables[0];

            string[] GroupbyField3 = _GetGroupName;
            string[] ComputeField3 = {  };
            string[] CField3       = { "count" };
            _tbGroup = GroupbyDataTable(tb, GroupbyField3, ComputeField3, CField3, null);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 查询已分诊的病人 Modify by zp 2013-11-05
        /// </summary>
        /// <param name="zqid">诊区id</param>
        /// <param name="rq1">开始日期</param>
        /// <param name="rq2">结束日期</param>
        /// <param name="klx">卡类型</param>
        /// <param name="kh">卡号</param>
        /// <param name="blh">病历号</param>
        /// <param name="sort">检索方式0检索全天1检索上午2检索下午</param>
        /// <param name="_DataBase"></param>
        /// <returns></returns>
        public static DataSet Select_yfzpat(int zqid, string rq1, string rq2, int klx, string kh, string blh, int sort, RelationalDatabase _DataBase)
        {
            try
            {
                ParameterEx[] parameters = new ParameterEx[7];

                parameters[0].Text  = "@zqid";
                parameters[0].Value = zqid;

                parameters[1].Text  = "@rq1";
                parameters[1].Value = rq1;

                parameters[2].Text  = "@rq2";
                parameters[2].Value = rq2;

                parameters[3].Text  = "@klx";
                parameters[3].Value = klx;

                parameters[4].Text  = "@kh";
                parameters[4].Value = kh;

                parameters[5].Text  = "@blh";
                parameters[5].Value = blh;

                parameters[6].Text  = "@sort";
                parameters[6].Value = sort;

                DataSet dset = new DataSet();
                _DataBase.AdapterFillDataSet("SP_mzhs_fz_yfzpat", parameters, dset, "sfmx", 30);
                return(dset);
            }
            catch (System.Exception err)
            {
                throw new System.Exception(err.ToString());
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 获取挂号收费明细
        /// </summary>
        /// <param name="ghlx">挂号类型</param>
        /// <param name="brlx">病人类型</param>
        /// <param name="brlx">医保类型</param>
        /// <param name="ghks">挂号科室</param>
        /// <param name="ghjb">挂号级别</param>
        /// <param name="ghys">挂号医生</param>
        /// <param name="blb">病历本</param>
        /// <param name="ybzf">医保支付</param>
        /// <param name="err_code">错误号</param>
        /// <param name="err_text">错误文本</param>
        /// <returns></returns>
        public static DataSet mzgh_get_sfmx(int ghlx, int brlx, int yblx, int ghks, int ghjb, int ghys, string blb, decimal ybzf, int klx, Guid yhlxid, long jgbm, out int err_code, out string err_text, string funname, RelationalDatabase _DataBase)
        {
            try
            {
                ParameterEx[] parameters = new ParameterEx[14];
                parameters[0].Text  = "@ghlx";
                parameters[0].Value = ghlx;

                parameters[1].Text  = "@brlx";
                parameters[1].Value = brlx;

                parameters[2].Text  = "@yblx";
                parameters[2].Value = yblx;

                parameters[3].Text  = "@ghks";
                parameters[3].Value = ghks;

                parameters[4].Text  = "@ghjb";
                parameters[4].Value = ghjb;

                parameters[5].Text  = "@ghys";
                parameters[5].Value = ghys;

                parameters[6].Text  = "@blb";
                parameters[6].Value = blb;

                parameters[7].Text  = "@ybzf";
                parameters[7].Value = ybzf;

                parameters[8].Text  = "@klx";
                parameters[8].Value = klx;

                parameters[9].Text  = "@yhlxid";
                parameters[9].Value = yhlxid;

                parameters[10].Text  = "@jgbm";
                parameters[10].Value = jgbm;

                parameters[11].Text          = "@err_code";
                parameters[11].ParaDirection = ParameterDirection.Output;
                parameters[11].DataType      = System.Data.DbType.Int32;
                parameters[11].ParaSize      = 100;

                parameters[12].Text          = "@err_text";
                parameters[12].ParaDirection = ParameterDirection.Output;
                parameters[12].ParaSize      = 100;

                parameters[13].Text  = "@funname";
                parameters[13].Value = funname;

                DataSet dset = new DataSet();
                _DataBase.AdapterFillDataSet("SP_MZGH_get_sfmx", parameters, dset, "ghsfxx", 30);
                err_code = Convert.ToInt32(parameters[11].Value);
                err_text = Convert.ToString(parameters[12].Value);
                return(dset);
            }
            catch (System.Exception err)
            {
                throw new System.Exception(err.Message);
            }
        }