SetResponseData

Updates data and audit information, if any, for the response in the Oracle Clinical internal structure and returns any univariate discrepancy raised.

Syntax

short int SetResponseData(ResponseId *response_identifier,
    ValueText *value,
    AuditInfo *audit_comment,
    DiscInfo *return_discrepancy_info,
    DCIAPIFlag *needs_audit);

Parameters

response_identifier (in) The ResponseId definition containing the unique identifier for this response.

value (in) A pointer to the ValueText structure containing the data for this response.

audit_comment (in) An AuditInfo structure holding the audit comment for this response.

return_discrepancy_info (out) A DiscInfo structure containing the discrepancy information for this response.

needs_audit (out) Indicates whether the response requires audit comment.

Return Value

SUCCESS or FAILURE or WARNING.

Comments

The response_identifier uniquely identifies the response that is being processed by the external system. Upon calling SetResponseData, Oracle Clinical locates the response in its internal structure and updates the audit comment information for this response from the input variables provided for holding this information. These input variables should be allocated and initialized before calling the routine.

While updating the data, the function checks the data for a univariate discrepancy and returns any discrepancy found in the structure provided for that purpose. If updating the data clears existing discrepancies, the discrepancy buffer is also cleared.

If this document is accessible and the API is in UPDATE mode, the audit comment is mandatory. SetResponseData returns FAILURE if the audit comment is needed but not provided — however, the internal buffers are updated with the rest of the information provided and the needs_audit flag is set. The user must call SetResponseData again with the missing audit comment information before calling any other API functions which will return FAILURE if invoked. Once the response has been updated with the audit comment information, you may continue with further processing by invoking other API functions.

If the RDCM is accessible, then the audit comment is mandatory to change the data. Otherwise, the API function will return FAILURE if the audit comment is not supplied.

Note:

It is possible to enter response values for non-displayed, non-enterable and derived questions. The SetResponseData API does not check for such properties of the question and leaves control with the external system.

Error Messages

Table 7-36 Error Messages for SetResponseData

Number Severity Message

284800

ERR

Function not available in this mode.

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.

306800

ERR

Invalid audit reason.

312500

ERR

Can not update repeating defaults when repeat sn is less than the maximum repeats expected for DCM question group.