This API is available for Registering a participant
List of mandatory fields:
- cpId
- ppId
- barcode
- activityStatus
- registrationDate
...
Use this resource to register a new/existing participant in the OpenSpecimen application. Use HTTP POST method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
Parameter | Details | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
participant | Details of the participant which is being registered. If the participant already exists then specify the identifier of that participant otherwise specify the complete details, below are the attributes of the participant:
| ||||||||||||||||||||||||||||||||||
cpId | Identifier of the protocol to which the participant is being registered. | ||||||||||||||||||||||||||||||||||
cpTitle | Title of the protocol to which the participant is being registered. | ||||||||||||||||||||||||||||||||||
cpShortTitle | ShortTitle of the protocol to which the participant is being registered. | ||||||||||||||||||||||||||||||||||
ppid [optional if autogeneration set at protocol level] | Protocol Participant Identifier, this is the identifier to uniquely identify the participant with in a protocol. Note: If PPID is set to auto-generated at protocol level, then please leave this attribute blank. | ||||||||||||||||||||||||||||||||||
registrationDate | Date of the registration of participant | ||||||||||||||||||||||||||||||||||
externalSubjectId | External subject id of the participant (optional) |
Note: For the collection protocol attributes, any one is required from the three: cpId/cpTitle/cpShortTitle.
http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocol-registrations/
Use this URL to add participant in OpenSpecimen application.
Result:
The response of this request will contains the details of the registered participant.
Below is the example of the register participant:
URL | openspecimen/rest/ng/collection-protocol-registrations/ |
Request type | application/json |
Method | POST |
json | { " |
participant":{ "id":2 }, "cpId":1, "ppid":"ASCI123", " |
activityStatus":" |
Active", " |
registrationDate":" |
2014-04-21", |
" |
externalSubjectId": " |
TEST_001" } | |
Response | { "id":5, " |
participant":{ "id":2 }, "cpId":1, "ppid":"ASCI123", " |
activityStatus":" |
Active", " |
registrationDate":" |
1398105000000", |
" |
externalSubjectId": " |
TEST_001" } |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Participant registered successfully |
400 | All requests | Invalid parameters, e.g duplicate |
UID, duplicate PPID etc | ||
401 | All requests | Authorization failed, User doesn’t have Authority to register Participant for the given collection protocol |
500 | All requests | Internal server error, Encountered server error while performing operations |