Current Gap
Laptops issued but not configured. No VAN ID assigned. No beneficiary data available locally. Field tracking cannot begin.
What We Need
Each laptop configured with its correct VAN ID, then synced with the central DB so local records are ready for offline field use.
Define Van Structure -> Create VANs in central DB, Map tab logins with VAN -> Allocate Ben to Vans -> Central DB (all ben) -> Down-sync (filter by vanid) -> Laptop local db (van-specific records) -> Field worker (tracks ben)
Planning
- Decide total no. of VANs and names
- List all field locations and corresponding logins
- Get the Beneficiary count per tab login
- Finalize the Location -> Login -> VAN allocation
Central DB Setup
- Create all VAN records in the central
- Map each tab login to its VAN ID
- Verify all the logins are mapped to a VAN
Beneficiary Allocation
- Ben record - look at “CreatedBy” - assign the ben to that VAN of CreatedBy login’s Van
- Verify - VAN ID | Ben Count
Laptop Configuration & Down-sync
- In each local laptop - configured the VAN
- Trigger the down-sync process from the application of local laptop
- Down-sync pulls all beneficiary records for the laptop's VAN
- Verify the count on laptop
Tables Involved in VAN Setup and Sync
- M_van
- M_uservanmapping (user - van)
- M_parkingplace (area)
- M_servicepoint
- M_synctabledetail
- M_providerservicemapping (state + service)
- M_vanservicepointmap (van - village)
- M_userparkingplacemap (user - area)
TB Clinical Tables - Verify Sync Columns (VanId, VanSerialNo, ParkingPlaceID, Processed, SyncedBy, SyncedDate, SyncFailureReason)
- Tb_screeing
- Tb_suspected
- Tb_confirmed_cases
- Tb_stoptb_visit
New columns to track per-record down-sync delivery
- DownSynced - char(1) - not null default ‘N’ (not sent to laptop)
- (‘N’, ‘P’, ‘ F’)
- DownSyncDate
- DownSyncFailureReason
Downsync Order of tables: FK dependency chain — records must arrive in this order
Master / Reference Data
- M_state / m_district / m_districtblock
- M_providerservicemapping
- m_van/ m_vantype / m_parkingplace
- M_servicepoint / m_servicepointvillagemap
- M_user / m_uservanmapping
- Clinical masters
Beneficiary Root Tables
- M_beneficiaryregidmapping
- I_beneficiarymapping
Then followed by the rest of the tables.
Note: The down-sync query for each transactional table is simply SELECT * FROM {table} WHERE VanID = {vanID}