Report in the CHT app

Hello community

For one of the CHT implementations we do have a Refer to B2 task config below

{
    name: 'no-contact-enrol',
    title: 'Refer to B2C',
    appliesTo: 'reports',
    appliesToType: ['enroll', 'enroll_with_barcode'],
    appliesIf: (contact) => {
      return contact.contact.rapidpro && contact.contact.rapidpro.visit_date;
    },
    resolvedIf: (contact, report, event, dueDate) => {
      if (contact.contact.muted) {
        return true;
      }
      
      return Utils.isFormSubmittedInWindow(
        contact.reports,
        'day14_no_contact',
        Utils.addDate(dueDate, event.start).getTime(),
        Utils.addDate(dueDate, event.end + 1).getTime()
      ) ||

      Utils.getMostRecentReport(
        contact.reports,
        'tracing_outcome'
      );
    },
    events: [
      {
        dueDate: (event, contact) => {
          return Utils.addDate(new Date(contact.contact.rapidpro.visit_date), 14);
        },
        start: 0,
        end: 14
      }
    ],
    actions: [
      {
        form: 'day14_no_contact'
      }
    ]
  },

However we would to generate a report called B2C referral list report, which should appear with the app. The report should have the following data elements.

  • Client Name
  • Patient ID
  • Date of birth

The report should cover a weekly list of clients escalated to B2C, Monday to Friday.

@jkuester @diana @mrjones How feasible is the implementation of this in the app ?

Hello @cliff

Let me make sure I understand.
The B2C referral list report should have data about multiple patients, not just one?

thanks @diana ,

Yes the B2C referral list report should have data about multiple patients ie weekly list of patients who had the Refer to B2C task triggered on them

The whole system of tasks is built on the idea that one report is about one patient.
Even if this is achievable (somehow, I don’t know how), it would be some hacky way of getting this data, probably supported by some hacky ways of passing data down from the reports.

What is your desired outcome? Is this just an overview?

thanks @diana for the clarification

well a tabular like representation on this list will suffice ,

yeah sure

Thanks @cliff.

And you mentioned this should be a report. Are you imagining this report would get automatically updated when actions happen - for example a new patient needs followup? Where do you imagine users will access this report? In the reports page?

I’m trying to better understand what your ideal situation would be. So far, it doesn’t seem that anything like this is supported by the CHT out of the box.

thanks @diana , yes this report should capture every patient upon whom the Refer to B2C task above is triggered for that week , just listing their names and the other data elements for the nurses to review .

About its location i think it can be embedded in the New Actions button if possible, though under the Reports tab would still be fine to

@diana this is not possible inside CHT?

Could it be possible via analytics in superset dashboard ?

@diana this is not possible inside CHT?

I can’t think of a way that doesn’t involve serious hacks.

I think you could achieve this in superset, I guess you’d need a dropdown to filter results by place, otherwise you would see all referrals server-wide.

yeah true ,

thanks @diana , will be sharing here more updates

1 Like

hello @diana would it be possible to create an export of the Refer to B2C task list? Rather than creating a report? , with the 4 data elements

Hi @cliff

I’m not sure I understand your question.
What is “task list”? Are you actually talking about tasks? You’re requesting a task export with a filter? (This doesn’t exist :frowning: )

If I haven’t understood correctly, please elaborate.