Integrating PGR In mGramSeva

Integrating PGR In mGramSeva

MDMS Configuration

  1. Add master data in MDMS service with module name as RAINMAKER-PGR. Following is some sample master data for the service:
    ServiceDefs.json

{ "tenantId": "pb", "moduleName": "RAINMAKER-PGR", "ServiceDefs": [ { "serviceCode": "FaultInMachinery", "name": "Fault in Machinery", "keywords": "water, supply, connection, drink, dirty,bad, quality, contaminated, impure, health, clean", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "AbsenceOfOperator", "name": "Absence of Operator", "keywords": "water,absence,operator", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "LargeScaleLeakageInThePipes", "name": "Large Scale Leakage in the Pipes", "keywords": "water,leakage,pipes", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "BadQualityOfWater", "name": "bad Quality of Water", "keywords": "water, supply, connection, drink, dirty,bad, quality, contaminated, impure, health, clean", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "WaterSupplyFailureInSomeSpecificArea", "name": "Water Supply failure in some specific area", "keywords": "water, supply, connection, areas, failure", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "HouseholdWaterConnectionNotGivenbyGPWSC/DWSS", "name": "Household water connection not given by GPWSC/DWSS", "keywords": "water, supply, connection, household,notprovided", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "WaterMeterNotInstalled/NotWorkingProperly", "name": "Water meter not installed/not working properly", "keywords": "water, meter,install,work", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "WaterTariifBeingCollectedHigerThenTheFixedCharges", "name": "Water tariif being collected higer then the fixed charges", "keywords": "water, collected,charges", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "AnyOtherWaterRelatedComplaints", "name": "Any other water related complaints", "keywords": "other,water,complaints", "department": "WaterSupply", "slaHours": 336, "menuPath": "WaterSupplyScheme", "active": true }, { "serviceCode": "ROPlantIsNotWorkingORClosed", "name": "RO Plant is not working/Closed", "keywords": "roplant,working,condition,closed", "department": "ROPlant", "slaHours": 336, "menuPath": "ROPlantScheme", "active": true }, { "serviceCode": "RoWaterNotProvidedDueToAbsenceofOperator", "name": "Ro Water not provided due to absence of operator.", "keywords": "roplant,provided,absence,operator", "department": "ROPlant", "slaHours": 336, "menuPath": "ROPlantScheme", "active": true }, { "serviceCode": "BadQualityofWater", "name": "bad Quality of Water", "keywords": "water, supply, connection, drink, dirty,bad, quality, contaminated, impure, health, clean", "department": "ROPlant", "slaHours": 336, "menuPath": "ROPlantScheme", "active": true }, { "serviceCode": "AnyOtherROPlantRelatedComplaints", "name": "Any other RO Plant related complaints", "keywords": "other,roplant,complaints", "department": "ROPlant", "slaHours": 336, "menuPath": "ROPlantScheme", "active": true }, { "serviceCode": "ROPlantORWaterTreatmentPlant", "name": "RO Plant/ Water Treatment Plant", "keywords": "RO, Plant,water ,treatment,plant", "department": "ROPlant", "slaHours": 336, "menuPath": "ROPlantScheme", "active": true }, { "serviceCode": "SewerageLineisBlocked", "name": "Sewerage line is blocked", "keywords": "sewage ,line, blocked", "department": "Sewerage", "slaHours": 336, "menuPath": "SewerageScheme", "active": true }, { "serviceCode": "STPisNotFunctional", "name": "STP is not functional", "keywords": "nonfunctional ,functional ,stp", "department": "Sewerage", "slaHours": 336, "menuPath": "SewerageScheme", "active": true }, { "serviceCode": "SewrageInterceptingTankIsNotClearedbyContractor", "name": "Sewrage intercepting Tank is not cleared by Contractor", "keywords": "sewage ,unclean ,tank ,contractor", "department": "Sewerage", "slaHours": 336, "menuPath": "SewerageScheme", "active": true }, { "serviceCode": "AnyOtherSewrageRelatedComplaints", "name": "Any other Sewrage related complaints", "keywords": "sewage ,complaints ,other", "department": "Sewerage", "slaHours": 336, "menuPath": "SewerageScheme", "active": true }, { "serviceCode": "AnyOtherComplaints", "name": "Any Other Complaints", "keywords": "other, miscellaneous,complaints", "department": "Other", "slaHours": 336, "menuPath": "Others", "active": true }, { "serviceCode": "HandedoverToPanchayat", "name": "Handed over to Panchayat", "keywords": "other, miscellaneous,complaints,handled,panchayat", "department": "Other", "slaHours": 336, "menuPath": "Others", "active": true }, { "serviceCode": "WorkInProgress", "name": "Work in Progress", "keywords": "other, miscellaneous ,complaints ,work ,progress", "department": "Other", "slaHours": 336, "menuPath": "Others", "active": true }, { "serviceCode": "ProblemRelatedtoStandaloneWaterPurificationSystem", "name": "Problem related to stand alone water purification system", "keywords": "other, miscellaneous ,standalone ,watersupply ,problem", "department": "Other", "slaHours": 336, "menuPath": "Others", "active": true } ] }

