Node protocol view schema (Event Mapping View)

BMI Journey - Node Protocol View (node-protocol-view-v2.0)

{
    "network": {
        "id": "aa951837-8e76-42bf-9820-62806ecaa062",
        "name": "CAN",
        "description": "Care Administration Network",
        "status": "Active",
        "version": 6,
        "certificates": "CERT-001",
        "publishDate": "29-06-2021",
        "effectiveDate": "01-07-201",
        "protocolVersionNumber": 13
    },
    "events": [
        {
            "id": "04002",
            "name": "Patient.BMI.Submitted",
            "code": "PT.BMI.SUBMITTED",
            "description": "Submit Patient's BMI data for BMI calcuation.",
            "status": "Active",
            "version": 2,
            "type": "Node_Event",
            "eventDefinitionRef": "event/04002.json",
            "fromRole": {
                "id": "01001",
                "name": "Patient",
                "description": "Patient role for the CAN",
                "status": "Active",
                "version": 1
            },
            "toRole": {
                "id": "01001",
                "name": "Patient",
                "description": "Patient role for the CAN",
                "status": "Active",
                "version": 1
            },
            "card": {
                "id": "03003",
                "name": "BMI Report",
                "description": "BMI Report, wallet card for the Patient ",
                "status": "Active",
                "version": 1,
                "transactionDataRef": "td/06001.json",
                "journey": {
                    "id": "02002",
                    "name": "BMI Logs",
                    "description": "BMI logs of the Patient",
                    "status": "Active",
                    "version": 1
                }
            },
            "nodeEventHandlers": [
                {
                    "id": "05002",
                    "name": "BMI.Calculate",
                    "description": "Event handler to Calculate BMI on node.",
                    "status": "Active",
                    "version": 2,
                    "type": "Node_Event_Handler",
                    "eventHandlerDefinitionRef": "event-handler/05002.json"
                }
            ]
        },
        {
            "id": "04002",
            "name": "Patient.BMI.Submitted",
            "code": "PT.BMI.SUBMITTED",
            "description": "Submit Patient's BMI data for BMI calcuation.",
            "status": "Active",
            "version": 2,
            "type": "Node_Event",
            "eventDefinitionRef": "event/04002.json",
            "fromRole": {
                "id": "01001",
                "name": "Patient",
                "description": "Patient role for the CAN",
                "status": "Active",
                "version": 1
            },
            "toRole": {
                "id": "01001",
                "name": "Patient",
                "description": "Patient role for the CAN",
                "status": "Active",
                "version": 1
            },
            "card": {
                "id": "03002",
                "name": "BMI Calculate",
                "description": "Submit the details require to Calculate BMI, wallet card for the Patient ",
                "status": "Active",
                "version": 1,
                "transactionDataRef": "td/06001.json",
                "journey": {
                    "id": "02001",
                    "name": "Calculate BMI",
                    "description": "Calculate BMI for the Patient",
                    "status": "Active",
                    "version": 1
                }
            },
            "nodeEventHandlers": [
                {
                    "id": "05002",
                    "name": "BMI.Calculate",
                    "description": "Event handler to Calculate BMI on node.",
                    "status": "Active",
                    "version": 2,
                    "type": "Node_Event_Handler",
                    "eventHandlerDefinitionRef": "event-handler/05002.json"
                }
            ]
        }
    ]
}

node-protocol-view-v1.0

{
  "node-protocol": {
    "network": {
      "name": "CAN",
      "description": "Care Administration Network",
      "version": 1,
      "publish_date": "25-03-2021",
      "effective_date": "01-04-201",
      "protocol_version_number": 1
    },
    "events": [
      {
        "id": "04102",
        "name": "Appointment.Request",
        "description": "Book an appointment with Doctor",
        "code": "PT.APPOINTMENT.REQUEST",
        "status": "Active",
        "version": "1.0",
        "type": "Node_Event",
        "event_definition_ref": "04102.json",
        "distribution_type": "node_to_node",
        "from_role": {
          "id": "01001",
          "name": "Patient",
          "type": "Wallet",
          "status": "Active",
          "version": 1
        },
        "to_role": {
          "id": "01002",
          "name": "Doctor",
          "type": "Wallet",
          "status": "Active",
          "version": 1
        },
        "card": {
          "id": "03101",
          "name": "Request_Appointment",
          "journey": {
            "id": "02001",
            "name": "Appointment"
          }
        },
        "event_handlers": [
          {
            "id": "05003",
            "name": "Appointment.Request.Create",
            "description": "Send an appointment event",
            "status": "Active",
            "version": 1,
            "event_handler_definition_ref": "05003.json"
          }
        ],
        "next_event": "04103"
      }
    ]
  }
}

Node event handler definition

BMI Calculator Event Handler (node_event_handler_definition_v2.0)

//Event handler definition to Calculate BMI on node.
{
  "id": "05002",
  "name": "Bmi.Dynamic.Handler",
  "description": "Bmi Dynamic Handler",
  "status": "Active",
  "version": 1,
  "type": "Node_Event_Handler",
  "nodeEventHandlers": [
    {
      "jarUrl": "https://a.solvecare.net/artifactory/libs-snapshot-local/care/solve/generic/node/hello-world-handler/1.0-SNAPSHOT/hello-world-handler-1.0-20210618.162517-7.jar",
      "className": "care.solve.node.handler.AddTransactionalGuidHandler",
      "order": 1
    },
    {
      "jarUrl": "https://a.solvecare.net/artifactory/libs-snapshot-local/care/solve/generic/node/hello-world-handler/1.0-SNAPSHOT/hello-world-handler-1.0-20210618.162517-7.jar",
      "className": "care.solve.node.handler.AddCreatedAtHandler",
      "order": 2
    },
    {
      "jarUrl": "https://a.solvecare.net/artifactory/libs-snapshot-local/care/solve/generic/node/hello-world-handler/1.0-SNAPSHOT/hello-world-handler-1.0-20210618.162517-7.jar",
      "className": "care.solve.node.handler.bmi.BmiComputeHandler",
      "order": 3
    },
    {
      "jarUrl": "https://a.solvecare.net/artifactory/libs-snapshot-local/care/solve/generic/node/hello-world-handler/1.0-SNAPSHOT/hello-world-handler-1.0-20210618.162517-7.jar",
      "className": "care.solve.node.handler.bmi.BmiCategoryHandler",
      "order": 4
    },
    {
      "jarUrl": "https://a.solvecare.net/artifactory/libs-snapshot-local/care/solve/generic/node/hello-world-handler/1.0-SNAPSHOT/hello-world-handler-1.0-20210618.162517-7.jar",
      "className": "care.solve.node.handler.bmi.BmiPersistHandler",
      "order": 5
    }
  ]
}

node_event_handler_definition_v1.0

{
  "name": "Appointment.Request.Create",
  "id": "05003",
  "description": "Send an appointment event",
   "event_id": "04102",
  "node_event_handlers": [
    {
      "jar_url": "",
      "class_name": "",
      "order": "0"
    },
    {
      "jar_url": "",
      "class_name": "",
      "order": "1"
    }
  ]
}