The present application relates to the field of
medical information technology, and provides a method and
system for on-chain and off-chain interaction of hierarchical diagnosis and treatment data based on a consortium
blockchain. In this method, after the patient signs the off-chain encrypted data generated by the lower-level
hospital based on the patient's
authorization using the patient's private key, the lower-level hospital generates on-chain
plaintext data, and encrypts the generated on-chain
plaintext data using the patient's public key to obtain on-chain
ciphertext data; and re-encrypts the on-chain
ciphertext data based on the proxy re-
encryption key to generate a proxy re-encrypted
ciphertext; stores the proxy re-encrypted ciphertext on the consortium
blockchain based on the patient's pseudo-identity information, and transmits the signed off-chain encrypted data through the off-chain
data channel; when the upper-level hospital passes the permission
verification, the upper-level hospital obtains the proxy re-encrypted ciphertext from the consortium
blockchain and decrypts it to obtain the on-chain
plaintext data, and obtains the off-chain encrypted data from the off-chain
data channel and decrypts it to obtain the patient's original diagnosis and treatment data for
verification.