View Source Glific.Clients.ArogyaWorld (Glific v5.1.6)
Custom code extenison for ArogyaWorld
Link to this section Summary
Functions
add data that needs to be sent to the database
adds the weekly dynamic data loaded from the sheet based on current week
Clean static weekly data from the CSV file.
Clean week data from the CSV file.
Get the messages based on flow label
Return the question id based on the label
Return the response of the question for a contact
Return the response score based on the body
Get response message based on day and week
Hourly task jobs for the ArogyaWorld
Run this function on the initial load
load participant files from gcs
message mapping to HSM UUID
question mapping to HSM UUID
response to score mapping
creates the static data map that needs to be sent to users
get template form EEx without variables
get template form EEx based on variables
Conditionally execute the trigger based on: ID, Week, Day.
Create a file in GCS bucket for candidate response
Webhook functions for the ArogyaWorld
Link to this section Functions
@spec add_data_from_csv(String.t(), String.t(), any(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
add data that needs to be sent to the database
@spec add_weekly_dynamic_data(String.t(), String.t(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
adds the weekly dynamic data loaded from the sheet based on current week
Clean static weekly data from the CSV file.
Clean week data from the CSV file.
Get the messages based on flow label
Return the question id based on the label
Return the response of the question for a contact
@spec get_response_score(String.t(), String.t(), non_neg_integer()) :: any()
Return the response score based on the body
@spec get_responses_by_week_and_day(non_neg_integer(), non_neg_integer(), String.t()) :: any()
Get response message based on day and week
@spec hourly_tasks(non_neg_integer()) :: any()
Hourly task jobs for the ArogyaWorld
@spec initial_load(non_neg_integer()) :: any()
Run this function on the initial load
@spec load_participant_file(non_neg_integer(), non_neg_integer()) :: any()
load participant files from gcs
@spec message_hsm_mapping(String.t(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
message mapping to HSM UUID
@spec question_hsm_mapping(String.t(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
question mapping to HSM UUID
@spec response_score_mapping(String.t(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
response to score mapping
@spec static_message_schedule_map(String.t(), non_neg_integer()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
creates the static data map that needs to be sent to users
get template form EEx without variables
get template form EEx based on variables
@spec trigger_condition(Glific.Triggers.Trigger.t()) :: boolean()
Conditionally execute the trigger based on: ID, Week, Day.
@spec upload_participant_responses(non_neg_integer(), non_neg_integer()) :: any()
Create a file in GCS bucket for candidate response
Webhook functions for the ArogyaWorld