@mrjones , this worked, however, when I look at the couch doc for the primary contact, I don’t see the kadi_ya_matibabu
field. The barcode value is rather stored in the SCAN_RESULT
. Please see below:
"_id": "22d3929b-2712-4a30-a665-9225e6bf06ef",
"_rev": "2-3541e12aa1f9e9209f0bc98eb9b9b6ec",
"SCAN_RESULT": "159002110013",
"first_name": "Samiha",
"middle_name": "Faki",
"last_name": "Haji",
"name": "Samiha Faki Haji",
"sex": "female",
"exact_dob_known": "no",
"date_of_birth": "2001-01-01",
"phone": "0714567890",
"phone_owner": "mine",
"phone_owner_other": "",
"alternate_phone": "",
"is_head_of_household": "yes",
"meta": {
"created_by": "chv",
"created_by_person_uuid": "4f84b499-64e1-4347-b1ff-6220cf62069f",
"created_by_place_uuid": "f1b94c7d-e10b-46b8-ba54-49b3a1a5bb23"
},
"reported_date": 1723528179590,
"type": "person",
"parent": {
"_id": "5cd33368-25c2-45b0-8f32-1c6d77233163",
"parent": {
"_id": "f1b94c7d-e10b-46b8-ba54-49b3a1a5bb23",
"parent": {
"_id": "ea307363-38c4-439e-a7da-1bddf6dcab9a"
}
}
},
"form_version": {
"time": 1723527892892,
"sha256": "15898d1e5a6c661b6b8431edf62cf98af895f8fc033d5154545764f8bd50dc89"
},
"patient_id": "07213"
}
Whereas the couch doc of the contact in the repeat group contains the kadi_ya_matibabu
variable as well as the whole barcode_repeat
group.
{
"_id": "38e7b186-9b7c-4911-a9ae-4cae2f793de1",
"_rev": "2-28d53ad8076d3564d59c5e300faa8794",
"hh_member_note": "",
"type": "person",
"parent": {
"_id": "5cd33368-25c2-45b0-8f32-1c6d77233163",
"parent": {
"_id": "f1b94c7d-e10b-46b8-ba54-49b3a1a5bb23",
"parent": {
"_id": "ea307363-38c4-439e-a7da-1bddf6dcab9a"
}
}
},
"first_name": "Daudi",
"middle_name": "Faki",
"last_name": "Haji",
"first_name_c": "Daudi",
"middle_name_c": "Faki",
"last_name_c": "Haji",
"name": "Daudi Faki Haji",
"sex_note": "",
"sex": "female",
"sex_c": "female",
"exact_dob_known": "no",
"exact_dob_known_c": "no",
"age_estimate": "23",
"yob": "2001",
"temp_hh_member": "temporary",
"barcode_repeat": {
"action": "com.google.zxing.client.android.SCAN",
"android-app-inputs": "",
"android-app-outputs": {
"SCAN_RESULT": "159002110013"
}
},
"kadi_ya_matibabu_id": "159002110013",
"date_of_birth": "2001-01-01",
"date_of_birth_c": "2001-01-01",
"is_exact_dob_in_range": "1",
"reproductive_age": "1",
"is_under_5_binary": "0",
"age_days": "8625",
"return_women_note": "",
"debug_note": "",
"meta": {
"created_by": "chv",
"created_by_person_uuid": "4f84b499-64e1-4347-b1ff-6220cf62069f",
"created_by_place_uuid": "f1b94c7d-e10b-46b8-ba54-49b3a1a5bb23"
},
"reported_date": 1723528179616,
"form_version": {
"time": 1723527892892,
"sha256": "15898d1e5a6c661b6b8431edf62cf98af895f8fc033d5154545764f8bd50dc89"
},
"patient_id": "02008"
}
Another issue with the scanner is that if I scan a QR code and then manually delete the ID, when I try to re-scan the same QR code, the ID does not reappear in the text field. However, if I navigate back to the previous screen and return, the ID becomes visible again. The ID also appears correctly if I re-scan with a different QR code. The issue only occurs when re-scanning the same QR code.