LogoLogo
  • Home
  • Protocol Overview
    • Introduction
    • Architecture
  • Protocol Guide
    • Get Started
      • Components
      • Definition of Terms
    • Build a dApp
      • Network Configuration
      • TuumIO Data Node
      • TuumIO Ledgers
      • Roles and Journeys
      • Card Definitions
        • Tiles
        • Functions
      • Events and Event Handlers
      • Node Event Handlers
      • Python Event Handlers
      • Transactional Data
    • Test and Publish
      • Publishing the protocol
      • Testing the app using BrowserStack
  • TuumIO Wallet User Manual
    • About TuumIO Wallet
    • User Access
    • SOLVE Tokens
    • Caira - AI Assistant
    • User Profile
    • Care.Trials
      • Overview
      • Participant
      • Site Admin
      • Trial Admin
      • Physician
      • Nurse
  • Tutorials
    • Create an Event Booker
    • Create a Library Explorer
  • Support
Powered by GitBook
LogoLogo

© Solve.Care. All rights reserved.

On this page
  • Cards
  • Card definition structure
  • Card data
  • Card layout
  • Card footer
  • Card UI actions

Was this helpful?

Edit on GitHub
Export as PDF
  1. Protocol Guide
  2. Build a dApp

Card Definitions

This section describes the structure of card definitions, including card data, card layout, card footer, and card UI actions.

All card definitions must be included in the input.json file.

Cards

A card contains multiple data types, user interface elements, and interactive functions triggered by events.

Field Name
Value Type
Description

id

string

The unique ID of the card.

name

string

The name of the card.

description

string

The description of the card.

status

string

The status of the card is set to Active.

card_definition_ref

string

The reference to the UI component of the card.

side

string

The side on which data is presented.

role

string

The role ID is referenced in the card.

transaction_data_ref

string

The reference to the transaction data used upon initialization.

journey

string

The journey to which the card belongs.

outgoing_events

array

The events or actions triggered by the card.

pre_rendering_events

array

The events or actions used to initialize the card.

Example:
    "cards": [
      {
        "id": "cd-start-rl-patient",
        "name": "Patient start card",
        "description": "Start card for patient",
        "status": "Active",
        "card_definition_ref": "card/cd-start-rl-patient.json",
        "side": "PUBLIC",
        "role": "rl-patient",
        "transaction_data_ref": "td/td-default.json",
        "private_card": "",
        "base_card": "",
        "journey": "jn-start-journey",
        "outgoing_events": ["ev-patient-nav-to-cd-next"],
        "pre_rendering_events": [],
        "post_rendering_events": []
      }
    ],

Card definition structure

Each card definition is located in the /definitions/card/ folder.

  • Card data - The information or data displayed within the card, such as texts, images, and links.

  • Card layout - The arrangement and organization of elements within the card, including body content style, and footer menus.

  • Card footer - The additional options, navigation buttons, or menus at the bottom of the card for user interaction and navigation.

  • Card UI actions - The actions triggered by user interactions within the card, such as navigation, form submissions, or data updates.

Card data

Card data can include text, images, links or different types of information relevant to a healthcare journey.

Example:
{
    "id": "cd-start-rl-patient",
    "name": "Get started",
    "cardData": {
        "Tile11000vtext": "Welcome to my TuumIO network!",
        "Tile11000vsubText": "This is an example.",
        "Tile11000vsubText1": "This is another example.",
        "imgUrlpjbx": "https://123.abc.net/media/Intro.png",
        "EN01BottomButton1002vtext": "Get Started"
    },

Card layout

Example:
    "cardLayout": {
        "body": [
            {
                "id": "00tc01",
                "tileComponent": [
                    {
                        "id": "Tile0",
                        "subView": [
                            {
                                "title": {
                                    "text": "Tile11000vtext",
                                    "style": "bold"
                                }
                            }
                        ],
                        "align": "START",
                        "type": "CONTAINER",
                        "uiAction": "",
                        "order": 1
                    },
                    {
                        "id": "Tile11",
                        "subView": [
                            {
                                "title": {
                                    "text": "Tile11000vsubText"
                                },
                                "subTitle": {
                                    "text": "Tile11000vsubText1"
                                }
                            }
                        ],
                        "align": "START",
                        "type": "CONTAINER",
                        "uiAction": "",
                        "order": 1
                    },
                    {
                        "id": "Tile16",
                        "subView": [
                            {
                                "img": {
                                    "text": "imgUrlpjbx",
                                    "isUrl": true,
                                    "height": "250",
                                    "width": "250"
                                }
                            }
                        ],
                        "align": "START",
                        "textColor": "#212121",
                        "borderColor": "#1a1a1a",
                        "type": "CONTAINER",
                        "uiAction": "",
                        "order": 1
                    }
                ],
                "tileType": "WRAP",
                "uiAction": "",
                "order": 1
            }
        ],

Card footer

The card footer includes buttons or actions used to interact with the card itself or navigate to other related cards. These buttons or actions can perform specific tasks like submitting information, saving changes, or going back to previous screens.

Example:
        "footer": {
            "menu": [
                {
                    "id": "EN01BottomButtonBack",
                    "subView": [
                        {
                            "title": {
                                "text": ""
                            }
                        }
                    ],
                    "align": "START",
                    "type": "BACK_BUTTON",
                    "uiAction": "${action1}",
                    "order": 1
                },
                {
                    "id": "EN01BottomButton1",
                    "subView": [
                        {
                            "title": {
                                "text": "EN01BottomButton1002vtext"
                            }
                        }
                    ],
                    "align": "END",
                    "type": "BUTTON",
                    "uiAction": "${action2}",
                    "order": 2
                }
            ],
            "orientation": "HORIZONTAL"
        }
    },

Card UI actions

The card UI actions define user interactions within the card's content. These actions trigger functionalities like navigation, data updates, input validation, or external function calls.

Example:
    "cardUIAction": {
        "action1": {
            "action": ""
        }, "action2": {
            "action": "ev-patient-nav-to-cd-next"
        }
    }
}

PreviousRoles and JourneysNextTiles

Last updated 8 months ago

Was this helpful?

The card body displays the card's content, which includes tiles, texts, images, and interactive functions. For information on supported tiles, see . For details on supported functions, see .

Tiles
Functions