openspecimen/rest/ng/visits?cprId=3<regId>&includeStats=true/false
Use this resource to get specimen collection groupsvisits. This API returns all visits for the given registration id.
...
Parameter | Details |
---|---|
cprId | Identifier of the collection protocol registration. |
includeStats [optional] | For true value, API will return collection status of visits which include planned and unplanned collection. By default false value is set. |
http[s]:<host>:<port>/openspecimen/rest/ng/visits?cprId=2 =<regId>&includeStats=true/false
Use this URL to get specimen collection groups get visits in openSpecimen application.
...
The response of this request will contains the details of the specimen collection groupsvisits with anticipated and unplanned collection status.
Below is the example of the get specimen collection groupsvisits:
URL | http://<host>:<port>/openspecimen /rest/ng/visits?cprId=539&includeStats=3true | |||||
Method | GET | |||||
Request | application/json | |||||
Response |
"id":1, "eventId":7, "name":"Test1234_Initial Visit_1", "eventLabel":"Initial Visit", "eventPoint":0, "status":"Complete", "visitDate":1432013976000, "anticipatedVisitDate":1431921600000, "anticipatedSpecimens":1, "collectedSpecimens":2, "uncollectedSpecimens":1, "unplannedSpecimens":1, }] |
...
|
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Specimen collection groups got successfully |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |