Versions Compared

Key

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

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:

Parameter
Details
cprId[mandatory]Mandatory. Collection Protocol Registration Id
consentDocumentUrlidentifier of consent-tier to update
consentSignatureDateconsent-tier statement
consentTierResponsesID
consentSignatureDateConsent signature date
responses


parameterdetail
codeConsent statement code (Either this or below statement)
statementConsent 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

emailAddressEmail address of the witness
loginNameLogin name of the witness
domainDomain 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:


Eclipse
URLhttp[s]://<host>:<port>/openspecimen/rest/ng/collection-protocol-registrations/248878/consents
MethodPOSTPUT
Requestapplication/json
json


Code Block
languagejs
themeEclipse
{
  "consentSignatureDate": 
"consentTierResponses
"2022-04-20",
  "witness":
[
 {
    "id": 1,
    "
statement
emailAddress:":
"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


Code Block
languagejs
theme
{
    "
cprId
cpShortTitle":
 null
 "
cpId": null
Lung Cancer",
    "ppid":
 null"consentDocumentUrl": null
 "PPID_KW_001",
    "consentSignatureDate":
 null
 1650412800000,
    "witness":
 {"id": 1
 {
        "id": 1,
        "type": "SUPER",
        "firstName":
 
 "Admin",
        "lastName":
 
 "Admin",
        "loginName":
 
 "
admin@admin
admin@krishagni.com",
        "domain":
 
 "openspecimen",
        "emailAddress":
 
 "
admin@admin
admin@krishagni.com"
"admin": true"cpCount": 0"creationDate": null}-"consentTierResponses": [1]0:  {"statement": "Allow to use the sample for research""response": "Yes"}--"consentDocumentName": null} 

 

"cprId": null
"cpId": null
"ppid": null
"consentDocumentUrl": null
"consentSignatureDate": null
"witness": 
{
"id": 1
"firstName": "Admin"
"lastName": "Admin"
"loginName": "admin@admin.com"
"domain": "openspecimen"
"emailAddress": "admin@admin.com"
"admin": true
"cpCount": 0
"creationDate": null
}
-
"consentTierResponses": 
[
1]
0:  
{
"statement": "test"
"response": "Yes"
}
-
-

...

,
        "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"
       }
    ]
}