/// <summary> /// Perform a consumer batch ihi search on the Medicare IHI service. /// </summary> /// <param name="searches">List of SearchIHIRequestType containing the request identifier and the search parameters.</param> /// <returns>Results matching the search parameters. Different fields are returned for diffent search types. For full details please refer to: /// <list type="bullet"> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.BasicSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.BasicMedicareSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.BasicDvaSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.DetailedSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.AustralianPostalAddressSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.AustralianStreetAddressSearch"/></description></item> /// <item><description><see cref="Nehta.VendorLibrary.HI.ConsumerSearchIHIClient.InternationalAddressSearch"/></description></item> /// </list> /// </returns> public searchIHIBatchResponse SearchIHIBatchSync(List <CommonSearchIHIRequestType> searches) { Validation.ValidateArgumentRequired("searches", searches); searchIHIBatchSyncRequest envelope = new searchIHIBatchSyncRequest(); var mappedSearches = Mapper.Map <List <CommonSearchIHIRequestType>, List <SearchIHIRequestType> >(searches); envelope.searchIHIBatchSync = mappedSearches.ToArray(); envelope.product = product; envelope.user = user; envelope.hpio = hpio; envelope.signature = new SignatureContainerType(); envelope.timestamp = new TimestampType() { created = DateTime.Now, expires = DateTime.Now.AddDays(30), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; searchIHIBatchSyncResponse response = null; try { response = ihiBatchClient.searchIHIBatchSync(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response != null && response.searchIHIBatchResponse != null) { return(response.searchIHIBatchResponse); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
/// <summary> /// Perform the service call. /// </summary> /// <param name="request">The search criteria in a searchHIProviderDirectoryForIndividual object.</param> /// <returns>The search results in a searchHIProviderDirectoryForIndividualResponse object.</returns> public searchForProviderOrganisationResponse ProviderOrganisationSearch(searchForProviderOrganisation request) { var envelope = new searchForProviderOrganisationRequest() { searchForProviderOrganisation = request, product = product, user = user, hpio = hpio, signature = new SignatureContainerType() }; envelope.timestamp = new TimestampType() { created = DateTime.Now, expires = DateTime.Now.AddDays(30), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; searchForProviderOrganisationResponse1 response1 = null; try { response1 = providerSearchForProviderOrganisationClient.searchForProviderOrganisation(envelope); providerSearchForProviderOrganisationClient.searchForProviderOrganisation(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response1 != null && response1.searchForProviderOrganisationResponse != null) { return(response1.searchForProviderOrganisationResponse); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
/// <summary> /// Obtain the current acceptable values for a list of web service request elements. /// Elements include (but may not be limited to): /// <list type="bullet"> /// <item>providerTypeCode</item> /// <item>providerSpecialty</item> /// <item>providerSpecialisation</item> /// <item>organisationTypeCode</item> /// <item>organisationService</item> /// <item>organisationServiceUnit</item> /// <item>operatingSystem</item> /// <item>token</item> /// </list> /// </summary> /// <param name="referenceList">A string array of request elements to look up.</param> /// <returns>The current reference data values for the specified elements.</returns> public readReferenceDataResponse ReadReferenceData(string[] referenceList) { Validation.ValidateArgumentRequired("referenceList", referenceList); readReferenceDataRequest envelope = new readReferenceDataRequest(); envelope.readReferenceData = referenceList; envelope.product = product; envelope.user = user; envelope.hpio = hpio; envelope.signature = new SignatureContainerType(); envelope.timestamp = new TimestampType() { created = DateTime.Now.ToUniversalTime(), expires = DateTime.Now.AddDays(30).ToUniversalTime(), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; readReferenceDataResponse1 response1 = null; try { response1 = providerReadReferenceDataClient.readReferenceData(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response1 != null && response1.readReferenceDataResponse != null) { return(response1.readReferenceDataResponse); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
/// <summary> /// Perform the service call. /// </summary> /// <param name="request">The search criteria in a searchHIProviderDirectoryForIndividual object.</param> /// <returns>The search results in a searchHIProviderDirectoryForIndividualResponse object.</returns> private searchHIProviderDirectoryForIndividualResponse HISearch(searchHIProviderDirectoryForIndividual request) { searchHIProviderDirectoryForIndividualRequest envelope = new searchHIProviderDirectoryForIndividualRequest(); envelope.searchHIProviderDirectoryForIndividual = request; envelope.product = product; envelope.user = user; envelope.hpio = hpio; envelope.signature = new SignatureContainerType(); envelope.timestamp = new TimestampType() { created = DateTime.Now, expires = DateTime.Now.AddDays(30), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; searchHIProviderDirectoryForIndividualResponse1 response1 = null; try { response1 = providerSearchHIProviderDirectoryForIndividualClient.searchHIProviderDirectoryForIndividual(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response1 != null && response1.searchHIProviderDirectoryForIndividualResponse != null) { return(response1.searchHIProviderDirectoryForIndividualResponse); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
/// <summary> /// Perform the IHI service call. /// </summary> /// <param name="request">The criteria in a createVerifiedIHI object.</param> /// <returns>The IHI create results.</returns> private createVerifiedIHIResponse IHICreateVerified(createVerifiedIHI request) { createVerifiedIHIRequest envelope = new createVerifiedIHIRequest(); envelope.createVerifiedIHI = request; envelope.product = product; envelope.user = user; envelope.hpio = hpio; envelope.signature = new SignatureContainerType(); envelope.timestamp = new TimestampType() { created = DateTime.Now.ToUniversalTime(), expires = DateTime.Now.AddDays(30).ToUniversalTime(), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; createVerifiedIHIResponse1 response1 = null; try { response1 = createVerifiedIhiClient.createVerifiedIHI(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response1 != null && response1.createVerifiedIHIResponse != null) { return(response1.createVerifiedIHIResponse); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
/// <summary> /// Remove the results of a batch IHI search after the results have been retrieved. /// </summary> /// <param name="batchIdentifier">The batch search identifier for the batch results to be deleted.</param> /// <returns>The status of the delete operation.</returns> public deleteSearchIHIBatchResponse1 DeleteSearchIHIBatch(string batchIdentifier) { Validation.ValidateArgumentRequired("batchIdentifier", batchIdentifier); var envelope = new deleteSearchIHIBatchRequest(); envelope.deleteSearchIHIBatch = new deleteSearchIHIBatch() { batchIdentifier = batchIdentifier }; envelope.product = product; envelope.user = user; envelope.signature = new SignatureContainerType(); envelope.timestamp = new TimestampType() { created = DateTime.Now, expires = DateTime.Now.AddDays(30), expiresSpecified = true }; // Set LastSoapRequestTimestamp LastSoapRequestTimestamp = envelope.timestamp; deleteSearchIHIBatchResponse1 response = null; try { response = ihiBatchClient.deleteSearchIHIBatch(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } return(response); }
/// <summary> /// Perform the IHI service call. /// </summary> /// <param name="request">The criteria in a createVerifiedIHI object.</param> /// <returns>The IHI create results.</returns> private MatchProviderAdministrativeIndividualResponseType MatchProviderAdministrativeIndividualVerified(MatchProviderAdministrativeIndividualRequestType request) { matchProviderAdministrativeIndividualRequest envelope = new matchProviderAdministrativeIndividualRequest(); envelope.matchProviderAdministrativeIndividualRequest1 = request; //TODO : STILL TO DO //envelope.Action = new AttributedURIType(); //envelope.MessageID = new AttributedURIType(); //envelope.Security = new SecurityHeaderType(); //envelope.To = new AttributedURIType(); //envelope.audit = new AuditType(); envelope.product = product; envelope.subjectId = user; matchProviderAdministrativeIndividualResponse response1 = null; try { response1 = matchProviderAdministrativeIndividualClient.matchProviderAdministrativeIndividual(envelope); } catch (Exception ex) { // Catch generic FaultException and call helper to throw a more specific fault // (FaultException<ServiceMessagesType> FaultHelper.ProcessAndThrowFault <ServiceMessagesType>(ex); } if (response1 != null && response1.matchProviderAdministrativeIndividualResponse1 != null) { return(response1.matchProviderAdministrativeIndividualResponse1); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }