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:
...
Item | Value |
---|
HTTP Method | POST |
URL | /rest/ng/collection-protocol-registrations |
?cpId=1&ppid=LS11&includeStats=trueMethod | GET |
Request | application/json |
Response | [theme | Eclipse |
---|
linenumbers | true |
{"cpId": <collection protocol |
|
participant{ id13 <ppid>,
"externalSubjectIds":[ <Comma separated |
|
"firstName":"tim",
values of external subject identifiers> ],
" |
|
lastNamenull, <participant first name or last name>
" |
|
empinull, uidnull},cprId:13, "registrationDate":1444622400000,
ppid"LS11" cpShortTitle"testprotocol",scgCount1, "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 query criteria. |
Parameters:
| |
---|
cpId | ID of the collection protocol whose participants are to be returned. |
registrationDate | List of participants registered to the CP on date specified by this parameter value. |
name | Participants whose first name or last name contains this parameter value as a substring. |
ppid | Matches participants by PPID. Exact or substring match is specified by exactMatch parameter. |
externalSubjectIds | Matches participants by external subject ID. Need to specify an array of external subject IDs. e.g. "externalSubjectIds":["KW001"] |
participantId | Participants whose UID / eMPI / MRN contains this parameter value as a substring. |
dob | Participants whose birth date is on the date specified by this parameter value. |
specimen | Participants whose specimen labels or barcodes contains this parameter value as a substring. |
startAt | startAt and maxResults are useful in implementing pagination of participants list. When not specified, startAt defaults to 0. When startAt = n , the first element of the response is (n + 1)th participant satisfying the query criteria. |
maxResults | startAt and maxResults are useful in implementing pagination of participants list. This parameter specifies how many participant records should be included in the API response. When not specified, maxResults defaults to 100.
When startAt = n and maxResults = 25 , then the API response includes participants (n + 1), (n + 2), ... (n + 25) of the participants list sorted by their database generated registration IDs. |
includeStats | Boolean specifying whether participant statistics like visits, specimens count should be included in the response |
exactMatch | Specifies whether the PPID should be exact match or sub-string match. Boolean true means exact match. Otherwise it is substring match. |
Given below is an example of API call request body to retrieve first 25 participants whose name is "John" registered to the collection protocol with ID = 16.
Code Block |
---|
POST <app-url>/rest/ng/collection-protocol-registrations/list
{
"cpId": 16,
"name": "john",
"startAt": 0,
"maxResults": 25
} |