This API is available for creating Specimen Collection Group.
List of mandatory fields:
- cprId
- cpeId
- name
- clinicalDiagnosis
- clinicalStatus
- activityStatus
- collectionSiteName
- collectionStatus
- barcode
- comment
- surgicalPathologyNumber
- collectorName
- collectionTimestamp
- collectionComments
- collectionProcedure
- collectionContainer
- receiverName
- receivedTimestamp
- receivedComments
- receivedQuality
...
/openspecimen/rest/ng/visits
This API is used to add/create a new visit of pre-registered participant. Use HTTP POST method to invoke this API by passing below payload details in JSON format.
Below are the attributes which need to be sent in request body.
Parameter | Description |
---|---|
cprId | System generated identifier of the registered participant |
eventId | Event identifier |
eventLabel | Event label |
ppid | Participant protocol identifer |
cpTitle | Collection protocol title |
cpShortTitle | Collection protocol short title |
name | Visit name |
clinicalDiagnosis (Prior to v4.0) clinicalDiagnoses (From v4.0) [optional] | Clinical diagnosis Note: Starting v4.0, clinical diagnosis is a multi-value field in Visit. |
clinicalStatus [optional] | Clinical status |
activityStatus [optional] | Activity Status |
site | Site name where visit perform |
status | Status of visit (COMPLETE, PENDING, MISSED) |
missedReason [optional] | Reason in case of missed visits |
missedBy [optional] | User details by which visit got missed |
comments [optional] | Comments on visit |
surgicalPathologyNumber [optional] | Surgical pathology number |
cohort [optional] | Cohort is a group of subjects who have shared a particular event together during a particular time span. Cohorts may be tracked over extended periods in a cohort study |
visitDate [optional] | Date of visit.By default it will take current date. |
Note :
To invoke the create visit API, following fields are mandatory
- cprId or (ppid and cpTitle) or (ppid and cpShortTitle)
- name
- site
API URL:
http[s]:<host>:<port>/openspecimen/rest/ng/visits
Use this URL to add visit for a pre-registered participant in OpenSpecimen application.
Result:
The response of this request will contains the details of the created visit.
Below is the example of the create participant:
URL | openspecimen/rest/ng/visits | |
Request type | application/json | |
Method | POST | |
json |
|
"cprId":5,
"cpeId":2,
|
"clinicalDiagnosis":"Not Specified",
"clinicalStatus":"Not Specified",
"activityStatus":"Active",
"collectionSiteName":"ATCC",
"collectionStatus":"Complete",
"barcode":"barcode1",
"surgicalPathologyNumber":"path123",
"collectorName":"tester@site.com",
"collectionTimestamp":"Jul 1, 2014 8:11:36 PM",
"collectionComments":"comments",
"collectionProcedure":"Lavage",
"collectionContainer":"CPT",
"receiverName":"tester@site.com",
"receivedTimestamp":"MAY 1, 2014 8:11:36 PM",
"receivedQuality":"Clotted"
}
Response
{
"id":1,
"cprId":5,
"cpeId":2,
"name":"skinCancerStudy_1_11",
"clinicalDiagnosis":"Not Specified",
"clinicalStatus":"Not Specified",
"activityStatus":"Active",
"collectionSiteName":"ATCC",
"collectionStatus":"Complete",
"barcode":"barcode1",
"surgicalPathologyNumber":"path123",
"collectorName":"tester@site.com",
"collectionTimestamp":"Jul 1, 2014 8:11:36 PM",
"collectionComments":"comments",
"collectionProcedure":"Lavage",
"collectionContainer":"CPT",
"receiverName":"tester@site.com",
"receivedTimestamp":"MAY 1, 2014 8:11:36 PM",
"receivedQuality":"Clotted"
}
| ||||||||
Response |
|
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources |
Visit has been created successfully | ||
400 | All requests | Invalid parameters, e.g duplicate |
name, duplicate barcode, invalid |
Site Name , duplicate code etc | ||
401 | All requests | Authorization failed, User doesn’t have |
authority to create |
visit for the given collection protocol | ||
500 | All requests | Internal server error, Encountered server error while performing operations |