Subjects endpoint

Given a StudyKey, fetch the set of subjects. A subject is a conduct resource that represents a single participant in a study. Subjects are related to records in that each subject has one-to-many records. Subjects are related to sites in that each subject belongs to a site.

Accessing the index

A GET request is used to access the index

Request structure

GET /api/v1/edc/studies/PHARMADEMO/subjects?page=0&size=25&sort=subjectId%2CASC&filter=subjectId%3D%3D370 HTTP/1.1
Content-Type: application/json
Host: localhost:8080

Path parameters are required.

Table 1. /api/v1/edc/studies/{studyKey}/subjects
Parameter Description

studyKey

StudyKey to retrieve list of subjects

Request parameters

Request parameters are optional. Default values are used unless specified.

Parameter Description

page

Which index page to be returned. Default value is 0.

size

Items per page to be returned. Default value is 25. Maximum items allowed per page is 500

sort

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 asc or desc. To sort by multiple properties add additional sort parameters. Default value is subjectId,asc.

filter

Optional filter search criteria. Must follow correct syntax. Refer to filter section for details.

Response body

Below is an example response payload.

{
  "metadata" : {
    "status" : "OK",
    "method" : "GET",
    "path" : "/api/v1/edc/studies/PHARMADEMO/subjects",
    "timestamp" : "2024-03-22 15:32:18",
    "error" : { }
  },
  "pagination" : {
    "currentPage" : 0,
    "size" : 25,
    "totalPages" : 1,
    "totalElements" : 1,
    "sort" : [ {
      "property" : "subjectId",
      "direction" : "ASC"
    } ]
  },
  "data" : [ {
    "studyKey" : "PHARMADEMO",
    "subjectId" : 1,
    "subjectOid" : "OID-1",
    "subjectKey" : "01-001",
    "subjectStatus" : "Enrolled",
    "siteId" : 128,
    "siteName" : "Chicago Hope Hospital",
    "deleted" : false,
    "enrollmentStartDate" : "2024-03-22 15:32:18",
    "dateCreated" : "2024-03-22 15:32:18",
    "dateModified" : "2024-03-22 15:32:19",
    "keywords" : [ {
      "keywordName" : "Data Entry Error",
      "keywordKey" : "DEE",
      "keywordId" : 15362,
      "dateAdded" : "2024-03-22 15:32:18"
    } ]
  } ]
}

Response fields

Path Type Description

metadata.status

String

Http status

metadata.method

String

Http method

metadata.path

String

Requested URI path

metadata.timestamp

String

Timestamp when response was generated

metadata.error

Object

Detail error message from request if error occur

pagination.currentPage

Number

Current index page

pagination.size

Number

Size per page

pagination.totalPages

Number

Total pages return from search

pagination.totalElements

Number

Total elements return from search

pagination.sort[].property

String

Sort property

pagination.sort[].direction

String

Sort direction

data[].studyKey

String

Unique study key for a given study

data[].subjectId

Number

Mednet Subject ID

data[].subjectOid

String

Client-assigned subject OID

data[].subjectKey

String

Protocol-assigned subject identifier

data[].subjectStatus

String

Subject status

data[].siteId

Number

Mednet Site ID

data[].siteName

String

Site name

data[].enrollmentStartDate

String

Enrollment start date

data[].deleted

Boolean

Subject deleted flag

data[].dateCreated

String

Date when this subject was created

data[].dateModified

String

Last date modified of this subject

data[].keywords

Array

All keywords associated with the subject