MedRec

chmod for medical records

Nchinda Nchinda

@Firescar96

Researcher in Viral Communications

https://slides.com/firescar96/medrec-30

  • what is MedRec
  • how to interpret blockchain technology
  • blockchains and wallets
  • patient and provider interactions
  • anonymity
  • ethereum
  • what are smart contracts

https://github.com/mitmedialab/medrec

MedRec is an Ethereum-based management system to give patients control over their medical records. MedRec 2.0 is...

  • Decentralized
  • Built on extensible smart contracts
  • Non-commercial and open
  • Intended for incremental adoption
  • Anonymous and private

What's the Blockchain

Consensus

PoW, PoS, PoA

Proof of Work

 

Hard to Solve, Easy to Verify

Wallets do not hold your bitcoin

Patients

MedRec

Providers

Pseudonymity

most systems are almost anonymous

MedRec provides anonymity

But Bitcoin is just a distraction from the blockchain...

Nyet.

What if we put code...on the blockchain

Types

  • boolean
    • true or false
  • int and uint
    • represent 256 bit signed and unsigned numbers respectively
  • address
    • holds a 20 byte ethereum address
  • bytes1 - bytes32
    • fixed size byte array
  • struct
    • fixed size byte array
  • enum
    • fixed size byte array

Contract Structure

pragma solidity ^0.4.0;

contract SimpleStorage {
    uint storedData;

  function SimpleStorage() {
    // ...
  }

  function bid() payable { // Function
    // ...
    }
  }

}

Special Operations

  • msg.sender
    • the ethereum address that directly called the contract
  • msg.value
    • value of the calling transaction
  • block.number
    • current blocknumber
  • sha256 and sha3
    • hash functions
  • selfdestruct(<address>)
    • kill self and send money to an address
  • wei, finney, szabo, ether
    • currency denominations

https://github.com/mitmedialab/medrec

Contract walkthrough

Medrec-30

By Nchinda Nchinda

Medrec-30

  • 934