Versions Compared

Key

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

/openspecimen/rest/ng/visits


This API is available for add visit for.

List of mandatory fields:

  1. cprId
  2. eventId
  3. ppid
  4. eventLabel
  5. eventPoint
  6. cpTitle
  7. cpShortTitle
  8. name
  9. clinicalDiagnosis
  10. clinicalStatus
  11. activityStatus
  12. site
  13. status
  14. comments
  15. surgicalPathologyNumber
  16. missedReason
  17. missedBy - (User Details)
  18. visitDate
  19. code
  20. cohort

...

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.

ParameterDescription
cprIdSystem generated identifier of the registered participant
eventIdEvent identifier
eventLabelEvent label
ppidParticipant protocol identifer
cpTitleCollection protocol title
cpShortTitleCollection protocol short title
nameVisit 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
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 invoke the create visit API, following fields are mandatory

  1. cprId or (ppid and cpTitle) or (ppid and cpShortTitle)
  2. name
  3. 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:


URLopenspecimen/rest/ng/visits
Request typeapplication/json
MethodPOST
json


Code Block
languagejs

{
   "cprId":5,
   "eventId":2,

   "cpShortTitle":"CNS"
   "name":"skinCancerStudy_1_11",
   "clinicalDiagnosis":"Not Specified",
   "clinicalStatus":"Not Specified",
   "activityStatus":"Active",
   "site":"ATCC",
   "collectionStatus":"Complete", 
   "surgicalPathologyNumber":"path123" 
}

Response

 

{
   "id":1,
   "cprId":5,
   "cpeId":2,
   "name":"skinCancerStudy_1_11",
   "clinicalDiagnosis":"Not Specified",
   "clinicalStatus":"Not Specified",
   "activityStatus":"Active",
   "collectionSiteName":"ATCC",
   "collectionStatus":"Complete",
}

...

linenumberstrue
{
"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": "2015-11-23",
"status": "Complete",
"surgicalPathologyNumber": "1234567",
"cohort": "Treated"
}


Response


Code Block
languagejs
linenumberstrue
{
 "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": "2015-11-23",
"status": "Complete",
"surgicalPathologyNumber": "1234567",
 "cohort": "Treated"
}



Error Cases :

code
Applies to
Status Message
200All resources
Specimen Collection group
Visit has been 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
authority to create
specimen collection group
visit for the given collection protocol
500All requestsInternal server error, Encountered server error while performing operations