Versions Compared

Key

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

This API is available for updating Specimen Collection Group.

List of mandatory fields:

  1. cprId
  2. cpeId
  3. name
  4. clinicalDiagnosis
  5. clinicalStatus
  6. activityStatus
  7. collectionSiteName
  8. collectionStatus
  9. barcode
  10. comment
  11. surgicalPathologyNumber
  12. collectorName
  13. collectionTimestamp
  14. collectionComments
  15. collectionProcedure
  16. collectionContainer
  17. receiverName
  18. receivedTimestamp
  19. receivedComments
  20. receivedQuality

...

/openspecimen/rest/ng/visits/{visitId}


This rest api is used to update visit. Use HTTP PUT method to call this api by passing below details in json format.

Below are the attributes which need to be sent in request body.

ParameterDescription
cprIdSystem generated identifier for registered participant for particular collection protocol
eventIdEvent Identifier
eventLabelEvent label
eventPoint [optional]Event point
ppIdParticipant protocol identifer
cpTitleCollection protocol title
cpShortTitleCollection protocol short title
nameVisit name
code [optional]Unique code given to visit. Which can used for barcode based data entry

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
siteSite name where visit perform
statusStatus 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 call below api following fields are mandatory

1.   cprId  or  ppId and cpTitle or ppId and cpShortTitle

2.  eventId or eventLabel

3. Name

4. Site

 

API URL :

http[s]:<host>:<port>/openspecimen/rest/ng/visits/{visitId}

Use this URL to update visit for a 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:

 

...

URLopenspecimen/rest/ng/visits/1
Request typeapplication/json
MethodPUT
json


Code Block
language
{
   "cprId":5,
   "cpeId":2,
   
js
linenumberstrue
{
"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":"2014-04-21",
   "collectionComments":"comments",
   "collectionProcedure":"Lavage",
   "collectionContainer":"CPT",
   "receiverName":"tester@site.com",
   "receivedTimestamp":"2014-04-21",
   "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":"2014-04-21",
   "collectionComments":"comments",
   "collectionProcedure":"Lavage",
   "collectionContainer":"CPT",
   "receiverName":"tester@site.com",
   "receivedTimestamp":"2014-04-21",
   "receivedQuality":"Clotted"
}

 

 "LP-5600-W0-PD",
"code": "1",
"cpTitle": "Lung Cancer Protocol",
"cprId": 101,
"eventId": 1,
"eventLabel": "Initial Visit",
"eventPoint": 0,
"clinicalDiagnoses": [
    "3-part fracture of surgical neck of humerus", 
	"(Idiopathic) normal pressure hydrocephalus"
],
"clinicalStatus": "Operative",
"activityStatus": "Active",
"site": "Site 1",
"visitDate": 23-11-2015,
"status": "Complete",
"surgicalPathologyNumber": "1234567"
}


Response


Code Block
languagejs
{
 "id": 1
"name": "LP-5600-W0-PD",
"code": "1",
"cpTitle": "Lung Cancer Protocol",
"cprId": 101,
"eventId": 1,
"eventLabel": "Initial Visit",
"eventPoint": 0,
"clinicalDiagnoses": [
    "3-part fracture of surgical neck of humerus", 
	"(Idiopathic) normal pressure hydrocephalus"
],
"clinicalStatus": "Operative",
"activityStatus": "Active",
"site": "Site 1",
"visitDate": 23-11-2015,
"status": "Complete",
"surgicalPathologyNumber": "1234567"
}


 

Error Cases :

code
Applies to
Status Message
200All resourcesSpecimen Collection
Group
group has been
updated
created successfully
400All requestsInvalid parameters, e.g  duplicate name, duplicate barcode, invalid Site Name , duplicate code etc
401All requestsAuthorization failed, User doesn’t have Authority to create specimen collection group for the given collection protocol
500All requestsInternal server error, Encountered server error while performing operations