intrahealth / emNutt

mACM implementation for mHero
https://intrahealth.github.io/emNutt/
7 stars 3 forks source link

Total Contacts on mHero #48

Open lkwirica opened 3 years ago

lkwirica commented 3 years ago

How many contacts do we have on mHero.

We need a feature displaying total number of contacts. As it is, it's difficult to establish the total number, hence it's hard to troubleshoot some issues e.g.

We're sending 32k messages, excluding CHVs but we only have 21k contacts. What is the cause of the discrepancy? We can only troubleshoot this if we can ascertain the number of individual contacts on the platform.

lkwirica commented 3 years ago

Since we cannot export the total sent list from Africastalking/Rapidpro, we need this on mHero

lkwirica commented 3 years ago

Message sent on mHero on 17th April -32,726 messages were sent excluding the CHV groups As per the current staff on 21st April 2021, only 23, 225 HCWs have phone numbers. Why do we have a 9501 discrepancy?

ashaban commented 3 years ago

@lkwirica this is fixed, Use the search people report to see total contacts in mHero.

ashaban commented 3 years ago

@lkwirica please review this

njugunask commented 3 years ago

Suggestion @ashaban & @lkwirica

Is it possible to have a list from the search tabs (group) of All HCWs merged together, All CHVs, and so on. So that when one chooses to send a message to a particular group of people then it is even easier to check on the discrepancies and also help in filtering/cleaning or removing unnecessary clutter in the database.

lkwirica commented 3 years ago

image The total number of current staff in iHRIS is currently 70,000, out of which, only 24804 records have phone numbers.(including the erroneous ones)

The total number of contacts added on mHero using the ‘Add Person’ feature is about 500, some of which are duplicates.

Since we only display contacts with phone numbers on mHero, the maximum number of HCW records on the platform should be at MOST 26,000. We also have about 19,000 CHV records, thus in total, we’d expect about 45,000 total contacts on mHero.

On Search People, we have a total of 120,000 records. This figure is almost 3 times the expected total.

As per the issue described initially, when we send messages EXCLUDING CHVs, about 36,900 messages are sent out, against an expected 25,300.

The report should be updated to pick the correct figures. image

ashaban commented 3 years ago

@lkwirica the Search People page displays all health workers including those without phone numbers/ wrong phone numbers and including any record that was added via rapidpro. the send message page is the one that displays only those with phone number.

lkwirica commented 3 years ago

@ashaban this should be updated to display ONLY HCWs on mhero both created in the platform/pulled from iHRIS meaning this MUST be a record with a phone number indicated. The reason, we created this issue is because 'Sending Message' total doesn't accurately display the total number of HCWs on the platform because of the duplicates caused by a HCW belonging to several groups.

ashaban commented 3 years ago

@lkwirica you just want to see how many total records with phone numbers and not total unique records in mHero? that will need to be a separate report.

lkwirica commented 3 years ago

We should only have records with phone numbers on mHero, right? Since we can only send a message to a record with phone number.

The request here, is to have a report on the unique records on the platform to help us answer the question...' How many unique contacts do we have on Mhero? or How many people can we send messages to on Mhero?'

ashaban commented 3 years ago

@lkwirica i will create a new report that displays total records with phone numbers.

ashaban commented 3 years ago

@lkwirica i have created a new report called 'Contacts List' which shows records that messages can be sent to them, it is under mHero report. Please review

lkwirica commented 3 years ago

Hi Ally,

I think we may still have duplicates...I've searched my name...There are 2 records coming up

image

ashaban commented 3 years ago

@lkwirica those are two different records. they are dupplicate because they were entered twice. The difference between this report and the send message page is that, the send message page displays multiple times a single record that belongs to multiple groups, depending on how many groups it belongs. This report shows every record that exists into the database only once. If you want those two records to appear only once then you need to do data cleaning to remove dupplicates. I created scripts to help you with data cleaning.

ashaban commented 3 years ago

@lkwirica in addition to above, mHero will not send a message twice to that record and other records with similar case, but it is still good to clean data and remove dupplicates.

lkwirica commented 3 years ago

@ashaban the report expected should only pull unique records i.e. unique phone numbers on the platform. The unique key should be phone number...

This report on unique records should only pick unique phone numbers since, the phone number can get a message only once.

Alternatively, can we include a filter for unique phone numbers to this report. This will be a report to show how many total number of messages we can expect to send at any given time.

In the case of lkwirica for example, one is a record created on Rapidpro, the other one is created on iHRIS. I believe the fix on checking if a contact exists first on iHRIS before adding a new contact will control for duplicates in the future.

Also, can we include the field for 'Contact group' in this Contact list report? This will help in further analysis on the numbers

ashaban commented 3 years ago

@lkwirica i have created a dashboard, the plan is to populate this dashboard with several visualizations, but for now it just shows total contacts that can be sent messages (which is what you need for now as far as this issue is concerned). Have a look and let me know your thought. You can access this dashboard by going to mHero menu then mHero Dashboards.