/// <summary>
        /// 查询门诊费
        /// </summary>
        public QueryOutpatientDepartmentCostjsonDto QueryOutpatientDepartmentCost(QueryOutpatientDepartmentCostParam param)
        {
            QueryOutpatientDepartmentCostjsonDto resultData = null;
            var xmlStr = XmlHelp.SaveXml(param);

            if (!xmlStr)
            {
                throw new Exception("查询门诊费保存参数出错");
            }
            var result = MedicalInsuranceDll.CallService_cxjb("TPYP303");

            if (result != 1)
            {
                throw new Exception("门诊费用查询执行出错");
            }
            var data = XmlHelp.DeSerializerModel(new Domain.Models.Dto.OutpatientDepartment.QueryOutpatientDepartmentCostDto(), true);

            if (data == null)
            {
                throw new Exception("门诊费用查询出错");
            }
            resultData = AutoMapper.Mapper.Map <QueryOutpatientDepartmentCostjsonDto>(data);



            return(resultData);
        }
        /// <summary>
        /// 门诊结算查询
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public QueryOutpatientDepartmentCostjsonDto QueryOutpatientDepartmentCost(UiBaseDataParam param)
        {
            var resultData = new QueryOutpatientDepartmentCostjsonDto();
            var userBase   = _serviceBasicService.GetUserBaseInfo(param.UserId);

            userBase.TransKey = param.TransKey;
            var outpatientSettlementNo = _serviceBasicService.GetOutpatientSettlementNo(new GetOutpatientSettlementNoParam()
            {
                BusinessId = param.BusinessId,
                User       = userBase
            });
            //获取医保病人信息
            var queryResidentParam = new QueryMedicalInsuranceResidentInfoParam()
            {
                BusinessId       = param.BusinessId,
                OrganizationCode = userBase.OrganizationCode,
                SettlementNo     = outpatientSettlementNo
            };
            var outpatient = _hisSqlRepository.QueryOutpatient(new QueryOutpatientParam()
            {
                BusinessId = param.BusinessId
            });

            if (outpatient == null)
            {
                throw new Exception("当前病人查找失败!!!");
            }
            var residentData = _medicalInsuranceSqlRepository.QueryMedicalInsuranceResidentInfo(queryResidentParam);

            if (residentData == null)
            {
                throw new Exception("当前病人未结算,无结算数据!!!");
            }
            if (residentData.MedicalInsuranceState != MedicalInsuranceState.HisSettlement)
            {
                throw new Exception("当前病人无结算数据!!!");
            }

            resultData.ReimbursementExpensesAmount = residentData.ReimbursementExpensesAmount;
            resultData.SelfPayFeeAmount            = residentData.SelfPayFeeAmount;
            resultData.AllAmount = residentData.MedicalInsuranceAllAmount;
            return(resultData);
        }