Create Cohort List

post

/HSDataService-web/api/3.2.0/cohortlists/create

This endpoint supports the creation of a Cohort List for the Logged in User by Cohort List Name, Description, Context, Privacy and Cohort List Member Identifiers.It returns Cohort List Details like Cohort List Identifier, Name, Description, Member Reference links and other Cohort List associated information.

Request

Supported Media Types
  • application/json
  • application/xml
Body Parameter
Contains all the inputs for creating a cohort list
Root Schema : CohortListCreateRequest
Type: object
Contains all the inputs for creating a cohort list
Nested Schema : patientWidList
Type: array
Nested Schema : subjectWidList
Type: array
Nested Schema : Number
Type: object

Response

Supported Media Types
  • application/json
  • application/xml
200 Response
successful operation
Body
Root Schema : CohortList
Type: object
Nested Schema : LinkedReference
Type: object
400 Response
Invalid parameters supplied
404 Response
Cohort List not created

Examples

The following example submits a POST request.

API URL

http://localhost:7001/HSDataService-web/api/3.2.0/cohortlists/create

Example of Request Body

The following example shows the request sent in JSON format.

{
  "cohortListName": "CohortList_1502",
   "cohortListDesc":"Cohort List Description",
   "context" : "patient",
   "patientWidList":[1,2,3,4,5,6,7,8,9,10],
   "privacy":"public"
}

Example of Response Body

The following example shows the response returned in JSON format.

{
  "cohortListId": 10000000542667,
  "cohortListName": "CohortList_1502",
  "cohortListDescription": "Cohort List Description",
  "contextFlag": "PATIENT",
  "privacy": "PUBLIC",
  "createdDate": "02/15/2017",
  "cohortListDetails": {
    "reference": "/HSDataService-web/api/3.2.0/cohortlists/10000000542667"
  }
}