ComplainClosingTime.json

{ "tenantId": "pb", "moduleName": "RAINMAKER-PGR", "ComplainClosingTime": [ { "ComplainMaxIdleTime": 3600000 } ] }

UIConstants.json

{ "tenantId": "pb", "moduleName": "RAINMAKER-PGR", "UIConstants": [ { "REOPENSLA": 432000000 } ] }
  1. Add Role-Action mapping for the API’s in MDMS. Following are the required entries. They should be mapped to appropriate employee roles.
    Actions :

{ "id": 2037, "name": "CreateComplaint", "url": "quickAction", "displayName": "File Complaint", "orderNumber": 1, "parentModule": "rainmaker-pgr", "enabled": true, "serviceCode": "PGR", "code": "null", "path": "Complaints.CreateComplaint", "navigationURL": "/digit-ui/employee/pgr/complaint/create", "quickAction": true, "leftIcon": "content:add", "rightIcon": "" }, { "id": 2042, "name": "rainmaker-common-complaints", "url": "card", "displayName": "Complaints", "orderNumber": 2, "parentModule": "", "enabled": true, "serviceCode": "", "code": "", "path": "", "navigationURL": "/digit-ui/employee/pgr/inbox", "leftIcon": "action:announcement", "rightIcon": "", "queryParams": "" }, { "id": 2043, "name": "Update PGR Request", "url": "/pgr-services/v2/request/_update", "parentModule": "", "displayName": "Update PGR Request", "orderNumber": 0, "enabled": false, "serviceCode": "pgr-services", "code": "null", "path": "" }, { "id": 2044, "name": "Search PGR Request", "url": "/pgr-services/v2/request/_search", "parentModule": "", "displayName": "Search PGR Request", "orderNumber": 0, "enabled": false, "serviceCode": "pgr-services", "code": "null", "path": "" }, { "id": 2045, "name": "Search PGR Request", "url": "/pgr-services/v2/request/_count", "parentModule": "", "displayName": "Count PGR Request", "orderNumber": 0, "enabled": false, "serviceCode": "pgr-services", "code": "null", "path": "" }, { "id": 2046, "name": "Locality searcher endpoint for PGR", "url": "/egov-searcher/locality/pgr-services/_get", "displayName": "PGR locality searcher", "orderNumber": 0, "enabled": false, "serviceCode": "egov-searcher", "code": "null", "path": "" }, { "id": 2047, "name": "Create PGR Request", "url": "/pgr-services/v2/request/_create", "parentModule": "", "displayName": "Create PGR Request", "orderNumber": 0, "enabled": false, "serviceCode": "pgr-services", "code": "null", "path": "" }, { "id": 2048, "name": "DSS Dashboard Config Home", "url": "/dashboard-analytics/dashboard/getDashboardConfig/home", "parentModule": "", "displayName": "DSS", "orderNumber": 0, "enabled": false, "serviceCode": "DSS", "code": "null", "path": "" }, { "id": 2049, "name": "DSS Dashboard Config PGR", "url": "/dashboard-analytics/dashboard/getDashboardConfig/pgr", "parentModule": "", "displayName": "DSS", "orderNumber": 0, "enabled": false, "serviceCode": "DSS", "code": "null", "path": "" }, { "id": 2050, "name": "Dashboard ULB PGR", "url": "/dashboard-analytics/dashboard/getDashboardConfig/ulb-pgr", "parentModule": "", "displayName": "DSS", "orderNumber": 0, "enabled": false, "serviceCode": "DSS", "code": "null", "path": "" }

Action-Roles :

