/// <summary>
        /// 获取门诊病人费用明细
        /// </summary>

        /// <param name="param"></param>
        /// <returns></returns>
        public List <BaseOutpatientDetailDto> GetOutpatientDetailPerson(OutpatientDetailParam param)
        {
            var resultData = new List <BaseOutpatientDetailDto>();
            var xmlData    = new MedicalInsuranceXmlDto();

            xmlData.BusinessId        = param.BusinessId;
            xmlData.HealthInsuranceNo = "48";//42MZ
            xmlData.TransactionId     = param.User.TransKey;
            xmlData.AuthCode          = param.User.AuthCode;
            xmlData.UserId            = param.User.UserId;
            xmlData.OrganizationCode  = param.User.OrganizationCode;
            var jsonParam = JsonConvert.SerializeObject(xmlData);
            var data      = _webServiceBasic.HIS_Interface("39", jsonParam);
            OutpatientPersonJsonDto dataValue = JsonConvert.DeserializeObject <OutpatientPersonJsonDto>(data.Msg);

            var detailInfo = dataValue.DetailInfo;

            foreach (var item in detailInfo)
            {
                var detail = AutoMapper.Mapper.Map <BaseOutpatientDetailDto>(item);
                detail.OrganizationCode = param.User.OrganizationCode;
                detail.OrganizationName = param.User.OrganizationName;
                detail.OutpatientNo     = dataValue.OutpatientPersonBase.OutpatientNumber;
                resultData.Add(detail);
            }
            if (param.IsSave)
            {
                _hisSqlRepository.SaveOutpatientDetail(param.User, resultData);
            }
            return(resultData);
        }
        /// <summary>
        /// 获取门诊病人
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public BaseOutpatientInfoDto GetOutpatientPerson(GetOutpatientPersonParam param)
        {
            BaseOutpatientInfoDto resultData = null;
            var xmlData = new MedicalInsuranceXmlDto();

            xmlData.BusinessId        = param.UiParam.BusinessId;
            xmlData.HealthInsuranceNo = "48";//42MZ
            xmlData.TransactionId     = param.UiParam.TransKey;
            xmlData.AuthCode          = param.User.AuthCode;
            xmlData.UserId            = param.User.UserId;
            xmlData.OrganizationCode  = param.User.OrganizationCode;
            var jsonParam = JsonConvert.SerializeObject(xmlData);
            var data      = _webServiceBasic.HIS_Interface("39", jsonParam);
            OutpatientPersonJsonDto dataValue = JsonConvert.DeserializeObject <OutpatientPersonJsonDto>(data.Msg);
            var dataValueFirst = dataValue.OutpatientPersonBase;

            if (dataValueFirst != null)
            {
                resultData                = AutoMapper.Mapper.Map <BaseOutpatientInfoDto>(dataValueFirst);
                resultData.Id             = param.Id;
                resultData.BusinessId     = param.UiParam.BusinessId;
                resultData.DiagnosticJson = JsonConvert.SerializeObject(dataValue.DiagnosisList);
                resultData.DiagnosisList  = dataValue.DiagnosisList;
                if (param.IsSave)
                {
                    _hisSqlRepository.SaveOutpatient(param.User, resultData);
                }
            }
            return(resultData);
        }