fix(disease-outbreaks): use TGH exact lat/lng for map pins, fix density and location display (#2393)

* chore: redeploy to pick up WORLDMONITOR_VALID_KEYS fix

* fix(disease-outbreaks): use TGH lat/lng for map pins, fix location, add cases + date to tooltip

Root cause: all map pins collapsed to country centroids (getCountryCentroid) even though TGH
provides exact lat/lng per alert. Deduplication further collapsed all same-disease+country
alerts into one pin. 90-day lookback of ~1,600 TGH records was being reduced to ~10 pins.

- proto: add lat, lng, cases fields to DiseaseOutbreakItem (field 10/11/12)
- seed: preserve _lat/_lng/_cases from TGH bundle per alert
- seed: trim place_name to first comma-segment to avoid "Riga, Riga, Latvia" display
- seed: TGH items skip keyword filter (already disease-curated) and deduplication
- seed: raise cap to 150 TGH + 50 WHO/CDC/ONT (from flat 50 total)
- DeckGLMap: use item.lat/lng when non-zero, fall back to country centroid
- tooltip: add date and case count (when available) below source name
- sourceVersion bumped to v6

* chore: regenerate HealthService OpenAPI docs — add lat, lng, cases fields

* fix(mcp): address Greptile P2s — coordinate falsy coercion, dedup sort order, dead tooltip branch

- Use Number.isFinite() + null-coalescing (??) instead of || 0 for lat/lng; prevents
  treating equatorial coord 0 as "missing" (even though TGH already filters !rec.lat)
- DeckGLMap: use Number.isFinite + !== 0 guard instead of falsy && check for lat/lng
- Sort otherOutbreaks by publishedAt desc BEFORE deduplication so first-seen = most recent
- Remove redundant re-sort of dedupedOthers (already sorted above)
- Simplify metaHtml: always show date (publishedAt is always set); remove dead else-branch
This commit is contained in:
Elie Habib
2026-03-28 01:54:44 +04:00
committed by GitHub
parent eae86f5345
commit 9a277233a0
7 changed files with 87 additions and 39 deletions

View File

@@ -106,4 +106,16 @@ components:
sourceName:
type: string
description: Source name (e.g., "WHO", "ProMED", "HealthMap").
lat:
type: number
format: double
description: Precise latitude from source (overrides country centroid on map when non-zero).
lng:
type: number
format: double
description: Precise longitude from source (overrides country centroid on map when non-zero).
cases:
type: integer
format: int32
description: Case count if reported by source (0 = unknown).
description: DiseaseOutbreakItem represents a single disease outbreak event.