Skip to content

feat: Health Facility API with V2 endpoints for connectivity and feature flags#342

Open
Victor1Ja wants to merge 3 commits into
developfrom
origin/feature/health-entity-api-impl-v2
Open

feat: Health Facility API with V2 endpoints for connectivity and feature flags#342
Victor1Ja wants to merge 3 commits into
developfrom
origin/feature/health-entity-api-impl-v2

Conversation

@Victor1Ja

@Victor1Ja Victor1Ja commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds support for measuring connectivity at health facilities (in addition to schools) and introduces V2 API endpoints consumed by the frontend.

This branch is a clean rebuild of feature/health-entity-api-impl on top of develop, keeping only the final health-facility work (originally by Rashan Smith) and the V2 endpoint implementation.

Changes

Health Facility API

  • New modules: facility-type, health, registration, and nearest-facility (controllers, services, DTOs, and tests).
  • Facility registration flow and nearest-facility lookup endpoints.
  • Measurements can now be linked to a health facility (facility_type_id, registration_id, giga_id_health).
  • entity_type was renamed to facility_type across schema and implementation, with a compatibility helper (facility-type-compat.ts).

V2 endpoints

  • New V2 controllers for connectivity, country, health, registration, nearest-facility, and public feature flags.
  • measurement-v2.mapper to build V2 measurement rows, plus query validation.

Database (Prisma)

  • Schema: facility_type and registration models, new measurement columns and indexes.
  • Migrations: 20260624120000_rename_entity_type_to_facility_type, 20260720120000_normalize_facility_type_codes.
  • Seed script: seed-health-entity-v1.sql.

Other

  • Dependency updates (package.json / package-lock.json).
  • Docs under docs/health-entity-v1-*.md (API changes, backend refactor, migration status, testing guide).

Testing

  • npm run build passes.
  • Test suite results match the pre-existing baseline on develop (no new suite failures introduced by this branch).

Notes

  • Replaces the original feature/health-entity-api-impl branch, which accumulated intermediate merge commits; the old branch is preserved as backup/health-entity-api-impl locally.

rashan-smith and others added 3 commits July 22, 2026 11:49
…nd feature flags

- Updated @nestjs/cli to version 10.4.9 in package.json and package-lock.json.
- Added new V2 endpoints for connectivity and feature flags, including:
  - `POST /api/v2/connectivity` for facility-aware connectivity checks.
  - `GET /api/v2/feature-flags` for retrieving feature flags.
- Enhanced health API to support government ID filtering.
- Introduced new DTOs and services for handling V2 data structures.
- Updated existing services and controllers to accommodate new V2 functionality.
@Victor1Ja Victor1Ja changed the title Origin/feature/health entity api impl v2 feat: Health Facility API with V2 endpoints for connectivity and feature flags Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants