avniproject/lfeteach

User count mismatch Analysis

Closed this issue · 1 comments

FD ticket: https://avni.freshdesk.com/a/tickets/3255

Context

In the Classroom Observations Trackers (State Level) [AP Teach] when we add date filter count of Users are not matching with the total users (Userwise Observation Count + Userwise Observation not Done Count)

Notes :

Userwise Observation Count

in this we findout that some users check not provided so we added that

Backup query:

-- Note: Unless you save your query, these tabs will NOT persist if you clear your cookies or change browsers.

SELECT users.username, "District",        users.name      as "name",
       users.phone_number as mobile_number,
"Mandal" as mandal,
"Complex" as complex,
"School" as school,
obs.id, obs.encounter_date_time,
"Type of School"                                    as school_type,
primary_status,
secondary_status
from teachap.teacher_observation obs
inner join teachap.teacher t on t.id = obs.individual_id
inner join address on t.address_id = address.id
inner join users on users.id = obs.last_modified_by_id
inner join user_status us on us.user_id = users.id
where obs.encounter_date_time is not null
     and obs.is_voided = false
     and t.is_voided = false
    -- and users.is_voided = false

Userwise Observation not Done Count

Analysis:

  1. In this card we find out that time filter is currently not working as no encounter_date_time available.
  2. So we have to pass it into inside query
  3. Logic for this component should be users which don't have encounters or don't have encounter between that time frame

Task done till time:

  1. created a new dataset with simmillar query named Users and Observations not done count - Updated
    cc : @sachsk
  2. Currently I am unable to pass time filter value. due to superset error. So I figure it out that we have to check ENABLE_TEMPLATE_PROCESSING as per document Link