Update form data
Make a PUT request if you need to change the value of one or more data elements in the form.
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.
studyName
,
studyID
, studyVersion
and mode
, as well
as the subjectId
, eventId
, formId
,
itemId
's and siteId
. These values are retrieved as part
of a prerequisite or a previous task, see Retrieve study information.
Step 1: Get the data element ID
Run the following cURL command to get a list of all your studies and their details:
curl -X GET "https://tenant.clinicalone.oraclecloud.com/ec-dc-svc/rest/v1/studies/{studyId}/{mode}/subject/{subjectId}/event/{eventId}/dataelements/visitdata"
To make subsequent calls for a specific data element, take note of the id
associated with the data element of your interest. In order to update a data element you
need this data.
For more details on this API, like its parameters and response objects, see Get data elements by subject and event ID.
Step 2: Create the request payload file
id
, create a JSON file called
updateform.json and copy the following:
Note:
Replace the each of these values with those relevant to you.Tip:
TheitemId
refers to
the question in a plain form, according to design. The id
refers to the
data element itself, which is an exisiting answer for a given question in a given form for
a given visit of a given subject. This last, is the one you retrieved in step
1.
{
"dataElement":
{
"studyId": "6516CC36A0E949989021A22633177C90",
"studyName": "TestStudy",
"studyVersion": "1.0.0.1",
"subjectId": "52682768FEF54E9FAD8BEA630448B5EE",
"eventId": "750739AD259347C8A37612A8D37538A4",
"formId": "7C68D67B1E154B9596181323B97160A6",
"itemId": "9FD1445119FA449A80D8256EAEFC7F43",
"siteId": "84EE8610B5E6466D9B7B64FE99F6606A",
"value": "2",
"id": "DA2D91C7E95B48EAA5E13EB3F06E876C",
"reason": "User error",
"comment": "",
"objectVersionNumber": 1,
"eventInstanceNum": null,
"repeatSequenceNumber": null,
"dataFlag": null
}
}
Step 3: Update single datat element using payload file
Given a data element ID, run the cURL command to update subject data in the form.
curl -X PUT "https://tenant.clinicalone.oraclecloud.com/ec-dc-svc/rest/v11.0/studies/{studyId}/{mode}/dataelements/{dataelementId}" -d "@updateform.json"
For more information on how to build the payload and other parameters, see Update single data element to clear rule error.
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.