Agency Management Reports

[STFF-104] Specification Details

Data Types Specs

Profile Created

Data Type(s): Profile Created
Deleted Option: all; no deleted

When a new client record is added to Clarity instance, a corresponding row is added to the "clients_log" table.

For "Profile Created" staff activity all rows are selected from "clients_log" table where:

  • clients_log.ref_user = STAFF_ID
  • and it is the profile creation record
  • and activity datetime (clients_log.date) is within [report date range]
  • and if client is private, then clients.ref_agency = CURRENT_AGENCY, otherwise there is no ref_agency restriction
  • and client record is not deleted

Profile Edited

Data Type(s): Profile Edited
Deleted Option: all; no deleted

When a client record is updated via the Clarity app, a corresponding row is added to the "clients_log" table.

For "Profile Edited" staff activity all rows are selected from "clients_log" table where:

  • clients_log.ref_user = STAFF_ID
  • and it is the profile update record
  • and activity datetime (clients_log.date) is within [report date range]
  • and if client is private, then clients.ref_agency = CURRENT_AGENCY, otherwise there is no ref_agency restriction
  • and client record is not deleted

Profile Deleted

Data Type(s): Profile Created, Profile Edited
Deleted Option: all; deleted only

 

When the client record is deleted, "clients" table is updated with "clients.deleted = 1.

For "Profile Deleted" staff activity all rows are selected from "clients" table where:

  • clients.deleted = 1
  • and clients.last_updated is within [report date range]
  • and if client is private, then clients.ref_agency = CURRENT_AGENCY, otherwise there is no ref_agency restriction

Note:

  • If any Data Type was deleted and then re-activated, the client is not reported as deleted
  • If any Data Type was deleted, then re-activated, and then deleted again, the first deletion will not be reported as deleted but will be reported for the datetime of the last deletion

Updated 3/9/2021