Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This module will enable the health facility supervisors to track referrals made by on-field health workers to different health facilities digitally via the Digit HCM app.
To learn more about Referral Reconciliation, click here. Link to the Pub Package:
The referral reconciliation feature enables the user to track referrals made by on-field health workers to different health facilities digitally via the Digit HCM app capturing all the cases of:
Beneficiary being referred
Referral details of the beneficiary
Reason for referrals and their diagnosis
Based on the diagnosis, further details, if applicable
HEALTH_FACILITY_WORKER
To use this package, add the following dependency to your pubspec.yaml file:
To integrate this package with the HCM Application, run the main function located in health-campaign-field-worker-app/tools/referral_reconciliation_imports.dart.
This will automatically add the necessary imports, mapper initializers, route config, setting initial data, and repository initialization to the required files.
Make sure you are on the path apps/health_campaign_field_worker_app
and run the command:
This adds a package route to the main router.gr.dart
Install the application and you should have referral reconciliation integrated into your base app.
By following these steps, you can successfully integrate and use the Referral Reconciliation module within your application.
The attendance management package is a comprehensive solution for managing attendance.
To learn more about Attendance Management, click here.
Link to the Pub Package:
SUPERVISOR
Attendance Pages: The package includes several pages like mark_attendance.dart, manage_attendance.dart, and session_select.dart that provides the user interface for managing attendance.
To use this package, add the following dependency to your pubspec.yaml file:
To integrate this package with the HCM application, run the main function located in health-campaign-field-worker-app/tools/attendance_management_imports.dart.
This will automatically add the necessary imports, mapper initializers, route config, setting initial data, and repository initialization to the required files.
Now make sure you are on the path apps/health_campaign_field_worker_app
and run the command:
This adds a package route to the main router.gr.dart
Navigate to the project bloc since we need to fetch registers and attendee data after login:
Next, navigate to the line where the project staff search is written, and add the below code in the try-catch where we check the role and fetch attendance data:
Make sure you are on the path apps/health_campaign_field_worker_app
and run the command:
This adds a package route to the main router.gr.dart
By following these steps, you'll successfully integrate and can use attendance module within your application.
This enables the user to manage the stocks of a health campaign. The user can record the stocks received, issued, returned, damaged and lost.
To known more about Inventory Management,
Link to the Pub Package:
DISTRIBUTOR, WAREHOUSE_MANAGER
Manage Stocks: Receipt, issued, returned, damaged, and loss of stocks.
Stock Reconciliation: Reconcile the stock data.
View Reports: View the reports of the stocks.
To use this package, add the following dependency to your pubspec.yaml file:
To integrate this package with the HCM Application, run the main function located in health-campaign-field-worker-app/tools/inventory_management_imports.dart.
This will automatically add the necessary imports, mapper initializers, route config, setting initial data, and repository initialization to the required files.
Make sure you are on the path apps/health_campaign_field_worker_app
and run the command:
This adds a package route to the main router.gr.dart
Install the application and you should have Inventory Management integrated into your base app.
By following these steps, you can successfully integrate and use the Inventory Management module within your application.
As a part of the 1.4 release, we have extracted the features of the Frontline Worker's App as individual packages:
A scanner package used for scanning QR codes and GS1 barcodes.
Link to the Pub Package:
To use the digit_scanner package, add the following dependency to your pubspec.yaml file:
To initialise the DigitScannerBloc provider in your application, add the following code:
To clear the scanner state, use the following code:
To navigate to the Digit Scanner page, use this code snippet:
Wrap the DigitScannerListener or DigitScannerBuilder in your widget tree wherever you need to read the scanned codes from the scanner state:
Find out about usage at the example implementation.
Link to the Pub Package:
The showcase widget is a wrapper widget that provides a way to highlight or showcase a widget. It is useful for highlighting a widget in a list of widgets or providing functionality to provide visual help to understand the widget's functionality.
Provides a showcase or highlight of the wrapped widget:
To use the digit_showcase package, add the following dependency to your pubspec.yaml file:
Wrap the top layer of your widget tree with the showcase widget:
Provide localisation for the showcase widget:
Now use .buildWith to build the showcase widget:
The high-level design of the HCM Framework is divided into three main parts, the details of which are available below.
Needs to work in low/no network coverage areas.
Needs to have a high level of configurability.
Needs to work on Android.
Users of the app have low-tech literacy.
Sync
Since the app is expected to be configurable, there is a need to receive these configurations from the server. Data already on the server might also need to be retrieved by the app.
Since the app is expected to work while users are offline, there is the need to send data that has been collected while the user has been offline to the server.
These functionalities are collectively called sync. The retrieval of configuration and data is referred to as sync down while sending data collected using the app is called sync up. Login and sync can only be done while the user is online.
When a user logs in, a sync down is performed to fetch the required configuration and data for the field app to run. After collecting data using the app, the user can perform a sync which will perform a sync-up (to send all data collected) followed by a sync-down (to retrieve any fresh configuration). Syncing of data down is not required for the initial implementation and can be turned off.
Configurability
Configurations for the field app are managed as master data in the MDMS service. These configurations are used to manage various aspects of how the app functions. The important ones are:
If the app has to run in an offline first mode or an online mode.
The backend interfaces for the app include localisation, MDMS, and various services. This also includes the URLs for the various services and endpoints so that a fresh app build is not required if there is a new version of an API.
How long the client can use each configuration that has been previously fetched before requesting data from the server (to optimise the time taken for sync).
Values/options that need to be displayed in various fields in the app.
Additional fields are to be captured for any of the entities, if any.
Supported languages.
Op Log
Any action to create or update the data performed by the field user while the app is configured to run in the offline first mode is written to an op log. When the user performs a sync, the sync-up action reads from this op log to send the data to the server.
Permission (role-action)-Based Access and Sync
Sync is optimised to fetch configuration relevant to the logged-in user so that only the configuration/data for the actions, permissible to the user within the projects that they are assigned to, are fetched.
Network Manager
The network manager component in the app acts as an interface between the rest of the app and the backend. As a result, the other components in the app do not have to change their behaviour based on whether the app is online or offline and rely on the network manager to handle this complexity. This implies that the network manager makes an API call directly if the app is offline or saves to the local database and the op log if the device is offline, whereas the other components just make a call to the network manager to read/write data.
Down Sync of Beneficiaries
The down sync of beneficiaries feature is designed to optimise data synchronisation between the local device and the server, specifically focusing on the beneficiary records. This process helps prevent duplicate record creation by different users within the same boundary.
The down sync initiates by sending a request to the server, providing the boundary code along with offset and limit parameters. The server validates the provided parameters and responds with the total count of beneficiary records within the specified boundary.
Based on the total count received, the down sync retrieves beneficiary records from the server in batches. The batch size is dynamically adjusted according to the device's internet speed to optimise the data transfer.
The response from the server, containing beneficiary records, is written to the local entities tables on the device. This ensures that the local database stays updated with the most recent beneficiary information.
Key Features
Utilises offset and limit parameters for efficient pagination of data retrieval from the server.
Adapts the batch size based on the internet speed to enhance the overall synchronisation performance.
Essential for avoiding the creation of duplicate beneficiary records by different users within the same boundary.
Use Case
The down-sync of beneficiaries is particularly crucial in scenarios where multiple users operate within the same geographical boundary. It ensures that each user has access to the latest beneficiary data while minimising redundant record creation.
Multi-Round Campaign
The multi-round campaign streamlines beneficiary registration and delivery processes, ensuring efficient tracking of eligibility and delivery statuses across multiple cycles.
The system fetches the projectType configuration from MDMS for the selected project.
Eligibility checks are dynamically performed based on the retrieved projectType configuration.
The minimum and maximum age criteria are evaluated to determine the beneficiary's eligibility for the current cycle.
Recorded side-effects for the beneficiary in the current cycle.
There is no cycle defined in the MDMS configuration for the selected project on the current date.
Status Tracking
Not Eligible:
The minimum and maximum age criteria are evaluated to determine the beneficiary's eligibility for the current cycle.
Recorded side effects for the beneficiary in the current cycle.
There is no cycle defined in the MDMS configuration for the selected project on the current date.
Beneficiary Refused: Indicates that the beneficiary refused to accept the delivery in the current cycle.
Beneficiary Referred: Indicates that the beneficiary was referred to a health facility during the current cycle.
Visited: Indicates that a delivery was successfully made for the beneficiary in the current cycle.
Not Visited: Indicates that no delivery was made for the beneficiary in the current cycle.
Beneficiary Refused, Beneficiary Referred, and Not Eligible status, except the age eligibility, will target reset every new cycle.
Init App
Login
Sync Down
Link to the Pub Package:
The digit_data_model package is a comprehensive data modeling library for the project. It defines various classes, enums, and functions used throughout the project. The package is written in Dart and is primarily used in Flutter applications.
Data Models: The package provides a set of predefined data models like DataModel, EntityModel, EntitySearchModel, AdditionalFields, AdditionalField, ClientAuditDetails, AuditDetails, etc. These models are used to structure the data in the project.
Model Provider: The package includes a ModelProvider abstract class that can be implemented to provide a list of models. It also includes a ModelProviderRegistry class to register and retrieve all model providers.
Data Model Type Enum: The package defines a DataModelType enum that represents the different types of data models in the project.
Mapping Annotations: The package uses the dart_mappable package to generate mapping code for the classes. This helps in converting the data models to and from JSON.
Data Repositories: The package provides abstract classes for data repositories, DataRepository, RemoteRepository, and LocalRepository, which can be extended to create repositories for different data models. It also includes error handling with InvalidApiResponseException.
Sql Store: The package includes a SqlStore class that can be used to store data in a SQLite database.
Here are the key features it provides to other packages:
Database Connection: It provides a connection to the SQLite database. This connection is opened when the database is first accessed.
Table Definitions: It defines the tables in the database. These tables correspond to various entities in the project.
Database Operations: It provides methods for querying and manipulating the data in the tables. These methods can be used to perform CRUD (Create, Read, Update, Delete) operations on the data.
Schema Version: It provides the schema version of the database. This can be used to handle database migrations.
Drift Integration: It uses the Drift package for interacting with the SQLite database. This provides a reactive persistence library for Flutter and Dart.
To use this package, add the following dependency to your pubspec.yaml file:
To integrate this package with the HCM Application, run the main function located in health-campaign-field-worker-app/tools/digit_data_model_imports.dart.
This will automatically add the necessary imports, mapper initializers, and repository initializations to the required files.
Below are some examples of how you can use this package:
Extend the EntityModel or `EntitySearchModel class and implement the required methods:
Extend the `LocalRepository` class and implement the required methods:
Extend the `RemoteRepository` class and implement the required methods:
: Framework to build multi-platform apps
: SQL offline db
: NoSQL offline db
: HTTP Client
This package provides a way to register a household and individual members and deliver the resources to the registered households.
To learn more about Registration and Delivery, click here. Link to the pub package:
DISTRIBUTOR
Register new households and individuals.
Search existing households and individuals.
Update details for existing households and individuals.
Record service delivery of healthcare interventions to households and individuals for a single round campaign.
Auto-calculation of resources to be delivered to a household or individuals based on the configured rule.
To use this package, add the following dependency to your pubspec.yaml file:
To integrate this package with the HCM Application, run the main function located in health-campaign-field-worker-app/tools/registration_delivery_imports.dart.
This will automatically add the necessary imports, mapper initializers, route config, setting initial data, and repository initialization to the required files.
Make sure you are on the path apps/health_campaign_field_worker_app
and run the command:
This adds a package route to the main router.gr.dart
Install the application and you should have Registration and Delivery integrated into your base app.
By following these steps, you can successfully integrate and use the egistration and delivery module within your application.
The below step is required as per your use case
During boundary selection, if you need to downsync registration-delivery-related data, include the below code in the project_beneficiaries_downsync
file:
Next, find this method in the same file networkManager.writeToEntityDb
and the below repositories:
With the above changes, you will enable the down sync of registration and delivery data.