Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Get Visits By Name Or Surgical Pathology Number

openspecimen/rest/ng/visits/bynamespr?visitName=<Visit Name>

Or

openspecimen/rest/ng/visits/bynamespr?sprNumber=<Surgical Pathology Number>

Use this resource to get all visits with given name and spr number. 

Use HTTP GET 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
visitName [optional]Name of the visit
sprNumber [optional]Surgical pathology number

Here both parameters are optional

  1. If you pass only visit name API will return visit with given visit name
  2. If you pass only spr number then API will return all visits with given spr number.

Result:

The response of this request will contains the details of the visits with anticipated and unplanned collection status.

Below is the example of the get visits by name:

URLhttp://<host>:<port>/openspecimen/rest/ng/visits/bynamespr?visitName=01
MethodGET
Requestapplication/json

Response

0:  {
"cprId": 595
"eventId": 4
"ppid": "DWP00013"
"eventLabel": "Baseline"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": 722
"name": "01"
"clinicalDiagnosis": "Not Specified"
"clinicalStatus": "Not Specified"
"activityStatus": "Active"
"site": "Arkansas Hospital"
"status": "Complete"
"comments": null
"surgicalPathologyNumber": "1234"
"sprName": null
"missedReason": null
"missedBy": null
"sprLocked": false
"visitDate": 1450377000000
"code": null
"cohort": null
"extensionDetail": null
}

 

Below is the example of the get visits by spr number:

URLhttp://<host>:<port>/openspecimen/rest/ng/visits/bynamespr?sprNumber=1234
MethodGET
Requestapplication/json

Response

0:  {
"cprId": 595
"eventId": 4
"ppid": "DWP00013"
"eventLabel": "Baseline"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": 722
"name": "01"
"clinicalDiagnosis": "Not Specified"
"clinicalStatus": "Not Specified"
"activityStatus": "Active"
"site": "Arkansas Hospital"
"status": "Complete"
"comments": null
"surgicalPathologyNumber": "1234"
"sprName": null
"missedReason": null
"missedBy": null
"sprLocked": false
"visitDate": 1450377000000
"code": null
"cohort": null
"extensionDetail": null
}
-

1:  {
"cprId": 595
"eventId": 86
"ppid": "DWP00013"
"eventLabel": "Test"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": "A Planned Clinical Study FD"
"id": 723
"name": "02"
"clinicalDiagnosis": "Not Specified"
"clinicalStatus": "Not Specified"
"activityStatus": "Active"
"site": "3165 Porder Drive"
"status": "Complete"
"comments": null
"surgicalPathologyNumber": "1234"
"sprName": null
"missedReason": null
"missedBy": null
"sprLocked": false
"visitDate": 1450377000000
"code": null
"cohort": null
"extensionDetail": null
}

Error Cases :

code
Applies to
Status Message
200All resourcesSpecimen collection groups got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com