registering assets


David Enyeart
 

Yes, think of ‘assets’ on the ledger as being ‘records’ in a database.

Fabric uses a key/value model for storing individual ‘records’ in the state database.

So in your example the record key may be “id1” and the value may be the JSON representation of the record, e.g.:

 

{

   "id":"id1",

   "name":"patient name"

}

 

The Fabric tutorials and samples demonstrate storing a generic “asset” JSON on the ledger, but you can model any data you like. It doesn’t even have to be JSON, but JSON is often a convenient lightweight and portable representation, plus it is queryable if using CouchDB as your state database.

 

 

From: fabric@... <fabric@...> on behalf of FemGeek <femgeek.massey@...>
Date: Wednesday, July 27, 2022 at 3:08 PM
To: fabric@... <fabric@...>
Subject: [EXTERNAL] [Hyperledger Fabric] registering assets

I need help with structuring data to populate on the ledger. I have a list with 27 parsed fields (see attachment below) that I want on the ledger. I'm not clear how to structure this data. Does asset = record? Are the elements = id, name..."list

ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

I need help with structuring data to populate on the ledger.  I have a list with 27 parsed fields (see attachment below) that I want on the ledger.  I'm not clear how to structure this data. 
Does asset = record?  Are the elements = id, name..."list of fields" ? 
 
Ex: const record = [
              {
                    id: "id1"
                    name: "patient name"  
              }
]