InitializeRdcmResponses
Once you have created a record for a received DCI using CreateRdci or fetched a record using FetchRdci, you may add response data. InitializeRdcmResponses initializes the DCM, responses, and discrepancies information and then sets up the document for your chosen mode of data entry. Use this function when you want to pull up a response in the database. Calling this function sets up the buffer structure either with data or without data depending upon the information that has already been saved.
InitializeRdcmResponses allows authorized users to:
- open documents in Browse mode in order to create user comments (manual discrepancies).
- open locked documents in Update mode in order to browse for comments.
Syntax
short int InitializeRdcmResponses(double
received_dcm_id
,
int
responses_mode
);
Parameters
received_dcm_id
(in) The internal key for this document.
responses_mode
(in) The mode to be used for the execution of this function. Valid values for this mode include:
- INITIAL_LOGIN
- KEY_CHANGES
- FIRST_PASS_ENTRY
- UPDATE
- BROWSE
Return Value
SUCCESS
or FAILURE
or WARNING
.
Comments
InitializeRdcmResponses handles memory allocation. If you attempt to set or get response values for a question in a particular repeat in a question group without creating a repeat first, you will receive an error message. For more information about memory allocation, see "Memory Allocation Rules for Data Entry".
Prior to calling this function, the RDCIRDCM buffers must be populated. The external application obtains the received_dcm_id from the stable views or from RDCI/RDCM APIs. The received_dcm_id uniquely identifies the document that is being used by the external system. Upon calling this function, Oracle Clinical initializes its internal structures with the definition of the DCM for which this document has been or will be entered and the data (if any) that had been earlier entered for this document. If this is a new document — a document with no existing data — the responses for the first repeat in all the question groups in this document are initialized to BLANK and the remaining repeats are not initialized.
An error is returned if:
- the document status is incompatible with the mode of data entry — for example, if the user attempts to update responses on a document with status RECEIVED.
- the mode of data entry is incompatible with the mode of Log-In — for example, if the user attempts in Log-In to update a document reserved in non-locking mode.
- the user does not have the adequate privileges for the attempted data entry operation.
- the study is not enabled for data entry in production mode.
Error Messages
Table 7-24 Error Messages for InitializeRdcmResponses
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. |
286100 |
ERR |
RDCM with this received_dcm_id does not exist. |
286200 |
ERR |
Status of Received DCM with this received_dcm_id is incompatible with data entry mode. |
286300 |
ERR |
Locking mode incompatible with data entry mode. |
286500 |
ERR |
Study is not enabled for data entry. |
286600 |
ERR |
Audit reason required and not provided. |
293800 |
WRN |
You are working with a data locked record and have privileged update. |
297100 |
ERR |
Changes pending. |
298600 |
WRN |
Invalid mode value. |
299100 |
ERR |
No data has been entered for this RDCM. |
299900 |
ERR |
Cannot proceed when blank flag is set to Y. |
300100 |
ERR |
Only the user who performed Pass 1 Entry can perform data entry task. |
300200 |
ERR |
This patient is frozen. |
300300 |
ERR |
This Received DCI is data locked. |
300500 |
ERR |
First pass entry cannot be performed on an accessible RDCM. |
300600 |
ERR |
RDCI status not compatible with the mode. |
301500 |
ERR |
Data entry is not enabled for the clinical study. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306600 |
ERR |
This received DCM is locked. |
Related Function
Parent topic: Data Capture API Functions