예제 #1
0
        public string zydj(string user_id)
        {
            string retStr = "";

            try
            {
                ZYBC_PROC_NEW_NOTICE        newNotice = new ZYBC_PROC_NEW_NOTICE();
                Dictionary <string, string> paramDict = new Dictionary <string, string>();
                //todo:参数需要HIS传值
                paramDict.Add("COME_AREA", ""); //医疗机构所在地区编码(取用户所在机构地区编码AREA_CODE)
                paramDict.Add("AREA_CODE", ""); //地区代码(病人所在地区编码)取前台选择的地区编码
                paramDict.Add("D401_10", "");   //医疗证号
                paramDict.Add("D504_02", "");   //个人编号
                paramDict.Add("D504_03", "");   //姓名
                paramDict.Add("D504_04", "");   //性别(1:男 2:女)传代码
                paramDict.Add("D504_05", "");   //身份证号
                paramDict.Add("D504_06", "");   //年龄
                paramDict.Add("D504_21", "");   //疾病代码
                paramDict.Add("D504_09", "");   //住院号
                paramDict.Add("D504_10", "");   //就诊类型代码(对应s301_05.xls)
                paramDict.Add("D504_11", "");   //入院时间(格式为YYYY-MM-DD)
                paramDict.Add("D504_14", "");   //就医机构代码=DEP_ID
                paramDict.Add("D504_19", "");   //入院状态代码 (对应S301-02.xls)
                paramDict.Add("D504_16", "");   //入院科室代码(对应S201-03.xls)
                paramDict.Add("D504_28", "");   //病人联系电话

                newNotice.executeSql(paramDict);
                if (newNotice.getExecuteStatus() == true)
                {
                    //保存成功:S_Returns= 0;D504_01
                    //D504_01:VARCHAR2(24)  住院登记流水号
                    //保存失败: S_Returns= 1;错误信息  (分号分隔)
                    Dictionary <string, string> dictRet = newNotice.getResponseResultWrapperMap();
                    string D504_01 = dictRet["D504_01"];
                    //缓存住院登记流水号D504_01
                    BufferUtil.setBuffer(user_id, "D504_01", D504_01);
                    retStr = DataConvert.getReturnJson("0", "success");
                }
                else
                {
                    retStr = DataConvert.getReturnJson("-1", "fail");
                }
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
                retStr = DataConvert.getReturnJson("-1", ex.ToString());
            }
            return(retStr);
        }
예제 #2
0
        public string login(string name, string pwd)
        {
            string retVal = "";

            try
            {
                //todo:HIS系统先验证用户名和密码

                //调用接口认证
                LoginAuth service = new LoginAuth();

                //直接塞参数进入Dictionary,由框架自动组装顺序
                Dictionary <string, string> requestParam = new Dictionary <string, string>();
                requestParam.Add("USER_CODE", name);
                requestParam.Add("USER_PASS", pwd);

                //使用executeSql重载的Dictionary参数方法
                string response = service.executeSql(requestParam);
                Dictionary <string, string> responseDict = service.getResponseResultWrapperMap();
                //登录失败
                if (service.getExecuteStatus() == false)
                {
                    retVal = "";
                    //记日志
                    XnhLogger.log(this.GetType().ToString() + service.getExecuteResultPlainString());
                }
                else
                {
                    //登录成功,缓存用户信息,服务器缓存以每个用户的user_id作为区分的cookie
                    string user_id = responseDict["USER_ID"];
                    foreach (KeyValuePair <string, string> item in responseDict)
                    {
                        BufferUtil.setBuffer(user_id, item.Key, item.Value);
                    }

                    retVal = MsgConvert.Dict2Json(responseDict);
                }
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
                retVal = "";
            }

            return(retVal);
        }
예제 #3
0
        public string login(string name, string pwd)
        {
            string retVal = "";

            try
            {
                //todo:HIS系统先验证用户名和密码

                /*
                 * string str_sql;
                 * str_sql = "select oper_name,pwd from code_operator where oper_code='" + name + "'";
                 * DataTable dt1 = DBUtil.queryExecute(str_sql);
                 *
                 * long ll_c;
                 * ll_c = dt1.Rows.Count;
                 * if (ll_c > 0)
                 * {
                 *  //p===pass
                 *  if (dt1.Rows[0]["pwd"].ToString() != pwd)
                 *  {
                 *      return "";//==
                 *  }
                 *  else
                 *  {
                 *      return "0;10011;admin;admin;刘德华;8881122;18012345678;天泰医院;DEP_AREA;USER_JG;DEP_LEVEL;AREA_CODE;T_IS_FLASH_AUTHORIZED;T_YEARS;T_IS_SK;T_IS_SK_HOSP;T_IS_XJ;T_RJZ_DATE;T_CH_START_DATE;T_CH_END_DATE;T_DY_MX_IS_HZ;T_IS_BLUSH_DAY;T_BLUSH_DAY;";
                 *  }
                 * }
                 * else
                 * {
                 *  return "";
                 * }
                 */
                // return "0;10011;admin;admin;刘德华;8881122;18012345678;天泰医院;DEP_AREA;USER_JG;DEP_LEVEL;AREA_CODE;T_IS_FLASH_AUTHORIZED;T_YEARS;T_IS_SK;T_IS_SK_HOSP;T_IS_XJ;T_RJZ_DATE;T_CH_START_DATE;T_CH_END_DATE;T_DY_MX_IS_HZ;T_IS_BLUSH_DAY;T_BLUSH_DAY;";

                //调用接口认证
                LoginAuth service = new LoginAuth();

                //直接塞参数进入Dictionary,由框架自动组装顺序
                Dictionary <string, string> requestParam = new Dictionary <string, string>();
                requestParam.Add("USER_CODE", name);
                requestParam.Add("USER_PASS", pwd);

                //使用executeSql重载的Dictionary参数方法
                string response = service.executeSql("", requestParam, "&");
                Dictionary <string, string> responseDict = service.getResponseResultWrapperMap();
                //登录失败
                if (service.getExecuteStatus() == false)
                {
                    retVal = "";
                    //记日志
                    XnhLogger.log(this.GetType().ToString() + service.getExecuteResultPlainString());
                }
                else
                {
                    //登录成功,缓存用户信息,服务器缓存以每个用户的user_id作为区分的cookie
                    string user_id = responseDict["USER_ID"];
                    foreach (KeyValuePair <string, string> item in responseDict)
                    {
                        BufferUtil.setBuffer(user_id, item.Key, item.Value);
                    }

                    retVal = DataConvert.Dict2Json(responseDict);
                }
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
                retVal = "";
            }

            return(retVal);
        }
