// GET: api/SignedDocument/5
        public string Get(string id)
        {
            string s1 = id;

            ContractBuilderDocumentSearch oBuilderDocumentSearch = new ContractBuilderDocumentSearch();
            Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchRequest2 documentListSearchRequest = new Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchRequest2();
            Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchResponse documentListSearchResponse = new Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchResponse();
            documentListSearchRequest = oBuilderDocumentSearch.BuildDocumentSearchRequest(id);
            EmployeeDesktop.API.SearchDocumentSearch ocallSearchDocument = new SearchDocumentSearch();
            documentListSearchResponse = ocallSearchDocument.GetDocumentFromSearch(documentListSearchRequest, "192.168.192.11");
            return "value";
        }
        public Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchRequest2 BuildDocumentSearchRequest(string patientID)
        {
            try
            {
                // declare new instnce of each object
                Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchRequest2 oRequest = new Greenway.PrimeSuite.DataContracts.Document.DocumentListSearchRequest2();
                List<Greenway.PrimeSuite.DataContracts.Document.DocumentStatus> documentStatusList = new System.Collections.Generic.List<Greenway.PrimeSuite.DataContracts.Document.DocumentStatus>();
                documentStatusList.Add(Greenway.PrimeSuite.DataContracts.Document.DocumentStatus.Authenticated);
                oRequest.DocumentStatus = documentStatusList;

                oRequest.PatientID = long.Parse(patientID);

                oRequest.Credentials = new Greenway.PrimeSuite.DataContracts.API.Credentials();
                oRequest.Credentials.PrimeSuiteCredential = new Greenway.PrimeSuite.DataContracts.API.PrimeSuiteCredential();
                oRequest.Credentials.VendorCredential = new Greenway.PrimeSuite.DataContracts.API.VendorCredential();
                oRequest.Header = new Greenway.PrimeSuite.DataContracts.API.Header();

                // populate the PrimeSuite Credentials
                oRequest.Credentials.PrimeSuiteCredential.PrimeSuiteSiteId = "asdf";
                oRequest.Credentials.PrimeSuiteCredential.PrimeSuiteUserAlias = "";
                oRequest.Credentials.PrimeSuiteCredential.PrimeSuiteUserName = "******";
                oRequest.Credentials.PrimeSuiteCredential.PrimeSuiteUserPassword = "******";

                // populate the Vendor Credentials
                oRequest.Credentials.VendorCredential.VendorLogin = "******";
                oRequest.Credentials.VendorCredential.VendorPassword = "******";
                //visitSearchRequest.Credentials.PrimeSuiteCredential.PrimeSuiteUserName = "******";
                //visitSearchRequest.Credentials.PrimeSuiteCredential.PrimeSuiteUserPassword = "******";

                // populate the Vendor Credentials
                oRequest.Header.SourceSiteID = "";
                oRequest.Header.PrimeSuiteUserID = 1038; // pull this from the table in the long run.
                oRequest.Header.DestinationSiteID = "asdf";

                return oRequest;
            }
            catch (Exception ex)
            {
                //do something
                throw ex;
            }
        }