/
Save Consents
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Save Consents

openspecimen/rest/ng/collection-protocol-registrations/{cprId}/consents

Use this API to save participant consent responses. Use HTTP PUT method to invoke 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
cprIdMandatory. Collection Protocol Registration ID
consentSignatureDateConsent signature date
responses
parameterdetail
codeConsent statement code (Either this or below statement)
statementConsent statement (Either this or above code)
response

Patient response. Response should be one of the below:

Yes, No, Not Specified, Withdrawn, None

witness
Parameter

Details

emailAddressEmail address of the witness
loginNameLogin name of the witness


Given below is an example request/response exchanged to update participant consents:


URLhttp[s]://<host>:<port>/openspecimen/rest/ng/collection-protocol-registrations/48878/consents
MethodPUT
Requestapplication/json
json
{
  "consentSignatureDate": "2022-04-20",
  "witness": {
    "id": 1,
    "emailAddress:": "admin@krishagni.com"
  },
  "comments": "Consent to collect specimens",
  "responses": [
    {
      "code": "CS1",
      "response": "Yes"
    },
    {
      "code": "CS2",
      "response": "No"
    }
  ]
}

Response

{
    "cpShortTitle": "Lung Cancer",
    "ppid": "PPID_KW_001",
    "consentSignatureDate": 1650412800000,
    "witness": {
        "id": 1,
        "type": "SUPER",
        "firstName": "Admin",
        "lastName": "Admin",
        "loginName": "admin@krishagni.com",
        "domain": "openspecimen",
        "emailAddress": "admin@krishagni.com",
        "instituteId": 1,
        "instituteName": "A1 - For Demo Users",
        "admin": true,
        "instituteAdmin": false,
        "phoneNumber": "",
        "manageForms": true,
        "manageWfs": true,
        "cpCount": 0,
        "activityStatus": "Locked"
    },
    "comments": "Consent to collect specimens",
    "responses": [
       {
         "code": "CS1",
         "response": "Yes"
       },
       {
         "code": "CS2",
         "response": "No"
       }
    ]
}

Related content

Consents CSV
Consents CSV
Read with this
Collecting Consent Data
Collecting Consent Data
Read with this
Create Participant
Create Participant
Read with this
Configure Consents in Participant overview page
Configure Consents in Participant overview page
Read with this
Consents tracking
Consents tracking
Read with this
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com