ProcessRdci
Purpose
Once you have completed all of the appropriate keys in the DCI, use this function to:
- validate the RDCI record as a unit.
- review interdependencies between fields.
- verify that there are no duplicate pre-existing RDCIs in the database.
- create RDCM records in the RDCM buffer for RDCMs that do not yet exist.
- perform data cascades from the API RDCI record to the existing RDCM records.
After this function verifies that the header is complete, it brings the appropriate DCMs to the buffers, and returns both the API RDCI record and an array containing the RECEIVED_DCM_IDs of all the API RDCM records.
The component items of the RDCI record that are also component items of RDCI_KEYS_REC — Investigator and Site, for example — might be implicitly assigned by this function. The component items of the RDCI record that are not component items of the RDCI_KEYS — Patient Position ID and Internal Timestamp, for example — are derived from the interface and implicitly returned by the system. For this reason the function returns the updated API RDCI record in the output parameter RDCI_REC.
Syntax
short int ProcessRdci(RdciRecord
*rdci_rec
,
RdcmArr
*rdcm_arr
);
Parameters
rdci_rec
(out) The updated contents of the API RDCI record in a RdciRecord structure.
rdcm_arr
(out) A RdcmArr structure consisting of an array of the RECEIVED_DCM_IDs of all API RDCM records and the number of elements in that array.
Return Value
SUCCESS
or FAILURE
or WARNING
.
Comments
This function fails if:
- The API RDCI buffer is empty.
- The API RDCI record exists in the database and has not been locked.
To learn about locking the API RDCI record see FetchRdci, WriteRdciRdcm, WriteResponses,and FlushResponses.
To validate the API RDCI record as a unit, this function:
- checks that all the mandatory items in the API RDCI record are populated.
- performs cross-item validation.
- performs uniqueness validation for the API RDCI record.
In interactive applications, at any point in time, the FE is working on one buffer only; either the FE RDCI buffer or the FE RDCM buffer. If it wants to switch from working on the FE RDCI buffer to working on the FE RDCM buffer, it should follow these steps first:
- Call ProcessRdci if there are changes pending in the API RDCI record that have not been processed through a call to ProcessRdci.
- Refresh the FE RDCM buffer because step 1 could have resulted in changes being cascaded to the API RDCM records. Cascaded changes will include deleting the existing API RDCM records and creating new ones in case the FE has changed the DCI_NAME in the API RDCI record. In this case the FE should clear the FE RDCM buffer altogether and populate it with the new API RDCM records.
To write the contents of the API RDCIRDCM buffer to the database, see WriteRdciRdcm. WriteRdciRdcm fails if there are changes pending in the API RDCI record that have not been processed through a call to ProcessRdci.
Error Messages
Table 7-26 Error Messages for ProcessRdci
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. |
286600 |
ERR |
Audit reason required and not provided. |
289900 |
ERR |
Document number not derived. |
290000 |
ERR |
Duplicate Received DCI found with the same keys in document number: \0. |
290300 |
ERR |
Current record is not complete: Operation was not successful. |
290500 |
ERR |
This site/investigator pair is invalid for this study. |
291500 |
WRN |
Subevent not found: actual event will be created once you save. |
292000 |
ERR |
Blank flag must be entered. |
292100 |
ERR |
Clinical planned event name must be entered. |
292200 |
ERR |
Patient must be entered. |
292300 |
ERR |
DCI name must be entered. |
292400 |
ERR |
Site is required. |
292800 |
ERR |
DCI date must be entered. |
293000 |
ERR |
Subevent number must be entered. |
293600 |
ERR |
Too many actual events correspond to this subevent #. |
295100 |
WRN |
Site/investigator pair is not current in study. |
295300 |
ERR |
An error occurred querying DVGs for an RDCM. |
297000 |
ERR |
Null or invalid input pointers provided. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
307000 |
ERR |
Cannot call this function if you have not locked the record. |
307100 |
ERR |
Investigator is required. |
307200 |
ERR |
DCI Time is required. |
307300 |
WRN |
Lab could not be defaulted. |
307600 |
ERR |
Can not log-in data for a patient that is not associated with a book in a study with no default DCI book. |
308200 |
ERR |
The DCI book assigned to this patient is not active. Can not use a DCI book that is not active to log data in a production environment. |
308500 |
ERR |
The current DCI book is Retired and the environment is Test. |
311800 |
WRN |
Patient not assigned to this site. |
Related Functions
Parent topic: Data Capture API Functions