Health-GPS

Logo

Global Health Policy Simulation model

View the Project on GitHub imperialCHEPI/healthgps

Schema Migration Plan: Unified Schema

Global Health Policy Simulation model

Home Quick Start User Guide Schemas Models Architecture Data Model Developer Guide Technical docs API
Related: Project requirements plan Technical index Documentation index

Goal

Consolidate v1 and v2 schemas into a single unified schema that works for all use cases.

Current State

New Unified Schema

Migration Steps

Step 1: Update CMake Configuration

Update src/HealthGPS.Console/CMakeLists.txt to copy unified schemas:

# Copy unified schemas instead of versioned schemas
file(COPY ${CMAKE_SOURCE_DIR}/schemas/config
     DESTINATION ${CMAKE_BINARY_DIR}/src/HealthGPS.Console/schemas)

Step 2: Update Schema References

Step 3: Test Both Projects

Step 4: Clean Up (Optional)

Benefits

For Developers:

For Projects:

Schema features matrix

What each schema tree actually covers today, and what a unified schema is meant to keep. Use Yes / No / Optional instead of icons.

Feature schemas/v1 schemas/v2 Unified goal
Income models (categorical / continuous) Yes Yes Yes
Flexible income category counts (3 / 4 / 5) Yes (project_requirements) Yes Yes
Region definitions Yes Yes Yes
Ethnicity definitions Yes Yes Yes
Physical activity model blocks Limited Yes (extended) Yes (optional)
Trend properties Via project_requirements / legacy fields Yes Yes (optional)
Stricter required fields on some models No Yes Yes where safe
project_requirements block Optional on top-level config.json Used by FINCH-style packs Keep optional for legacy configs
output.individual_id_tracking Yes (optional on output.json) N/A (use v1 output schema) Keep optional

How to read this: India-style packs may omit project_requirements and still validate. FINCH-style packs use v1 config plus richer modelling / model schemas (and sometimes v2 model files). The unified work is to stop maintaining two parallel trees for the same concepts.

Not the same as “done”: Rows above describe capability, not that every project has migrated off schemas/v1 / schemas/v2 yet. See Configuration schemas for the live layout.

Implementation Notes

Backward Compatibility:

Schema Structure:

Output schema (v1):

Top-level config (v1):

Future Improvements:


Author: Mahima Ghosh