Consent-API: Sync download and upload for STOP TB camp laptop

XMLWordPrintable

    • Type: Task
    • Resolution: Unresolved
    • Priority: High
    • 3.14
    • Affects Version/s: None

      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

      1. Download (before the camp): Send the latest notices (all languages), purposes, and the consent status of patients in the area.
      2. Upload (when back online): Receive consents, withdrawals, audit entries and access logs from the laptop. Proof files are uploaded separately.
      3. Check the signature from the device that sent the data.
      4. Treat a consent with the same device ID as a duplicate. Do not save it again.
      5. Check the audit entries are unbroken.
      6. 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.
      7. 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.
      8. Reject uploads signed after the device's key has been revoked.
      9. Confirm the upload, so the laptop deletes its local copy only after confirmation.
      10. 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)

              Assignee:
              Shivani Garg
              Reporter:
              Shivani Garg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: