From medical records to Merkle trees with IPFS

Be prepared for the blockchain discussion by improving your knowledge of Merkle trees and Merkle-DAGs. Do you know how they relate to healthcare?

It’s the application of technology, not the technology itself, that provides for business transformation. Making the connection between how the technology works and how it applies to healthcare can be perplexing. Today, we’ll untie the knot of Merkle trees and Merkle-DAGs and connect these innovations to healthcare.

A Merkle tree

Hash values are numeric values, created from data. Hash values uniquely identify data and provide a “digital fingerprint.” These values are used to validate that data has not been tampered with or altered.

The Merkle tree was named after Ralph Merkle, one of the inventors of public key encryption and a researcher on cryonics (suspension and storage services of humans). In 1979, Merkle wrote a paper titled “Secrecy, Authentication and Public Key Systems,” in which he presented his thesis findings on cryptography.

The Merkle tree is a cascading network of hashes (or hash trees). This binary tree structure is used to condense transactions that are hashed into a block. The Merkle tree structure is important because it allows miners to verify the hashes of blocks. Think of a tree with all the minor branches connected into larger branches, which eventually connect to the trunk of the tree or the “root hash.”

For example, let’s assume you have a single block and you want to verify the authenticity of that block. You will first need the root hash (a collection of block hashes) and the blocks in the transaction tree (or series) that together will allow the reconstruction of the hash tree for blocks that you didn’t generate.

Objects in a typical Merkle tree are linked together by block’s transaction sequence. Therefore, you need all or some of that transaction history (collection of hashes) to confirm authenticity. At some point, scale becomes a challenge or at minimum a point of discussion.

A Merkle-DAG

A Merkle-DAG is similar to a Merkle tree in that they both are essentially a tree of hashes. A Merkle tree connects transactions by sequence, but a Merkle-DAG connects transactions by hashes. In a Merkle-DAG, addresses are represented by a Merkle hash. This spider web of Merkle hashes links data addresses together by a Merkle graph. The directed acyclic graph (DAG) is used to model information. In our case, modeling what address has stored specific data.

It’s useful to know that different blockchains (Ethereum, Bitcoin, Lisk, MultiChain and Eris) use a variety of implementations of Merkle trees or similar structures.

The healthcare connection

Let’s put it all together: Merkle trees are used to verify something.

Simply stated, Merkle tree data structures provide state verifications for data. The knowledge of the state also becomes useful when we’re talking about healthcare. For example, we can answer the queries such as “Tell me the last time you had a physical” or “Did you have a blood test done during your last appointment?” We just become much smarter.

By keeping the states in a Merkle DAG (or hash chain) nodes can verify the validity and correctness of states. The verified state can also be used for searching. It is not possible for nodes to lie or change a past state. Therefore nodes cannot change or falsify content. This results in nodes not having to trust each other.

Another interesting beast is the Merkle computer, where the state changes are hash-linked sequentially (think serial log). Merkle trees are used to verify the state.

Allow me to provide an example. Let’s assume we have three patients: patient A, patient B and patient C. It’s unlikely all health events from patient C will neatly follow all the health events of patient A and patient B. Most likely, health events for all three patients will be in random order.

Merkle-DAG structures can be used to verify the state of hashes. When used in combination with a Merkle computer, we could process through a list of health events to construct a chronological history of the patient — e.g., healthcare events for patient A, then patient B and lastly patient C, even if the actual events were out of our desired grouped sequence.

The new discussion

Does it scale? Will this evolve into existence or fade into extinction? Many questions remain to be solved. We don’t have all the answers. We rarely do.

However, I’m sure of one thing: IPFS and blockchain will gain momentum in healthcare. Interest in these areas will continue to grow as leaders better understand the technological impact on the business of healthcare delivery.

Rest assured, you’re better prepared for the blockchain discussion with an upgraded understanding of Merkle trees.

Now available on Amazon! Click here!

Previous articleThe permanent web for healthcare with IPFS and blockchain
Next articleThe quiet revolution: the internet of data structures with IPFS
Peter is a technology executive with over 20 years of experience, dedicated to driving innovation, digital transformation, leadership, and data in business. He helps organizations connect strategy to execution to maximize company performance. He has been recognized for Digital Innovation by CIO 100, MIT Sloan, Computerworld, and the Project Management Institute. As Managing Director at OROCA Innovations, Peter leads the CXO advisory services practice, driving digital strategies. Peter was honored as an MIT Sloan CIO Leadership Award Finalist in 2015 and is a regular contributor to on innovation. Peter has led businesses through complex changes, including the adoption of data-first approaches for portfolio management, lean six sigma for operational excellence, departmental transformations, process improvements, maximizing team performance, designing new IT operating models, digitizing platforms, leading large-scale mission-critical technology deployments, product management, agile methodologies, and building high-performance teams. As Chief Information Officer, Peter was responsible for Connecticut’s Health Insurance Exchange’s (HIX) industry-leading digital platform transforming consumerism and retail-oriented services for the health insurance industry. Peter championed the Connecticut marketplace digital implementation with a transformational cloud-based SaaS platform and mobile application recognized as a 2014 PMI Project of the Year Award finalist, CIO 100, and awards for best digital services, API, and platform. He also received a lifetime achievement award for leadership and digital transformation, honored as a 2016 Computerworld Premier 100 IT Leader. Peter is the author of Learning Intelligence: Expand Thinking. Absorb Alternative. Unlock Possibilities (2017), which Marshall Goldsmith, author of the New York Times No. 1 bestseller Triggers, calls "a must-read for any leader wanting to compete in the innovation-powered landscape of today." Peter also authored The Power of Blockchain for Healthcare: How Blockchain Will Ignite The Future of Healthcare (2017), the first book to explore the vast opportunities for blockchain to transform the patient experience. Peter has a B.S. in C.I.S from Bentley University and an MBA from Quinnipiac University, where he graduated Summa Cum Laude. He earned his PMP® in 2001 and is a certified Six Sigma Master Black Belt, Masters in Business Relationship Management (MBRM) and Certified Scrum Master. As a Commercial Rated Aviation Pilot and Master Scuba Diver, Peter understands first hand, how to anticipate change and lead boldly.