Skip to content

Core Event Objects

Every Content Block have some respective event objects that are required by the events to be used. These event objects can be referred to as item properties for that event or model/data classes that are required for that event. These objects provide a detailed context to the event about the element they are associated with.

List of Objects

Here's a list of objects that are required in core module events.

Object Name Usability Description
Blocked Object blocked Track the item Id and type being returned in the result list for the search event.
Search Result Object results_list Track the item Id and type being returned in the result list for the search event.


Blocked Object

To be used in Identify Event where you are required to pass the values when the action is blocked/unblocked The object you of the following format.

Param Usability Format Description
reason REQUIRED STRING Reason for blocking the user
remarks OPTIONAL STRING Any additional remarks you want to provide
    val blockedObject =  BlockedObject(
        reason = "Reason for Blocking", 
        remarks = "Some Remarks"
    )
    let blockedObject =  BlockedObject(
        reason = "Reason for Blocking", 
        remarks = "Some Remarks"
    )
    let blocked = {
        reason: "some Reason",
        remarks: "some Remarks"
      }
    {
        "reason": "some Reason",
        "remarks": "some Remarks"
    },



Search Result Object

To be used in Search Event where you are required to pass the elements that are returned by the search query in your app. The object you of the following format.

Param Usability Format Enum Values Description
id REQUIRED STRING -- Id for the result item returned by the search
type REQUIRED STRING patient_record, blood, grocery, oxygen, drug, medical_equipment, lifestyle_item, investigation_test_item, treatment_plan_item, subscription, other type for the result item returned by the search
    val resultItems: ArrayList<SearchItemModel> = arrayListOf(
        SearchItemModel(
            item_id = "item ID 1",
            item_type = SearchItemType.drug.name
        ),
        SearchItemModel(
            item_id = "item ID 2",
            item_type = SearchItemType.drug.name
        )
    var search_results = [
          {
            id: "itemId1",
            type: SearchItemType.Drug,
          },
          {
            id: "itemId2",
            type: SearchItemType.Drug,
          }
    ]
    var search_results = [
          {
            id: "itemId1",
            type: SearchItemType.Drug,
          },
          {
            id: "itemId2",
            type: SearchItemType.Drug,
          }
    ]
    "results_list": [
                {
                    "id": "result_Item_Id_1",
                    "type": "drug"
                },
                {
                    "id": "result_Item_Id_2",
                    "type": "patient_record"
                }
            ]