Table of Contents | ||
---|---|---|
|
Reports Logic
Using replicated tables from fraud data mart and BI tool the reports with outliers must be shown. Until there is no enough statistic to use statistical methods to find outliers, the top least(5%, 25 rows) can be shown instead.
For now there are 3 reports are required - for autorization, doctors and phone_numbers.
Predefine views with aggregation
1. Doctor aggregation
number of patients per doctor (total_patients_doctor)
...
SOURCE | FIELD | NAME | DESCRIPTION |
---|---|---|---|
employee | legal_entity_id | legal_entity_id | |
divisions | divisions.addresses.residence_settlement_type | residence_settlement_type | when type<>'CITY' then 'OTHER' else type |
persons | count(authentication_methods.type='OFFLINE'.person_id) | offline_patients_qty | authentication_methods.type='OFFLINE' |
persons | count(authentication_methods.{type}='OFFLINE'.person_id)/count(person_id) | ratio_offline_patients_qty | ratio of patients with offline method of authorization within particular legal entity |
persons | count(person_id) | patients_qty | qty patients by legal entity (total till report date) |
$inserted_at | report_date | the date when calculated |
Authorizations_fraud report
Using
- autorization_legal_entity table - legal entities with patients_qty<= 50 are not taken into account.
autorization_doctor table - doctors with patients_qty<= 10 are not taken into account.
...
- id (based on input type it can be party_id or legal_entity_id)
- settlement_type
- offline_patients_qty
- ratio_offline_patients_qty
- report_date
Phone_numbers_fraud report
Using
- patients_phonenumber table - phone numbers with patients_qty<= 1 are not taken into account.
...
- phone_number
- patients_qty
- report_date
Doctors_fraud report
Using
- total_patients_doctor table - doctors with patients_qty<= 10 are not taken into account.
...