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 2 Next »

openspecimen/rest/ng/collection-protocol-events

Use this resource to add collection protocol event 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
eventLabelevent label
eventPointevent point (in days)
collectionProtocolcollection protocol name
defaultSitedefault site name
clinicalDiagnosisclinical disgnosis, value should be exist in PV's
clinicalStatusclinical status, value should be exist in PV's
activityStatusactivity status
code[optional]event code, it is unique in given collection protocol

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

Use this URL to create collection protocol event in the OpenSpecimen application.

Result:

The response of this request will contains the details of the create collection protocol event

Below is the example of the create collection protocol event:

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocol-events
MethodPOST
Requestapplication/json
json
{
    "activityStatus": "Active",
    "clinicalDiagnosis": "8551/3 Acinar cell cystadenocarcinoma",
    "clinicalStatus": "Operative", 
    "code": null,
    "collectionProtocol": "BocaBiosciences CP",
    "defaultSite": "Bocabio Collection Site",
    "eventLabel": "Base visit", 
    "eventPoint": 0
}

Response

{
    "id": 10,
    "activityStatus": "Active",
    "clinicalDiagnosis": "8551/3 Acinar cell cystadenocarcinoma",
    "clinicalStatus": "Operative", 
    "code": null,
    "collectionProtocol": "BocaBiosciences CP",
    "defaultSite": "Bocabio Collection Site",
    "eventLabel": "Base visit", 
    "eventPoint": 0
}

 

 Error Cases :

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

 

 

  • No labels