eClaims Document Web Service

eClaims is a multi-trust processing center currently processing claims for the Manville, Thurston, and USM Trusts.  CRMC provides a web service for entering claimant and claim data for each trust.  A separate web service is provided for uploading and downloading documents.  The WSDL for the eClaims Document service is found in file https://ws.claimsres.com/WSDOC/eClaimsDocSvc.svc?wsdl.

 

 

Operations:

 

The following operations are supported. 

 

·         AddDoc – Add (or Upload) a document to eClaims for the specified claim and document form type optionally adding a note to accompany document.  

                                                                                                                  

·         GetDoc – Retrieve a document from eClaims for the specified claim ID and either a document ID or document type code.

 

 

Requirements

 

The WSDL is provided to allow you to be able to construct SOAP messages that conform to it.

 

The service is built to accept MTOM encoding of messages with buffered output.  You may find that you’ll need to increase the maxArrayLength for larger files in your binding.  The maximum size file accepted is:  10 MB. 

 

It is recommended you use Microsoft Visual Studio .NET 2008 or later.

 

Each customer must be granted permission to use the eClaims web service.  To get started, a sample program showing how to access the web site using Microsoft Visual Studio 2008 and C# is provided. 

 

Sample

 

Code Snippet

Here is a sample of how to connect to the web service to upload a file to eClaims

 

                                                eClaimsWSDocClient proxyDoc = new eClaimsWSDocClient(); ;

 

                                                string username = "ValidEClaimsUserName";

                                                string password = "ValidPassword"; 

                                                // Set the username and password to a valid eClaims username and password using an existing account

                                                proxyDoc.ClientCredentials.UserName.UserName = username;

                                                proxyDoc.ClientCredentials.UserName.Password = password;

 

                                                // Get list of valid occupations for the Manville Trust

                                                AddDocMessage msg = new AddDocMessage ();

                                                msg.ClaimID = 11111111;   // valid claim id

                                                msg.docTypeCD = “Medical”;   // valid document form type code

                                                msg.fileName = “Meds_11111111.pdf”   // valid claim id

                                                int documentId = 0;

                                                try

                                                {

                                                                using (FileStream uploadFS = new FileStream(fileName,FileMode.Open,FileAccess.Read, FileShare.Read))

                                                                {

                                                                                long fileLength = (int)uploadFS.Length;

                                                                                if (fileLength > 10240000)

                                                                                                throw new IOException("File too big for transfer");

                                                                                msg.data = new byte[(int)fileLength];

                                                                                int bytesRead = uploadFS.Read(msg.data, 0, (int)fileLength);

                                                                }

 

                                                                // Call web service with data

                                                                documentId = proxy.AddDoc(msg.claimID, msg.docTypeCD, msg.fileName, msg.data);

                                                                Console.WriteLine("Successfully uploaded file. Document Id = " + documentId.ToString();

 

                                                                text_results.Text = "Successfully uploaded file. Document Id = " + documentId.ToString();

 

                                                                // Close the Session

                                                                proxy.Close();

 

                                                }

                                                catch (System.ServiceModel.FaultException<eClaims.API.eclaimsAppFault> ee)

                                                {

                                                                Console.WriteLine(" Fault Exception Occcured: " + ee.Detail.Reason);

                                                                proxy.Close();

                                                                return;

                                                }

 

Extensive Sample Program

A more extensive sample is provided by downloading the MS VS 2008 project at https://ws.claimsres.com/eclaims%20Doc%20Web%20Service/DocSample/SampleDocConsole.zip.  This sample shows how to get the required documents for a claim and upload a document for the claim to the eClaims system.  There are several areas of code that you must modify to get this to work for you.  First, please verify the app.config file endpoint address is set to: https://ws.claimsres.com/WSDoc/eClaimsDocSvc.svc

 

         <endpoint address="https://ws.claimsres.com/WSDOC//eClaimsDocSvc.svc" binding="basicHttpBinding"

          bindingConfiguration="BasicHttpBinding_eClaimsWSDoc" contract="eClaimsWSDoc"

          name="BasicHttpBinding_eClaimsWSDoc" />

 

Next, open the SampleDocProgram.cs file and find the Main.  Set the username and password to an authorized eClaims user.   Find the claimID definition and change it to a valid claim that the user has access to inside of eClaims.  At this point, you should be able to build the program and execute it from a console window to see if you can get a list of required documents for the claim and to upload a document for the claim.

 

Steps to Creating a VS 2008 application

 

To create a Windows Application project from scratch using VS 2008:

  1. Select File->New->Project
  2. Select Windows and then Console Application (note, this could be any Windows or Web project type)
  3. Specify the location and name of the project (i.e. “SampleConsole”)
  4. Open a “Visual Studio 2008 Command Prompt” window
  5. Create the proxy against the wsdl files supplied by entering the following command:

 

svcutil /d:.  /o:docserviceproxy.cs /config:app.config .\*.wsdl .\*.xsd

 

  1. Copy the docserviceproxy.cs and app.config file to your new project and include both files in the project.  Please note, if you are using both eClaims web services, you will have to take out the duplicate definitions defined in the docserviceproxy in order to build the system (these are eclaimsAppFault and TrustCode).  Also note, that the app.config files will need to be consolidated into one file with both bindings and endpoints defined in it.
  2. Add in a reference to System.Runtime.Serialization and System.ServiceModel .Net dlls into your project.
  3. Add in code similar to the sample above including your eClaims user name and password for each web service call.
  4. Write your program to make eClaims Web service calls and test