Skip to main content

Data Architecture & Entity Relationship Diagrams

The data architecture is split into two logical models: the Observation Prediction model (the core backend analytical engine) and the User Management model (access control and alerts). Both ERDs follow crow's-foot notation.


Observation Prediction ERD

This ERD maps the core backend entities. The Zone table is the spatial anchor — all observation and forecast tables relate to it via zone_id. The model supports dual-disease forecasting through parallel Malaria and NCD entity sets.

EOHA Observation Prediction ERD — Zone, Malaria/NCD Observations, Malaria/NCD Risk Forecasts, Ground Observation

Entity summary

EntityPKKey fieldsPurpose
Zonezone_idparent_zone_id, boundary_polygon, base_population, dominant_habitat_codeSpatial unit — ward / district / municipality
Malaria_Observationenv_record_idzone_id (FK), lst_surface_temp_c, soil_moisture_pct, ndvi_vegetation_index, ndwi_water_indexEO-derived environmental readings per zone per date
NCD_Observationncd_observation_idzone_id (FK), no2_density, so2_density, aerosol_index, uv_radiation_indexAtmospheric pollution readings per zone
Ground_Observationcase_record_idzone_id (FK), disease_category, aggregated_case_countClinically reported case counts
Malaria_Risk_Forecastforecast_idzone_id (FK), outbreak_probability_score, environmental_lag_days, model_version_usedXGBoost-generated outbreak probability
NCD_Risk_Forecastforecast_idzone_id (FK), primary_ncd_category, population_exposure_score, projected_prevalence_increaseNCD exposure and prevalence projections

Key relationships

  • ZoneMalaria_Observation: one zone has many observations (1 to many)
  • ZoneGround_Observation: one zone has many case reports (1 to many)
  • ZoneMalaria_Risk_Forecast: one zone has many forecasts (1 to many)
  • Zone is self-referencing via parent_zone_id (ward → district → municipality hierarchy)

User Management ERD

This ERD maps the access control and notification entities. User is the central entity, linked to a Role for permissions and to User_Risk_Alert for personalised outbreak warnings.

EOHA User Management ERD — User, Role, User_Risk_Alert

Entity summary

EntityPKKey fieldsPurpose
Useruser_idrole_id (FK), email_address, password_hash, organization, first_name, last_namePlatform user profile
Rolerole_idrole_name, permissionsRBAC role definition
User_Risk_Alertalert_iduser_id (FK), forecast_id, alert_status, sent_timestampPer-user alert record linked to a forecast

Key relationships

  • UserRole: many users share one role (many to one)
  • User_Risk_AlertUser: many alerts per user (many to one)
  • User_Risk_Alert.forecast_id references either Malaria_Risk_Forecast or NCD_Risk_Forecast

Alert status lifecycle

[System creates forecast with score > 0.80]

alert_status = 'Active'

User acknowledges alert

alert_status = 'Acknowledged'

User resolves / closes

alert_status = 'Resolved' → moved to Historical view

API Use Case ERD

The following diagram shows how the API layer relates to the use case model, connecting external actors to the system's REST endpoints.

EOHA API Use Case Diagram


NCD environmental indicators

FieldDescription
UniqueIDDistrict/ward identifier
latitude / longitudeLocation coordinates
NO2_Column_DensityAverage NO2 exposure (mol/m²)
SO2_Column_DensityAverage SO2 exposure
Aerosol_Index_PMParticulate matter proxy
Aerosol_Index_SilicaSilica aerosol index
UV_IndexUV radiation level
LST_Mean_CLand surface temperature (°C)
Urban_Cover_PercentageUrban land cover ratio (%)

Malaria environmental indicators

FieldDescription
UniqueIDDistrict/ward identifier
latitude / longitudeLocation coordinates
LST_Surface_CSurface temperature (°C)
Soil_MoistureVolumetric soil moisture
NDWI_waterNormalised Difference Water Index
Habitat_Vegetation_IndexNDVI — vegetation suitability for vectors
Population_Density_Per_KM2Human-vector interaction proxy