Get Main Stats
Detailed spec:
{ "data": { "declarations": select count(*) from declarations where inserted_at <= end_date and status in('active', 'pending_verification') "msps": select count(*) from legal_entities where type ='MSP' and is_active = true and status='ACTIVE' "doctors": select count(*) from employees where is_active = TRUE and employee_type = 'DOCTOR' and status = 'APPROVED' "pharmacies": select count(*) from legal_entities where type ='PHARMACY' and is_active = TRUE and status='ACTIVE' "pharmacists": select count(*) from employees where is_active = TRUE and employee_type = 'PHARMACIST' and status = 'APPROVED' "active medication requests": select count(*) from medication_requests where status = 'ACTIVE' "completed medication requests": select count(*) from medication_requests where status = 'COMPLETED' }, }
Get Main Stats by Regions
Detailed spec
"declarations": declarations.division.addreses['RESIDENCE'].region_ID and status in('active', 'pending_verification') "msps": legal_entities.[type='MSP' and status='ACTIVE'].addreses['REGISTRATION'].region_ID "doctors": 15 --> employees.[employee_type='DOCTOR' & is_active=true and status='APPROVED'].division_id-->divisions.addreses['RESIDENCE'].region_ID "pharmacies": 2, --> legal_entities.[type='PHARMACY' and status='ACTIVE'].addreses['REGISTRATION'].region_ID "pharmacists": 15 --> employees.[employee_type='PHARMACIST' & is_active=true and status='APPROVED'].division_id-->divisions.addreses['RESIDENCE'].region_ID "medication_requests": 30 -->medication_requests.employee_id-->division_id-->divisions.addreses['REGISTRATION'].region_ID
Get Main Stats by Division