National Dashboard-Birth and Death Technical Documentation

Birth and Death-National DSS Documentation

DSS has two sides to it. One being the process in which the Data is pooled to ElasticSearch and the other being the way it is fetched, aggregated, computed, transformed and sent across.

As this revolves around a variety of Data Set, there is a need for making this configurable. So that, tomorrow, given a new scenario is introduced, then it is just a configuration away from getting the newly introduced scenario involved in this flow of process. 

This document explains the steps on how to define the configurations for Analytics Side Of DSS for Birth and Death.

 

What is analytics?

Analytics : Micro Service which is responsible for building, fetching, aggregating and computing the Data on ElasticSearch to a consumable Data Response. Which shall be later used for visualizations and graphical representations. 

Analytics Configurations:
Analytics contains multiple configurations. we need to add the changes related to Birth and Death in this dashboard-analytics.
Here is the location : https://github.com/egovernments/configs/tree/qa/egov-dss-dashboards/dashboard-analytics
Below is a list of configurations that need to be changed to run Birth and Death successfully.

  1. Chart API Configuration

  2. Master Dashboard Configuration

  3. Role Dashboard Mappings Configuration

Description :

Chart API Configuration : 

Each Visualization has its own properties. Each Visualization comes from different data sources (Sometimes it is a combination of different data sources) 

In order to configure each visualization and their properties, we have a Chart API Configuration Document.

In this, Visualization Code, which happens to be the key, will be having its properties configured as a part of configuration and are easily changeable. 

Here is the sample ChartApiConfiguration.json data for the Birth and Death.

 

