示例#1
0
        public override void ProcessMessage()
        {
            OutObject = new TIJIANCXSQCX_OUT();
            string zhengJianHM = InObject.ZHENGJIANHM.ToUpper(); //证件号码
            string tiJianBM    = InObject.TIJIANBM;              //体检编码
            string shengQingLX = InObject.SHENQINGLX;            //申请类型

            #region 基础入参判断

            if (string.IsNullOrEmpty(zhengJianHM))
            {
                throw new Exception("证件号码不能为空!");
            }
            if (string.IsNullOrEmpty(tiJianBM))
            {
                throw new Exception("体检编码不能为空!");
            }
            if (string.IsNullOrEmpty(shengQingLX))
            {
                shengQingLX = "1";
            }
            #endregion

            #region 检查是否已经提交申请
            string    tiJianChaXunSQSql = "select * from TJ_JK_SHENQINGDAN_view  where tijianbm = '{0}' and ZHENGJIANBM = '{1}' and shenqingdlx = '{2}' ";
            DataTable dtTiJianChaXunSQ  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianChaXunSQSql, tiJianBM, zhengJianHM, shengQingLX));
            if (dtTiJianChaXunSQ != null && dtTiJianChaXunSQ.Rows.Count <= 0)
            {
                throw new Exception("未找到该体检的操作申请!");
            }
            #endregion

            OutObject.SHENQINGDID = dtTiJianChaXunSQ.Rows[0]["shenqingdid"].ToString();
            OutObject.SHENQINGZT  = dtTiJianChaXunSQ.Rows[0]["zhuangtai"].ToString();
        }
示例#2
0
        public override void ProcessMessage()
        {
            OutObject = new TIJIANCXSQ_OUT();
            string zhengJianHM = InObject.ZHENGJIANHM.ToUpper(); //证件号码
            string tiJianBM    = InObject.TIJIANBM;              //体检编码
            string shengQingLX = InObject.SHENQINGLX;            //申请类型

            #region 基础入参判断

            if (string.IsNullOrEmpty(zhengJianHM))
            {
                throw new Exception("证件号码不能为空!");
            }
            if (string.IsNullOrEmpty(tiJianBM))
            {
                throw new Exception("体检编码不能为空!");
            }
            if (string.IsNullOrEmpty(shengQingLX))
            {
                shengQingLX = "1";
            }
            #endregion

            #region 报告状态确认
            string tjbgdzt = ConfigurationManager.AppSettings["TJBGFFZT"].ToString();
            if (string.IsNullOrEmpty(tjbgdzt))
            {
                tjbgdzt = "6";
            }
            string    tiJianBaoGaoZTSql = "select * from tj_dengjixx_view where tijianbm = '{0}' and tijiandzt in ({1})";
            DataTable dtTiJianBaoGaoZT  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianBaoGaoZTSql, tiJianBM, tjbgdzt, zhengJianHM));
            if (dtTiJianBaoGaoZT == null || dtTiJianBaoGaoZT.Rows.Count <= 0)
            {
                throw new Exception("该体检还未出报告!");
            }
            #endregion

            #region 检查是否已经提交申请
            string    tiJianChaXunSQSql = "select * from TJ_JK_SHENQINGDAN_view  where tijianbm = '{0}' and ZHENGJIANBM = '{1}'  and shenqingdlx = '{2}' ";
            DataTable dtTiJianChaXunSQ  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianChaXunSQSql, tiJianBM, zhengJianHM, shengQingLX));
            if (dtTiJianChaXunSQ != null && dtTiJianChaXunSQ.Rows.Count > 0)
            {
                throw new Exception("该体检单已提交了查询申请,请等待审核!");
            }
            #endregion

            #region 写入申请信息
            string shenQingDID       = DBVisitorTiJian.ExecuteScalar("select JK_SHENQINGDAN.Nextval from dual").ToString();
            string tiJiaoTiJianSQSql = "insert into tj_jk_shenqingdan(shenqingdid,shenqingdlx,zhengjianbm,tijianbm,zhuangtai,shengqingren,shengqingrq) values ('{0}','{1}','{2}','{3}',0,'{4}',sysdate)";
            DBVisitorTiJian.ExecuteNonQuery(string.Format(tiJiaoTiJianSQSql, shenQingDID, shengQingLX, zhengJianHM, tiJianBM, InObject.BASEINFO.CAOZUOYDM));
            #endregion
        }
示例#3
0
文件: TIJIANJGCX.cs 项目: radtek/WCF
        public override void ProcessMessage()
        {
            OutObject = new TIJIANJGCX_OUT();
            string tiJianBM = InObject.TIJIANBM;                     //体检编码

            string zhengJianHM     = InObject.ZHENGJIANHM.ToUpper(); //证件号码
            string danWeiBM        = InObject.DANWEIBM;              //单位编码
            string danWeiTiJianDBM = InObject.DANWEITJDBM;           //单位体检单编码

            #region 基本入参判断
            if (string.IsNullOrEmpty(tiJianBM))
            {
                throw new Exception("体检编码不能为空!");
            }
            #endregion

            #region 报告状态确认
            string tjbgdzt = ConfigurationManager.AppSettings["TJBGFFZT"].ToString();
            if (string.IsNullOrEmpty(tjbgdzt))
            {
                tjbgdzt = "6";
            }
            string    tiJianBaoGaoZTSql = "select * from tj_dengjixx_view where tijianbm = '{0}' and tijiandzt in ({1})";
            DataTable dtTiJianBaoGaoZT  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianBaoGaoZTSql, tiJianBM, tjbgdzt));
            if (dtTiJianBaoGaoZT == null || dtTiJianBaoGaoZT.Rows.Count <= 0)
            {
                throw new Exception("该体检还未出报告!");
            }
            #endregion

            #region 信息查询授权判断
            if (ConfigurationManager.AppSettings["TJBGRGSHBZ"] == "1")
            {
                string    tiJianChaXunSQSql = "select * from TJ_JK_SHENQINGDAN_view  where tijianbm = '{0}' and ZHENGJIANBM = '{1}'  and shenqingdlx = '1' and zhuangtai = 1 ";
                DataTable dtTiJianChaXunSQ  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianChaXunSQSql, tiJianBM, zhengJianHM));
                if (dtTiJianChaXunSQ != null && dtTiJianChaXunSQ.Rows.Count <= 0)
                {
                    throw new Exception("该体检单已提交了查询申请,还未审核通过,请等待审核!");
                }
            }
            #endregion

            #region 体检结果数据检索

            TIJIANJGXX tjjgxx = new TIJIANJGXX();
            tjjgxx.TIJIANBM = tiJianBM;//体检编码  唯一号

            #region 总检信息
            string    zongJianXXSql = "select * from Tj_Gerenzjd_view where tijianbm = '{0}' ";
            DataTable dtZongJianXX  = DBVisitorTiJian.ExecuteTable(string.Format(zongJianXXSql, tjjgxx.TIJIANBM));
            if (dtZongJianXX != null && dtZongJianXX.Rows.Count > 0)
            {
                tjjgxx.ZONGJIANXX.TIJIANZD   = dtZongJianXX.Rows[0]["TIJIANZD"].ToString();
                tjjgxx.ZONGJIANXX.ZONGJIANJY = dtZongJianXX.Rows[0]["ZONGJIANJY"].ToString();
                tjjgxx.ZONGJIANXX.ZONGJIANXJ = dtZongJianXX.Rows[0]["ZONGJIANXJ"].ToString();
            }
            #endregion

            #region 体检组合信息
            string    tiJianZuHeXXSql = "select distinct nvl((select zuhexmmc from tj_zd_zuhexm where zuhexmbm = a.zuhexmbm),a.zuhexmbm) as zuhexmbm from tj_tijiandtjxm_view a  where tijianbm ='{0}'";
            DataTable dtTiJianZuHeXX  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianZuHeXXSql, tjjgxx.TIJIANBM));
            if (dtTiJianZuHeXX != null && dtTiJianZuHeXX.Rows.Count > 0)
            {
                for (int i = 0; i < dtTiJianZuHeXX.Rows.Count; i++)
                {
                    TIJIANXMXX tjxmxx = new TIJIANXMXX();
                    tjxmxx.XIANGMUZHMC = dtTiJianZuHeXX.Rows[i]["zuhexmbm"].ToString();
                    string    tiJianJieGuoMXXXSql = "select * from tj_tijiandtjxm_view where tijianbm ='{0}' and zuhexmbm ='{1}' ";
                    DataTable dtTiJianJieGuoMXXX  = DBVisitorTiJian.ExecuteTable(string.Format(tiJianJieGuoMXXXSql, tjjgxx.TIJIANBM, tjxmxx.XIANGMUZHMC));
                    if (dtTiJianJieGuoMXXX != null && dtTiJianJieGuoMXXX.Rows.Count > 0)
                    {
                        for (int j = 0; j < dtTiJianJieGuoMXXX.Rows.Count; j++)
                        {
                            TIJIANXMJGXX tjxmjgxx = new TIJIANXMJGXX();
                            tjxmjgxx.XIANGMUBM    = dtTiJianJieGuoMXXX.Rows[j]["xiangmubm"].ToString();
                            tjxmjgxx.XIANGMUMC    = dtTiJianJieGuoMXXX.Rows[j]["xiangmumc"].ToString();
                            tjxmjgxx.JILIANGDW    = dtTiJianJieGuoMXXX.Rows[j]["jiliangdwbm"].ToString();
                            tjxmjgxx.ZHIXINGKS    = dtTiJianJieGuoMXXX.Rows[j]["zhixingksbm"].ToString();
                            tjxmjgxx.CAOZUORBM    = dtTiJianJieGuoMXXX.Rows[j]["caozuorbm"].ToString();
                            tjxmjgxx.CAOZUORQ     = dtTiJianJieGuoMXXX.Rows[j]["caozuorq"].ToString();
                            tjxmjgxx.TIJIANJG     = dtTiJianJieGuoMXXX.Rows[j]["tijianjg"].ToString();
                            tjxmjgxx.ZHENGCHANGJG = dtTiJianJieGuoMXXX.Rows[j]["zhengchangjg"].ToString();
                            tjxmjgxx.CANKAOXX     = dtTiJianJieGuoMXXX.Rows[j]["cankaoxx"].ToString();
                            tjxmjgxx.CANKAOSX     = dtTiJianJieGuoMXXX.Rows[j]["cankaosx"].ToString();
                            tjxmjgxx.JIELUN       = dtTiJianJieGuoMXXX.Rows[j]["jielun"].ToString();
                            tjxmjgxx.SHENHEY      = dtTiJianJieGuoMXXX.Rows[j]["shenhey"].ToString();
                            tjxmjgxx.SHENHESJ     = dtTiJianJieGuoMXXX.Rows[j]["shenhesj"].ToString();
                            tjxmjgxx.YANGBENH     = dtTiJianJieGuoMXXX.Rows[j]["yangbenh"].ToString();
                            tjxmxx.TIJIANXMJGMX.Add(tjxmjgxx);
                        }
                    }
                    tjjgxx.TIJIANXMMX.Add(tjxmxx);
                }
            }

            OutObject.TIJIANJGMX.Add(tjjgxx);
            #endregion
            #endregion

            if (tjjgxx.ZONGJIANXX == null ||
                (string.IsNullOrEmpty(tjjgxx.ZONGJIANXX.ZONGJIANJY) && string.IsNullOrEmpty(tjjgxx.ZONGJIANXX.TIJIANZD) && string.IsNullOrEmpty(tjjgxx.ZONGJIANXX.ZONGJIANXJ)) ||
                tjjgxx.TIJIANXMMX.Count == 0)
            {
                throw new Exception("未能获取完整的体检结果信息!");
            }
        }
