Skip to main content
. 2020 Mar 4;2019:1266–1275.

Figure 2.

Figure 2.

Example Ethereum Solidity pseudo code involved in a simple contract between two institutions (as described in Figure 1 (b)). University B deployed this QuerySmartContract, with two functions: sendQuery and getQuery, to the blockchain network. University A executed this smart contract and queried the data for “how many patients have hemoglobin test results for postmenopausal females” (the upper-right box). Then, University A retrieved the query from the blockchain, and can see the query criteria as well as the address of the contract owner (which is University B). Note that it takes some time for the smart contract to be enclosed in a verified transaction of a block, therefore the first query only returns empty values for the query. Also, this smart contract, as well as any function calls that change the state of the variables in the smart contract, will be logged in the immutable blockchain, which enables future attribution, auditing, dispute and resolution for both (and even a third-party) institutions.