openspecimen/rest/ng//collection-protocol-registrations?cpId={collection-protocol-Id}
or
openspecimen/rest/ng/collection-protocol-registrations?cpId={collectionProtocolId}®istrationDate={registraitonDate}&name={paritcipantName}&query={searchString}&ppid={participantProtocolId}&uid={participantUniqueIdentifier}&participantId={masterPatientIndex}&empi={masterPatientIndex}&dob={dateOfBirth}&specimen={specimenLabel}&startAt={startAt }&max={maxResults }&includeStats={true/false}&exactMatch={true/false}
Use this resource to get participant registration details for a given protocol. This API returns all the matching participant registration details based on the searchString, if searchString not specified then it returns all the registrations for a given collection protocol.
Use HTTP GET method to call this API by passing the below request parameters.
Below are the attributes which need to be sent in the request body:
| |
---|
collectionProtocolId[mandatory] | The collection protocol identifier for which the participant registrations to be searched. |
searchString | The value with which you want to search the participant registration. The given value will be matched with PPID, firstName, lastName |
registraitonDate | Participant registration date |
paritcipantName | This parameter will be used to match on the basis of firstName and lastName of the participant |
participantProtocolId | Matched with the protocol participant Id |
participantUniqueIdentifier | Matched with the unique identifier of the patient |
masterPatientIndex | Matched with Medical record number, participant unique identifier and master patient index |
masterPatientIndex | Matched with master patient index |
dateOfBirth | Matched with participants date of birth |
specimenDetails | Matched with specimen label and barcode |
startAt | start index of the results |
maxResults | Maximum number of records to fetch. By default it will be 1000 |
includeStats | To specify whether to include statistics like visits count, specimens count etc |
exactMatch | Flag to specify whether to perform exact match or not. |
Result:
The response of this request will contains the details of the collection protocols.
Below is the example of the get all collection protocols:
URL | http://<host>:<port>/
openspecimen/Item | Value |
---|
HTTP Method | POST |
URL | /rest/ng/collection-protocol-registrations?cpId=1&ppid=LS11&includeStats=true |
Method | GET |
Request | application/json |
Response | Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
[
{
Request Body | | participant | { <collection protocol ID>,
|
| | id | 13, | | | firstName | "tim",
| lastName | null,
<participant first name or last name>
" |
| empi | null, | | null | } | | cprId | :13, | "registrationDate":1444622400000,
| ppid | "LS11" | | cpShortTitle | "test | protocol", | scgCount | 1, | "specimenCount":3
}
]
Error Cases :
| | |
---|
200 | All resources | Collection protocols registration got successfully |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |
Response Body | List of registered participants that match the requested criteria. |
Parameters:
| |
---|
cpId | Identifier of CP whose participants are queried. Mandatory parameter. |
searchStr | Query string. Finds participants whose first name or last name or UID contains query string. |
registraitonDate | Participant registration date |
name | Finds participants whose first name or last name contains this parameter value. |
ppid | Matches participants by PPID. Exact or contains match is specified by exactMatch parameter. |
uid | Matches participants by UID. Exact or contains match is specified by exactMatch parameter. |
dob | Matches participants by birth date |
specimen | Finds participants whose specimen labels or barcodes contains this parameter value |
startAt | Specifies the starting participant to include in the response. |
maxResults | Maximum number of records to fetch. By default it will be 100 |
includeStats | Boolean specifying whether participant statistics like visits, specimens count should be included in the response |
exactMatch | Specifies whether the PPID or UID match should be exact match or contains match (i.e. sub-string match). |