예제 #4
0
        public string readCard(string USER_ID, string M_MM, string AREA_NO)
        {
            string retVal = "";

            //todo:M_MM 读卡的加密串 此值的获取需要接口
            //string M_MM = ""; //由前台的ActiveX控件获取提供

            try
            {
                //(1)调用验证此卡号是否存在交易
                MZBC_Check_Ylzh_Bulsh check = new MZBC_Check_Ylzh_Bulsh();
                string retStr = check.executeSql(
                    new Dictionary <string, string>()
                {
                    { "AREA_NO", AREA_NO }, { "M_MM", M_MM }
                }
                    );

                if (check.getExecuteStatus() == false)
                {
                    retStr = DataConvert.getReturnJson("-1", "不存在此卡号交易");
                    XnhLogger.log("卡号:" + M_MM + " " + "不存在此卡号交易");
                }

                //卡号存在交易
                if (check.getExecuteStatus() == true)
                {
                    Dictionary <string, string> retDic = check.getResponseResultWrapperMap();
                    //返回的医疗证号
                    string D401_10 = retDic["D401_10"];
                    //缓存医疗号
                    BufferUtil.setBuffer(USER_ID, "D401_10", D401_10);

                    //(2)调用获取家庭成员交易
                    MZBC_Get_Member getMember       = new MZBC_Get_Member();
                    string          getMemberRetStr = getMember.executeSql(
                        new Dictionary <string, string>()
                    {
                        { "AREA_NO", AREA_NO }, { "D401_10", D401_10 }
                    }
                        );
                    if (getMember.getExecuteStatus() == true)
                    {
                        //返回的家庭成员信息D401_21/D401_02;D401_21/D401_02
                        //成员序号:D401_21  CHAR(2)
                        //成员姓名:D401_02  VARCHAR2(24)
                        string retMember = (string)getMember.getResponseResultOtherWrapper();
                        retVal = DataConvert.Dict2Json(new Dictionary <string, string>()
                        {
                            { "lyzh", D401_10 }, { "data", retMember }
                        });
                        //家庭成员信息存储到HIS
                        string[] memberArray = retMember.Split(new string[] { ";" }, StringSplitOptions.None);
                        foreach (string one in memberArray)
                        {
                            string D401_21 = one.Split(new string[] { "/" }, StringSplitOptions.None)[0]; //成员序号
                            Dictionary <string, string> record = new Dictionary <string, string>()
                            {
                                { "D401_10", D401_10 }, { "D401_21", D401_21 }
                            };
                            HIS.insertMZBC(record);
                            HIS.insertZYBC(record);
                        }

                        //(3)根据医疗证号和序号调用查询基础人员信息交易,将信息显示到用户画面。
                        //string[] memberArray = retMember.Split(new string[]{";"},StringSplitOptions.None);
                        //foreach (string one in memberArray)
                        //{
                        //    string D401_21 = one.Split(new string[] { "/" }, StringSplitOptions.None)[0]; //成员序号
                        //    //查询成员基本信息
                        //    MZBC_Get_Member_Information getMemberInfo = new MZBC_Get_Member_Information();
                        //    getMemberInfo.executeSql(
                        //        new Dictionary<string, string>() { { "AREA_NO", AREA_NO }, { "D401_10", D401_10 }, { "D401_21", D401_21 } }
                        //        );
                        //    Dictionary<string,string> memberBaseInfo = getMemberInfo.getResponseResultWrapperMap(); //成员基本信息
                        //    //(4)成员基本信息显示在用户界面 todo

                        //    //(5)验证本人是否已经住院(注:应该是住院状态不允许门诊报销)
                        //    //AREA_NO&D401_10&D401_21&DEP_ID
                        //    MZBC_PROC_ZYBZ_NOTICE_CHECK zy = new MZBC_PROC_ZYBZ_NOTICE_CHECK();
                        //     //从缓存获取信息
                        //    string DEP_ID = BufferUtil.getBufferByKey(USER_ID, "DEP_ID");
                        //    zy.executeSql(
                        //        new Dictionary<string, string>() { { "AREA_NO", AREA_NO }, { "D401_10", D401_10 }, { "D401_21", D401_21 }, { "DEP_ID", DEP_ID } }
                        //        );
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
            }

            return(retVal);
        }