Queries endpoint

Given a StudyKey, fetch the set of queries. A query is a conduct resource that encapsulates dialogue pertaining to specific eCRF responses or other matters relevant to the conduct of the study. Queries may be user-initiated, or automatically applied according to study protocol criteria.

Accessing the index

A GET request is used to access the index

Request structure

GET /api/v1/edc/studies/batchId/queries?page=0&size=25&sort=annotationId%2CASC&filter=variable%3D%3Daeterm HTTP/1.1
Content-Type: application/json
Host: localhost:8080

Path parameters are required.

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

studyKey

StudyKey to retrieve list of query

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 annotationId,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/batchId/queries",
    "timestamp" : "2024-11-04 16:03:19",
    "error" : { }
  },
  "pagination" : {
    "currentPage" : 0,
    "size" : 25,
    "totalPages" : 1,
    "totalElements" : 1,
    "sort" : [ {
      "property" : "annotationId",
      "direction" : "ASC"
    } ]
  },
  "data" : [ {
    "studyKey" : "PHARMADEMO",
    "subjectId" : 1,
    "subjectOid" : "OID-1",
    "annotationType" : "subject",
    "annotationId" : 1,
    "type" : null,
    "description" : "Monitor Query",
    "recordId" : 123,
    "variable" : "aeterm",
    "subjectKey" : "123-005",
    "dateCreated" : "2024-11-04 16:03:19",
    "dateModified" : "2024-11-04 16:03:20",
    "queryComments" : [ {
      "sequence" : 1,
      "annotationStatus" : "Monitor Query Open",
      "user" : "john",
      "comment" : "Added comment to study",
      "closed" : false,
      "date" : "2024-11-04 16:03:19"
    } ]
  } ]
}

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[].annotationType

String

User defined identifier for Query Type

data[].annotationId

Number

Unique system identifier for Query Instance

data[].type

Null

System text identifier for query type/location. Valid responses are subject|record|question

data[].description

String

Query description

data[].subjectKey

String

Protocol-assigned subject identifier

data[].recordId

Number

Unique system identifier for Record

data[].variable

String

User defined field identifier

data[].queryComments[].sequence

Number

Query sequence

data[].queryComments[].user

String

User performing Query action

data[].queryComments[].annotationStatus

String

User defined Query status

data[].queryComments[].comment

String

User comments applied at time of Query action

data[].queryComments[].closed

Boolean

Query moved to closed status

data[].queryComments[].date

String

Date of Query Comment

data[].dateCreated

String

Date when the query was created

data[].dateModified

String

Date when the query was modified