Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • DB: Add facilityID column to i_ben_flow_outreach, backfill old records, new table m_userfacilitymapping
  • HWC-API: ~25 files   (new login API, 16 worklist queries, visit save, entity change)
  • HWC-UI: ~25 files (login flow, session, worklist calls, visit save)
  • Inventory-API: ~3 files   (hierarchy walk)
  • Total: ~57 files

Benefit:

...

]

  • No more fake Van, Zone, Parking Place for HWC
  • Clean architecture - HWC uses facility directly
  • Login: 2 API calls instead of 3
  • Hierarchy built-in (DH→CHC→PHC→SC)

...

  • DB: ZERO changes to i_ben_flow_outreach (no new column, no backfill)
  • HWC-API: ZERO changes to login, worklist, visit save
  • HWC-UI: ZERO changes to login, worklist, visit save
  • Inventory-API: ~3 files (hierarchy walk using Van → FacilityID → ParentFacilityID)
  • Total: ~3-5 files only

Benefit:

  • Almost no code changes
  • No risk to existing flow - everything stays as is
  • No old data migration needed
  • Hierarchy is available whenever needed through Van → FacilityID → m_facility
  • Inventory hierarchy walk works (Van → FacilityID → walk up parents)
  • Can be done very quickly

...

~57

Option A (Remove Van)Option B (Keep Van + Hierarchy)
Files to change



~3-5DB migrationYes (ALTER + backfill)No
Login flowChanged (facilityID)No change
Worklist queriesChanged (16 queries)No change
Visit saveChangedNo change
Admin setup for new HWC2 pages6 pages (same as now)
Fake Van/Zone neededNoYes (same as now)
Hierarchy availableYes (direct)Yes (through Van → FacilityID)
Inventory hierarchy walkYesYes
RiskMedium (many changes)Very low (minimal changes)Testing effortHigh (~57 files)Low (~3-5 files)



Old data handlingBackfill neededNo change needed
RollbackRedeploy old codeAlmost nothing to rollback

...