Got feedback or spotted a mistake?

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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

openspecimen/rest/ng/visits/bynamespr?visitName=<Visit Name>&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.
  3. If you pass both then API will return union of visit with given name and all visits with given spr number


http[s]:<host>:<port>/openspecimen/rest/ng/visits/bynamespr?visitName=<Visit Name>&sprNumber=<Surgical Pathology Number>

Use this URL to get visits in openSpecimen application.

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:

URLhttp://<host>:<port>/openspecimen/rest/ng/visits?cprId=539&includeStats=true
MethodGET
Requestapplication/json

Response

[
0:  {
id: 665
eventId: 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: null
}
-

1:  {
id: null
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: 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
  • No labels