Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Collection Protocol Groups (CPG)

Introduction

From v6.2, similar collection protocols (belonging to a site or department, having the same workflows, forms, and data fields) can be moved under a cp group. (Refer to https://openspecimen.atlassian.net/wiki/x/NQBcGw for more information)

Adding CPs under a CPG

URL: http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocol-groups/{id}

({id} → This is the identifier of the Collection Protocol Group)

Use this resource to add collection protocols under a collection protocol group. Use the HTTP PUT method to call this API by passing the below details in JSON format.

Below are the attributes which need to be sent in the request body:

Parameter

Details

Parameter

Details

name

Name of the collection protocol group (Optional)

activityStatus

Activity status of the collection protocol group (Optional)

cps

List of collection protocol(s) that should be present in the mentioned collection protocol group

Example

URL

http:localhost:8081/openspecimen/rest/ng/collection-protocol-groups/9

Method

PUT

Request

application/json

JSON

{ "name": "Pune Site CP Group (PSCG)", "cps": [ {"shortTitle": "Pune_CP1"}, {"shortTitle": "Pune_CP2"} ] }

Response

{ "id": 9, "name": "Pune Site CP Group (PSCG)", "activityStatus": "Active", "cps": [ { "opComments": null, "id": 14, "shortTitle": "Pune_CP1", "title": "Pune_CP1", "code": "PCP1", "principalInvestigator": { "id": 6, "type": "NONE", "firstName": "Barnabus", "lastName": "Stinson", "loginName": "Barnacle", "domain": "openspecimen", "emailAddress": "BarnabusStins@Stins.com", "instituteName": "Biobank Institute", "primarySite": null, "admin": false, "instituteAdmin": false, "manageForms": false, "cpCount": 0, "creationDate": 1576780200000, "activityStatus": "Locked" }, "startDate": null, "endDate": null, "participantCount": null, "specimenCount": null, "ppidFmt": "", "manualPpidEnabled": false, "specimenCentric": false, "catalogId": null }, { "opComments": null, "id": 3, "shortTitle": "Pune_CP2", "title": "Pune_CP2", "code": null, "principalInvestigator": { "id": 2, "type": "SUPER", "firstName": "System", "lastName": "Administrator", "loginName": "admin", "domain": "openspecimen", "emailAddress": "admin@localhost", "instituteName": "Biobank Institute", "primarySite": null, "admin": true, "instituteAdmin": false, "manageForms": false, "cpCount": 0, "creationDate": null, "activityStatus": "Active" }, "startDate": null, "endDate": null, "participantCount": null, "specimenCount": null, "ppidFmt": null, "manualPpidEnabled": false, "specimenCentric": false, "catalogId": null } ] }

Response code

Code

Applies to

Status Message

Code

Applies to

Status Message

200

All resources

Collection protocols successfully added to the group.

400

All requests

Invalid parameters. (Ex: Cp group does not exist)

401

All requests

Authorization failed, the user doesn’t have authority.

500

All requests

Internal server error, encountered server error while performing operations.

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com