Skip to content

Duplicate Patient Checkup and Sync Conflict in Offline Mode #902

@shivammm21

Description

@shivammm21

Describe the bug
When multiple field workers in rural areas check the same patient (e.g., Ravi) while offline, each worker can unknowingly create a separate record for the same patient. When both devices later connect to the internet and sync, the system encounters a conflict error due to duplicate patient entries and checkup forms.

To Reproduce
Steps to reproduce the behaviour

  1. Worker A visits a patient (e.g., Ravi) in a rural area without internet, fills out and saves a health checkup form for Ravi on their device.
  2. Worker B, also offline, visits the same patient (Ravi) and fills out a separate health checkup form for him on their device.
  3. Both workers later connect their devices to the internet and attempt to sync their data with the server.
  4. The system detects duplicate entries for Ravi and raises a conflict error.

Expected behaviour
The system should detect potential duplicate checkups for the same patient before submission or during sync, warn the field worker, and provide a way to resolve or merge the data, ensuring a single, complete patient record and checkup history.

Screenshots
N/A (This is a workflow/data issue; screenshots are not applicable.)

Desktop (please complete the following information):

  • OS: [Any]
  • Browser: [Any]
  • Version: [Any]

Smartphone (please complete the following information):

  • Device: [Any Android device used by field workers]
  • OS: [e.g. Android 10]
  • Browser: [N/A]
  • Version: [App version, if available]

Additional context
This issue is common in rural deployments where internet connectivity is unreliable. It leads to data conflicts, duplicate patient records, and incomplete patient histories, impacting healthcare delivery and data quality.

Developer Checklist
Developer fixing the bug should fill this checklist.

  • Does the fix require extensive regression testing?
  • Are you mentioning the required scenarios that could be affected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions