/// <summary> /// Calls the GetMultipleMedicalValidationMessages method as defined in the service reference ServiceReference1 /// which takes an array of strings as it's parameter, as well as a username and password for authentication purposes /// </summary> /// <param name="client"></param> /// <param name="vendorClaims"></param> /// <returns>ValidationResults as defined in VendorUploadService.Results</returns> public static ValidationResults GetMultiValidationErrors(Client client, string[] vendorClaims) { Stopwatch sw = new Stopwatch(); var uploader = new ServiceReference1.ClaimImportServiceClient(); //uploader.InnerChannel.OperationTimeout = new TimeSpan(0, 10, 0); //Set previous to claim limit being set @ 20 to prevent timeouts uploader.Open(); var results = new ValidationResults(); sw.Start(); try { results.MultiClaimValidationResponses = uploader.GetMultipleMedicalValidationMessages(client.Username, client.Password, vendorClaims); sw.Stop(); } catch (Exception e) { results.Exceptions.Add(e); results.thrownException = true; } uploader.Close(); results.whenUploaded = DateTime.Now; results.timeToRespond = sw.Elapsed; return(results); }
/// <summary> /// Legacy, no longer needed. Previous to requirements being further defined, any number of claims were allowed to upload, but on the client side of /// wvc it would timeout waiting for all those validations. This test and GetMultiValidationErrors were both built previous to requirements update /// As currently stands, the client cannot be expected or asked to make any extra changes in their code, so the limit was set to 20 claims, so the /// timout problem is now moot. /// </summary> /// <param name="client"></param> /// <param name="vendorClaims"></param> /// <returns></returns> public static ValidationResults GetMultipleValidationResultsWithoutChanges(Client client, string[] vendorClaims) { Stopwatch sw = new Stopwatch(); var uploader = new ServiceReference1.ClaimImportServiceClient(); var results = new ValidationResults(); sw.Start(); try { results.MultiClaimValidationResponses = uploader.GetMultipleMedicalValidationMessages(client.Username, client.Password, vendorClaims); sw.Stop(); } catch (Exception e) { results.Exceptions.Add(e); results.thrownException = true; } uploader.Close(); results.whenUploaded = DateTime.Now; results.timeToRespond = sw.Elapsed; return(results); }