Document Index
Index storage
Using a smart contract as a document and data index repository provides high availability, fault tolerance, immutability.
User (patient)
user_id - unique identifier
user key pair - public key + private key, generated according to the Curve25519 elliptic curve-based cryptosystem
EHR (electronic health record)
Is a data structure described in the openEHR standard
ehr_id
includes the documents: EHR_STATUS, COMPOSITION, DIRECTORY, CONTRIBUTION
Each patient can have only one EHR.
EHR index
Sets the relationship between ehr_id
from a specified user_id
Document index
Sets the relationship betweendoc_storage_id
and ehr_id
EHRsubject index
Sets the relationship between ehr_id
and subject_id
, subject_namespace
docAccess index
Allows to find an encrypted doc_key
for the specified doc_storage_id
and user_id
dataSearch index
Allows to find the doc_storage_id
of documents that contain data with the specified values
dataAccess index
access_group
- access group, within which encrypted data is searched
Creating EHR
An EHR document is created as a json file
Generation of a new
doc_key
The document is encrypted using the
doc_key
Document is saved in the document storage,
doc_storage_id
is returnedAn entry is added to the EHR Index to link the patient and their EHR:
An entry is added to the Document Index to allow the document in the repository to be linked to the EHR
An entry is added to the EHRsubject Index to search for
ehr_id
by its subjectAn entry is added to the AccessStore index to find the encrypted
doc_key
from the document
Getting EHR by ehr_id
Get
ehr_id
usinguser_id
in EHR IndexGet
doc_storage_id
of a document with DocType = EHRGet the encrypted
doc_key
from the AccessStore indexDecrypt
doc_key
with user'spriv_key
Download document with
doc_storage_id
from storageDecrypt the document using the decrypted
doc_key
in step 5
Creating COMPOSITION
The document is created as a json file
The document is encrypted with the unique key
doc_key
The document is saved in the document storage,
doc_storage_id
is returnedAn entry is added to the document index, allowing you to link the document in the repository with the EHR
Path construction for all field values within the document
Determining the
access_group
for searching the values in the dataSearch indexRecords containing paths, values encrypted with
access_group_key
andencrypted doc_storage_id
to associate records with documents in the repository andaccess_group_id
are added to the dataSearch Index for all values
Search for documents using queries
Paths to the values of interest and conditions are generated from the query
Search for records in dataSearch index, which satisfy the specified conditions, the encrypted
doc_storage_id
of documents containing these values is returned, or the encrypted valuesSearch for an
access_group_key
in the dataAccess indexDecrypting
access_group_key
withuser_priv_key
Decrypting field values with
access_group_key
Decrypting
doc_storage_id
withuser_priv_key
Search for
doc_keys
encrypted documents in the docAccess index bydoc_storage_id
Decrypting
doc_keys
Downloading found documents from the storage
Documents are decrypted using
doc_keys
Last updated