Description: This template is used to add events in any CP based on CP Short Title.
This operation is allowed via REST API only. REST API details are as below:
> To Upload File:
URL | http://<host>:<port>/ openspecimen/rest/ng/import-jobs/input-file |
Method | POST |
Request | application/json |
File | CSV File to be uploaded Ex: cpe.csv |
Response |
> To Start Import:
URL | http://<host>:<port>/ openspecimen/rest/ng/import-jobs/ | |
Method | POST | |
Request | application/json | |
Json |
| |
Response |
Note: Coding needs to be enabled for this, if Specimen Requirements also needs to be imported using BO.
openspecimen/rest/ng/collection-protocol-events
Use this resource to create 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 |
---|---|
eventLabel | event label |
eventPoint | event point (in days) |
collectionProtocol | collection protocol name |
defaultSite | default site name |
clinicalDiagnosis | clinical disgnosis, value should be exist in PV's |
clinicalStatus | clinical status, value should be exist in PV's |
activityStatus | activity 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:
URL | http://<host>:<port>/ openspecimen/rest/ng/collection-protocol-events |
Method | POST |
Request | application/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 |
---|---|---|
200 | All resources | Collection Protocol Event has been created successfully |
400 | All requests | Invalid parameters, e.g duplicate event label, blank event label etc |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |