Skip to content

Commit

Permalink
Updated PT SLA query and citz delivery index (#2649)
Browse files Browse the repository at this point in the history
* [Um-6079]- Added TL ndss query for Pendancy

* Updated PT SLA query and citz delivery index
  • Loading branch information
hinamakhija-eGov authored Apr 20, 2023
1 parent 268fddf commit b1e95c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion egov-dss-dashboards/dashboard-analytics/ChartApiConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18453,6 +18453,13 @@
"dateRefField": "date",
"indexName": "pt-national-dashboard",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"applicationStatus.keyword\":\"APPROVED\"}}]}},\"aggs\":{\"stateApplicationsWithinSla\":{\"terms\":{\"field\":\"state.keyword\"},\"aggs\":{\"intermediateAggrULB\":{\"terms\":{\"field\":\"ulb.keyword\"},\"aggs\":{\"intermediateAggrWard\":{\"terms\":{\"field\":\"ward.keyword\"},\"aggs\":{\"days\":{\"terms\":{\"field\":\"date\"},\"aggs\":{\"applicationsSubmittedWithInSla\":{\"avg\":{\"field\":\"todaysApplicationsWithinSLA\"}}}},\"wardapplications\":{\"sum_bucket\":{\"buckets_path\":\"days.applicationsSubmittedWithInSla\"}}}},\"ulbApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrWard.wardapplications\"}}}},\"stateApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrULB.ulbApplications\"}}}},\"Total_Applications_Within_SLA\":{\"sum_bucket\":{\"buckets_path\":\"stateApplicationsWithinSla.stateApplications\"}},\"stateMovedApplications\":{\"terms\":{\"field\":\"state.keyword\"},\"aggs\":{\"intermediateAggrULB\":{\"terms\":{\"field\":\"ulb.keyword\"},\"aggs\":{\"intermediateAggrWard\":{\"terms\":{\"field\":\"ward.keyword\"},\"aggs\":{\"days\":{\"terms\":{\"field\":\"date\"},\"aggs\":{\"totalMovedApplications\":{\"avg\":{\"field\":\"todaysMovedApplicationsForApplicationStatus\"}}}},\"wardapplications\":{\"sum_bucket\":{\"buckets_path\":\"days.totalMovedApplications\"}}}},\"ulbApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrWard.wardapplications\"}}}},\"stateApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrULB.ulbApplications\"}}}},\"Total_Moved_Applications\":{\"sum_bucket\":{\"buckets_path\":\"stateMovedApplications.stateApplications\"}}}}}}"
},
{
"module": "PT",
"requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}",
"dateRefField": "date",
"indexName": "pt-national-dashboard",
"aggrQuery": "{\"size\":0,\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"applicationStatus.keyword\":\"REJECTED\"}}]}},\"aggs\":{\"stateMovedApplications\":{\"terms\":{\"field\":\"state.keyword\"},\"aggs\":{\"intermediateAggrULB\":{\"terms\":{\"field\":\"ulb.keyword\"},\"aggs\":{\"intermediateAggrWard\":{\"terms\":{\"field\":\"ward.keyword\"},\"aggs\":{\"days\":{\"terms\":{\"field\":\"date\"},\"aggs\":{\"totalMovedApplications\":{\"avg\":{\"field\":\"todaysMovedApplicationsForApplicationStatus\"}}}},\"wardapplications\":{\"sum_bucket\":{\"buckets_path\":\"days.totalMovedApplications\"}}}},\"ulbApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrWard.wardapplications\"}}}},\"stateApplications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggrULB.ulbApplications\"}}}},\"Total_Moved_Applications\":{\"sum_bucket\":{\"buckets_path\":\"stateMovedApplications.stateApplications\"}}}}}}"
}
],
"chartType": "metric",
Expand Down Expand Up @@ -18627,7 +18634,7 @@
"requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}",
"dateRefField": "date",
"indexName": "pt-national-dashboard",
"aggrQuery": "{\"aggs\": {\"all_matching_docs\": {\"filters\": {\"filters\": {\"all\": {\"match_all\": {}}}},\"aggs\": {\"state\":{\"terms\": {\"field\": \"state.keyword\",\"size\": 10000},\"aggs\": {\"ulb\": {\"terms\": {\"field\": \"ulb.keyword\",\"size\": 10000},\"aggs\": {\"ward\": {\"terms\": {\"field\": \"ward.keyword\",\"size\": 10000},\"aggs\": {\"SlaintermediateAggr\": {\"terms\": {\"field\": \"date\",\"size\": 10000},\"aggs\": {\"applicationsSubmittedWithInSla\": {\"avg\": {\"field\": \"todaysApplicationsWithinSLA\"}}}},\"Total_Applications_Within_SLA\": {\"sum_bucket\": {\"buckets_path\": \"SlaintermediateAggr.applicationsSubmittedWithInSla\"}},\"app\": {\"filter\": {\"bool\": {\"must\":[{\"match\":{\"applicationStatus.keyword\" : \"APPROVED\"}}]}},\"aggs\": {\"totalapplication\": {\"sum\": {\"field\": \"todaysMovedApplicationsForApplicationStatus\"}}}},\"aggregatedsla\": {\"bucket_script\": {\"buckets_path\": {\"total\": \"app.totalapplication\",\"withinsla\": \"Total_Applications_Within_SLA\"},\"script\": \"((params.withinsla / params.total) * 100)*0.5\"}}}}}}}}}}}}"
"aggrQuery": "{\"aggs\":{\"all_matching_docs\":{\"filters\":{\"filters\":{\"all\":{\"match_all\":{}}}},\"aggs\":{\"state\":{\"terms\":{\"field\":\"state.keyword\",\"size\":10000},\"aggs\":{\"ulb\":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":10000},\"aggs\":{\"ward\":{\"terms\":{\"field\":\"ward.keyword\",\"size\":10000},\"aggs\":{\"SlaintermediateAggr\":{\"terms\":{\"field\":\"date\",\"size\":10000},\"aggs\":{\"applicationsSubmittedWithInSla\":{\"avg\":{\"field\":\"todaysApplicationsWithinSLA\"}}}},\"Total_Applications_Within_SLA\":{\"sum_bucket\":{\"buckets_path\":\"SlaintermediateAggr.applicationsSubmittedWithInSla\"}},\"app\":{\"filter\":{\"bool\":{\"must\":[{\"match\":{\"applicationStatus.keyword\":\"APPROVED\"}}]}},\"aggs\":{\"totalapplication\":{\"sum\":{\"field\":\"todaysMovedApplicationsForApplicationStatus\"}}}},\"reject\":{\"filter\":{\"bool\":{\"must\":[{\"match\":{\"applicationStatus.keyword\":\"REJECTED\"}}]}},\"aggs\":{\"totalapplication\":{\"sum\":{\"field\":\"todaysMovedApplicationsForApplicationStatus\"}}}},\"aggregatedsla\":{\"bucket_script\":{\"buckets_path\":{\"total\":\"app.totalapplication\",\"total_rejected\":\"reject.totalapplication\",\"withinsla\":\"Total_Applications_Within_SLA\"},\"script\":\"((params.withinsla \/ (params.total + params.total_rejected)) * 100)*0.5\"}}}}}}}}}}}}"
},
{
"module": "CF",
Expand Down

0 comments on commit b1e95c9

Please sign in to comment.