SetStudyContext
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.
Syntax
short int SetStudyContext(char*study,
StudyRecord*study_rec);
Parameters
study (in) The study name.
study_rec (out) A StudyRecord structure containing information about the live version of the study.
Return Value
SUCCESS or FAILURE.
Comments
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.
Error Messages
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. |
Related Functions
Parent topic: Data Capture API Functions