Registration & Delivery Package

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:

Role

  • DISTRIBUTOR

Features

  • 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.

Getting Started

To use this package, add the following dependency to your pubspec.yaml file:

dependencies:
  registration_delivery: ^latest
  digit_scanner: ^latest

Integrating with the HCM Application:

  1. 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.

  2. Make sure you are on the path apps/health_campaign_field_worker_app and run the command:

dart run build_runner build --delete-conflicting-outputs

This adds a package route to the main router.gr.dart

  1. 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:

final LocalRepository<HouseholdModel, HouseholdSearchModel>
  householdLocalRepository;
final LocalRepository<HouseholdMemberModel, HouseholdMemberSearchModel>
  householdMemberLocalRepository;
final LocalRepository<ProjectBeneficiaryModel, ProjectBeneficiarySearchModel>
  projectBeneficiaryLocalRepository;
final LocalRepository<TaskModel, TaskSearchModel> taskLocalRepository;
final LocalRepository<SideEffectModel, SideEffectSearchModel>
  sideEffectLocalRepository;
final LocalRepository<ReferralModel, ReferralSearchModel>
  referralLocalRepository;

Next, find this method in the same file networkManager.writeToEntityDb and the below repositories:

householdLocalRepository,
householdMemberLocalRepository,
projectBeneficiaryLocalRepository,
taskLocalRepository,
sideEffectLocalRepository,
referralLocalRepository,

With the above changes, you will enable the down sync of registration and delivery data.

Last updated

https://creativecommons.org/licenses/by/4.0/