GetResponse
Returns response value and comments as well as an indicator of whether any discrepancy information exists for the response. Also returns the response ID.
Syntax
short int GetResponse(ResponseId*response_identifier,ResponseData*response_data,double*response_id,short int*disc_type);
Parameters
response_identifier (in) A ResponseId structure containing the unique identifier for this response.
response_data (out) A pointer to the ResponseData structure containing the data for this response and the data comment for this response.
response_id (out) The response_id of the response identified by a response_identifier.
disc_type (out) Indicates whether or not the response has a discrepancy. If yes, it describes the discrepancy type which may be univariate (U), manual (M), or both (B).
Return Value
SUCCESS or FAILURE.
Comments
InitializeRdcmResponses should be called before calling GetResponse to initialize the API Responses buffer with the definition of the DCM.
The response_identifier uniquely identifies the response that is being processed by the external system. Upon calling this function, Oracle Clinical locates the response in its internal structure and gets the data, comment and discrepancy information for this response into the output variables. The output variables, which are provided to hold the data, comment and discrepancy information, should be allocated by the calling routine.
If this is a new document, and SetResponseData and/or SetDataComment and/or SetUnivDiscrepancy has never been called for this response, NULL values would be used to populate the output variable. Otherwise, the data from the last SetResponseData and/or SetDataComment and/or SetUnivDiscrepancy call would be returned. This applies also in the case of existing documents, with one exception:
- if the question has a repeating default, even if SetResponseData has not been called for the response, the value of the repeating default, if provided, is returned.
For ordinary defaults, the default value is returned only for the first repeat. For repeats greater than 1, SetResponseData must be called with the appropriate default value.
Note:
The discrepancy information is only an indicator of whether or not any discrepancies exist for this response. To get the actual value of the discrepancy, use GetUnivDiscrepancy.Error Messages
Table 7-22 Error Messages for GetResponse
| Number | Severity | Message |
|---|---|---|
|
284900 |
ERR |
User does not have the privilege to call function in the current mode. |
|
285000 |
ERR |
Function called out of sequence. |
|
285900 |
ERR |
No current OCL database connection open. Use ConnectOCL to connect to OCL database. |
|
286600 |
ERR |
Audit reason required and not provided. |
|
286700 |
ERR |
Cannot locate the corresponding DCM question in the internal OCL buffers for the DCM question ID passed. |
|
286800 |
ERR |
No response in the internal buffers for the question. |
|
286900 |
ERR |
No existing univariate discrepancy for the question. |
|
287000 |
ERR |
DCM question and DCM question group combination does not exist in DCM. |
|
287100 |
ERR |
DCM question group does not exist in DCM. |
|
288000 |
ERR |
Repeat sn does not exist for DCM question group. |
|
304600 |
ERR |
Function does not exist. |
|
304700 |
ERR |
Privilege does not exist. |
Related Functions
InitializeRdcmResponses, SetDataComment, SetResponseData, SetUnivDiscrepancy, GetUnivDiscrepancy, GetManualDiscrepancy
Parent topic: Data Capture API Functions