public GetPatientResp GetPatient(long customerId, BillingAccount billingAccount) { try { var client = new KareoServicesClient(); var requestHeader = new RequestHeader { ClientVersion = ClientVersion, CustomerKey = billingAccount.CustomerKey, User = billingAccount.UserName, Password = billingAccount.Password }; var getPatientReq = new GetPatientReq { RequestHeader = requestHeader, Filter = new SinglePatientFilter { ExternalID = customerId.ToString() } }; var getPatientResp = client.GetPatient(getPatientReq); client.Close(); return(getPatientResp); } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// /// </summary> /// <param name="pIdPatient"></param> /// <returns></returns> public static GetPatientRes GetPatient(int pIdPatient) { GetPatientReq req = new GetPatientReq(); //req.BusinessData.Apellido = ; req.BusinessData.Id = pIdPatient; req.ContextInformation.UserId = frmBase_TabForm.IndentityUserInfo.ProviderId.ToString(); req.ContextInformation.AppId = Controller.CurrentHealthInstitution.HealthInstitutionId.ToString(); GetPatientRes res = req.ExecuteService <GetPatientReq, GetPatientRes>(req); if (res.Error != null) { throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); } return(res); }
/// <summary> /// /// </summary> /// <param name="pIdPatient"></param> /// <returns></returns> public static GetPatientRes GetPatient(int pIdPatient) { GetPatientReq req = new GetPatientReq(); //req.BusinessData.Apellido = ; req.BusinessData.Id = pIdPatient; req.ContextInformation.UserId = frmBase_TabForm.IndentityUserInfo.ProviderId.ToString(); req.ContextInformation.AppId = Controller.CurrentHealthInstitution.HealthInstitutionId.ToString(); GetPatientRes res = req.ExecuteService<GetPatientReq, GetPatientRes>(req); if (res.Error != null) throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); return res; }