cdd_getProcessList

Purpose:

Gets a list of processes.

Parameters (json array)

  • serviceName (string) = “dataDictionary”
  • function (string) = “cdd_getProcessList”

Notes

  • O

Results (json array)

  • Status (string).  (“0″=Success, “1”=Not Successful)
  • statusMessage (string) (“Empty”,”Results”)
  • data (json array) (the results if not empty)

Example

Click here for an example.

cdd_getDatasetELementList

Purpose:

Gets a list of elements in a dataset.

Parameters (json array)

  • serviceName (string) = “dataDictionary”
  • function (string) = “cdd_getDatasetELementList”
  • Dataset ID (string)

Notes

  • O

Results (json array)

  • Status (string).  (“0″=Success, “1”=Not Successful)
  • statusMessage (string) (“Empty”,”Results”)
  • data (json array) (the results if not empty)

Example

Click here for an example.

ccb_getDatasetList

Purpose:

Gets a list of data sets.

Parameters (json array)

  • serviceName (string) = “dataDictionary”
  • function (string) = “cdd_getDatasetList”
  • codeID(string)

Notes

  • O

Results (json array)

  • Status (string).  (“0″=Success, “1”=Not Successful)
  • statusMessage (string) (“Empty”,”Results”)
  • data (json array) (the results if not empty)

Example

Click here for an example.

cdd_getCodeValue

The webServiceURL= The worksheetURL=https://contentbroker.ca/api-example/ Press here to see an example.

Purpose:

Gets the value of a given codeValueID.

Service Parameters (json array)

  • serviceName (string) = “content”
  • function (string) = “ccb_getCodeValue”

Key Parameters

  • codeValueid (string) Required

Notes

  • If a FollowupID is provided, the service returns the elements for that event only.
  • Data Parameters

    A the value of the codeValueID.

  • Results (json array)

    • Status (string).  (“0″=Success, “1”=Not Successful)
    • statusMessage (string) (“Empty”,”Results”)
    • data (json array) (the results if not empty)
function getCodeValue_example(){ 
       $rm_options = get_option('ccb_option_name');    
  ?>
        <br><strong><a href="<?php echo $_GET['returnURL'];?>">Back</a></strong><p>
      <?php  
      
    try {  
        
        // old way 
        $endPointURL = $webserviceURL ;
 
            
        // new way 
        $endPointURL = $webserviceURL ;
        $postParameters = array(
            "serviceName" => "dataDictionary", 
            "function" => "cdd_getCodeValue"
          ) ;
          
         $data_ar = array(   
             "CodeValueID" => "278" // 
          );  
      
        util_dump_var($postParameters, "Post Parameters") ;
        util_dump_var($data_ar, "Data Parameters") ;
        $transData_json = json_encode($data_ar); 
        $response = wp_remote_post( $rm_options['webservice_url'], array(
            'method'      => 'POST',
            'timeout'     => 45,
            'redirection' => 5,
            'httpversion' => '1.0',
            'blocking'    => true,
            'headers'     => array(),
            'body'        => array(
                "serviceName" => $postParameters["serviceName"], 
                "function" =>  $postParameters["function"], 
                "transData" => $transData_json  
            ),
            'cookies'     => array()
            )
        ); 
        if ( is_wp_error( $response ) ) {
            $error_message = $response->get_error_message();
            util_log("Web service error in:" . $postParameters["service"]  . " " .  $postParameters["function"] . " " .  $error_message);
        } else { 
        }  
  
        $obj = json_decode($response['body'], true); 
        $responseData = $obj["data"] ; 
        util_dump_var($responseData, "wp_remote_post response") ;
        return $responseData ;  
        
        
    }
    
    catch (Exception $e) {
          return "<br>searchImportTables_example Error: " . $e->getMessage();
    } 
}  

cdd_getCodePossibleValues

Purpose:

For a given code table, the function gets it’s possible values. MaritalStatusCd is given in the example. Gets and array of codeValueIDs and possible values (label_med) of a given codeID.

Parameters (json array)

  • serviceName (string) = “dataDictionary”
  • function (string) = “cdd_getCodePossibleValues”
  • CodeID (string) required

Results (json array)

  • Status (string).  (“0″=Success, “1”=Not Successful)
  • statusMessage (string) (“Empty”,”Results”)
  • data (json array) (the results if not empty)

ccb_getCommentLog

Purpose:

Gets a list of the comments from events for a given client’s file.

Service Parameters (json array)

  • serviceName (string) = “content”
  • function (string) = “ccb_getCommentLog”

Key Parameters

  • clientID (string) Required
  • FollowupID (string) optional
  • Notes

    • If a FollowupID is provided, the service returns the elements for that event only.
    • Data Parameters

      A key value pair of the data element and it’s value.

    Results (json array)

    • Status (string).  (“0″=Success, “1”=Not Successful)
    • statusMessage (string) (“Empty”,”Results”)
    • data (json array) (the results if not empty)

    Example

    Click here for an example.

ccb_getElementValues

Purpose:

Gets all the element values for a given client ID, or only the element values for a particular event ID.

Service Parameters (json array)

  • serviceName (string) = “content”
  • function (string) = “ccb_getElementValues”

Key Parameters

  • clientID (string) Required
  • FollowupID (string) optional
  • Notes

    • If a FollowupID is provided, the service returns the elements for that event only.
    • Data Parameters

      A key value pair of the data element and it’s value.

    Results (json array)

    • Status (string).  (“0″=Success, “1”=Not Successful)
    • statusMessage (string) (“Empty”,”Results”)
    • data (json array) (the results if not empty)

    Example

    Click here for an example.

ccb_search

Purpose:

Searches content for matching data elements with values matching the criteria described in an array of key value pairs and returns the values of the data elements as described in the array of return elements.

Service Parameters (json array)

  • serviceName (string) = “content”
  • function (string) = “ccb_search”

Search Parameters

  • ccbUserID (string) Required
  • At least one  key value pair of Data Element and search it’s search criteria
  • Return Parameters

      • At least one Data Element to return

    Notes

          • Returns a maximum of 100 records
          • String searches that contain a wild card (“%”) are searched with a “LIKE” statement.

    Results (json array)

          • Status (string).  (“0″=Success, “1”=Not Successful)
          • statusMessage (string) (“Empty”,”Results”)
          • data (json array) (the results if not empty)

ccb_dataTransaction

Purpose:

Applies a value pair array of data elements and values to a new or existing file. All the transactions are grouped as a form packed together as an event.

Service Parameters (json array)

  • serviceName (string) = “content”
  • function (string) = “ccb_dataTransaction”

Key Parameters

  • processID (string> Required
  • formID (string)
  • EventID (string)
  • parentID (string)
  • clientID (string)
  • fileID
  • ccbUserID
  • firstName (string) Required
  • lastName (string) Required
  • appendValues(boolean)
  • userID (string) Required (/li>
  • assignedTo (string) Required
  • Notes

    • If no EventID is provided, the service creates one based on the characteristics described in the ProcessID.
    • If no clientID is provided, the service creates one. If it creates a possible duplicate record, the service returns ClientIDs of the possible duplicates.
    • If no fileID is provided, the service creates one.
    • Depending on the settings of the ProcessID, the service will change the file status, generate automatic Events, generate additional data elements and identify the type of the transaction event as required.
    • Data Parameters

      A key value pair of any data element and it’s value.

    Results (json array)

    • Status (string).  (“0″=Success, “1”=Not Successful)
    • statusMessage (string) (“Empty”,”Results”)
    • data (json array) (the results if not empty)

    Example

    Click here for an example.

    stringParserTestExample

    Purpose:

    To demonstrate the utility to parse through a string to create an array of key/value pairs for data elements within the string.

    Parameters (json array)

    • serviceName (string) = “ama”
    • function (string) = “ama_stringParser”
    • Subject(string)
    • To(string)
    • From(string)
    • Body(string)

    Notes

    • If the string is an email, provide the key value pairs for the related data elements
    • If the string is not an email, put the string in the Body item.

    Results (json array)

    • Status (string).  (“0″=Success, “1”=Not Successfull)
    • statusMessage (string) (“Empty”,”Results”)
    • data (json array) (the results if not empty)

    Example

    Click here for an example.