Transaction / Assets #database


FemGeek
 

Hello, I'm troubled about how to represent RCM Healthcare claim payments from payer as assets.  How can I design the data to represent a key-value pair on the ledger.


Sam Venzi
 

Hello FemGeek,

In Hyperledger Fabric, data is already stored as a key-value representation. You can model the value structure as you please. For example:

“key1”: “value1"

or

“key2”: {
“property1”: “hey”,
“property2”: 23
}

The following link provides an example of representation:
https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/architecture.html#physical-representation

In the fabcar chaincode, you can see that the car data is modeled using a Go struct and then marshaled into a JSON to serve as the value which is passed as argument to PutState(key, value): 
https://github.com/hyperledger/fabric-samples/blob/main/chaincode/fabcar/go/fabcar.go#L62 

Hope it sheds some light on your problem.

Best,

Samuel Venzi
CTO @ GoLedger


On 12 Jul 2022 09:54 -0300, FemGeek <femgeek.massey@...>, wrote:

Hello, I'm troubled about how to represent RCM Healthcare claim payments from payer as assets.  How can I design the data to represent a key-value pair on the ledger.