{ "rolecode": "CSR", "actionid": 2037, "actioncode": "", "tenantId": "pb" }, { "rolecode": "PGR_LME", "actionid": 2042, "actioncode": "", "tenantId": "pb" }, { "rolecode": "CSR", "actionid": 2042, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2042, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CITIZEN", "actionid": 2043, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CSR", "actionid": 2043, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2043, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CSR", "actionid": 2043, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CITIZEN", "actionid": 2044, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CSR", "actionid": 2044, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2044, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2045, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CSR", "actionid": 2045, "actioncode": "", "tenantid": "pb" }, { "rolecode": "SUPERUSER", "actionid": 2045, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CITIZEN", "actionid": 2045, "actioncode": "", "tenantid": "pb" }, { "rolecode": "SUPERUSER", "actionid": 2046, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2046, "actioncode": "", "tenantid": "pb" }, { "rolecode": "CITIZEN", "actionid": 2047, "actioncode": "", "tenantId": "pb" }, { "rolecode": "CSR", "actionid": 2047, "actioncode": "", "tenantId": "pb" }, { "rolecode": "CSR", "actionid": 2048, "actioncode": "", "tenantId": "pb" }, { "rolecode": "CSR", "actionid": 2049, "actioncode": "", "tenantId": "pb" }, { "rolecode": "CSR", "actionid": 2050, "actioncode": "", "tenantId": "pb" }, { "rolecode": "PGR_LME", "actionid": 2048, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2049, "actioncode": "", "tenantid": "pb" }, { "rolecode": "PGR_LME", "actionid": 2050, "actioncode": "", "tenantid": "pb" }, { "rolecode": "DASHBOARD_VIEWER", "actionid": 2048, "actioncode": "", "tenantId": "pb" }, { "rolecode": "DASHBOARD_VIEWER", "actionid": 2049, "actioncode": "", "tenantId": "pb" }, { "rolecode": "DASHBOARD_VIEWER", "actionid": 2050, "actioncode": "", "tenantId": "pb" }

Roles :

{ "code": "CSR", "name": "Customer Support Representative", "description": "Employee who files and follows up complaints on behalf of the citizen" }, { "code": "PGR_LME", "name": "PGR Last Mile Employee", "description": "PGR Last mile employee to whom the request can be assigned" }
  1. Add IdFormat in common-masters folder.

{ "format": "PG-PGR-[cy:yyyy-MM-dd]-[SEQ_EG_PGR_ID]", "idname": "pgr.servicerequestid" }
  1. Add PGR and DSS in citymodule.json file and add ulbs for which PGR application needs to be created.

{ "module": "PGR", "code": "PGR", "active": true, "order": 2, "tenants": [ { "code": "pb.lodhipur" }, { "code": "pb.massewal" }, { "code": "pb.testing" } ] }, { "module": "DSS", "code": "DSS", "active": true, "order": 6, "tenants": [ { "code": "pb.lodhipur" }, { "code": "pb.massewal" }, { "code": "pb.testing" } ] }
  1. Enable "pgrEnabled": true in tenants.json, for the ulbs for whom we need to enable PGR to show in login dropdown.

  2. In master-config.json , add PGR mdms Config at state level.

    "RAINMAKER-PGR": { ServiceDefs": { "masterName": "ServiceDefs", "isStateLevel": true, "uniqueKeys": [ "$.code" ] }

Workflow Configuration

In mGramSeva, two step Workflow is configured for PGR where CSR will raise a complaint to LME and LME will resolve or reject the complaint.

{ "ResponseInfo": { "apiId": "Rainmaker", "ver": null, "ts": null, "resMsgId": "uief87324", "msgId": "1693543810296|en_IN", "status": "successful" }, "BusinessServices": [ { "tenantId": "pb", "businessService": "PGR", "business": "pgr-services", "businessServiceSla": 432000000, "states": [ { "tenantId": "pb", "sla": null, "state": null, "applicationStatus": null, "docUploadRequired": false, "isStartState": true, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "tenantId": "pb", "currentState": null, "action": "APPLY", "nextState": "PENDINGATLME", "roles": [ "CITIZEN", "CSR" ], "active": true } ] }, { "tenantId": "pb", "sla": 300000, "state": "PENDINGATLME", "applicationStatus": "PENDINGATLME", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "tenantId": "pb", "currentState": "PENDINGATLME", "action": "COMMENT", "nextState": "PENDINGATLME", "roles": [ "CITIZEN" ], "active": true }, { "tenantId": "pb", "currentState": "PENDINGATLME", "action": "RESOLVE", "nextState": "RESOLVED", "roles": [ "PGR_LME" ], "active": true }, { "tenantId": "pb", "currentState": "PENDINGATLME", "action": "REJECT", "nextState": "REJECTED", "roles": [ "PGR_LME" ], "active": true } ] }, { "tenantId": "pb", "sla": 300000, "state": "REJECTED", "applicationStatus": "REJECTED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": [ { "tenantId": "pb", "currentState": "REJECTED", "action": "RATE", "nextState": "CLOSEDAFTERREJECTION", "roles": [ "CFC", "CITIZEN" ], "active": true }, { "tenantId": "pb", "currentState": "REJECTED", "action": "COMMENT", "nextState": "REJECTED", "roles": [ "CITIZEN" ], "active": true } ] }, { "tenantId": "pb", "sla": 300000, "state": "RESOLVED", "applicationStatus": "RESOLVED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": [ { "tenantId": "pb", "currentState": "RESOLVED", "action": "RATE", "nextState": "CLOSEDAFTERRESOLUTION", "roles": [ "CFC", "CITIZEN" ], "active": true }, { "tenantId": "pb", "currentState": "RESOLVED", "action": "COMMENT", "nextState": "RESOLVED", "roles": [ "CITIZEN" ], "active": true } ] }, { "tenantId": "pb", "sla": null, "state": "CLOSEDAFTERREJECTION", "applicationStatus": "CLOSEDAFTERREJECTION", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "tenantId": "pb", "sla": null, "state": "CLOSEDAFTERRESOLUTION", "applicationStatus": "CLOSEDAFTERRESOLUTION", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null } ] } ] }

