Versions Compared

Key

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

catissuecore/rest/ng/collection-protocols/{id}

or

catissuecore/rest/ng/collection-protocols/title={title}

or

catissuecore/rest/ng/collection-protocols/shortTitle={shortTitle}

Use this resource for update the Collection Protocol. Use 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
title Collection Collection protocol title. Unique Should be unique in the application
shortTitle

Collection protocol short title. Unique 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 earlier 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
activityStatusActivity status of a collection protocol
cpTypevisitNameFmt[optional]Collection protocol typelabelFormatVisit name format
specimenLabelFmt[optional]CP Specimen label format
derivedLabelFormat[optional]Derived label format
aliquotLabelFormat[optional]Aliquot label format
ppIdFormat[optional]PPId format
cpSiteRoles[optional]cpSites

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.

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

code[optional]: Site code

 

http[s]:<host>:<port>/catissuecore/rest/ng/collection-protocols/{id}

or

http[s]:<host>:<port>/catissuecore/rest/ng/collection-protocols/title={title}

or

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


Use this URL to update collection protocol in caTissue application.

 http[s]:<host>:<port>/catissuecore/rest/ng/collection-protocols/shortTitle={shortTitle}

Use this URL to update collection protocol in caTissue application.

 id}

Result:

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

...

{

    "id" : 1,

    "title":"My Cp",

    "shortTitle": "CpM",

    "startDate" :  "2012-07-23",

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

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

    "cpSiteRoles" : {

        "id" : 1,

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

URL

http://<host>:<port>/catissuecore/rest/ng/collection-protocols/1

or

http://<host>:<port>/catissuecore/rest/ng/collection-protocols/title=My Cp

or

http://<host>:<port>/catissuecore/rest/ng/collection-protocols/shortTitle=CpM

2

MethodPUT
Requestapplication/json
json

{

    "title":"My Cp",

    "shortTitle": "CpM",

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

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

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

    "cpSiteRoles" : {

        "siteName" : "My Site",

        "roleName" : "Scientist"

    }

}

Response

Code Block
languagejs
themeEclipse
linenumberstrue
{
    "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"
}

Response

Code Block
languagejs
themeEclipse
linenumberstrue
{
    "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"
}

 

Error Cases :

code
Applies to
Status Message
200All resourcesCollection Protocol has been updated successfully
400All requestsInvalid parameters, e.g  duplicate CP title, blank CP Title etc
401All requestsAuthorization failed, User doesn’t have Authority
404All requestsCP not found, CP with given details not present in the system
500All requestsInternal server error, Encountered server error while performing operations