Example #1
0
        /// <summary>
        /// 调用pacs接口进行门诊确费
        /// </summary>
        /// <param name="jcxx">检查信息表</param>
        public void OutCheckFee(T_JCXX jcxx)
        {
            #region 入参说明

            //Registeredserialnumber:挂号序号(门诊号);
            //Operatorid:操作者ID
            //Departmentid:执行科室ID
            //Datime:操作时间,时间格式:yyyy - MM - dd HH: mm: ss
            //Type:执行类型:1:确费,0:取消确费;此函数传1;

            #endregion

            string result = "";

            try
            {
                log.WriteMyLog("开始门诊确费,门诊号:" + jcxx.F_MZH);
                var date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                //调用门诊确费
                HnsfyRegistrationInterface.WebService service = new HnsfyRegistrationInterface.WebService();

                log.WriteMyLog("开始调用门诊确费接口,门诊号(发票号)是:" + jcxx.F_MZH);
                //门诊号存的就是发票号 账号:林春华 工号:4411 科室ID:1094
                var returnXML = service.CheckFeeOperationByInvoicenumber(jcxx.F_MZH, "4411", "1094", date, "1");
                log.WriteMyLog("门诊确费成功,返回值:\r\n" + returnXML);

                //解析门诊确费接口的返回值
                var    row   = GetDataSetByXml(returnXML).Tables[0].Rows[0];
                int    count = Int32.Parse(row["Code"].ToString());
                string msg   = row["ERR_TEXT"].ToString();

                //如果确费数量<0,则确费失败
                if (count < 0)
                {
                    throw new Exception(msg);
                }
            }
            catch (Exception ee)
            {
                log.WriteMyLog("门诊确费失败:" + ee.Message);
                throw new Exception("确费失败,因为:" + ee.Message);
            }
        }
Example #2
0
        /// <summary>
        /// 获取extid,该值在pacs中代表报告id,必填
        /// </summary>
        /// <param name="jcxx"></param>
        /// <returns></returns>
        public string GetSqxhFormPacs(T_JCXX jcxx)
        {
            //判断是门诊还是住院
            string operType = "";

            if (string.IsNullOrEmpty(jcxx.F_MZH.Trim()) == false)
            {
                operType = "0";
            }
            else if (string.IsNullOrEmpty(jcxx.F_ZYH.Trim()) == false)
            {
                operType = "1";
            }

            string sxml = "";

            try
            {
                HnsfyRegistrationInterface.WebService service = new HnsfyRegistrationInterface.WebService();
                sxml = service.QuePatiengInfo("", "", "", jcxx.F_ZYH, jcxx.F_MZH, "", operType);

                var dt = GetDataSetByXml(sxml).Tables[0];
                var f  = new ApplicationSelector();
                f.DataTable = dt;
                f.ShowDialog();
                var exid = f.SelectedRow["exid"].ToString();
                //log.请求患者信息成功
                log.WriteMyLog("请求HIS患者信息成功,返回值:\r\n" + sxml);
                return(exid);
            }
            catch (Exception e)
            {
                //log.请求患者信息失败
                log.WriteMyLog("查询HIS患者信息失败:" + e.Message);
                throw new Exception("查询HIS患者信息失败:" + e.Message);
            }
        }