Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use this resource to create new collection protocol in the openSpecimen application. Use HTTP POST 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:

startDate
Parameter
Details
title Collection protocol title.Unique in the application
shortTitle

Collection protocol short title. Unique in the application

Full title of the collection protocol, which is normally used in the regulatory approval documents.

shortTitle

User friendly short string to uniquely identify the collection protocol.

code [optional]A short code to uniquely identify the CP in the system.
startDate [optional]Collection protocol starting date
endDate [optional]Collection protocol end date. If given then, the endDate should not be later than startDatestart date.
investigatorprincipalInvestigator

Principal investigator on of CP

Mainly contains following  parameters :

loginName :  User login name. For this specified user must be present in application.

domainName: Name of domain to which user belongs to. By default it will be catissue.

coordinators [optional]

Collection of coordinators. It is collection of user info mainly contains following parameters :

loginName :  User login name. For this specified user must be present in application.

domainName: Name of domain to which user belongs to. By default it will be catissue.

irbId [optional]Ethics approval id
anticipatedParticipantsCount [optional]Anticipated participants count. This is ignored for specimen centric CPs.
activityStatusActivity status of a collection protocol
cpTypevisitNameFmt [optional]Collection protocol typelabelFormatVisit name format. This is ignored for specimen centric CPs.
specimenLabelFmt [optional]CP Specimen label format
derivedLabelFormat [optional]Derived label format
aliquotLabelFormat [optional]Aliquot label format
ppIdFormatppidFmt [optional]PPId formatcpSiteRoles[optional]It is collection of Sites and Roles with respect to CP. By default it will be none. i.e. Blank collectionPPID format. This is ignored for specimen centric CPs.
cpSites

Array of sites at which the collection protocol is being run or active.

Mainly contains following  parameters :

roleName :  Role of user like Scientist, Admin etc. For this attribute role must be present in application.

siteName: Site name. For this attribute Site must be present in application.

 

...

siteName: Site name.

code[optional]: Site code


manualPpidEnabled [optional]When enabled, users have to manually enter the participant PPID.
manualVisitNameEnabled [optional]When enabled, users have to manually enter the visit names.
manualSpecLabelEnabled [optional]When enabled, users have to manually enter the specimen (primary, derived, aliquot) labels.
specimenCentric

Boolean indicating whether the CP is participant or specimen centric. When the value of this attribute is null or false, a participant centric CP is created. However, when the value is true, a specimen centric CP is created.

Note: This flag is effective only when a CP is being created. The value of this attribute is ignored in the CP update APIs.

In other words, a participant centric CP cannot be converted to specimen centric and vice-versa.


http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols

...

    "aliquotLabelFormat": null,

    "ppIdFormat": "",

    "cpSiteRoles" : {

        "id" : 1,

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

{

    "id" : 1,

    "title":"My Cp",

    "shortTitle": "CpM",

    "startDate" :  "2014-07-23",

    "endDate" : "2018-07-23",

    "investigator" : {"loginName" : "admin@admin.com", "domainName" :"catissue"},

    "labelFormat": null,

    "derivedLabelFormat": null,

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols
MethodPOST
Requestapplication/json
json
{

    "title":"My Cp",

    "shortTitle": "CpM",

    "startDate" :  "2014-07-23",

    "endDate" : "2018-07-23",

     "activityStatus": "Active",

    "investigator" : {"loginName" : "admin@admin.com", "domainName" :"catissue"},

    "cpSiteRoles" : {

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

}

Response

   "shortTitle": "A Planned Clinical Study FD",
"title": "Planned Clinical Study",
"code": null,
"principalInvestigator": {
"loginName": "admin@admin.com",
"domain": "openspecimen"
},
"startDate": 1427653800000,
"endDate": 1454178600000,
"ppidFmt": "DWP%05d",
"manualPpidEnabled": false,
"coordinators": [],
"cpSites": [ {
"siteName": "Arkansas Repository",
"code": "CS_123"
}, {
"siteName": "Arkansas Hospital",
"code": "CS_34"
} ],
"consentsWaived": false,
"irbId": "65465",
"anticipatedParticipantsCount": null,
"descriptionUrl": null,
"specimenLabelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%",
"derivativeLabelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%",
"aliquotLabelFmt": "%PSPEC_LABEL%.%PSPEC_UID%",
"visitNameFmt": null,
"manualVisitNameEnabled": false,
"manualSpecLabelEnabled": true,
"aliquotsInSameContainer": null,
"activityStatus": "Active"
}
Response
{
"id": 2,
"shortTitle": "A Planned Clinical Study FD",
"title": "Planned Clinical Study",
"code": null,
"principalInvestigator": {
"id": 1,
"firstName": "Admin",
"lastName": "Admin",
"loginName": "admin@admin.com",
"domain": "openspecimen",
"emailAddress": "openspecimendemo@gmail.com",
"admin": true,
"cpCount": 0,
"creationDate": null
},
"startDate": 1427653800000,
"endDate": 1454178600000,
"participantCount": null,
"specimenCount": null,
"ppidFmt": "DWP%05d",
"manualPpidEnabled": false,
"coordinators": [],
"cpSites": [ {
"id": 2,
"siteName": "Arkansas Repository",
"code": "CS_123"
}, {
"id": 25,
"siteName": "Arkansas Hospital",
"code": "CS_34"
} ],
"consentsWaived": false,
"irbId": "65465",
"anticipatedParticipantsCount": null,
"descriptionUrl": null,
"specimenLabelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%",
"derivativeLabelFmt": "%PPI%.%SP_TYPE%.%SYS_UID%",
"aliquotLabelFmt": "%PSPEC_LABEL%.%PSPEC_UID%",
"visitNameFmt": null,
"manualVisitNameEnabled": false,
"manualSpecLabelEnabled": true,
"aliquotsInSameContainer": null,
"activityStatus": "Active",
"consents": null,
"events": null
}

 Error Cases :

code
Applies to
Status Message
200All resourcesCollection Protocol has been created successfully
400All requestsInvalid parameters, e.g  duplicate CP title, blank CP title etc
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations

...