Create Cohort List
post
/ohfapi/cg/v3.3/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
Contains all the inputs for creating a cohort list
Root Schema : CreateCohortList
Type:
object
Contains all the inputs for creating a cohort list
Show Source
Nested Schema : Number
Type:
object
Security
-
basicAuth: basic
Type:
basic
Response
Supported Media Types
- application/json
- application/xml
200 Response
successful operation
Root Schema : CohortList
Type:
Show Source
object
-
cohortListDescription(optional):
string
-
cohortListDetails(optional):
object LinkedReference
-
cohortListId(optional):
integer(int64)
-
cohortListName(optional):
string
-
contextFlag(optional):
string
-
createdDate(optional):
string(date-time)
-
ownedBy(optional):
string
-
privacy(optional):
string
Allowed Values:
[ "PUBLIC", "PRIVATE", "SHARED" ]
400 Response
Invalid parameters supplied
404 Response
Cohort List not created
Examples
The following example submits a POST request.
API URL
http://localhost:7010/ohfapi/cg/v3.3/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": "/ohfapi/cg/v3.3/cohortlists/10000000542667" } }