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.
Address Object address Track the address object for various events
Coordinates Object coordinates Track the coordinates object for address events


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, incident, address, ambulance, other_vehicle, contact, call, email, sms, 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"
                }
            ]


Address Object

Below are the details for the address object. Either Site_id or Country is required for the address object.

Param Usability Format Enum Values Description
site_id OPTIONAL STRING --- Site Id for the address object
name OPTIONAL STRING --- name for the address object
country OPTIONAL STRING --- country for the address object
region_state OPTIONAL STRING --- region_state for the address object
district OPTIONAL STRING --- district for the address object
sub_district OPTIONAL STRING --- sub_district for the address object
city_town OPTIONAL STRING --- city_town for the address object
street_address OPTIONAL STRING --- street_address for the address object
landmark OPTIONAL STRING --- landmark for the address object
coordinates OPTIONAL OBJECT (Coordinates Object) --- coordinates for the address object
    var address = {
            country: "Spain",
            region_state: "Barcelona",
            city_town: "Barcelona",
            street_address: "ASDFGHJKL"
        },
    {
        "address": {
          "country": "Spain",
          "region_state": "Barcelona",
          "city_town": "Barcelona",
          "street_address": "ASDFGHJKL",
        }
    }


Coordinates Object

Below are the details for the coordinates object.

Param Usability Format Enum Values Description
lat OPTIONAL FLOAT --- Latitude for the Coordinates object
lon OPTIONAL FLOAT --- Longitude for the Coordinates object
    var coordinates = {
            lat: 1.111111,
            lon: 1.11111
        },
    {
        "coordinates": {
          "lat": 1.111111,
          "lon": 1.111111
        }
    }