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
- cohortListDesc
-
Type:
string
- cohortListName
-
Type:
string
- context
-
Type:
string
- patientWidList
-
Type:
array
patientWidList - privacy
-
Type:
string
- subjectWidList
-
Type:
array
subjectWidList
Nested Schema : Number
Type:
object
Response
Supported Media Types
- application/json
- application/xml
200 Response
successful operation
Body
Root Schema : CohortList
Type:
object
- cohortListDescription
-
Type:
string
- cohortListDetails
-
Type:
object
LinkedReference - cohortListId
-
Type:
integer
(int64
) - cohortListName
-
Type:
string
- contextFlag
-
Type:
string
- createdDate
-
Type:
string
(date-time
) - ownedBy
-
Type:
string
- privacy
-
Type:
string
Allowed Values:[ "PUBLIC", "PRIVATE", "SHARED" ]
Nested Schema : LinkedReference
Type:
object
- display
-
Type:
string
- reference
-
Type:
string
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" } }