Versions Compared

Key

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

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

Or

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

...

  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.
  3. If you pass both then API will return union of visit with given name and 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=

...

Use this URL to get visits in openSpecimen application.

Result:

...

01
MethodGET
Requestapplication/json

Response

Code Block
linenumberstrue
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?cprId=539&includeStats=truesprNumber=1234
MethodGET
Requestapplication/json

Response

Code Block
linenumberstrue
[
0:  {
id"cprId": 665595
"eventId": 4
"ppid": "DWP00013"
"eventLabel": "Baseline"
"eventPoint": 10
"cpId": 2
"cpTitle": "Planned Clinical Study"
"cpShortTitle": 84
name: "LP-6800-W0-PD"
eventLabel: "Initial Visit"
eventPoint: 0
status: "Complete"
visitDate: 1449039799000
anticipatedVisitDate: 1448994600000
anticipatedSpecimens: 12
collectedSpecimens: 9
uncollectedSpecimens: 0
unplannedSpecimens: 0
missedReason: null
missedBy "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:  {
id"cprId": null595
"eventId: 85
name: null
eventLabel: "Week Two"
eventPoint: 7
status: null
visitDate: null
anticipatedVisitDate: 1449599400000
anticipatedSpecimens: 3
collectedSpecimens: 0
uncollectedSpecimens: 0
unplannedSpecimens: 0
missedReason: null
missedBy": 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