Skip to main content

Fetch all the consent artefact details of a patient

GET/api/hiecm/consent/v3/artefact

By invoking this API, users can retrieve comprehensive information about all consent artefacts associated with the patient’s health information. This functionality is essential for maintaining transparency and ensuring that users have access to complete and up-to-date consent artefact information. The API supports efficient tracking and management of consent artefacts, facilitating secure and compliant health information exchange within the healthcare ecosystem.

Authorizations

Authorizationbearer tokenRequired

The access token from POST /api/hiecm/gateway/v3/sessions, sent with a Bearer prefix.

Query parameters

limitintegerRequired

The number of items to be returned at a time

offsetinteger

The number of items to be skipped before starting to collect data

statusstring

Status of the consent

Headers

REQUEST-IDstringRequired

Unique UUID for tracking the end-to-end request transaction

TIMESTAMPstringRequired

Actual time of the request was initiated, ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds, and milliseconds

X-CM-IDstringRequired

Suffix of the consent manager to which the request was intended

X-AUTH-TOKENstringRequired

The user token the PHR service issued when the patient logged in.

Responses

200

Ok

sizeinteger
limitinteger
offsetinteger
consentArtefactsobject[]

List of consent artefact ids that were created.

consentArtefacts.statusstring

One of GRANTEDEXPIREDREVOKED

consentArtefacts.consentDetailobject
consentArtefacts.consentDetail.consentIdstring

Allows alpha numeric character and special characters like "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$";

consentArtefacts.consentDetail.purposeobjectRequired
consentArtefacts.consentDetail.purpose.textstringRequired

One of Care ManagementBreak the GlassPublic HealthHealthcare PaymentDisease Specific Healthcare ResearchSelf Requested

consentArtefacts.consentDetail.purpose.codestringRequired

One of CAREMGTBTGPUBHLTHHPAYMTDSRCHPATRQT

consentArtefacts.consentDetail.purpose.refUristringRequired

The reference URL. Should be a valid URL

consentArtefacts.consentDetail.patientobjectRequired
consentArtefacts.consentDetail.patient.idstringRequired

The abha address of the patient

consentArtefacts.consentDetail.hipobject

Identifier and name of the health information provider.

consentArtefacts.consentDetail.hip.idstringRequired

The service ID of the health information provider. Allows alpha numeric character and special characters like [A-Z a-z 0-9]+[A-Z a-z 0-9 //_//-]*[A-Z a-z 0-9]$

consentArtefacts.consentDetail.hip.namestringRequired

The name of the health information provider. Allows alpha numeric and special characters like _\-@,():/

consentArtefacts.consentDetail.hip.typestring

The type of the health information provider. Allows alpha numeric and special characters like _\-@,. ":/

consentArtefacts.consentDetail.hiuobjectRequired
consentArtefacts.consentDetail.hiu.idstringRequired

The service ID of the health information user. Allows alpha numeric character and special characters like [A-Z a-z 0-9]+[A-Z a-z 0-9 //_//-]*[A-Z a-z 0-9]$

consentArtefacts.consentDetail.hiu.namestringRequired

The name of the health information user. Allows alpha numeric and special characters like _\-@,():/

consentArtefacts.consentDetail.hiu.typestring

The type of the health information user. Allows alpha numeric and special characters like _\-@,. ":/

consentArtefacts.consentDetail.careContextsobject[]

List of care contexts linked at the HIP end for the identified patient.

consentArtefacts.consentDetail.careContexts.patientReferencestringRequired

A patient identifier with which patient is registered in the facility/hospital

consentArtefacts.consentDetail.careContexts.careContextReferencestringRequired

An identifier of patient's care context created in HIP. A care context is a group of patient's health data (Not the actual health data)

consentArtefacts.consentDetail.requesterobjectRequired
consentArtefacts.consentDetail.requester.namestringRequired

The name of the requester

consentArtefacts.consentDetail.requester.identifierobjectRequired
consentArtefacts.consentDetail.createdAtstring
consentArtefacts.consentDetail.lastUpdatedstring
consentArtefacts.consentDetail.schemaVersionstring
consentArtefacts.consentDetail.consentManagerobject
consentArtefacts.consentDetail.consentManager.idstring
consentArtefacts.consentDetail.hiTypesstring[]Required

Types of health information document.

consentArtefacts.consentDetail.permissionobjectRequired
consentArtefacts.consentDetail.permission.accessModestringRequired

One of VIEWSTORESTREAMQUERY

consentArtefacts.consentDetail.permission.dateRangeobjectRequired
consentArtefacts.consentDetail.permission.dataEraseAtstringRequired

The date at which the consent expire. Should be UTC date time in ISO format

consentArtefacts.consentDetail.permission.frequencyobjectRequired
consentArtefacts.signaturestring
400

Bad Request. The request could not be processed because it was malformed or failed validation - a missing mandatory field, a value in the wrong format, or a header that did not match the body.

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1006 - Bad Request, invalid request Body. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

error.messagestringRequired

Short description of the failure.

401

Unauthorized

Everything returns 401

codestring

900901 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

messagestring
descriptionstring
404

Not Found

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1001 - No data found. May be returned either bare (ABDM-1001) or with a trailing ": " separator (ABDM-1001: ); match on the code itself and tolerate the separator.

error.messagestringRequired
500

Internal Server Error

Error codes for this module

codestring

900900 - Unclassified Authentication Failure. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

messagestring
descriptionstring
503

Service Unavailable

Error codes for this module

codestringRequired

ABDM-1024 - Dependent service unavailable. May be returned either bare (ABDM-1024) or with a trailing ": " separator (ABDM-1024: ); match on the code itself and tolerate the separator.

messagestringRequired