CR List Count
This page explains how Caution Report diagnose-code counts are loaded.
API Endpoints
GET /data/caution-report/all/count
Purpose
Count flow gives quick summary of active CR volume by diagnose code.
Current response has two counters:
networkCountserviceCount
Business meaning
This flow is not portal pagination total.
It is separate summary flow used to show how many CRs currently match high-level count filters, split by diagnose code.
Flow summary
| Step | Business meaning |
|---|---|
| resolve date range to UTC | count window is normalized |
| check admin vs non-admin | role affects visible workgroups |
| if NOC user, force allowed workgroups | count scope is narrowed |
| apply source and creator filters | summary can be scoped |
| query grouped diagnose-code counts | backend aggregates by NETWORK and SERVICE |
| map missing groups to zero | stable response shape is preserved |
return networkCount and serviceCount | UI summary cards can render |
Implementation note
This matches current implementation:
- backend exposes
GET data/caution-report/all/count - backend counts by diagnose code, not paginated row total
- mobile uses this endpoint for summary cards
- portal list total still comes from
GET data/caution-report/all
Code refs:
intt-mobile/lib/services/caution_report_service.dart:129intt-mobile/lib/screens/caution_report/caution_report_screen.dart:231mvp2-data-service/src/modules/caution-report/caution-report.controller.ts:233mvp2-data-service/src/modules/caution-report/caution-report.service.ts:657
What this flow does not mean
- it does not replace CR list query
- it does not drive portal pagination total
- it does not apply full list-filter matrix like status, region, or TMF fields