Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SOURCEFIELDNAMEDESCRIPTION
employeeparty_idparty_id
employeelegal_entity_idlegal_entity_id
declarationscount(person_id)patients_qtyqty patients by doctor (total till report date)
declarations

avg(qty_person_id_30)/

avg(qty_person_id_60)

patient_increase_30d

For each doctor calculate lifetime - (report_date-inserted_at)

If doctor lifetime <=90 days  - then null 

if doctor lifetime >= 90 days:

avg(qty_person_id_30) - average number of patients (new declarations) for a doctor for the last 30 days

avg(qty_person_id_60) - average number of patients (new declarations) for a doctor for 60 days before last 30 days


$inserted_atreport_datethe date when calculated

...