예제 #1
0
        public string getMemberInfoDetail(string USER_ID, string AREA_NO, string D401_21)
        {
            string retStr = "";

            try
            {
                //根据USER_ID获取缓存的新医疗卡号信息
                string D401_10 = BufferUtil.getBufferByKey(USER_ID, "D401_10");
                //查询成员基本信息
                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(); //成员基本信息
                retStr = DataConvert.Dict2Json(memberBaseInfo);
                retStr = DataConvert.getReturnJson("0", retStr);
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
                retStr = DataConvert.getReturnJson("-1", ex.ToString());
            }
            return(retStr);
        }
예제 #2
0
        public string rydj(string USER_ID, string PARAM)
        {
            string retStr = "";

            try
            {
                //根据USER_ID获取缓存的新医疗卡号信息
                string D401_10 = BufferUtil.getBufferByKey(USER_ID, "D401_10");
                //(1)验证输入疾病是否在疾病库中存在,存在可以继续登记
                MZBC_PROC_DIAGNOSIS_CHECK check = new MZBC_PROC_DIAGNOSIS_CHECK();
                string DIAGNOSIS_CODE           = ""; //疾病代码
                check.executeSql(
                    new Dictionary <string, string>()
                {
                    { "DIAGNOSIS_CODE", DIAGNOSIS_CODE }
                }
                    );

                //0	成功
                //1	此疾病在疾病库中不存在
                //2	程序异常
                if (check.getExecuteResultPlainString() != null && check.getExecuteResultPlainString().Length >= 1 &&
                    check.getExecuteResultPlainString().Substring(0, 1) != "0")
                {
                    if (check.getExecuteResultPlainString().Substring(0, 1) == "1")
                    {
                        retStr = DataConvert.getReturnJson("-1", "此疾病在疾病库中不存在");
                    }
                    if (check.getExecuteResultPlainString().Substring(0, 1) == "2")
                    {
                        retStr = DataConvert.getReturnJson("-1", check.getExecuteResultPlainString());
                    }
                    return(retStr);
                }

                //疾病代码存在,可以继续登记
                //(2)检查是否可以做入院登记
                //调用验证住院号是否重复交易,如果重复说明已经登记,此时调用修改住院登记交易;
                //如果不重复调用保存入院登记交易进行入院登记,入院登记成功修改HIS端标志并保存农合信息。
                MZBC_PROC_ZYBZ_NOTICE_CHECK zydjCheck = new MZBC_PROC_ZYBZ_NOTICE_CHECK();
                string AREA_NO = "";
                string D401_21 = "";
                string DEP_ID  = "";
                zydjCheck.executeSql(
                    new Dictionary <string, string>()
                {
                    { "AREA_NO", AREA_NO }, { "D401_10", D401_10 }, { "D401_21", D401_21 }, { "DEP_ID", DEP_ID }
                }
                    );
                //0	成功
                //1	此病人在本院已经做过入院登记
                //2	此病人在其他医院已经做过入院登记
                //3	程序异常
                //此病人在其他医院已经做过入院登记:  2;医院名称(分号分隔)
                //程序异常:                           3;错误信息(分号分隔)
                string flag = zydjCheck.getExecuteResultPlainString().Substring(0, 1);
                if (flag == "2")
                {
                    return(retStr = DataConvert.getReturnJson("-1", "此病人在其他医院已经做过入院登记:" + zydjCheck.getExecuteResultPlainString()));
                }
                if (flag == "3")
                {
                    return(retStr = DataConvert.getReturnJson("-1", "程序异常:" + zydjCheck.getExecuteResultPlainString()));
                }

                string decodeParam = DataConvert.Base64Decode(PARAM); //解码
                Dictionary <string, string> jsonDict = Newtonsoft.Json.JsonConvert.DeserializeObject <Dictionary <string, string> >(decodeParam);

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

                    //保存入院登记
                    ZYBC_PROC_NEW_NOTICE newNotice = new ZYBC_PROC_NEW_NOTICE();
                    newNotice.executeSql(param);

                    //0	成功
                    //1	失败
                    //保存成功:S_Returns= 0;D504_01
                    //D504_01:VARCHAR2(24)  住院登记流水号
                    //保存失败: S_Returns= 1;错误信息  (分号分隔)
                    if (newNotice.getExecuteStatus() == true)
                    {
                        //保存住院登记流水号到HIS
                        string D504_01 = newNotice.getResponseResultWrapperMap()["D504_01"];
                        Dictionary <string, string> record = new Dictionary <string, string>()
                        {
                            { "D401_10", D401_10 },
                            { "D401_21", D401_21 },
                            { "D504_21", jsonDict["D504_21"] },
                            { "D504_01", D504_01 },
                        };
                        HIS.bcZYBC(record);

                        retStr = DataConvert.getReturnJson("0", "保存住院登记成功");
                    }
                    else
                    {
                        retStr = DataConvert.getReturnJson("-1", newNotice.getExecuteResultPlainString());
                    }
                }

                if (flag == "1")
                {
                    //修改住院登记
                    ZYBC_PROC_UPDATE_NOTICE     updateNotice = new ZYBC_PROC_UPDATE_NOTICE();
                    Dictionary <string, string> param        = new Dictionary <string, string>();
                    param.Add("AREA_CODE", jsonDict["AREA_CODE"]); //病人地区编码(取前台选择的地区编码)
                    param.Add("D504_01", jsonDict["D504_01"]);     //住院登记流水号
                    param.Add("D504_21", jsonDict["D504_21"]);     //疾病代码
                    param.Add("D504_09", jsonDict["D504_09"]);     //住院号
                    param.Add("D504_10", jsonDict["D504_10"]);     //就诊类型
                    param.Add("D504_19", jsonDict["D504_19"]);     //入院状态代码(对应S301-02.xls)
                    param.Add("D504_16", jsonDict["D504_16"]);     //入院科室代码(对应S201-03.xls)
                    param.Add("D504_11", jsonDict["D504_11"]);     //入院时间(格式为YYYY-MM-DD)
                    param.Add("D504_28", jsonDict["D504_28"]);     //联系电话

                    updateNotice.executeSql(param);
                    if (updateNotice.getExecuteStatus() == true)
                    {
                        //保存修改到HIS
                        Dictionary <string, string> record = new Dictionary <string, string>()
                        {
                            { "D401_10", D401_10 },
                            { "D401_21", D401_21 },
                            { "D504_21", jsonDict["D504_21"] }
                        };
                        HIS.xgZYBC(record);
                        retStr = DataConvert.getReturnJson("0", "修改住院登记成功");
                    }
                    else
                    {
                        retStr = DataConvert.getReturnJson("-1", updateNotice.getExecuteResultPlainString());
                    }
                }
            }
            catch (Exception ex)
            {
                XnhLogger.log(this.GetType().ToString() + " " + ex.StackTrace);
                retStr = DataConvert.getReturnJson("-1", ex.ToString());
            }
            return(retStr);
        }
예제 #3
0
        public string readCard(string USER_ID, string AREA_NO)
        {
            string retVal = "";

            //todo:M_MM 读卡的加密串 此值的获取需要接口
            string M_MM = "";

            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() == 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();
                        //todo:家庭成员信息存储

                        //(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);
        }