Localisations And SMS Templates

Using /localization/messages/v1/_upsert , add localisation (templates) for notification messages to be sent. Following are the product notification templates:

{ "messages": [ { "code": "PGR_RESOLVE_RESOLVED_SMS_MESSAGE", "message": "Dear Citizen, Your complaint for <complaint_type> with ID <id> submitted on <date> has been resolved by <emp_name>. If you are not satisfied with service you can REOPEN complaint through mSeva Punjab mobile App (download here - <download_link>) or your local municipal web portal or by calling our CSR.", "module": "rainmaker-pgr", "locale": "en_IN" }, { "code": "PGR_REJECT_REJECTED_SMS_MESSAGE", "message": "Dear Citizen, Your complaint for <complaint_type> with ID <id> submitted on <date> has been rejected. Reason for Rejection: <reason>, Additional Comments: <additional_comments> If you wish to re-open the complaint, you can download the mSeva Punjab mobile app (download here - <download_link>) or visit your local municipal website.", "module": "rainmaker-pgr", "locale": "en_IN" }, { "code": "PGR_REASSIGN_PENDINGATLME_SMS_MESSAGE", "message": "Dear Citizen, Your complaint for <complaint_type> with ID <id> submitted on <date> has been re-assigned to <reassign_emp_name>, <emp_designation>, <emp_department>. You can track your complaint status and connect with our officials on the mSeva Punjab mobile App (download here - <download_link>) or your local municipal web portal.", "module": "rainmaker-pgr", "locale": "en_IN" } ] }

Localisation sheet : https://docs.google.com/spreadsheets/d/1K38ZLPTY1GYWKRLciHkufgVokfVneEkIWQwp8VLxL7Y/edit?usp=sharing

Deployment Details

  • Deploy the latest version of pgr-services

Config/Service Name

Path/Build

Config/Service Name

Path/Build

pgr-services

pgr-services-db:v1.1.7-3d7f744977-1

rainmaker-pgr

rainmaker-pgr:v1.1.4-32caf0d992-4

User Creation

  • In mGramSeva, Search the user from user search api :

curl --location 'localhost:8082/user/_search' \ --header 'Content-Type: application/json' \ --data '{ "RequestInfo": { "apiId": "apiId", "ver": "version", "action": "action", "did": "did", "key": "key", "msgId": "msgId", "requesterId": "4c2b6b92-1578-4bdb-81e6-6c81c682c201", "authToken": "6d5264e8-e28c-4b50-a384-4d632da685bd" }, "tenantId": "pb", "username":"9876556789" }'
  • Update the existing user by providing roles of PGR related to specific ulb. Example :

{ "code": "CSR", "name": "Customer Support Representative", "tenantId": "pb.baruwal" }, { "code": "PGR_LME", "name": "PGR Last Mile Employee", "tenantId": "pb.baruwal" }

API List

PR for Changes in Repository