示例#4
0
        public override void ProcessMessage()
        {
            OutObject = new TIJIANJLCX_OUT();
            string zhengJianHM     = InObject.ZHENGJIANHM; //证件号码
            string danWeiBM        = InObject.DANWEIBM;    //单位编码
            string danWeiTiJianDBM = InObject.DANWEITJDBM; //单位体检单编码

            #region 基础入参判断

            if (!string.IsNullOrEmpty(zhengJianHM) || (!string.IsNullOrEmpty(danWeiBM) && !string.IsNullOrEmpty(danWeiTiJianDBM)))
            {
                if (string.IsNullOrEmpty(zhengJianHM))
                {
                    zhengJianHM = string.Empty;
                }
                else
                {
                    zhengJianHM = InObject.ZHENGJIANHM.ToUpper();
                }

                if (string.IsNullOrEmpty(danWeiBM))
                {
                    danWeiBM = string.Empty;
                }

                if (string.IsNullOrEmpty(danWeiTiJianDBM))
                {
                    danWeiTiJianDBM = string.Empty;
                }
            }
            else
            {
                throw new Exception("请传入正确的证件号码或单位体检信息!");
            }

            #endregion

            string tiJianXXSql = "select * from tj_dengjixx_view where zhengjianbm = '{0}' or ( nvl(danweibm,'*') = '{1}' and nvl(danweitjdbm,'*') = '{2}' )";

            DataTable dtTiJianXX = DBVisitorTiJian.ExecuteTable(string.Format(tiJianXXSql, zhengJianHM, danWeiBM, danWeiTiJianDBM));

            if (dtTiJianXX == null || dtTiJianXX.Rows.Count <= 0)
            {
                throw new Exception("未找到相关的体检信息!");
            }
            else
            {
                for (int i = 0; i < dtTiJianXX.Rows.Count; i++)
                {
                    TIJIANXX tjxx = new TIJIANXX();
                    tjxx.TIJIANBM    = dtTiJianXX.Rows[i]["tijianbm"].ToString();    //体检编码 唯一号
                    tjxx.ZHENGJIANHM = dtTiJianXX.Rows[i]["zhengjianbm"].ToString(); //诊间号码
                    tjxx.XINGMING    = dtTiJianXX.Rows[i]["xingming"].ToString();    //姓名
                    tjxx.CHUSHENGRQ  = dtTiJianXX.Rows[i]["chushengrq"].ToString();  //出生日期
                    tjxx.GONGZUODW   = dtTiJianXX.Rows[i]["gongzuodw"].ToString();   //工作单位
                    tjxx.TIJIANRQ    = dtTiJianXX.Rows[i]["tijianrq"].ToString();    //体检日期
                    tjxx.CAOZUOYBM   = dtTiJianXX.Rows[i]["caozuoybm"].ToString();   //操作员编码
                    tjxx.CAOZUOYMC   = dtTiJianXX.Rows[i]["caozuoymc"].ToString();   //操作员名称
                    tjxx.CAOZUORQ    = dtTiJianXX.Rows[i]["caozuorq"].ToString();    //操作日期
                    tjxx.TIJIANLBBM  = dtTiJianXX.Rows[i]["tijianlbbm"].ToString();  //体检类别编码
                    tjxx.TIJIANLBMC  = dtTiJianXX.Rows[i]["tijianlbmc"].ToString();  //体检类别名称
                    tjxx.TIJIANDZT   = dtTiJianXX.Rows[i]["tijiandzt"].ToString();   //体检单状态  0:登记 1:科室结束 2:总检结束 3:审核结束 4:报告已发 5:结算结束 6:发放报告
                    tjxx.TIJIANKSRQ  = dtTiJianXX.Rows[i]["tijianksrq"].ToString();  //体检开始日期
                    tjxx.TIJIANJSRQ  = dtTiJianXX.Rows[i]["tijianjsrq"].ToString();  //体检结束日期
                    tjxx.DANWEITJDBM = dtTiJianXX.Rows[i]["danweitjdbm"].ToString(); //单位体检单代码
                    tjxx.DANWEIBM    = dtTiJianXX.Rows[i]["danweibm"].ToString();    //单位编码
                    tjxx.JIESUANZT   = dtTiJianXX.Rows[i]["jszt"].ToString();        //结算状态
                    tjxx.GUIDANGBZ   = dtTiJianXX.Rows[i]["guidangbz"].ToString();   //归档标识
                    tjxx.GUIDANGRQ   = dtTiJianXX.Rows[i]["guidangrq"].ToString();   //归档日期
                    tjxx.TAOCANMC    = dtTiJianXX.Rows[i]["taocanmc"].ToString();    //套餐名称
                    OutObject.TIJIANMX.Add(tjxx);
                }
            }
        }