Got feedback or spotted a mistake?

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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

openspecimen/rest/ng/collection-protocols

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:

Parameter
Details
titleCollection protocol title. Should be unique in the application
shortTitle

Collection protocol short title. Should be unique in the application

code[optional]Collection protocol code
startDate[optional]Collection protocol starting date
endDate[optional]Collection protocol end date. If given then, the endDate should be later than start date.
principalInvestigator

Principal investigator 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
activityStatusActivity status of a collection protocol
visitNameFmt[optional]Visit name format
specimenLabelFmt[optional]Specimen label format
derivedLabelFormat[optional]Derived label format
aliquotLabelFormat[optional]Aliquot label format
ppIdFormat[optional]PPId format
cpSites

It is collection of Sites.

Mainly contains following  parameters :

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

code[optional]: Site code

 

manualPpidEnabled[optional]User inputs allowed for ppid
manualVisitNameEnabled[optional]User inputs allowed for visit name
manualSpecLabelEnabled[optional]User inputs allowed for specimen label

 

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

Use this URL to add collection protocol in openSpecimen application.

Result:

The response of this request will contains the details of the created collection protocol.

Below is the example of the create collection protocol:

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

{
"shortTitle": "A Planned Clinical Study FD",
"title": "Planned Clinical Study",
"code": null,
"principalInvestigator": {
"loginName": "admin@admin.com",
"domain": "openspecimen"
},
"startDate": 1427653800000,
"endDate": 1454178600000,
"participantCount": null,
"specimenCount": null,
"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
  • No labels