InsertRepeat
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.
Syntax
short int InsertRepeat(RepeatId
*repeat_identifier
);
Parameters
repeat_identifier
(in) The RepeatId containing the unique identifier for this repeat.
Return Value
SUCCESS
or FAILURE
.
Comments
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.Error Messages
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. |
Related Functions
Parent topic: Data Capture API Functions