"nssNumberOfBirthsTodayByGender": { "chartName": "NSS_NUMBER_OF_BIRTHS_TODAY_BY_GENDER", "queries": [ { "module": "BIRTH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Number of Birth Today By Gender\":{\"terms\":{\"field\":\"gender.keyword\"},\"aggs\":{\"category\":{\"sum\":{\"field\":\"numberOfBirthsTodayForGender\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Number of Birth Today By Gender" ], "insight": { }, "_comment": "Number of Births Today By Gender" }, "nssNumberOfBirthCertificateDownloadByChannel": { "chartName": "NSS_NUMBER_OF_BIRTH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "queries": [ { "module": "BIRTH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Number Of Birth Certificate Download By Channel\":{\"terms\":{\"field\":\"channel.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForChannel\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Number Of Birth Certificate Download By Channel" ], "insight": { }, "_comment": "Number Of Birth Certificate Download By Channel" }, "nssBirthTotalCertificateDownload": { "chartName": "NSS_BIRTH_TOTAL_CERTIFICATE_DOWNLOAD", "queries": [ { "module": "BIRTH", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Birth total Certificate Download\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForChannel\"}}}}}}", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date" } ], "chartType": "metric", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Birth total Certificate Download" ], "insight": { "chartResponseMap" : "totalApplication", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": " total Certificate Download" }, "nssNumberOfBirthCertificateDownloadByBoundary": { "chartName": "NSS_BND_CERT_DOWNLOAD_BY_BOUNDARY", "queries": [ { "module": "BIRTH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"state \":{\"terms\":{\"field\":\"state.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Birth Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ {"key": "state", "column": "State"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "xNssBirthDownloadByUlb", "documentType": "_doc", "action": "", "plotLabel": "State", "isRoundOff":true, "aggregationPaths": [ "Birth Total Downloads (Mobile App)", "Birth Total Downloads (Web)", "Birth Total Downloads", "Birth Delayed Registrations" ], "pathDataTypeMapping": [ { "Birth Total Downloads (Mobile App)": "number" }, { "Birth Total Downloads (Web)": "number" }, { "Birth Total Downloads": "number" }, { "Birth Delayed Registrations": "number" } ], "insight": { }, "_comment": "" }, "xNssBirthDownloadByUlb": { "chartName": "NSS_BND_CERT_DOWNLOAD_BY_ULB", "queries": [ { "module": "BIRTH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ulb \":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Birth Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "filterKeys": [ {"key": "ulb", "column": "ULB"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "xNssBirthDownloadByWard", "documentType": "_doc", "action": "", "plotLabel": "ULB", "isRoundOff":true, "aggregationPaths": [ "Birth Total Downloads (Mobile App)", "Birth Total Downloads (Web)", "Birth Total Downloads", "Birth Delayed Registrations" ], "pathDataTypeMapping": [ { "Birth Total Downloads (Mobile App)": "number" }, { "Birth Total Downloads (Web)": "number" }, { "Birth Total Downloads": "number" }, { "Birth Delayed Registrations": "number" } ], "insight": { }, "_comment": "" }, "xNssBirthDownloadByWard": { "chartName": "NSS_BND_CERT_DOWNLOAD_BY_WARD", "queries": [ { "module": "BIRTH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "birth-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ward \":{\"terms\":{\"field\":\"ward.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Birth Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Birth Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "filterKeys": [ {"key": "ward", "column": "Ward"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "table", "valueType": "number", "drillChart": "none", "documentType": "_doc", "action": "", "plotLabel": "Ward", "isRoundOff":true, "aggregationPaths": [ "Birth Total Downloads (Mobile App)", "Birth Total Downloads (Web)", "Birth Total Downloads", "Birth Delayed Registrations" ], "pathDataTypeMapping": [ { "Birth Total Downloads (Mobile App)": "number" }, { "Birth Total Downloads (Web)": "number" }, { "Birth Total Downloads": "number" }, { "Birth Delayed Registrations": "number" } ], "insight": { }, "_comment": "" },"nssNumberOfDeathsByCategory": { "chartName": "NSS_NUMBER_OF_DEATHS_BY_CATEGORY", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"category\":{\"terms\":{\"field\":\"gender.keyword\"},\"aggs\":{\"category\":{\"sum\":{\"field\":\"numberOfDeathsTodayForGender\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "category" ], "insight": { }, "_comment": "Death By Age Category" }, "nssNumberOfDeathsByAge": { "chartName": "NSS_NUMBER_OF_DEATHS_BY_AGE", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"1_lessthan-2\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"lessthan-2\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"2_2-14\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"2-14\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"3_15-29\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"15-29\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"4_30-44\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"30-44\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"5_45-59\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"45-59\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"6_60-74\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"60-74\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}},\"7_greaterthan-75\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"age.keyword\":[\"greaterthan-75\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfDeathsTodayForAge\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "order": "asc", "aggregationPaths": [ "1_lessthan-2", "2_2-14", "3_15-29", "4_30-44", "5_45-59", "6_60-74", "7_greaterthan-75" ], "insight": { }, "_comment": "Death By Age Category" }, "nssNumberOfDeathCertificateDownloadByChannel": { "chartName": "NSS_NUMBER_OF_DEATH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Number Of Death Certificate Download By Channel\":{\"terms\":{\"field\":\"channel.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForChannel\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Number Of Death Certificate Download By Channel" ], "insight": { }, "_comment": "Number Of Death Certificate Download By Channel" }, "nssDeathTotalCertificateDownload": { "chartName": "NSS_DEATH_TOTAL_CERTIFICATE_DOWNLOAD", "queries": [ { "module": "DEATH", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Death total Certificate Download\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForChannel\"}}}}}}", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date" } ], "chartType": "metric", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Death total Certificate Download" ], "insight": { "chartResponseMap" : "totalApplication", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": " totalApplication is the chartId" }, "nssNumberOfDeathCertificateDownloadByBoundary": { "chartName": "NSS_DEATH_CERT_DOWNLOAD_BY_BOUNDARY", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"state \":{\"terms\":{\"field\":\"state.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Death Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ {"key": "state", "column": "State"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "xNssDeathDownloadByUlb", "documentType": "_doc", "action": "", "plotLabel": "State", "isRoundOff":true, "aggregationPaths": [ "Death Total Downloads (Mobile App)", "Death Total Downloads (Web)", "Death Total Downloads", "Death Delayed Registrations" ], "pathDataTypeMapping": [ { "Death Total Downloads (Mobile App)": "number" }, { "Death Total Downloads (Web)": "number" }, { "Death Total Downloads": "number" }, { "Death Delayed Registrations": "number" } ], "insight": { }, "_comment": "" }, "xNssDeathDownloadByUlb": { "chartName": "NSS_DEATH_CERT_DOWNLOAD_BY_ULB", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\", \"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ulb \":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Death Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "filterKeys": [ {"key": "ulb", "column": "ULB"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "xNssDeathDownloadByWard", "documentType": "_doc", "action": "", "plotLabel": "ULB", "isRoundOff":true, "aggregationPaths": [ "Death Total Downloads (Mobile App)", "Death Total Downloads (Web)", "Death Total Downloads", "Death Delayed Registrations" ], "pathDataTypeMapping": [ { "Death Total Downloads (Mobile App)": "number" }, { "Death Total Downloads (Web)": "number" }, { "Death Total Downloads": "number" }, { "Death Delayed Registrations": "number" } ], "insight": { }, "_comment": "" }, "xNssDeathDownloadByWard": { "chartName": "NSS_DEATH_CERT_DOWNLOAD_BY_WARD", "queries": [ { "module": "DEATH", "requestQueryMap": "{\"ward\" : \"ward.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "death-cert-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ward \":{\"terms\":{\"field\":\"ward.keyword\",\"size\":1000,\"order\":{\"_term\":\"asc\"}},\"aggs\":{\"Death Total Downloads (Mobile App)\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads (Web)\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"web\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Total Downloads\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"boundary.keyword\":[\"mobileApp\",\"web\"]}}]}},\"aggs\":{\"Total Downloads\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}},\"Death Delayed Registrations\":{\"filter\":{\"bool\":{\"must\":[{\"term\":{\"boundary.keyword\":\"delayedRegistration\"}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"numberOfCertificatesDownloadedTodayForBoundary\"}}}}}}}}}}" } ], "filterKeys": [ {"key": "ward", "column": "Ward"} ], "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "chartType": "table", "valueType": "number", "drillChart": "none", "documentType": "_doc", "action": "", "plotLabel": "Ward", "isRoundOff":true, "aggregationPaths": [ "Death Total Downloads (Mobile App)", "Death Total Downloads (Web)", "Death Total Downloads", "Death Delayed Registrations" ], "pathDataTypeMapping": [ { "Death Total Downloads (Mobile App)": "number" }, { "Death Total Downloads (Web)": "number" }, { "Death Total Downloads": "number" }, { "Death Delayed Registrations": "number" } ], "insight": { }, "_comment": "" }

Click here to check the complete configuration

Master Dashboard Configuration:

Master Dashboard Configuration is the main configuration which defines as which are the Dashboards which are to be painted on screen. 

It includes all the Visualizations, their groups, the charts which comes within them and even their dimensions as what should be their height and width.

{ "name": "NSS_BIRTH_DEATH", "id": "nss-birth-death", "isActive": "", "style": "linear", "visualizations": [ { "row": 1, "name": "NSS_BIRTH", "vizArray": [ { "id": 311, "name": "NSS_BIRTH_OVERVIEW", "dimensions": { "height": 350, "width": 5 }, "vizType": "metric-collection", "label": "NSS_BIRTH_OVERVIEW", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "nssBirthTotalCertificateDownload", "name": "NSS_BIRTH_TOTAL_CERTIFICATE_DOWNLOAD", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssBirthTotalCollection", "name": "NSS_BIRTH_TOTAL_COLLECTION", "code": "", "chartType": "metric", "filter": "", "headers": [] } ] }, { "id": 342, "name": "NSS_BIRTH_CERTIFICATE_DOWNLOAD_TREND", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "isCollapsible": false, "charts": [ { "id": "nssBirthCertificateDownloadTrend", "name": "Monthly", "code": "", "chartType": "line", "filter": "", "headers": [] } ] } ] }, { "row": 2, "name": "NSS_BIRTH", "vizArray": [ { "id": 323, "name": "NSS_NUMBER_OF_BIRTH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "dimensions": { "height": 250, "width": 4 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "nssNumberOfBirthCertificateDownloadByChannel", "name": "NSS_NUMBER_OF_BIRTH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 342, "name": "NSS_NUMBER_OF_BIRTHS_TODAY_BY_GENDER", "dimensions": { "height": 250, "width": 4 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "nssNumberOfBirthsTodayByGender", "name": "NSS_NUMBER_OF_BIRTHS_TODAY_BY_GENDER", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] } ] }, { "row": 3, "name": "NSS_BIRTH", "vizArray": [ { "id": 431, "name": "NSS_CERT_DOWNLOAD_BY_BOUNDARY", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssNumberOfBirthCertificateDownloadByBoundary", "name": "NSS_CERT_DOWNLOAD_BY_BOUNDARY", "code": "", "chartType": "table", "filter": "", "headers": [], "tabName": "Boundary" } ] } ] }, { "row": 5, "name": "NSS_DEATH", "vizArray": [ { "id": 311, "name": "NSS_DEATH_OVERVIEW", "dimensions": { "height": 350, "width": 5 }, "vizType": "metric-collection", "label": "NSS_DEATH_OVERVIEW", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "nssDeathTotalCertificateDownload", "name": "NSS_DEATH_TOTAL_CERTIFICATE_DOWNLOAD", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssDeathTotalCollection", "name": "NSS_DEATH_TOTAL_COLLECTION", "code": "", "chartType": "metric", "filter": "", "headers": [] } ] }, { "id": 342, "name": "NSS_DEATH_CERTIFICATE_DOWNLOAD_TREND", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "isCollapsible": false, "charts": [ { "id": "nssDeathCertificateDownloadTrend", "name": "Monthly", "code": "", "chartType": "line", "filter": "", "headers": [] } ] } ] }, { "row": 6, "name": "NSS_DEATH", "vizArray": [ { "id": 323, "name": "NSS_NUMBER_OF_DEATH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "dimensions": { "height": 250, "width": 4 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "nssNumberOfDeathCertificateDownloadByChannel", "name": "NSS_NUMBER_OF_DEATH_CERTIFICATE_DOWNLOAD_BY_CHANNEL", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 542, "name": "NSS_NUMBER_OF_DEATHS_BY_CATEGORY", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "isCollapsible": false, "charts": [ { "id": "nssNumberOfDeathsByCategory", "name": "NSS_NUMBER_OF_DEATHS_BY_CATEGORY", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 542, "name": "NSS_NUMBER_OF_DEATHS_BY_AGE", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "isCollapsible": false, "charts": [ { "id": "nssNumberOfDeathsByAge", "name": "NSS_NUMBER_OF_DEATHS_BY_AGE", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] } ] }

 

Click here for the complete configuration

Role Dashboard Mappings Configuration:

Master Dashboard Configuration which was explained earlier hold the list of Dashboards which are available.

Given the instance where Role Action Mapping is not maintained in the Application Service, this configuration will act as Role - Dashboard Mapping Configuration 

In this, each Role is mapped against the Dashboard which they are authorized to see

This was used earlier when the Role Action Mapping of eGov was not integrated.

Later, when the Role Action Mapping started controlling the Dashboards to be seen on the client side, this configuration was just used to enable the Dashboards for viewing. 

{ "_comment": "Holds mapping for each role with and its associated dashboards", "roles" : [ { "_comment":"This role is super role which can access all the available dashboards: [other/new roles are suppose to be added]", "roleId": 6, "roleName" : "Admin", "isSuper" : "", "orgId": "", "dashboards": [ { "name": "National Birth Death", "id": "nss-birth-death" } ] } ] }

 

Click here to check the configuration

 MDMS Configuration to be added:

common-masters/uiCommonConstants.json

Click here to check the complete configuration

roleaction.json

 

Click here to check the complete configuration

Action test.json:

 

Click here to check the complete configuration

Birth and Death - State DSS Consists of multiple graphs which represent the data of Birth and Death. Each graph has its own configuration which will describe the chart and its type.

State DSS Consists of following charts in Birth and Death:

Birth and Death Page :

Birth :

  • Overview

  • Certificates Download Trend

  • Downloads by Channel

  • Births by Gender

  • Certificate Downloads by Boundary

Overview:

Overview graph contains multiple data information as below in the selected time period.

  • Total Certificate Downloads : This represents total number of birth certificates downloaded.

  •  Total Collection : Total revenue collected for downloading birth certificates for the applied date filter.

 

Certificates Download Trend:

This will be a line graph that shows total birth certificates downloaded for a given month, total Birth Certificates downloaded for the applied date filter.

line - this graph/chart is data representation on date histograms or date groupings.

 

Downloads by Channel :

This will be a pie chart where total birth certificate downloads will be bifurcated by channel (Mobile App, Web etc.)

Births by Gender : This will be a pie chart where total births registered will be bifurcated by gender

Certificate Downloads by Boundary : This tabular chart representation graph shows multiple Birth information like Total Downloads (Mobile App), Total Downloads (Web), Total Downloads, Delayed Registrations. And this table shows the data in DDR level and also has the drill down chart for each state to ulb and from ulb to ward level data for the same.

xtable type allows to add multiple computed fields with the aggregated fields dynamically added.

To add multiple computed columns,  computedFields []  where actionName (IComputedField<T> interface), fields [] names as in exist in query key, newField as name to appear for computation must be defined.

On click of any State name will enter into drill down charts, which will represents that specific state data.

On click of the ULB will navigate to wards under that specific ULB and each ward shows the specific data regarding that ward.

 

Death :

  • Overview

  • Certificates Download Trend

  • Downloads by Channel

  • Deaths by Age Category

  • Certificate Downloads by Boundary

Overview:

Overview graph contains multiple data information as below in the selected time period.

  • Total Certificate Downloads : This represents total number of death certificates downloaded.

  •  Total Collection : Total revenue collected for downloading death certificates for the applied date filter.

 

Certificates Download Trend:

This will be a line graph that shows total death certificates downloaded for a given month, total death Certificates downloaded for the applied date filter.

line - this graph/chart is data representation on date histograms or date groupings.

 

Downloads by Channel :

This will be a pie chart where total death certificate downloads will be bifurcated by channel (Mobile App, Web etc.)

Deaths by Gender : This will be a split bar graph where total deaths registered will be bifurcated by age category (< 2 years, 2-15, 15-29, 30-44, 45-59, 60-74, >= 75) and each bar will show gender wise split

Deaths by Age Category : This will be a split bar graph where total deaths registered will be bifurcated by age category (< 2 years, 2-15, 15-29, 30-44, 45-59, 60-74, >= 75) and each bar will show age wise data

 

Certificate Downloads by Boundary : This tabular chart representation graph shows multiple Birth information like Total Downloads (Mobile App), Total Downloads (Web), Total Downloads, Delayed Registrations. And this table shows the data in DDR level and also has the drill down chart for each state to ulb and from ulb to ward level data for the same.

xtable type allows to add multiple computed fields with the aggregated fields dynamically added.

To add multiple computed columns,  computedFields []  where actionName (IComputedField<T> interface), fields [] names as in exist in query key, newField as name to appear for computation must be defined.

On click of any DDR name will enter into drill down charts, which will represents that specific state data.

On click of the ULB will navigate to wards under that specific ULB and each ward shows the specific data regarding that ward.

Newly introduced property:

isRoundOff: This property is introduced to round off the decimal values. Ex: if the value is 25.43 by using isRoundOff property in configuration we will get it as 25. if value is 22.56 round of value will be 23.
This can be used for insights configuration as well for overview graph.

Common Properties available:

Key(eg: fsmTotalrequest) : This is the Visualization Code. This key will be referred to in further visualization configurations.

This is the key which will be used by the client application to indicate which visualization is needed for display.

chartName : The name of the Chart which has to be used as a label on the Dashboard. The name of the Chart will be a detailed name.

In this configuration, the Name of the Chart will be the code of Localization which will be used by Client Side.

queries : Some visualizations are derived from a specific data source. While some others are derived from different data sources and are combined together to get a meaningful representation.

The queries of aggregation which are to be used to fetch out the right data in the right aggregated format are configured here.

queries.module : The module / domain level, on which the query should be applied on. Birth and Death is birth-death.

queries.indexName : The name of the index upon which the query has to be executed is configured here.

queries.aggrQuery : The aggregation query in itself is added here. Based on the Module and the Index name specified, this query is attached to the filter part of the complete search request and then executed against that index

queries.requestQueryMap : Client Request would carry certain fields which are to be filtered. The parameters specified in the Client Request are different from the parameters in each of these indexed documents.

In order to map the parameters of the request to the parameters of the ElasticSearch Document, this mapping is maintained.

queries.dateRefField : Each of these modules have separate indexes. And all of them have their own date fields. 

When there is a date filter applied against these visualizations, each of them has to apply it against their own date reference fields.

In order to maintain what is the date field in which index, we have this configured in this configuration parameter.

chartType : As there are different types of visualizations, this field defines what is the type of chart / visualization that this data should be used to represent. 

Chart types available are:

metric - this represents the aggregated amount/value for records filter by the aggregate es query 

pie - this represents the aggregated data on grouping. This is can be used to represent any line graph, bar graph, pie chart or donuts

line - this graph/chart is data representation on date histograms or date groupings

perform - this chart represents groping data as performance wise.

table - represents a form of plots and value with headers as grouped on and list of its key, values pairs. 

xtable - represents a advanced feature of table, it has addition capabilities for dynamic adding header values.

valueType : In any case of data, the values which are sent to plot, might be a percentage, sometimes an amount and sometimes it is just a count.

In order to represent them and differentiate the numbers from amount from percentage, this field is used to indicate the type of value that this Visualization will be sending.

action : Some of the visualizations are not just aggregation on data source. There might be some cases where we have to do a post aggregation computation.

For Example, in the case of Top 3 Performing ULBs, the Target and Total Collection is obtained and then the percentage is calculated. In these kinds of cases, what is the action that has to be performed on that data obtained is defined in this parameter. 

documentType : The type of document upon which the query has to be executed is defined here. 

drillChart : If there is a drill down on the visualization, then the code of the Drill Down Visualization is added here. This will be used by Client Service to manage drill downs.

aggregationPaths : All the queries will be having Aggregation names in it. In order to fetch the value out of each Aggregation Responses, the name of the aggregation in the query will be an easy bet. These aggregation paths will have the names of Aggregation in it.

insights : It is to show the data with the comparison of last year with arrow symbols, it will show the data in how much % is increased or decreased. 

_comment : In order to display information on the “i” symbol of each visualization, Visualization Information is maintained in this field. 

Index Properties of State Birth and Death- Dss:

The index that contains data for State-Birth and Death are - birth-cert-v1, death-cert-v1

The mapping for this index is:

Birth :

Death :