-
Type:
Task
-
Resolution: Unresolved
-
Priority:
High
-
Affects Version/s: None
-
STOP TB
-
Dev
What this is
Two APIs that move consent data between the STOP TB camp laptop and the central server.
APIs
- Download: GET /consent/v1/sync/snapshot
- Upload: POST /consent/v1/sync/upload
Steps
- Download (before the camp): Send the latest notices (all languages), purposes, and the consent status of patients in the area.
- Upload (when back online): Receive consents, withdrawals, audit entries and access logs from the laptop. Proof files are uploaded separately.
- Check the signature from the device that sent the data.
- Treat a consent with the same device ID as a duplicate. Do not save it again.
- Check the audit entries are unbroken.
- If an offline withdrawal and an online consent conflict, compare capture times. A withdrawal always wins over an older or equal consent. A later full consent stays current.
- If the device clock looks wrong (capture time outside the allowed range), save it, flag it for review, and use server time to order conflicts.
- Reject uploads signed after the device's key has been revoked.
- Confirm the upload, so the laptop deletes its local copy only after confirmation.
- Send SMS confirmations after sync.
Done when
- The laptop can download everything it needs before the camp.
- Uploading the same consent twice creates one record.
- A withdrawal wins over an older or equal consent.
- Uploads from a revoked device are rejected.
Waiting on: Maximum age of the downloaded data (decision D-06).
Source: DPDPA Compliance Proposal v14, sections 3.2.1, 3.2.2, 8 (M1, M6 to M12, M14)