POST
/transactional-api/update-scr-consentUpdate Summary Care Record Consent
Sets the patient's consent preference for their Summary Care Record and pushes the change to Spine. User-restricted only: the calling staff member must have a CIS2 identity with the B0020 (Control Consent Status) RBAC activity code.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/update-scr-consent' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"consentPreference": "773051000000102",
"reason": "Patient requested at consultation"
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
patientId | string<uuid> | Yes | Medicus patient identifier. |
consentPreference | enum | Yes | SNOMED CT concept id for the patient's new Summary Care Record consent preference. One of: 773031000000109, 773051000000102, 777441000000102. |
reason | string (nullable) | No | Optional free-text reason for the change, recorded on the care record note. |
Responses
200 Consent preference updated.
Response fields
| Field | Type | Description |
|---|---|---|
noteId | string<uuid> |
{
"noteId": "b3d1f7a2-6c4e-4b9a-8e0f-1a2b3c4d5e02"
}
400 Validation error.
5 possible code values
| Code | Description | When |
|---|---|---|
missing-patient-id | The patientId is required. | patientId is blank |
invalid-patient-id | The patientId is not valid. | patientId is not a valid UUID |
patient-not-found | Patient not found for this patientId | patientId doesn't correspond to a patient |
missing-consent-preference | The consentPreference is required. | consentPreference is blank |
invalid-consent-preference | The consentPreference must be one of the supported values. | consentPreference is not one of the supported SNOMED CT concept ids |
Response fields
| Field | Type | Description |
|---|---|---|
errors[].code | string | |
errors[].description | string |
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required."
}
]
}
403 The calling staff member cannot be authorised for this action.
3 possible code values
| Code | Description | When |
|---|---|---|
cis2-not-logged-in | This staff member is not currently logged in with CIS2. They must log in with CIS2 and try again. | the calling staff member is not currently logged in with CIS2 (never logged in, or their session has lapsed and could not be refreshed) |
cis2-activity-not-granted | This staff member's CIS2 role does not have the RBAC activity code required. | the calling staff member's CIS2 role lacks the required RBAC activity code |
application-restricted-not-supported | This endpoint is only available to user-restricted callers. | the call is application-restricted rather than user-restricted |
Response fields
| Field | Type | Description |
|---|---|---|
errors[].code | string | |
errors[].description | string |
{
"errors": [
{
"code": "cis2-not-logged-in",
"description": "This staff member is not currently logged in with CIS2. They must log in with CIS2 and try again."
}
]
}