Start a visit for a subject

Before saving subject data to a form, the subject must be in the correct visit. Make a POST request to start a visit for a subject and get the event ID to save data on a form associated to that event.

Note:

  • To run these Oracle Clinical One Platform API calls, you need to include an authentication token. For instructions on how to generate your authentication token, see Get a token for authentication and Use the token to make an API request.
  • For every API call make sure you construct the URL using the correct server URL and path parameters values.
For the following API calls, you need the studyID, studyVersion and mode, as well as the subjectId, eventId and siteId. These values are retrieved as part of a prerequisite or a previous task, see Retrieve study information.

Step 1: Create the request payload file

The following JSON contains the code for creating a new visit for a subject in an existing study. The subject will be added using a non-dispensation visit type for a study with version 1.0.0.1.

Create a JSON file called visit.json and copy the following:

Note:

Replace the subjectId, eventId, siteId and studyVersion with the correct value for each.
{
    "subjectId": "52682768FEF54E9FAD8BEA630448B5EE",
    "eventId": "750739AD259347C8A37612A8D37538A4",
    "siteId": "84EE8610B5E6466D9B7B64FE99F6606A",
    "visitStatus": "NEW",
    "studyVersion": "12.0.0.21",
    "visitType": "NON_DISPENSATION"
}

Step 2: Start a visit for a subject using payload file

Run the following cURL command to create a visit in the defined site, study and mode:

curl -X POST "https://tenant.clinicalone.oraclecloud.com/ec-dc-svc/rest/v5.0/studies/{studyId}/{mode}/visitstatus" -d "@visit.json"

To make subsequent calls for this specific event, take note of its id value contained in the response. In order to save data to a form using Rest APIs you need this data.

For more information on how to build the payload and other parameters, see Create visit status record.

Tip:

There are many different Clinical One APIs that could help you complete a particular task. Browse for these and other related APIs under the Tasks section of this guide. If you see any deprecated endpoint, look for its newest version.