Add a subject to a study

Make a POST request to add a subject to a study and obtain the subject ID.

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 and mode. These values are retrieved as part of a prerequisite, see Get study information.

Step 1: Create the request payload file

The following JSON contains the code for adding a new subject in the defined site and study.

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

Note:

Replace the studyId and siteId with the correct value for each.
{
   "subject": {
    "screeningDate": null,
    "codeBreak": null,
    "userId": null,
    "id": null,
    "versionStart": null,
    "description": null,
    "subjectNumber": null,
    "studyId": "82F9663311F74BF1B2D5B72523233393",
    "siteId": "AF176F9D12A248598AC3FC57C1C70125",
    "dob": null,
    "state": "new",
    "stateDate": null,
    "screeningFailure": null,
    "enrollmentFailure": null,
    "enrollmentOverride": null,
    "informedConsentDate": null,
    "gender": null,
    "reason": null,
    "comment": null,
    "studyVersion": null
   }
}

Step 2: Add subject to a study using payload file

Run the following cURL call to create a new subject in the defined site and study:

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

To make subsequent calls for this specific subject, 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 request body and other parameters, see Add a subject to a study.

View all subjects

Run the following cURL call to get a list of all subjects:

curl -X GET "https://tenant.clinicalone.oraclecloud.com/ec-dc-svc/rest/v4.0/studies/{studyId}/{mode}/subjects"

If you want to make subsequent calls for a specific subject, take note of the id associated with the subject of your interest.

For more information on this API, like its parameters and response objects, see Get a list of all subjects for the specified study and mode.

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.