Retrieve Consent for a Patient Identifier

get

/HSDataService-web/api/3.2.0/patientapi/patients/{id}/consent

This endpoint supports the retrieval of Consents for a single Patient Identifier passed. It returns all the Consents related information like Status, Type and other associated information.

Request

Supported Media Types
  • application/json
  • application/xml
Path Parameters
id
Type: integer (int64)
Required: true
Patient Row ID
Query Parameters
limit
Type: integer (int32)
Pagination query params: ?limit=2&offset=0
offset
Type: integer (int32)
Pagination query params: ?limit=2&offset=0

Response

Supported Media Types
  • application/json
  • application/xml
200 Response
successful operation
Body
Model for paginated collections of data.
Root Schema : PageableCollectionConsent
Type: object
Model for paginated collections of data.
Nested Schema : items
Type: array
A collection of paged items.
Nested Schema : ConsentStatus
Type: object
Nested Schema : ConsentType
Type: object
Nested Schema : CdmIdentifier
Type: object
Identifier assigned by a given system
Nested Schema : LinkedReference
Type: object
Nested Schema : DateRange
Type: object
Nested Schema : CodeableConcept
Type: object
Model that represents a value as a reference to one or more terminologies or ontologies or defined by the provision of text.
Nested Schema : coding
Type: array
Read Only: true
Code(s) defined by a terminology system.
Nested Schema : Coding
Type: object
Model for a reference to a code defined by a terminology system.
400 Response
Invalid parameters supplied
404 Response
consent not found

Examples

The following example submits a GET request.

API URL

http://localhost:7001/HSDataService-web/api/3.2.0/patientapi/patients/1/consent?limit=2&offset=0

Example of Response Body

The following example shows the response returned in JSON format.

{
  "resourceType": "Consent",
  "items": [
    {
      "identifier": {
        "system": "CDM",
        "value": "1"
      },
      "period": {
        "start": "11/14/1998",
        "end": "12/31/1998"
      },
      "patient": {
        "reference": "/HSDataService-web/api/3.2.0/patientapi/patients/1"
      },
      "consentStatus": {
        "identifier": {
          "system": "CDM",
          "value": "2"
        },
        "status": {
          "coding": [
            {
              "code": "2",
              "display": "Withdrawn",
              "description": "Consent Status Description",
              "sysId": "EHA_CUSTOM_CD_SYS",
              "sysName": "EHA Custom Code System",
              "sysVersion": "1"
            }
          ]
        }
      },
      "consentType": {
        "identifier": {
          "system": "CDM",
          "value": "1"
        },
        "type": {
          "coding": [
            {
              "code": "CS1",
              "display": "CS1Name",
              "description": "Consent Description",
              "sysId": "EHA_CUSTOM_CD_SYS",
              "sysName": "EHA Custom Code System",
              "sysVersion": "1"
            }
          ]
        }
      }
    },
    {
      "identifier": {
        "system": "CDM",
        "value": "2"
      },
      "period": {
        "start": "11/14/1998",
        "end": "12/31/1998"
      },
      "patient": {
        "reference": "/HSDataService-web/api/3.2.0/patientapi/patients/1"
      },
      "consentStatus": {
        "identifier": {
          "system": "CDM",
          "value": "2"
        },
        "status": {
          "coding": [
            {
              "code": "2",
              "display": "Withdrawn",
              "description": "Consent Status Description",
              "sysId": "EHA_CUSTOM_CD_SYS",
              "sysName": "EHA Custom Code System",
              "sysVersion": "1"
            }
          ]
        }
      },
      "consentType": {
        "identifier": {
          "system": "CDM",
          "value": "1"
        },
        "type": {
          "coding": [
            {
              "code": "CS1",
              "display": "CS1Name",
              "description": "Consent Description",
              "sysId": "EHA_CUSTOM_CD_SYS",
              "sysName": "EHA Custom Code System",
              "sysVersion": "1"
            }
          ]
        }
      }
    }
  ],
  "count": 2,
  "hasMore": true,
  "links": [
    {
      "rel": "self",
      "href": "http://localhost:7001/HSDataService-web/api/3.2.0/patientapi/patients/1/consent?limit=2&offset=0"
    },
    {
      "rel": "next",
      "href": "http://localhost:7001/HSDataService-web/api/3.2.0/patientapi/patients/1/consent?offset=2&limit=2"
    }
  ]
}