GET /api/v1/edc/studies/PHARMADEMO/records?page=0&size=25&sort=recordId%2CASC&filter=recordId%3D%3D5510&recordDataFilter=aeterm%3D%3DBronchitis HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Given a StudyKey, fetch the set of records. A record is a conduct resource that represents a single instance of an electronic case report form (eCRF). Each record contains the responses to each question on the eCRF.
A GET
request is used to access the index.
A POST
request is used to add records to the iMednet database.
Path parameters are required.
Parameter | Description |
---|---|
|
StudyKey to retrieve list of records |
GET
RequestsGET
Request structureGET /api/v1/edc/studies/PHARMADEMO/records?page=0&size=25&sort=recordId%2CASC&filter=recordId%3D%3D5510&recordDataFilter=aeterm%3D%3DBronchitis HTTP/1.1
Content-Type: application/json
Host: localhost:8080
GET
Request parametersRequest parameters are optional. Default values are used unless specified.
Parameter | Description |
---|---|
|
Which index page to be returned. Default value is 0. |
|
Items per page to be returned. Default value is 25. Maximum items allowed per page is 500 |
|
Name of the property by which to sort the result set. To sort in a particular direction add a comma to the property name and either |
|
Optional filter search criteria. Must follow correct syntax. Refer to Common filter section for details. |
|
Optional record data filter search criteria. Must follow correct syntax. Refer to Common record data filter section for details. |
GET
Response bodyBelow is an example response payload.
{
"metadata" : {
"status" : "OK",
"method" : "GET",
"path" : "/api/v1/edc/studies/PHARMADEMO/records",
"timestamp" : "2024-03-22 15:32:18",
"error" : { }
},
"pagination" : {
"currentPage" : 0,
"size" : 25,
"totalPages" : 1,
"totalElements" : 1,
"sort" : [ {
"property" : "recordId",
"direction" : "ASC"
} ]
},
"data" : [ {
"studyKey" : "PHARMADEMO",
"intervalId" : 99,
"formId" : 10202,
"formKey" : "AE",
"siteId" : 128,
"recordId" : 1,
"recordOid" : "REC-1",
"recordType" : "SUBJECT",
"recordStatus" : "Record Incomplete",
"deleted" : false,
"dateCreated" : "2024-03-22 15:32:18",
"dateModified" : "2024-03-22 15:32:19",
"subjectId" : 326,
"subjectOid" : "OID-1",
"subjectKey" : "123-456",
"visitId" : 1,
"parentRecordId" : 34,
"keywords" : [ {
"keywordName" : "Data Entry Error",
"keywordKey" : "DEE",
"keywordId" : 15362,
"dateAdded" : "2024-03-22 15:32:18"
} ],
"recordData" : {
"dateCreated" : "2018-10-18 06:21:46",
"unvnum" : "1",
"dateModified" : "2018-11-18 07:11:16",
"aeser" : "",
"aeterm" : "Bronchitis"
}
} ]
}
GET
Response fieldsPath | Type | Description |
---|---|---|
|
|
Http status |
|
|
Http method |
|
|
Requested URI path |
|
|
Timestamp when response was generated |
|
|
Detail error message from request if error occur |
|
|
Current index page |
|
|
Size per page |
|
|
Total pages return from search |
|
|
Total elements return from search |
|
|
Sort property |
|
|
Sort direction |
|
|
Unique study key for a given study |
|
|
Unique system identifier for Interval |
|
|
Form ID |
|
|
Form Key |
|
|
Unique system identifier for site |
|
|
Unique system identifier for record |
|
|
Client-assigned record OID |
|
|
Type of record |
|
|
User defined record status |
|
|
Mednet Subject ID |
|
|
Client-assigned subject OID |
|
|
Protocol-assigned subject identifier |
|
|
Unique system identifier for the subject visit instance |
|
|
All keywords currently associated with the record |
|
|
Record data detail |
|
|
Record deleted flag |
|
|
Parent Record Id |
|
|
Date when this record was created |
|
|
Last date modified of this record |
POST
RequestsProviding a studyKey
and a requestBody
, adds a record to the iMednet database. The requestBody
is an array. The contents
of the requestBody
determine if the request will register a subject, update a scheduled record, or create a new record.
requestBody
examples can be seen below for each different scenario. Different identifiers may be used in the requestBody
, these
identifiers can be seen in the table below:
POST /api/v1/edc/studies/PHARMADEMO/records HTTP/1.1
x-email-notify: user@domain.com
Accept: application/json
Content-Type: application/json
Host: localhost:8080
[ ]
Identifier | Name | Description |
---|---|---|
Form Identifiers |
|
User defined form key |
Site Identifiers |
|
User defined site name |
Subject Identifiers |
|
Patient Display ID Full |
Interval Identifiers |
|
User defined interval name |
Record Identifiers |
|
System generated record identifier |
When making a POST
request to the records endpoint, be sure to use the correct type for any fields/attributes included in the
data
object.
Sample request body containing all of the valid field types:
[ {
"formKey" : "REG",
"siteName" : "Minneapolis",
"data" : {
"textField" : "Text data",
"dateField" : "2020-01-20",
"numberField" : 11,
"radioField" : "Yes",
"dropdownField" : "Always",
"memoField" : "Memo data",
"checkboxField" : true
}
} ]
Valid field types:
Path | Type | Description |
---|---|---|
|
|
Form Key |
|
|
Site Name |
|
|
Data for specific record |
|
|
Text field |
|
|
Date field |
|
|
Number field |
|
|
Radio field |
|
|
Dropdown field |
|
|
Memo field |
|
|
Checkbox field |
Request body for registering a subject:
[ {
"formKey" : "REG",
"siteName" : "Minneapolis",
"data" : {
"textField" : "Text value"
}
} ]
Request fields for registering a subject:
Path | Type | Description |
---|---|---|
|
|
Form Key |
|
|
Site Name |
|
|
Data for specific record |
|
|
Text field |
Request body for updating a scheduled record:
[ {
"formKey" : "REG",
"subjectKey" : "651-042",
"intervalName" : "Registration",
"data" : {
"textField" : "Text value"
}
} ]
Request fields for updating a scheduled record:
Path | Type | Description |
---|---|---|
|
|
Form Key |
|
|
Subject Key |
|
|
Interval Name |
|
|
Data for specific record |
|
|
Text field |
Request body for creating a new record:
[ {
"formKey" : "REG",
"subjectKey" : "123-876",
"data" : {
"textField" : "Text value"
}
} ]
Request fields for creating a new record:
Path | Type | Description |
---|---|---|
|
|
Form Key |
|
|
Subject Key |
|
|
Data for specific record |
|
|
Text field |
Below is an example response payload. The POST
request will return a batchId
and a state
which can be used to
check on the status of the record being added to the iMednet database via GET
requests to the jobs endpoint.
{ "jobId": "9663fe34-eec7-460a-a820-097f1eb2875e", "batchId" : "c3q191e4-f894-72cd-a753-b37283eh0866", "state": "created" }