The beginning of the chapter lists the Functions Grouped by Task that comprise the Oracle Clinical API. Each function is listed alphabetically by function name, and includes:
a brief description of the function
the syntax for calling it
its input and output parameters
return values and their meaning
comments, which provide more information about the function including restrictions on its usage. Details about the task or tasks a function performs appear in this section.
a list of error messages that the call can generate
related functions in the DCAPI
Table 7-1 groups the API functions by their task. These functions are listed alphabetically throughout the rest of this section.
All – refers to a function that can be used throughout the API development process.
Data Entry – refers to a function that processes response data.
Log-In – refers to a function that processes RDCI/RDCM data.
Standalone – refers to a function that is not related to the other functions.
Connects the user to an Oracle Clinical database in either Production or Test mode.
short int ConnectOCL(char *user, char *password, char *database, short int mode, double *sessionid);
user
(in) The OCL database user name.
password
(in) The OCL database user password.
database
(in) The OCL database name.
mode
(in)
Either OCL_TEST
or OCL_PROD
for a standalone application.
Either 2
(Production) or 3
(Test) to share the same database session.
Note:
In Oracle Clinical on Forms 10g (4.6 and higher), when invoking this function to share the same database session that is used by Oracle Forms, use a mode value of2
for Production and 3
for Test mode. When invoking the function from a standalone application (not via Oracle Forms), use a mode value of OCL_PROD
for Production and OCL_TEST
for Test mode.sessionid
(out) The session ID for the current session.
Table 7-2 Error Messages for ConnectOCL
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. |
285700 |
ERR |
An open database connection already exists. Use DisconnectOCL to close the connection. |
297000 |
ERR |
Null or invalid input parameters provided. |
302200 |
ERR |
Mode should be OCL_PROD or OCL_TEST. NOTE: A mode value of 2 should be used for Production and 3 for Test mode when invoking the ConnectOCL DCAPI function to share the same database session. |
303800 |
ERR |
Cannot find location_code in the reference codelist for the current connection. |
304900 |
WRN |
User has been granted too many roles: exceeds the maximum allowed. |
305000 |
WRN |
Too many messages. |
Creates a new Received DCI for a patient.
short int CreateRdci(RdciKeysRecord *rdci_keys_rec, int rdcirdcm_mode, RdciRecord *rdci_rec );
rdci_keys_rec
(in) A structure of type RdciKeysRecord containing the key values of the API RDCI record to be created.
rdcirdcm_mode
(in) The mode to be used for executing this function. It also stays in effect as the RDCIRDCM mode up to the next call of either CreateRdci or FetchRdci. Values are INITIAL_LOGIN
or KEY_CHANGES
.
rdci_rec
(out) A structure of type RdciRecord that the function fills in with the content of the created API RDCI record.
The function creates an RDCI record in the API RDCI buffer using the keys passed in, and returns the contents of the API RDCI record created. The component items of an API RDCI record that are not component items of rdci_keys_rec, such as all the numeric ID items, are implicitly assigned by this function. You use this function to:
flush the RDCIRDCM buffer.
validate each individual non-null item passed in rdci_keys_rec.
All of these items must pass validation in order for the creation to take place; otherwise no creation takes place and the function returns FAILURE. The RDCI-RDCM buffer will still be empty as a result of the flush.
You use SetRdci to:
assign values to the items of API RDCI record that are not assigned by CreateRdci.
change the values of the items assigned by CreateRdci.
Table 7-3 Error Messages for CreateRdci
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. |
289800 |
ERR |
This document already exists in the database. |
290500 |
ERR |
This site/investigator pair is invalid for study. |
290600 |
ERR |
Invalid investigator. |
290700 |
ERR |
Invalid site. |
290800 |
ERR |
Patient position is frozen. |
290900 |
WRN |
Patient not enrolled for this study. |
291000 |
ERR |
Patient position is invalid. |
291200 |
ERR |
DCI is inactive or invalid. |
291300 |
ERR |
[error message returned by OCL_CLIENT_PACK. Validate document] |
291400 |
ERR |
Clinical planned event is invalid for the current study. |
294600 |
ERR |
Document found in different study. Change study to access. |
294900 |
WRN |
Site is currently inactive. |
295000 |
WRN |
Investigator is currently inactive. |
296600 |
ERR |
Cannot preserve a lock when performing a rollback. |
297000 |
ERR |
Null or invalid input pointers provided. |
297100 |
ERR |
Changes pending. |
299000 |
ERR |
Only browse mode can be performed on a frozen study. |
299700 |
WRN |
The data entered for this received DCI will be deleted. |
299800 |
ERR |
Date cannot exceed today's date. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
305600 |
ERR |
Invalid DCI date. |
305700 |
ERR |
Invalid DCI time. |
308700 |
ERR |
Cannot set RDCI time until RDCI short name is set. |
308800 |
ERR |
DCI short name is not applicable. |
309100 |
ERR |
Document number is not applicable. |
309200 |
ERR |
Patient is not applicable. |
309400 |
ERR |
Date is not applicable. |
309600 |
ERR |
Time is not applicable. |
309800 |
ERR |
Visit name is not applicable. |
310000 |
ERR |
Subevent number is not applicable. |
310200 |
ERR |
Site is not applicable. |
310400 |
ERR |
Investigator is not applicable. |
310600 |
ERR |
Blank flag is not applicable. |
310800 |
ERR |
Comment is not applicable. |
311600 |
ERR |
DCI document number can not be updated to null. |
311700 |
ERR |
Document number must not have any lower case. |
Deletes the currently buffered RDCI record from the database along with all of its accompanying RDCMs, Responses, Discrepancies, and Actual Events (if not referenced by another RDCI or RDCM). DeleteRdci also performs a database commit and clears the API RDCIRDCM buffer.
Table 7-4 Error Messages for DeleteRdci
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. |
297100 |
ERR |
Changes pending. |
306200 |
ERR |
RDCI record being deleted does not exist in the database. |
306800 |
ERR |
Invalid audit reason. |
312200 |
ERR |
Cannot delete Received DCI as it is Data Locked. |
317800 |
ERR |
Cannot delete accessible Received DCI in Initial Login Mode. |
659700 |
ERR |
No default audit reason. |
659800 |
ERR |
More than one default audit reason found. |
660000 |
ERR |
Cannot use system-generated audit reason. |
Deletes a question group repeat from the API responses buffer.
repeat_identifier
(in) A parameter of type RepeatId, which contains the unique identifier for the question group repeat and the AuditInfo structure for this repeat.
This function re-sequences all repeats following the one that was deleted, if any, by subtracting 1 from the repeat sequence number for all questions in the group in those repeats.
Table 7-5 Error Messages for DeleteRepeat
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. |
297100 |
ERR |
DCM question group does not exist in the DCM. |
287800 |
ERR |
Cannot delete repeats in browse mode. |
287900 |
ERR |
Cannot delete repeat for a non-repeating question group. |
288000 |
ERR |
Repeat sn does not exist for DCM question group. |
288100 |
ERR |
Cannot delete for repeating defaults when repeat is less than the maximum repeats for DCM question group. |
297000 |
ERR |
Null or invalid input pointers provided. |
302600 |
ERR |
No existing manual discrepancy for this question. |
306800 |
ERR |
Invalid audit reason. |
313600 |
WRN |
You have privileged update and have deleted repeating default when repeat sn is less than the maximum repeats for DCM question group. |
659700 |
ERR |
No default audit reason. |
659800 |
ERR |
More than one default audit reason found. |
660000 |
ERR |
Cannot use system-generated audit reason. |
685900 |
ERR |
Audit comment for Deletion of Repeat cannot have more than 158 bytes. |
Ends the current Oracle Clinical database connection.
Table 7-6 Error Messages for DisconnectOCL
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. |
286000 |
ERR |
Cannot disconnect while changes are pending for RDCI/RDCM work. |
302300 |
ERR |
Cannot disconnect while changes are pending for responses work. |
Enrolls a patient in the current study.
pat_pos_id
(in) The PATIENT_POSITION_ID for the patient you want to enroll. This parameter is the unique identifier in the database.
pat_rec
(in) A structure of type PatientRecord.
Table 7-7 Error Messages for EnrollPatient
Number | Severity | Message |
---|---|---|
285000 |
ERR |
Function called out of sequence. |
285900 |
ERR |
No current OCL database connection open. Use ConnectOCL to connect to OCL database. |
288900 |
ERR |
Cannot enroll a patient when RDCI is locked. |
297000 |
ERR |
Null or invalid input pointers provided. |
302400 |
WRN |
Zero rows being updated |
303600 |
ERR |
Invalid patient. |
304800 |
ERR |
User is not authorized to call this function. |
Launches multivariate Procedure execution.
short int ExecuteMultivariate(MvInfo *mv, DCIAPIFlag preserve_lock), double *return_job_id));
mv
(in) Criteria for multivariate validation submission. This parameter is a structure of type MvInfo.
preserve_lock
(in) A flag indicating whether the lock on the API RDCI record should be preserved or released. If the value is TRUE, the lock remains; if the value is FALSE, the lock is released.
return_job_id
(out) A unique identifier of the submitted job.
This function allows the calling application to submit multivariate Procedures for execution. Execution is performed on demand for a given patient, either on a DCM basis or not, depending upon the criteria chosen for submission. Once this function is called, control is immediately returned to the application; all processing takes place in the background. As soon as the function completes its processing, the results of the execution become available in Oracle Clinical tables. For information about how to define the execution context for a Procedure, see "Procedure Classification".
From the API submission, the returned argument (return_job_id) acts as a handle for subsequent status/results polling.
Execution is tracked in a table called MV_EXECUTION_LOG, which contains the information that is listed in the following table.
Table 7-8 MV execution log information
Column Name | Type/Size | Nullability | Possible Values |
---|---|---|---|
JOB_ID |
NUMBER |
NOT NULL |
|
SESSION_ID |
NUMBER |
NOT NULL |
|
EXECUTION_STATUS |
VARCHAR2(15) |
NOT NULL |
SUBMITTED, |
OUTCOME_STATUS |
VARCHAR2(15) |
||
EXECUTION_SUBMITTED_TS |
DATE |
NOT NULL |
|
EXECUTION_START_TS |
DATE |
||
EXECUTION_END_TS |
DATE |
||
EXECUTION_CONTEXT |
VARCHAR2(15) |
NOT NULL |
|
PROCEDURE_ID |
NUMBER(10) |
||
PROCEDURE_VERSION_SN |
NUMBER(3) |
||
PATIENT_ID |
NUMBER(10) |
NOT NULL |
|
DCM_ID |
NUMBER(10) |
||
TOT_NEW_DISC |
NUMBER(10) |
||
TOT_SAME_DISC |
NUMBER(10) |
||
TOT_OBS_DISC |
NUMBER(10) |
The client application can:
check EXECUTION_STATUS at any time by using the JOB_ID unique identifier.
browse all submissions for a given user session by querying the SESSION_ID field.
When the job is submitted a corresponding row is added to the table with an:
EXECUTION_STATUS of SUBMITTED.
EXECUTION_SUBMITTED_TS of SYSDATE.
When DBMS_JOB starts executing the job:
EXECUTION_STATUS is updated to EXECUTING.
EXECUTION_START_TS is updated to SYSDATE.
Finally, upon execution completion:
EXECUTION_STATUS changes to COMPLETED.
OUTCOME_STATUS updates accordingly.
The total number of new discrepancies is now available in TOT_NEW_DISC.
The total number of unchanged discrepancies is now available in TOT_SAME_DISC.
The total number of obsolete discrepancies is now available in TOT_OBS_DISC.
EXECUTION_END_TS is populated with SYSDATE.
Discrepancy information can be queried from the DISCREPANCY_MANAGEMENT view which is described in the Oracle Clinical Stable Interface Technical Reference Manual.
Table 7-9 Error Messages for ExecuteMultivariate
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. |
291000 |
ERR |
Patient position is invalid. |
297100 |
ERR |
Changes pending. |
297200 |
ERR |
Invalid execution context. |
297300 |
ERR |
Procedure ID is required for SINGLE execution context. |
297400 |
ERR |
Procedure version is required for SINGLE execution context. |
297500 |
ERR |
Invalid Procedure (nonexistent, retired or pre-3.1 style). |
297600 |
WRN |
Procedure is not active or needs to be regenerated. |
297700 |
WRN |
Procedure is not compiled. |
297800 |
ERR |
DCM ID is required for ON-LINE/DCM execution context. |
297900 |
ERR |
DCM ID does not apply for ON-LINE execution context. |
298000 |
ERR |
DCM ID does not apply for SINGLE execution context. |
298100 |
ERR |
Procedure ID and version must be -1 for ON-LINE and ON-LINE/DCM execution contexts. |
298200 |
ERR |
Mandatory patient position ID is missing. |
298300 |
ERR |
Invalid preserve lock value. |
298400 |
ERR |
Mandatory clinical study ID is missing. |
298500 |
ERR |
Mandatory clinical study version number is missing. |
298600 |
ERR |
Invalid mode value. |
298700 |
ERR |
Invalid debug flag value. |
298800 |
ERR |
Mandatory execution context is missing. |
300200 |
ERR |
This patient is frozen. |
303600 |
ERR |
Invalid patient. |
304400 |
WRN |
No procedures qualify for execution. |
304500 |
ERR |
Cannot preserve lock as the Received DCI is not locked. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
304800 |
ERR |
User is not authorized to call this function. |
313800 |
ERR |
User is not authorized to call ExecuteMultivariate (not granted RXCLIN_MOD privilege) |
Use this function to fetch an existing header RDCI record from the database. FetchRdci pulls an RDCI record, along with all its underlying RDCM records, from the database into the API RDCIRDCM buffer. It returns the API RDCI record and an array of RECEIVED_DCM_IDs of all the API RDCM records.
short int FetchRdci(double received_dci_id,
DCIAPIFlag lock_flag, int rdcirdcm_mode, RdciRecord *rdci_rec, RdcmArr *rdcm_arr);
received_dci_id
(in) The received_dci_id of the RDCI record to be fetched. Use the stable interface to retrieve the correct ID. See the Oracle Clinical Stable Interface Technical Reference Manual for the documented data model.
lock_flag
(in) A flag indicating whether the specified RDCI record should be locked or not. Values are true for a locked record or false for an unlocked record.
rdcirdcm_mode
(in) The mode to be used for executing this function. It also stays in effect as the RDCIRDCM mode up to the next call of either CreateRdci or FetchRdci. Values are initial_log-in, first_pass_entry, key_changes, update or browse.
rdci_rec
(out) A structure of type RdciRecord that the function fills in with the content of the just-populated API RDCI record.
rdcm_arr
(out) A structure of type RdcmArr consisting of an array of the RECEIVED_DCM_IDs of all underlying RDCM records fetched along with the specified RDCI record, and the number of elements in that array that the function fills in.
FetchRdci flushes the RDCIRDCM buffer, then searches the database for an RDCI record whose received_dci_id equals the parameter received_dci_id. If FetchRdci finds a record, the function:
fetches the record, in the specified locking mode, into the API RDCI buffer.
fetches all the underlying RDCM records into the API RDCM buffer.
returns the contents of the populated API RDCI record in the parameter rdci_rec.
returns the RECEIVED_DCM_IDs of all the populated API RDCM records in the array component of the parameter rdcm_arr.
However, if FetchRdci does not find an appropriate record, it fails. It also fails if it finds the record but cannot get the lock required by the parameter lock_flag. A FAILURE happening at any point during the steps above causes the function to stop with FAILURE without reversing the effect of the flush.
Table 7-10 Error Messages for FetchRdci
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. |
286300 |
ERR |
Locking mode incompatible with data entry mode. |
286600 |
ERR |
Audit reason required and not provided. |
293800 |
WRN |
You are working with a data locked record and have privileged update. |
294600 |
ERR |
Document found in different study. Change study to access. |
296600 |
ERR |
Cannot preserve lock when performing a rollback. |
296700 |
ERR |
Unable to lock RDCI. |
297000 |
ERR |
Null or invalid input pointers provided. |
297100 |
ERR |
Changes pending. |
299000 |
ERR |
Only browse mode can be performed from a frozen study. |
299200 |
ERR |
RDCI status is incompatible with querying the record in first-pass data entry mode. |
299300 |
ERR |
RDCI is accessible. You can query only inaccessible documents in first-pass data entry mode. |
299400 |
ERR |
Operator comment in browse is disabled. You cannot fetch the document in locking mode. |
299500 |
ERR |
RDCI is inaccessible. You can query only accessible documents in browse mode. |
299600 |
ERR |
Owning location of the patient is different from that of the database. |
300700 |
WRN |
Patient is frozen. The RDCI record will behave as if it were fetched in non-locking mode. |
300800 |
WRN |
Data on this RDCI is locked. The RDCI record will behave as if it were fetched in non-locking mode. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306300 |
ERR |
Received DCI is inactive or invalid. |
306500 |
ERR |
Unable to release lock. |
Flushes information from the API RDCIRDCM buffer and releases any locks on the database records that were buffered there.
discard_changes
(in) A flag indicating whether or not this function should discard any changes pending in the RDCIRDCM buffer prior to starting its work to flush the buffer. If the value is FALSE the function returns an error if there are changes pending.
This function only affects the information in the RDCIRDCM buffer. It does not affect buffered response data. To flush the data, see FlushResponses.
Table 7-11 Error Messages for FlushRdciRdcm
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. |
299600 |
ERR |
Cannot preserve lock when performing a rollback. |
297100 |
ERR |
Changes pending. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306500 |
ERR |
Unable to release lock. |
Flushes information from the API Responses buffer, then either preserves the lock on the API RDCI record or releases it, based on the value of the parameter preserve_lock.
discard_changes
(in) A flag indicating whether this function should discard any changes pending in the Responses buffer prior to starting its work to flush the buffer. If the value is FALSE the function returns an error if there are changes pending, leaving the buffer intact.
preserve_lock
(in) A flag indicating whether the lock on the API RDCI record should be preserved or released. If the value is:
TRUE
– the lock remains.FALSE
– the lock on the API RDCI record is released.This function does not affect the RDCIRDCM buffer. To flush the header file, see FlushRdciRdcm.
Table 7-12 Error Messages for FlushResponses
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. |
288300 |
ERR |
The API RDCI record is not locked. |
294200 |
ERR |
An error occurred while processing the Received DCI structure and updating the PATIENT_DM_TRACKING table. |
294300 |
ERR |
An error occurred while processing the Received DCM structure and updating the received DCI. |
297100 |
ERR |
Changes pending. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306500 |
ERR |
Unable to release lock. |
Returns the next error message in the internal error stack. Depending upon the error that is generated, this function reflects expected API errors or internal Oracle or API errors.
err_info
(out) – This parameter contains the information about the error in a structure of type ErrorInfo.
If any unexpected internal database errors are encountered during the execution of the APIs — running out of table space, for example — the call stack and the error message encountered by the deepest routine are saved in an internal error stack. Each time GetError is called, the next entry in the stack, if any, is returned; otherwise an error is raised.
Returns the depth of the error message stack. This depth data allows you to process all of the returned error information.
If any unexpected internal database errors are encountered during the execution of the APIs — running out of table space, for example — the call stack and the error message encountered by the deepest routine are saved in an internal error stack. This function returns the depth of the stack.
Returns manual discrepancy information, if any, for the response. Manual discrepancies are also referred to as operator comments. Operator comments often consist of notes about data that appears to be incorrect even though Oracle Clinical has not flagged it for any potential errors. For example, an operator might add a comment that the handwriting for a data value must be reviewed by another person.
short int GetManualDiscrepancy(ResponseId *response_identifier,
DiscInfo *return_discrepancy_info);
response_identifier
(in) contains the unique identifier for this response in a data structure of type ResponseId.
return_discrepancy_info
(out) contains the manual discrepancy information for this response in a structure of type DiscInfo.
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 the database and places the manual discrepancy information for this response into the disc_info structure.
If this is an existing document, the buffers are populated with data from the database. If some manual discrepancy has been previously added for this response, that data would be returned. Otherwise NULL values would be used to populate the output structures.
If this is a new document, and SetManualDiscrepancy has never been called for this response, NULL values would be used to populate the input variable. Otherwise, the data from the last SetManualDiscrepancy call would be returned. This applies also in the case of existing documents.
Table 7-15 Error Messages for GetManualDiscrepancy
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. |
302700 |
ERR |
No existing manual discrepancy for the question. |
Returns the number of rows for a question group. This information might be useful if you are allocating space to hold returned values.
dcm_group_id
(in) The question_group_id of the DCM question group.
num_rows
(out) The number of rows for this DCM question group.
The group_identifier uniquely identifies the question_group. Upon calling this function Oracle Clinical returns the number of rows that are present for this group in the internal buffer.
Table 7-16 Error Messages for GetNumRows
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. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
308600 |
ERR |
Record changed by another user. |
Returns the DCM question group ID for the DCM question group. As an alternative, you can query the stable views for this information. See the Oracle Clinical Stable Interface Technical Reference Manual for the documented data model.
group_identifier
(in) contains the unique name of the DCM question group in a data structure of type GroupId.
group_id
(out) The internal question_group_id for the DCM question group identified by the group name.
The group_identifier uniquely identifies the DCM question group. Upon calling this function Oracle Clinical locates the group in its internal structure and returns the group_id DCM question. The current state of the internal buffers — that is, the current DCM and subset_number — determines the behavior of Oracle Clinical.
Table 7-17 Error Messages for GetQuestGroupId
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. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
Returns the DCM question_id for the DCM question. As an alternative, you can query the stable views for this information. See the Oracle Clinical Stable Interface Technical Reference Manual for the documented data model.
question_identifier
(in) contains the unique identifier for the question in a data structure of type QuestionId.
question_id
(out) The internal dcm_question_id for the DCM question identified by the question_identifier.
The question_identifier uniquely identifies the group that is being processed by the external system. Upon calling this function Oracle Clinical locates the question in its internal structure and gets the question_id. Oracle Clinical functions based on the current state of its internal buffers, that is, the current DCM and the subset_number.
Table 7-18 Error Messages for GetQuestionId
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. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
Returns the RDCI structure from the API buffers. This function is necessary when you call WriteRdciRdcm with preserve lock. After calling WriteRdciRdcm, call GetRdci to synchronize the information on the RDCI with the information in the buffer that was updated by WriteRdciRdcm. You may then begin data entry by calling InitializeRdcmResponses.
rdci_rec
(out) contains the contents of the API RDCI record in a data structure of type RdciRecord.
This function fails if the API RDCI buffer is empty. In order to:
populate an empty API RDCI buffer, see CreateRdci and FetchRdci.
change the contents of the API RDCI record, see SetRdci.
process the API RDCI record as a unit, see ProcessRdci.
Table 7-19 Error Messages for GetRdci
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. |
297000 |
ERR |
Null or invalid input pointers provided. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
Returns the contents of a specific API RDCM record. Typically, you call this function after calling FetchRdci for an existing document or ProcessRdci for a new document.
received_dcm_id
(in) The RECEIVED_DCM_ID of the API RDCM record to be returned.
rdcm_rec
(out) contains the contents of the specified API RDCM record in a data structure of type RdcmRecord.
This function fails if:
the API RDCI buffer is empty.
there are changes pending in the API RDCI buffer that have not yet been processed through a call to ProcessRdci.
there is no API RDCM record whose RECEIVED_DCM_ID equals the parameter received_dcm_id.
In order to:
populate an empty API RDCI buffer, see FetchRdci or CreateRdci.
change the contents of a certain API RDCM record, see SetRdcm.
process an API RDCM record as a unit, see ProcessRdcm.
Table 7-20 Error Messages for GetRdcm
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 |
286600 |
ERR |
Audit reason required and not provided. |
297000 |
ERR |
Null or invalid input pointers provided. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306100 |
ERR |
Changes pending that have not been processed. |
Returns an array containing the RECEIVED_DCM_IDs of all the API RDCM records. This function is useful because it provides you with the internal keys you need to query RDCM and to look at the full record for one or more RDCMs.
rdcm_arr
(out): a structure of type RdcmArr containing an array of the RECEIVED_DCM_IDs of all API RDCM records and the number of elements in that array.
This function fails if:
the API RDCI buffer is empty.
there are changes pending in the API RDCI buffer that have not yet been processed through a call to ProcessRdci.
In order to:
to get the API RDCM records, see GetRdcm.
to process an API RDCM record as a unit, see ProcessRdcm.
Table 7-21 Error Messages for GetRdcmArr
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. |
297000 |
ERR |
Null or invalid input pointers provided. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306100 |
ERR |
Changes pending that have not been processed. |
Returns response value and comments as well as an indicator of whether any discrepancy information exists for the response. Also returns the response ID.
short int GetResponse(ResponseId *response_identifier, ResponseData *response_data, double *response_id, short int *disc_type);
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).
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.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. |
Returns system-generated discrepancy information, if there is any, for the response. Use this function to query specific system-generated discrepancies.
short int GetUnivDiscrepancy(ResponseId *response_identifier,
DiscInfo *return_discrepancy_info);
response_identifier
(in) The ResponseId definition containing the unique identifier for this response.
return_discrepancy_info
(out) The DiscInfo containing the discrepancy information for this response.
The response_identifier uniquely identifies the response that is being proceeded by the external system. Upon calling this function Oracle Clinical locates the response in its internal structure and gets the discrepancy information for this response into the input variables. The input variables, which are provided for holding the discrepancy information, should be allocated by the calling routine.
For existing documents, if a discrepancy has been previously added for this response, that information would be returned. The function returns FAILURE otherwise.
For new documents, if SetResponseData and/or SetUnivDiscrepancy has never been called for this response, the function returns FAILURE because no discrepancies exist. Otherwise, the discrepancy information created by the last SetResponseData and/or SetUnivDiscrepancy call would be returned. This applies also in the case of existing documents.
Table 7-23 Error Messages for GetUnivDiscrepancy
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. |
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.
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
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.
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. |
Inserts a new record in the internal buffers for the repeat sequence number. This function is useful when entering repetitive data into a DCM. For example, you may wish to create a repeat that records time of day and patient's temperature at several different intervals within a 24-hour period. This function can be used to insert a repeat before existing repeats with resequencing of the following repeats.
Once an operator creates a blank row in the Oracle Clinical internal buffers, it is possible to add data to this new row using SetResponseData. WriteResponses is then used to commit this data into the database.
repeat_identifier
(in) The RepeatId containing the unique identifier for this repeat.
The repeat_identifier uniquely identifies the row that is being processed by the external system (returning FAILURE if the row does not exist). Upon calling this function, Oracle Clinical inserts a new record (with all data values initialized to NULL) in its internal buffers. The API returns a FAILURE if the repeat sequence number exceeds the maximum repeats specified for the question group. SetResponseData needs to be called to update the response values as and when they are entered.
In InitializeRdcmResponses, Oracle Clinical automatically creates the first row in each group, so this function accepts repeat sequence numbers greater than or equal to 1 only.
Note:
This API function re-sequences all repeats, if any, following the one that was inserted by adding 1 to the repeat sequence number for all questions in the group in those repeats.Table 7-25 Error Messages for InsertRepeat
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. |
287100 |
ERR |
DCM question group does not exist in the DCM. |
287200 |
ERR |
Cannot insert repeats in browse mode. |
287300 |
ERR |
Invalid DCM question group ID passed. |
287400 |
ERR |
Cannot insert repeat for a non-repeating question group. |
287500 |
ERR |
Inserting repeat will introduce a null repeat in the middle. |
287600 |
ERR |
Cannot insert for repeating defaults when repeat is less than the maximum repeats for DCM question group. |
287700 |
ERR |
The repeat exceeds the maximum repeats expected for DCM question group. |
297000 |
ERR |
Null or invalid input pointers provided. |
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.
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.
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.
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. |
This function verifies that the selected RDCM record in the API RDCM buffer is a unit that includes all necessary data. For example, if the DCM requires a qualifying value, this function checks to see if one is supplied. In addition, this function verifies:
interdependencies between fields.
that there are no duplicate RDCMs in the API RDCM buffer.
that there are no duplicate pre-existing RDCMs in the database.
When this function identifies a duplicate RDCM in the buffer, it returns the ID of that record in the double *RECEIVED_DCM_IDs parameter. When this function identifies a duplicate RDCM in the database, it returns an error and includes the document number of the duplicate record within the error message text.
received_dcm_id
(in) The RECEIVED_DCM_ID of the API RDCM record to be validated.
received_dcm_ids
(out) The RECEIVED_DCM_ID of the first duplicate API RDCM record encountered. This parameter will contain null if there is no duplicate API RDCM record encountered.
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 learn about privileges, see the "Functional State Mapping Information" and the "Functional State Transition Diagram".
there are changes pending in the API RDCI buffer that have not yet been processed through a call to ProcessRdci.
there is no API RDCM record whose RECEIVED_DCM_ID equals the parameter received_dcm_id.
To validate an API RDCM record as a unit, this function:
checks that all the mandatory items in the API RDCM record are populated.
performs cross-item validation.
performs uniqueness validation for the API RDCM record. If the function finds a duplicate within the other API RDCM records, it returns its RECEIVED_DCM_ID in the output parameter RECEIVED_DCM_IDs along with an error message. However, if the function finds a duplicate under another RDCI in the database, it returns an error message.
WriteRdciRdcm also validates each of the API RDCM records as part of its processing. This function is provided in order to give the FE a facility to determine early in the process whether individual API RDCM records are valid.
To write the contents of the API RDCIRDCM buffer to the database, see WriteRdciRdcm.
Table 7-27 Error Messages for ProcessRdcm
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. |
290100 |
ERR |
Duplicate Received DCM found within this Received DCI. |
290200 |
ERR |
Duplicate Received DCM found in document number: \0. |
290300 |
ERR |
Current record is not complete: Operation was not successful. |
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. |
293000 |
ERR |
Subevent number must be entered. |
293300 |
ERR |
DCM time must be entered. |
293400 |
ERR |
Qualifying value must be entered. |
293600 |
ERR |
Too many actual events correspond to this subevent #. |
293700 |
ERR |
DCM date must be entered. |
297000 |
ERR |
Null or invalid input pointers provided. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306100 |
ERR |
Changes pending that have not been processed. |
307000 |
ERR |
Cannot call this function if you have not locked the record. |
307300 |
WRN |
Lab could not be defaulted. |
307400 |
ERR |
Please use the patient enrollment form to specify which DCI Book to use to maintain the page tracking information. |
Use this function to add a comment to an actual event. This function updates the specified actual event record with the new comment and commits the change.
actual_event_id
(in) The ACTUAL_EVENT_ID of the row you want to update.
ActualEventsRecord
(in) The new contents with which you want to update the specified Actual Event record. This parameter is in a structure of type ActualEventsRecord.
Table 7-28 Error Messages for SetActualEvent
Number | Severity | Message |
---|---|---|
285000 |
ERR |
Function called out of sequence. |
285900 |
ERR |
No current OCL database connection open. Use ConnectOCL to connect to OCL database. |
288800 |
ERR |
Cannot set actual event when RDCI is locked. |
297000 |
ERR |
Null or invalid input pointers provided. |
302400 |
WRN |
Zero rows updated. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
304800 |
ERR |
User is not authorized to call this function. |
Use this function to modify a comment. This function updates the investigator comment, if any, for the response in the Oracle Clinical internal structure.
response_identifier
(in) The ResponseId definition containing the unique identifier for this response.
data_comm
(in) A DataComment structure containing the data (investigator) comment for this response.
The response_identifier uniquely identifies the response that is being processed by the external system. Upon calling SetDataComment, Oracle Clinical locates the response in its internal structure and updates the data (investigator) 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.
Table 7-29 Error Messages for SetDataComment
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. |
659700 |
ERR |
No default audit reason. |
659800 |
ERR |
More than one default audit reason found. |
660000 |
ERR |
Cannot use system-generated audit reason. |
Sets the external context information that will be used to populate the columns of the RDCI_HISTORY records to be created. This function helps to create a comprehensive tracking record that becomes part of the RDCI history. For example, this function enables you to record when data was originally entered into an external system that later passes data to Oracle Clinical.
context_info
(in) A structure of type ExternalContextInfo.
This function validates the value of the parameter context_info. It validates the trans_type item by checking that it contains a value from the reference codelist EXTERNAL_TRANS_TYPE. If it does not contain a value, the value STANDARD will be used. If the validation succeeds, the value of context_info will immediately take effect as the new external context info and the function returns SUCCESS; otherwise, the function will return FAILURE leaving the existing external context info intact.
The values set through a call to SetExternalContext will be reflected in all the subsequently created RDCI_HISTORY records until the next call of SetExternalContext or the call of DisconnectOCL, whichever comes first. No auditing records will be created if SetExternalContext has never been called since the last call to ConnectOCL.
An RDCI record in the API RDCI buffer will have only one audit record created for it upon the first writing to the database done due to a call of either WriteRdciRdcm or WriteResponses. Successive writing to the database while the same RDCI record is still in the API RDCI buffer will cause more audit records to be created for it only if a call to SetExternalContext has taken place after the last time an audit record was created for it.
In contrast to the API, Oracle Clinical does not maintain the RDCI_HISTORY table in the sense that it does not create or update records of that table.
The RDCI_HISTORY table will not be replicated and there are no reports running against it.
Table 7-30 Error Messages for SetExternalContext
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. |
297000 |
ERR |
Null or invalid input pointers provided. |
297100 |
ERR |
Changes pending. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
Creates or updates manual discrepancy (operator comment) information for the response in the Oracle Clinical internal structure. This information includes the original comment and information about whether or not the issue has been resolved. If the issue has been resolved, the resolution is described. If unresolved, the new comment replaces the existing comment (which is retained in the DISCREPANCY_ENTRY_REVIEW_HIST table).
response_identifier
(in) The ResponseId definition containing the unique identifier for this response.
discrepancy_info
(in) The DiscInfo definition containing the discrepancy information for this response.
The response_identifier parameter uniquely identifies the response that is being processed by the external system. Upon calling SetManualDiscrepancy, Oracle Clinical locates the response in its internal structure and updates the manual discrepancy (operator 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.
If the user has the privilege to create operator comments in browse mode and the document was fetched in locked mode, SetManualDiscrepancy may be invoked even in browse mode. In this respect it differs from other functions that set response and/or discrepancy values which may not be called in browse mode.
Table 7-31 Error Messages for SetManualDiscrepancy
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. |
297000 |
ERR |
Null or invalid input pointers provided. |
302800 |
ERR |
Invalid discrepancy review status code. |
302900 |
ERR |
Invalid discrepancy resolution type code. |
303000 |
ERR |
Resolution type code cannot be null for RESOLVED review status. |
303100 |
ERR |
Resolution type code should be null if review status is not RESOLVED. |
312500 |
ERR |
Can not update repeating defaults when repeat sn is less than the maximum repeats expected for DCM question group. |
Sets the resolution text for an existing discrepancy with a current status. This function can only be called in UPDATE mode.
disc_id
(in) The discrepancy ID for the discrepancy being updated.
disc_subtype
(in) Type of discrepancy. Valid types are UNIVARIATE, MANUAL, INDICATOR, MULTIVARIATE or MANUAL HEADER.
discrepancy_info
(in) The DiscInfo definition containing the discrepancy information. Only the resolution field in the structure DiscInfo is used.
The disc_id and subtype parameters uniquely identify the discrepancy that is being processed by the external system. Upon calling SetMiscDiscrepancy, Oracle Clinical locates the discrepancy in its internal structure and updates the resolution comment or text for this discrepancy from the input variables provided for holding this information. These input variables should be allocated and initialized before calling the routine. The remaining fields should be initialized, otherwise a warning is raised.
If any of the remaining fields contain a non-null value, then a warning is raised.
Only discrepancies in status 'CURRENT' can be updated using this routine.
This function sets the status of a received page and commits. SetPageStatus enables you to track a specific page within a DCI. This is particularly useful, for example, when a DCI has multiple repeats within the same group that are listed on separate pages of the Case Report Form (CRF). Recording the page number from the original paper form provides a useful tracking mechanism for the electronic version of the document.
received_page_id
(in) The RECEIVED_PAGE_ID of the received page whose status is to be updated.
page_status
(in) The new status of the specified received page.
This function will first lock the RDCI record to which the specified page belongs. If it cannot, it will fail; otherwise it will validate the new status and update the received page with the new status.
Table 7-33 Error Messages for SetPageStatus
Number | Severity | Message |
---|---|---|
285000 |
ERR |
Function called out of sequence. |
285900 |
ERR |
No current OCL database connection open. Use ConnectOCL to connect to OCL database. |
289000 |
ERR |
Cannot set page status when RDCI is locked. |
289100 |
ERR |
Unable to find the RDCI to which page belongs: \0. |
289200 |
ERR |
Unable to lock the RDCI to which page belongs. |
289300 |
ERR |
'Unknown' page status can only be changed to 'Missing' or 'Present'. |
289400 |
ERR |
The page status cannot be manually changed to a system status. |
289500 |
ERR |
A system page status cannot be manually changed. |
297000 |
ERR |
Null or invalid input pointers provided. |
302500 |
ERR |
Invalid page status. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
304800 |
ERR |
User is not authorized to call this function. |
Assigns the values of the parameter rdci_keys_rec, which is the parameter for the keys within the RDCI record, to the API RDCI record. It also returns the contents of the updated API RDCI record in the output parameter rdci_rec, which is the parameter for the entire RDCI record.
The component items of an API RDCI record which are not component items of rdci_keys_rec, such as all the numeric ID items, are implicitly assigned by this function. For example, patient ID is not a key field, but because it is part of the RDCI record, it is populated implicitly once the external patient identifier is supplied and validated.
rdci_keys_rec
(in): The RdciKeysRecord definition containing the value that you want to assign to the API RDCI record.
rdci_rec
(out): The RdciRecord definition containing the contents of the updated API RDCI record.
This function fails if:
the API RDCI buffer is empty.
the API RDCI record exists in the database and has not been locked, or its locked but the user does not have the privilege required for SetPageStatus. To learn about locking the API RDCI record see FetchRdci, WriteRdciRdcm, WriteResponses and FlushResponses. To learn about privileges, see the "Functional State Mapping Information" and the "Functional State Transition Diagram".
Only the items of rdci_keys_rec that have a value different from that of the corresponding item in the API RDCI record will be considered. These items will be validated first. All of them have to pass validation in order for the update to take place; otherwise no update will take place and the function will return FAILURE. The type of validation taking place here is individual item validation whereas cross-item validation will happen as part of the validation of the API RDCI record as a unit which takes place in ProcessRdci.
If this function fails, rdci_rec will be empty; if it succeeds rdci_rec will contain the current contents of the updated API RDCI record.
To populate an empty API RDCI buffer, see CreateRdci and FetchRdci.
Table 7-34 Error Messages for SetRdci
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. |
289800 |
ERR |
This document already exists in the database. |
290500 |
ERR |
This site/investigator pair is invalid for study. |
290600 |
ERR |
Invalid investigator. |
290700 |
ERR |
Invalid site. |
290800 |
ERR |
Patient position is frozen. |
290900 |
ERR |
Patient not enrolled for this study. |
291000 |
ERR |
Patient position is invalid. |
291200 |
ERR |
DCI is inactive or invalid. |
291300 |
ERR |
[error message returned by OCL_CLIENT_PACK. Validate document.] |
291400 |
ERR |
Clinical planned event is invalid for the current study. |
294600 |
ERR |
Document found in different study. Change study to access. |
294900 |
WRN |
Site is currently inactive. |
295000 |
WRN |
Investigator is currently inactive. |
297000 |
ERR |
Null or invalid input pointers provided. |
299700 |
WRN |
The data entered for this received DCI will be deleted. |
299800 |
ERR |
Date cannot exceed today's date. |
300900 |
ERR |
No update allowed to the RDCI buffer. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
305600 |
ERR |
Invalid DCI date. |
305700 |
ERR |
Invalid DCI time. |
306800 |
ERR |
Invalid audit reason. |
307000 |
ERR |
Cannot call this function if you have not locked the record. |
308700 |
ERR |
Cannot set RDCI time until RDCI short name is set. |
308900 |
ERR |
DCI short name is not updateable. |
309000 |
ERR |
Document number is not updateable. |
309300 |
ERR |
Patient is not updateable. |
309500 |
ERR |
Date is not updateable. |
309700 |
ERR |
Time is not updateable. |
309900 |
ERR |
Visit name is not updateable. |
310100 |
ERR |
Subevent number is not updateable. |
310300 |
ERR |
Site is not updateable. |
310500 |
ERR |
Investigator is not updateable. |
310700 |
ERR |
Blank flag is not updateable. |
310900 |
ERR |
Comment is not updateable. |
311600 |
ERR |
DCI comment number can not be updated to null. |
311700 |
ERR |
Document number must not have lower case. |
314800 |
ERR |
Received DCI is accessible; please use Key Changes to change Blank Flag. |
315000 |
ERR |
Some received DCMs are accessible; please use Key Changes to change Blank Flag. |
315100 |
WRN |
Responses exist for this RDCI. Changing the Blank Flag to 'Y' will cause them to be irrevocably deleted. |
659700 |
ERR |
No default audit reason. |
659800 |
ERR |
More than one default audit reason found. |
660000 |
ERR |
Cannot use system-generated audit reason. |
Assigns the value of the parameter rdcm_keys_rec to a specific API RDCM record. It also returns the contents of the updated API RDCM record in the parameter rdcm_rec. The component items of API RDCM record which are not component items of rdcm_keys_rec, such as all the numeric ID items, are implicitly assigned by this function. Patient ID, for example, is not a key field but instead is populated implicitly once the external patient identifier is supplied and validated. This process is the reason that the function returns the updated API RDCM record in the output parameter rdcm_rec.
short int SetRdcm(double received_dcm_id,
RdcmKeysRecord *rdcm_keys_rec, RdcmRecord *rdcm_rec);
received_dcm_id
(in) The RECEIVED_DCM_ID of the API RDCM record to be updated.
rdcm_keys_rec
(in) The RdcmKeysRecord definition containing the value that you want to assign to the specified API RDCM record.
rdcm_rec
(out) The RdcmRecord definition containing the contents of the updated API RDCM record.
the API RDCI buffer is empty.
the API RDCI record exists in the database and has not been locked, or it is locked but the user does not have the privilege required for SetRdcm.
To learn about locking the API RDCI record, see GetRdci, FetchRdci, FlushRdciRdcm, FlushResponses, WriteRdciRdcm, and WriteResponses. To learn about privileges, see the "Functional State Mapping Information" and the "Functional State Transition Diagram".
there are changes pending in the API RDCI buffer that have not yet been processed through a call to ProcessRdci.
there is no API RDCM record whose RECEIVED_DCM_ID equals the parameter received_dcm_id.
Only the items of rdcm_keys_rec that have a value different from that of the corresponding item in the specified API RDCM record will be considered. These items will be validated first. All of them have to pass validation in order for the update to take place; otherwise no update will take place and the function will return FAILURE. The type of validation taking place in SetRdcm is individual item validation, whereas cross-item validation will happen as part of the validation of the API RDCM record as a unit. Cross-item validation takes place in both ProcessRdcm and WriteRdciRdcm.
If the API RDCM record contains items related to DCM definitions, such as dcm_date and dcm_time, and those items take their values, by definition, from the corresponding items in the API RDCI record, then the values passed in for these items in SetRdcm should be the same as the values of these items in the API RDCM record. If this is not the case, the function will fail. This restriction does not apply, however, if those items do not take their values from the API RDCI record. The current values of an API RDCI record can be obtained through a call to GetRdcm.
If this function fails, rdcm_rec is empty, and if it succeeds rdcm_rec contains the current contents of the updated API RDCM record.
To populate an empty API RDCI buffer, see CreateRdci and FetchRdci.
Table 7-35 Error Messages for SetRdcm
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. |
291400 |
ERR |
Clinical planned event is invalid for the current study. |
294600 |
ERR |
Invalid lab. |
291700 |
ERR |
Discrete value does not exist or is inactive. |
291800 |
ERR |
Discrete value could not be validated. |
291900 |
ERR |
Value must be Y or N. |
293500 |
ERR |
Cannot set to N (not blank) when Received DCI is blank. |
297000 |
ERR |
Null or invalid input pointers provided. |
299800 |
ERR |
Date cannot exceed today's date. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
305800 |
ERR |
Invalid DCM date. |
305900 |
ERR |
Invalid DCM time. |
306100 |
ERR |
Changes pending that have not been processed. |
306800 |
ERR |
Invalid audit reason. |
306900 |
ERR |
No update allowed to the RDCM buffer. |
307000 |
ERR |
Cannot call this function if you have not locked the record. |
309400 |
ERR |
Date is not applicable. |
309500 |
ERR |
Date is not updateable. |
309600 |
ERR |
Time is not applicable. |
309700 |
ERR |
Time is not updateable. |
309800 |
ERR |
Visit name is not applicable. |
309900 |
ERR |
Visit name is not updateable. |
310000 |
ERR |
Subevent number is not applicable. |
310100 |
ERR |
Subevent number is not updateable. |
310600 |
ERR |
Blank flag is not applicable. |
310700 |
ERR |
Blank flag is not updateable. |
310800 |
ERR |
Comment is not applicable. |
310900 |
ERR |
Comment is not updateable. |
311000 |
ERR |
Qualifying value is not applicable. |
311100 |
ERR |
Qualifying value is not updateable. |
311200 |
ERR |
Lab is not applicable. |
311300 |
ERR |
Lab is not updateable. |
311400 |
ERR |
Data comment is not applicable. |
311500 |
ERR |
Data comment is not updateable. |
314900 |
ERR |
Received DCM is accessible; please use Key Changes to change Blank Flag. |
315200 |
WRN |
Responses exist for this RDCM. Changing the Blank Flag to 'Y' will cause them to be irrevocably deleted. |
345400 |
ERR |
Qualifying value can only be changed to the default value defined at the DCI module. |
659700 |
ERR |
No default audit reason. |
659800 |
ERR |
More than one default audit reason found. |
660000 |
ERR |
Cannot use system-generated audit reason. |
Updates data and audit information, if any, for the response in the Oracle Clinical internal structure and returns any univariate discrepancy raised.
short int SetResponseData(ResponseId *response_identifier,
ValueText *value, AuditInfo *audit_comment, DiscInfo *return_discrepancy_info, DCIAPIFlag *needs_audit);
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.
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.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. |
This function sets up the environment for a study by gathering all study-related information, user-related information and configuration settings. Calling this function sets the study context for future API calls.
study
(in) The study name.
study_rec
(out) A StudyRecord structure containing information about the live version of the study.
This function takes these processing steps:
Set the new study context, using the parameter study, replacing the existing study context. If it fails in setting the study context it will return FAILURE, leaving the existing study context intact.
Flush the API RDCIRDCM buffer and consequently the Responses buffer.
Table 7-37 Error Messages for SetStudyContext
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. |
286500 |
ERR |
Study is not enabled for data entry. |
301300 |
ERR |
Invalid clinical study. |
301400 |
ERR |
The clinical study is not live. |
301500 |
ERR |
Data entry is not enabled for the clinical study. |
301600 |
ERR |
Clinical study does not exist in the current location. |
301700 |
ERR |
No study state for the clinical study. |
301800 |
ERR |
No study access account exists for the study. |
301900 |
ERR |
Record validation failed. |
302000 |
ERR |
User is not authorized to access the study. |
302100 |
ERR |
Validation of study failure. |
303300 |
ERR |
Changes are pending for RDCI/RDCM work. |
303400 |
ERR |
Changes are pending for responses work. |
Updates discrepancy information such as review status and comment for the response in the Oracle Clinical internal structure.
response_identifier
(in) The ResponseId structure definition containing the unique identifier for this response.
discrepancy_info
(in) The DiscInfo structure definition containing the discrepancy information for this response.
The response_identifier uniquely identifies the response that is being processed by the external system. Upon calling SetUnivDiscrepancy, Oracle Clinical locates the response in its internal structure and updates the discrepancy 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.
Table 7-38 Error Messages for SetUnivDiscrepancy
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. |
297000 |
ERR |
Null or invalid input pointers provided. |
302800 |
ERR |
Invalid discrepancy review status code. |
302900 |
ERR |
Invalid discrepancy resolution type code. |
303000 |
ERR |
Resolution type code cannot be null for RESOLVED review status. |
303100 |
ERR |
Resolution type code should be null if review status is not RESOLVED. |
312500 |
ERR |
Can not update repeating defaults when repeat sn is less than the maximum repeats expected for DCM question group. |
This function reviews the header information in the API RDCM and RDCI buffers and validates that each of the API RDCM records is a unit that includes all necessary data. In addition, it verifies that there are no duplicate RDCMs in either buffer or in the database. If there are duplicate RDCMs in the buffer:
the RDCM ID of the RDCM being tested is returned in the double *received_dcm_id parameter
the ID of the duplicate RDCM is returned in the double *received_dcm_id_dup parameter
If there are duplicate pre-existing RDCMs in the database, an error is returned and the document number of the duplicate record is returned as part of the error message text. Once the API RDCM records are validated as a unit and all duplicates are resolved, this function writes the contents of the API RDCIRDCM buffers to the database and commits. If someone has created a duplicate RDCI between the time you called ProcessRdci and the time you called WriteRdciRdcm, the duplicate will be trapped at the time of the commit and the function will fail. Then it either preserves the lock on the API RDCI record or releases it based on the value of the parameter preserve_lock.
short int WriteRdciRdcm (DCIAPIFlag preserve_lock,
double *received_dcm_id, double *received_dcm_id_dup);
preserve_lock
(in) A flag indicating whether the lock on the API RDCI record should be preserved or released. If the value is TRUE, the lock will be kept and if it is FALSE, it will be released.
received_dcm_id
(out) The RECEIVED_DCM_ID of either the first API RDCM record to fail validation in steps 1 or 2 below or the first API RDCM record in a pair of duplicate API RDCM records found in step 3 below.
received_dcm_id_dup
(out) The RECEIVED_DCM_ID of the second API RDCM record in a pair of duplicate API RDCM records. This parameter will contain null if there are no duplicate API RDCM records encountered.
To validate each API RDCM record as a unit, this function takes these steps for each API RDCM record:
The function checks that all the mandatory items in the API RDCM record are populated.
WriteRdciRdcm performs cross-item validation. If either the previous step or this step fails, the function stops with FAILURE returning in the output parameter received_dcm_id the RECEIVED_DCM_ID of the API RDCM record and null in the parameter received_dcm_id_dup.
The function performs uniqueness validation for the API RDCM record. If it finds a duplicate within the other API RDCM records it returns the following values:
In the output parameter received_dcm_id, the function returns the RECEIVED_DCM_ID of the API RDCM record currently being validated.
In the output parameter received_dcm_id_dup, the function returns the RECEIVED_DCM_ID of the duplicate API RDCM record found, in addition to an error message.
If, on the other hand, WriteRdciRdcm finds a duplicate under another RDCI in the database, the function just returns an error message.
As part of the validation it carries out, this function will change the value of the blank flag of the API RDCI record to bring it in sync with the set of blank flag values of all the API RDCM records, if this change is necessary.
This function also assigns values to the time stamp items of both the API RDCI record and the API RDCM records.
To see the effects of this function on the API RDCIRDCM buffer, the front end has to call GetRdci and GetRdcm.
To validate a single API RDCM record, see ProcessRdcm.
Table 7-39 Error Messages for WriteRdciRdcm
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. |
290100 |
ERR |
Duplicate Received DCM found within this Received DCI. |
290200 |
ERR |
Duplicate Received DCM found within document number: \0. |
290300 |
ERR |
Current record is not complete: Operation was not successful. |
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. |
293000 |
ERR |
Subevent number must be entered. |
293300 |
ERR |
DCM time must be entered. |
293400 |
ERR |
Qualifying value must be entered. |
293600 |
ERR |
Too many actual events correspond to this subevent #. |
293700 |
ERR |
DCM date must be entered. |
293800 |
WRN |
You are working with a data locked record and have privileged update. |
294200 |
ERR |
An error occurred while processing the Received DCI structure and updating the PATIENT_DM_TRACKING table. |
294300 |
ERR |
An error occurred while processing the Received DCM structure and updating the received DCI. |
294700 |
ERR |
Received DCI is protected because at least one of its received DCMs is locked. |
294800 |
ERR |
An error occurred while in the Rxc_Login_Pack. SoftDeleteAll received DCMs function. |
295200 |
ERR |
Too many rows found in NON_EXPECTED_DCMS table. |
295800 |
ERR |
Problem retrieving from the actual event sequence. |
296700 |
ERR |
Unable to lock RDCI. |
297000 |
ERR |
Null or invalid input pointers provided. |
300700 |
WRN |
Patient is frozen. The RDCI record will behave as if it were fetched in non-locking mode. |
301200 |
WRN |
No changes to save. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306100 |
ERR |
Changes pending that have not been processed. |
306400 |
ERR |
Too many current actual events. |
306500 |
ERR |
Unable to release lock. |
307000 |
ERR |
Cannot call this function if you have not locked the record. |
307400 |
ERR |
Please use the patient enrollment form to specify which DCI Book to use to maintain the page tracking information. |
315500 |
WRN |
RDCI is not protected because at least one of its RDCMs is locked and you have privileged update. |
This function reviews the response data in the buffers, verifies that they are clean, and then sends it to the Oracle Clinical database. If this function detects an incomplete flag (used, for example, if the operator has not finished the work and will complete it after lunch), the response data remains in the buffers. Otherwise the function writes the data to the database and commits. Then it either preserves the lock on the API RDCI record or releases it based on the value of the parameter preserve_lock.
short int WriteResponses(DCIAPIFlag incomplete,
DCIAPIFlag preserve_lock, ResponseId *response_identifier);
incomplete
(in) – Specify whether responses should be saved in incomplete mode. Value is TRUE or FALSE.
preserve_lock
(in) – A flag indicating whether the lock on the API RDCI record should be preserved or released. If the value is TRUE, the lock will be kept and if it is FALSE, it will be released.
response_identifier
(out) – A ResponseId structure containing the unique identifier of the failed response.
Table 7-40 Error Messages for WriteResponses
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. |
288300 |
ERR |
The API RDCI record is not locked. |
288400 |
ERR |
The completion flag is not compatible with the data entry mode. |
288500 |
WRN |
Write responses called but no changes are pending. |
288600 |
ERR |
Blank repeats exist. |
288700 |
ERR |
Mandatory field missing. |
293800 |
WRN |
You are working with a data locked record and have privileged update. |
294200 |
ERR |
An error occurred while processing the Received DCI structure and updating the PATIENT_DM_TRACKING table. |
294300 |
ERR |
An error occurred while processing the Received DCM structure and updating the Received DCI. |
300700 |
WRN |
Patient is frozen. The RDCI record will behave as if it were fetched in non-locking mode. |
303500 |
ERR |
Document contains empty repeats. |
304600 |
ERR |
Function does not exist. |
304700 |
ERR |
Privilege does not exist. |
306400 |
ERR |
Too many current actual events. |
306500 |
ERR |
Unable to release lock. |
308600 |
ERR |
Record changed by another user. |