chrisly-bear / PEBRApp

The mobile app for the PEBRA trial in rural Lesotho.
https://pebra.info
MIT License
6 stars 1 forks source link

Handle ART Duplicate #102

Open chrisly-bear opened 4 years ago

chrisly-bear commented 4 years ago

Problem

The VisibleImpact database may have more than one patient_id associated with an ART number. When this happens a MultiplePatientsException is thrown in the lib/utils/VisibleImpactUtils.dart/_getPatientIdVisibleImpact method (which matches ART numbers to patient_ids on VisibleImpact). This means that it is not possible to

Solution

Try to find the right participant by matching birth_date, sex, mobile_phone (the variables are also returned by the GET /patient endpoint of the VisibleImpact API). If the conflict can still not be resolved this way inform the user via notification (flushbar and/or required action) so that they can take further action such as informing the study supervisor or the data clerk to update the entry on the database.

Optional: Show an interface to the user where they are presented with the list of duplicates and can then select the right one to resolve the conflict.

Resources

Tlotliso-Wiinc commented 4 years ago
Tlotliso-Wiinc commented 4 years ago

Also only match by birth_date and gender.