Versions Compared

Key

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

catissuecorePOST openspecimen/rest/ng/distributionprotocolsdistribution-protocols

Use this resource to create new destribution distribution protocol in the caTissue 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
titleTitle of distribution protocol
shortTitleShort title of distribution protocol
principalInvestigator

Principal Investigator

Name of investigator
Title 
Short Title 
IRB ID 
Start Date 
Number of Specimen Anticipated 
Description URL

 

 

user details. This is the JSON format object with following details:

idIdentifier of the user.
loginName[optional]Login name of the user.
 instituteNameReceiving institute for which the distribution protocol will be used.
 defReceivingSiteName [optional]  Default receiving site name under receiving institute.
irbId [optional]IRB ID of of distribution protocol
startDate [optional]
Starting date of distribution protocol
endDate [optional]End date of distribution protocol.
 report [optional]This is the JSON format object for order report query. The required field for report is id (identifier) of query.
 distributingSites

This is the JSON object of distributing site details the object format is institute name : array of siteName.

Example:

"{"institute1": ["Site1", "Site2"], "institute2": []}"

The empty array for site names represent "All current & future sites".

activityStatus [optional]

Defines the status of a distribution protocol record

{active, disabled}. The default value will be "Active".

 

POST http[s]:<host>:<port>/catissuecoreopenspecimen/rest/ng/distributionprotocolsdistribution-protocols

Use this URL to add distribution protocol in caTissue OpenSpecimen application. 

Result:

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

Below is the example of the create distribution protocol:

 

{

"principal_investigator" : "Admin Admin",

"title" : "CPOProtocol",

"short_title" : "CPOP",

"IRB_ID" : "IRB004",

"start_date" : "06-10-2014",

"number_of_participants _anticipated" : 56,

"description_url" : "www.simpleurl.com"
URLhttp://<host>:<port>/catissuecoreopenspecimen/rest/ng/distributionprotocolsdistribution-protocols
MethodPOST
Requestapplication/json
json

{

"principal_investigatortitle" : "DP Protocol",

"shortTitle" : "DP Pro",
"principalInvestigator" : {"id": "Admin Admin2"},

"titleinstituteName": "CPOProtocolInstitute1",

"short_title defReceivingSiteName": "CPOPSite1",

"IRB_IDirbId" : "IRB004IRB555571",

"start_datestartDate" : "2014-06-10-2014",

"number_of_participants _anticipated" : 56,

"description_url" : "www.simpleurl.com"
}

Response

13",

"endDate": "2015-10-01",

"distributingSites": {"Institute2": ["Site4", "Site5"]}
}

Response

{
  "id": 5,
  "title": "DP Protocol",
  "shortTitle": "DP Pro",
  "principalInvestigator": {
    "id": 3,
    "firstName": "admin",
    "lastName": "admin",
    "loginName": "admin@admin.com",
    "domain": "openspecimen",
    "emailAddress": "admin@admin.com",
    "admin": false,
    "cpCount": 0,
    "creationDate": 1442946600000
  },
  "startDate": 1401580800000,
  "endDate": 1444435200000,
  "distributedSpecimensCount": 0,
  "instituteName": "Institute1",
  "defReceivingSiteName": "Site1",
  "irbId": "IRB555571",
  "activityStatus": "Active",
  "report": null,
  "distributingSites": {
    "Institute2": [
      "Site4",

      "Site5"
    ]
  }
}

 

Error Cases :

code
Applies to
Status Message
200All resourcesDistribution Protocol protocol has been created successfully
400All requestsInvalid parameters, e.g  duplicate Protocol protocol Name, blank Protocol Name  blank protocol name etc
401All requestsAuthorization failed, User user doesn't have Authority
500All requestsInternal server error, Encountered server error while performing operations