Open chrisekelley opened 4 years ago
Background for LOE estimate:
I think this would use the Case Management module. How do you search for a Person's record? Where would we save the fp data?
LOE details: 4 parts
cordova API (scan, cache, search, license) and caching for the search (storing in the sqllite db on java side and related cache mgmt utility functions). CEK: Most of this is implemented. Instead of registering a First Name, will need to provide or generate a fingerprint ID instead. But the basic operations are already available. 2 days.
tangy fingerprint scan (fairly easy, will use the current cordova API) - process of capturing the FP scan. This is the custom element to use in the form and maybe re-use in the search. Tasks: write the custom element, add to the editor (need a custom element for that) and integrate into the Tangerine codebase. 3 days
From case home, have a "search for FP button" that calls the FP API, returns FP ID, which we can then use to search for the participant. The button may take you to the form that has the custom element. We'll be searching for fingerprint_id, not participant_id. 2 days
Making sure we are always building the cache index - in the database class (when new records are created on device) and after a sync (make sure we get any data not created on the device). Would we need to rebuild the cache often or every time? When happens during a pouchDB replication - we cannot hook into it. Are there callbacks during the replication API to monitor what has changed and add any new FP templates to the SQLLite cache on the java side? One solution: During replication - subscribe to the changes feed, which gives us a bunch of ids that have changed, that we can then inspect and process if they are new FP templates. This is the hardest part. What do you put in the index that is searched? It will probably be a key/value pair: fingerprint_id: fingerprint data. 5 days
Total Coding LOE: 12 days
Testing this can be time consuming and cumbersome. I would recommend adding 14 days to test and fix bugs.
data stricture for fingerprintScan Data
We will continue to use the current SQLlite database on the plugin's Java side to perform searches, but we will need to copy this fp data to the pouch db and manage its replication to the server and to other tabs that need it.
1st milestone:
When to clear the sqllite cache? on replication, process one fp at a time? process spinner when processing. Also, every time we save a record, check for fp data in the json, if yes, send to the plugin to pass to the SQLLite db.
Dev notes:
Building in the TangyBiometrics project using my Lenovo TB-8504F (Android 8.1.0) using a Secugen Hamster Pro 20 scanner. On the tablet, place licenses in Neurotechnology/Licenses. Need the following:
Current application UX:
When the user wants to register someone, enter the person's name and press Scan.
The first time it is run, it asks for USB permissions:
Entering name to register a new Person:
When the registration is successful, it displays "Fingerprint enrolled for " + firstName"
To search for a Person, do not enter anything in the text box. Place a finger on the scanner and search. When a user is found, displays "Identification Results: Chris"
When you enter another name but scan the same fingerprint, it displays "Enrollment Failed. Duplicate ID"
Early version of test instructions
User story: In a Tangerine assessment, after the enumerator fills out the age, grade, and gender of a child, the next section is for managing the child's identity. The enumerator scans the child's fingerprint; if the widget returns a student id, this id is stored in this assessment and the assessment proceeds to the next section. If it does not return a student id, the system captures the child's fingerprint, assigns a student id, and saves both the fingerprint info and student id to the assessment.
We need to create a new biometric widget for tangerine that uses the cordova-plugin-fingerprint-identification plugin to capture fingerprints, search assessments for the field that stores the biometric fingerprint template data, and either assigns a student id or returns a student id if the plugin matches the fingerprint with the template stored in the assessments.