EhrIndexer

Provides work with EHR documents and groups of documents.

Functions

setEhrUser

function setEhrUser(
    bytes32 userIDHash,
    bytes32 ehrId,
    address signer,
    uint deadline,
    bytes calldata signature
) external onlyAllowed(msg.sender)

Sets the association between userID and ehrID.

Parameters

Name
Type
Description

userIDHash

bytes32

Hash of userID

ehrId

bytes32

EhrID

signer

address

Address of the signer of the request

deadline

uint

Expiration timestamp of the request

signature

bytes

Cryptographic signature of the request performed by the signer's key

getEhrUser

Getting ehrID for userID

Parameters

Name
Type
Description

userIDHash

bytes32

Hash of userID

Return Values:

Name
Type
Description

ehrId

bytes32

EhrID

setEhrSubject

Sets the association between ehrID and subject.

Parameters

Name
Type
Description

subjectKey

bytes32

sha3(subjectID + subjectNamespace)

ehrId

bytes32

EhrID

signer

address

Address of the signer of the request

deadline

uint

Expiration timestamp of the request

signature

bytes

Cryptographic signature of the request performed by the signer's key

addEhrDoc

Adding a new EHR document

Parameters

Name
Type
Description

getEhrDocs

Text

Parameters

Name
Type
Description

userIDHash

bytes32

Hash of userID

docType

Document type

Return Values:

Name
Type
Description

docs

List of documents of the specified type for the given userIDHash

getLastEhrDocByType

Retrieve the last document of the specified type.

Parameters

Name
Type
Description

ehrId

bytes

EhrID

docType

Document type

Return Values:

Name
Type
Description

getDocByVersion

Retrieve the specified version of the document

Parameters

Name
Type
Description

ehrId

bytes32

EhrID

docType

Document type

docBaseUIDHash

bytes32

Hash of document UID

version

bytes32

Document version

Return Values:

Name
Type
Description

getDocByTime

Retrieving a document that is up to date at the specified time

Parameters

Name
Type
Description

ehrID

bytes32

EhrID

docType

Document type

Return Values:

Name
Type
Description

getDocLastByBaseID

Retrieving the latest version of the document specified by id

Parameters

Name
Type
Description

userIDHash

bytes32

Hash of userID

docType

Document type

Return Values:

Name
Type
Description

deleteDoc

Deleting a document. The actual status of the document changes to Deleted.

Parameters

Name
Type
Description

ehrId

bytes32

EhrId

docType

Document type

docBaseUIDHash

bytes32

Hash of document UID

version

bytes32

Document version

signer

address

Address of the signer of the request

deadline

uint

Expiration timestamp of the request

signature

bytes

Cryptographic signature of the request performed by the signer's key

setAccess

Sets the access level to the object

Parameters

Name
Type
Description

accessID

bytes32

signer

address

Address of the signer of the request

deadline

uint

Expiration timestamp of the request

signature

bytes

Cryptographic signature of the request performed by the signer's key

docGroupCreate

Creating a document group

Parameters

Name
Type
Description

docGroupAddDoc

Adding a document to a group of documents

Parameters

Name
Type
Description

groupIDHash

bytes32

Hash of groupID

docCIDHash

bytes32

docCIDEncr

bytes

Document CID encrypted by group key

signer

address

Address of the signer of the request

deadline

uint

Expiration timestamp of the request

signature

bytes

Cryptographic signature of the request performed by the signer's key

docGroupGetDocs

Getting the list of documents included in the group

Parameters

Name
Type
Description

groupIDHash

bytes32

Return Values:

Name
Type
Description

docCIDEncrs

bytes[]

Array of CIDs of documents encrypted with the document group key

docGroupGetAttrs

Getting group attributes

Parameters

Name
Type
Description

groupIDHash

bytes32

Return Values:

Name
Type
Description

attrs

Array of group attributes

Models

Attribute

DocGroupCreateParams

IDocs.Type

IDocs.AddEhrDocParams

IDocs.DocumentMeta

IAccessStore.AccessLevel

IAccessStore.Access

Last updated