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:
Parameter | Details |
---|---|
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, collected specimen or pending counts etc |
exactMatch | Flag to specify whether to perform exact match or not. |
http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols
or
http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols?start={start}&max={maxResults}&searchString={searchString}&countReq={true/false}
Use this URL to get collection protocols in openSpecimen application.
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/rest/ng/collection-protocol-registrations?cpId=1&ppid=LS11&includeStats=true |
Method | GET |
Request | application/json |
Response | [ { "participant":{ "id":13, "firstName":"tim", "lastName":null, "empi":null, "uid":null }, "cprId":13, "registrationDate":1444622400000, "ppid":"LS11", "cpShortTitle":"test protocol", "scgCount":1, "specimenCount":3 } ] |
Error Cases :
code | Applies to | Status Message |
---|---|---|
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 |