Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


openspecimen/rest/ng//collection-protocol-registrations?cpId={collection-protocol-Id}

or

openspecimen/rest/ng/collection-protocol-registrations?cpId={collectionProtocolId}&registrationDate={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.
searchStringThe value with which you want to search the participant registration. The given value will be matched with PPID, firstName, lastName
registraitonDateParticipant registration date
paritcipantNameThis parameter will be used to match on the basis of firstName and lastName of the participant
participantProtocolIdMatched with the protocol participant Id
participantUniqueIdentifierMatched with the unique identifier of the patient
masterPatientIndexMatched with Medical record number, participant unique identifier and master patient index
masterPatientIndexMatched with master patient index
dateOfBirthMatched with participants date of birth
specimenDetailsMatched with specimen label and barcode
startAt start index of the results
maxResultsMaximum number of records to fetch. By default it will be 1000
includeStatsTo specify whether to include statistics like visits count, specimens count etc
exactMatchFlag 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:

http://<host>:<port>/openspecimen/[ { participant{ id13, firstName"tim", lastNamenull, empinull, null} cprId:13, "registrationDate":1444622400000, ppid"LS11" cpShortTitle"testprotocol",scgCount1, "specimenCount":3 } ]
URLItemValue
HTTP MethodPOST
URL/rest/ng/collection-protocol-registrations?cpId=1&ppid=LS11&includeStats=true
MethodGET
Requestapplication/json

Response

Code Block
languagejs
themeEclipse
linenumberstrue
Request Body


Code Block
{
  "
cpId":
 <collection protocol ID>,
  
"
registrationDate":
 <registration 
date>,
  
"
ppid":
 <ppid>
  "
name":
 <participant first name or last name>
  "
dob":
 <birth date>,
  
"uid":
 <SSN or any national 
ID>,
  
"
specimen"
 <specimen label 
or barcode>,
  "
includeStats":
 <true|false>,
  
"
startAt":
 
<startAt | 0>,
  "
maxResults":
 <maxResults | 

 

 

Error Cases :

code
Applies to
Status Message
200All resourcesCollection protocols registration got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations
100>
}


Response BodyList of registered participants that match the requested criteria.


 

Parameters:

Parameter
Details
cpIdIdentifier of CP whose participants are queried. Mandatory parameter. 
searchStrQuery string. Finds participants whose first name or last name or UID contains query string.
registraitonDateParticipant registration date
nameFinds participants whose first name or last name contains this parameter  value.
ppidMatches participants by PPID. Exact or contains match is specified by exactMatch parameter.
uidMatches participants by UID. Exact or contains match is specified by exactMatch parameter.
dobMatches participants by birth date
specimenFinds participants whose specimen labels or barcodes contains this parameter value
startAt Specifies the starting participant to include in the response. 
maxResultsMaximum number of records to fetch. By default it will be 100
includeStatsBoolean specifying whether participant statistics like visits, specimens count should be included in the response
exactMatchSpecifies whether the PPID or UID match should be exact match or contains match (i.e. sub-string match).