openspecimen/rest/ng/collection-protocols
...
Parameter | Details | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
title | Collection 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 not 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
activityStatus | Activity 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 | Sites | ||||||||||||||||||||||||||||||||||||||||||||||||||
events[optional] | It is collection of collection protocol event details Mainly contains following parameters :
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
cpSiteRoles[optional] | It is collection of Sites and Roles with respect to CP. By default it will be none. i.e. Blank collection. Mainly contains following parameters : roleName : Role of user like Scientist, Admin etc. For this attribute role must be present in application. 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
...
Below is the example of the create collection protocol:
...
protocol:
URL | http://<host>:<port>/ openspecimen/rest/ng/collection-protocols | ||
Method | POST | ||
Request | application/json | ||
json | cpSiteRoles: [0]{ "domain": " catissueopenspecimen" "receiver": { "loginName":"admin@admin.com", "domainName":"catissue" }, "collectionContainer":"Frizeer", "collectionProcedure" : "Needle Aspirate", "receivedQuality":"Acceptable", "lineage" : "New", "activityStatus":"Active", "childSpecimenRequirementCollection": [ { "collectionTimestamp":"2014-09-12", "collector": { "loginName":"admin@admin.com", "domainName":"catissue" }, "receiver": { "loginName":"admin@admin.com", "domainName":"catissue" }, "collectionContainer":"Frizeer", "collectionProcedure" : "Not Specified", "receivedQuality":"Acceptable", "lineage" : "Aliquot", "activityStatus":"Active", "childSpecimenRequirementCollection":[ ] } ] } ] } ], "coordinators": [], "investigator": { "loginName": "admin@admin.com", "domainName": "catissue" } } | Response | }, |
Response |
|
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Collection Protocol has been created successfully |
400 | All requests | Invalid parameters, e.g duplicate CP title, blank CP title etc |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |