openspecimen/rest/ng/collection-protocol-registrations/{cprId}/consents
Use this resource API to save consent-tier response for participant registration in the OpenSpecimen applicationparticipant consent responses. Use HTTP POST PUT method to call invoke this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
| |
---|
cprId[mandatory] | Mandatory. Collection Protocol Registration Id | consentDocumentUrl | identifier of consent-tier to updateID |
consentSignatureDate | consent-tier statement | consentTierResponsesConsent signature date |
responses |
parameter | detail |
---|
code | Consent statement code (Either this or below statement) | statement | Consent tier statement defined in CPstatement (Either this or above code) | response | Patient response. Response should be one of the below: Yes, No, Not Specified, Withdrawn, None |
|
witness |
Parameter | Details |
---|
emailAddress | Email address of the witness | loginName | Login name of the witness | domain | Domain name of the user. its mandatory if you are specifying the login name |
|
http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols/{cpId}/consent-tiers/1
Use this URL to update consent-tier for Collection Protocol in the OpenSpecimen application.
Result:
The response of this request will contains the details of the updated consent-tier
Below is the example of the update consent-tier:
...
...
Given below is an example request/response exchanged to update participant consents:
URL | http[s]://<host>:<port>/openspecimen/rest/ng/collection-protocol-registrations/248878/consents |
Method | POSTPUT |
Request | application/json |
json |
Code Block |
---|
| {
"consentSignatureDate": |
"consentTierResponses[statement"Allow to use the sample for research",
"response":"Yes"
}],
"witness":{
"emailAddress":"admin@admin.com"
}
"admin@krishagni.com"
},
"comments": "Consent to collect specimens",
"responses": [
{
"code": "CS1",
"response": "Yes"
},
{
"code": "CS2",
"response": "No"
}
]
} |
|
Response | cprIdnull"cpId": null nullconsentDocumentUrl": nullPPID_KW_001",
"consentSignatureDate": 1650412800000,
|
null "witness": {
"id": 1,
"type": "SUPER",
"firstName": "Admin",
"lastName": "Admin",
"loginName": " |
admin@adminadmin@krishagni.com",
"domain": "openspecimen",
"emailAddress": " |
admin@adminadmin@krishagni.com",
"instituteId": 1,
"instituteName": "A1 - For Demo Users",
"admin": true,
"instituteAdmin": false,
"phoneNumber": "",
"manageForms": true,
"manageWfs": true,
"cpCount": 0,
|
"creationDate": null
}
-
"consentTierResponses "activityStatus": "Locked"
},
"comments": "Consent to collect specimens",
"responses": [
|
1]0:statementAllowtousethesampleforresearch" "response": "Yes"
},
{
"code": |
"consentDocumentName": null
}
"CS2",
"response": "No"
}
]
}
|
|