Hanz Pillerva commited on
Commit ·
cd4e713
1
Parent(s): e6e510e
update
Browse files
app.py
CHANGED
|
@@ -443,6 +443,7 @@ def _map_confidence_for_form(raw_confidence, form_hint):
|
|
| 443 |
return {
|
| 444 |
'registry_no': p('registry_no'),
|
| 445 |
'city_municipality': p('city_municipality'),
|
|
|
|
| 446 |
'child_first': p('name_first'),
|
| 447 |
'child_middle': p('name_middle'),
|
| 448 |
'child_last': p('name_last'),
|
|
@@ -462,9 +463,11 @@ def _map_confidence_for_form(raw_confidence, form_hint):
|
|
| 462 |
if form_hint == '2A':
|
| 463 |
# Keys must match what Form2A Val looks up:
|
| 464 |
# registry → registry_no (via confidenceKeyMap)
|
|
|
|
| 465 |
# all others are direct display-key lookups
|
| 466 |
return {
|
| 467 |
'registry_no': p('registry_no'),
|
|
|
|
| 468 |
'deceased_name': p('deceased_name'),
|
| 469 |
'sex': p('sex'),
|
| 470 |
'age': p('age'),
|
|
@@ -500,6 +503,7 @@ def _map_confidence_for_form(raw_confidence, form_hint):
|
|
| 500 |
'wife_father_citizenship': p('wife_father_citizenship'),
|
| 501 |
'marriage_venue': p('place_of_marriage'),
|
| 502 |
'marriage_month': p('date_of_marriage'),
|
|
|
|
| 503 |
}
|
| 504 |
|
| 505 |
if form_hint == '90':
|
|
@@ -514,6 +518,7 @@ def _map_confidence_for_form(raw_confidence, form_hint):
|
|
| 514 |
'registry_no': p('registry_no'),
|
| 515 |
'city': p('city_municipality'),
|
| 516 |
'province': p('province'),
|
|
|
|
| 517 |
'groom_name': avg('groom_name_first', 'groom_name_middle', 'groom_name_last'),
|
| 518 |
'groom_age': p('groom_age'),
|
| 519 |
'groom_residence': p('groom_residence'),
|
|
@@ -691,6 +696,7 @@ def _map_template_output(raw: dict, form_hint: str) -> dict:
|
|
| 691 |
'registry_no': g('registry_no'),
|
| 692 |
'city_municipality': g('city_municipality'),
|
| 693 |
'province': g('province'),
|
|
|
|
| 694 |
'child_first': g('name_first'),
|
| 695 |
'child_middle': g('name_middle'),
|
| 696 |
'child_last': g('name_last'),
|
|
@@ -715,6 +721,7 @@ def _map_template_output(raw: dict, form_hint: str) -> dict:
|
|
| 715 |
'registry_no': g('registry_no'),
|
| 716 |
'city_municipality': g('city_municipality'),
|
| 717 |
'province': g('province'),
|
|
|
|
| 718 |
'deceased_first': g('deceased_name'),
|
| 719 |
'sex': g('sex'),
|
| 720 |
'age_years': g('age'),
|
|
@@ -730,6 +737,7 @@ def _map_template_output(raw: dict, form_hint: str) -> dict:
|
|
| 730 |
'registry_no': g('registry_no'),
|
| 731 |
'city_municipality': g('city_municipality'),
|
| 732 |
'province': g('province'),
|
|
|
|
| 733 |
'husband_first': g('husband_name_first'),
|
| 734 |
'husband_middle': g('husband_name_middle'),
|
| 735 |
'husband_last': g('husband_name_last'),
|
|
@@ -762,6 +770,7 @@ def _map_template_output(raw: dict, form_hint: str) -> dict:
|
|
| 762 |
'registry_no': g('registry_no'),
|
| 763 |
'city_municipality': g('city_municipality'),
|
| 764 |
'province': raw.get('province', '').strip(),
|
|
|
|
| 765 |
'groom_name': _join_name('groom_name_first', 'groom_name_middle', 'groom_name_last'),
|
| 766 |
'groom_age': g('groom_age'),
|
| 767 |
'groom_residence': g('groom_residence'),
|
|
|
|
| 443 |
return {
|
| 444 |
'registry_no': p('registry_no'),
|
| 445 |
'city_municipality': p('city_municipality'),
|
| 446 |
+
'date_submitted': p('registration_date'),
|
| 447 |
'child_first': p('name_first'),
|
| 448 |
'child_middle': p('name_middle'),
|
| 449 |
'child_last': p('name_last'),
|
|
|
|
| 463 |
if form_hint == '2A':
|
| 464 |
# Keys must match what Form2A Val looks up:
|
| 465 |
# registry → registry_no (via confidenceKeyMap)
|
| 466 |
+
# date_reg → date_submitted (via confidenceKeyMap)
|
| 467 |
# all others are direct display-key lookups
|
| 468 |
return {
|
| 469 |
'registry_no': p('registry_no'),
|
| 470 |
+
'date_submitted': p('registration_date'),
|
| 471 |
'deceased_name': p('deceased_name'),
|
| 472 |
'sex': p('sex'),
|
| 473 |
'age': p('age'),
|
|
|
|
| 503 |
'wife_father_citizenship': p('wife_father_citizenship'),
|
| 504 |
'marriage_venue': p('place_of_marriage'),
|
| 505 |
'marriage_month': p('date_of_marriage'),
|
| 506 |
+
'city_municipality': p('city_municipality'),
|
| 507 |
}
|
| 508 |
|
| 509 |
if form_hint == '90':
|
|
|
|
| 518 |
'registry_no': p('registry_no'),
|
| 519 |
'city': p('city_municipality'),
|
| 520 |
'province': p('province'),
|
| 521 |
+
'date': p('date_issued', 'date_issuance'),
|
| 522 |
'groom_name': avg('groom_name_first', 'groom_name_middle', 'groom_name_last'),
|
| 523 |
'groom_age': p('groom_age'),
|
| 524 |
'groom_residence': p('groom_residence'),
|
|
|
|
| 696 |
'registry_no': g('registry_no'),
|
| 697 |
'city_municipality': g('city_municipality'),
|
| 698 |
'province': g('province'),
|
| 699 |
+
'date_submitted': g('registration_date'),
|
| 700 |
'child_first': g('name_first'),
|
| 701 |
'child_middle': g('name_middle'),
|
| 702 |
'child_last': g('name_last'),
|
|
|
|
| 721 |
'registry_no': g('registry_no'),
|
| 722 |
'city_municipality': g('city_municipality'),
|
| 723 |
'province': g('province'),
|
| 724 |
+
'date_submitted': g('registration_date'),
|
| 725 |
'deceased_first': g('deceased_name'),
|
| 726 |
'sex': g('sex'),
|
| 727 |
'age_years': g('age'),
|
|
|
|
| 737 |
'registry_no': g('registry_no'),
|
| 738 |
'city_municipality': g('city_municipality'),
|
| 739 |
'province': g('province'),
|
| 740 |
+
'date_submitted': g('registration_date'),
|
| 741 |
'husband_first': g('husband_name_first'),
|
| 742 |
'husband_middle': g('husband_name_middle'),
|
| 743 |
'husband_last': g('husband_name_last'),
|
|
|
|
| 770 |
'registry_no': g('registry_no'),
|
| 771 |
'city_municipality': g('city_municipality'),
|
| 772 |
'province': raw.get('province', '').strip(),
|
| 773 |
+
'date_issuance': g('date_issued', 'date_issuance'),
|
| 774 |
'groom_name': _join_name('groom_name_first', 'groom_name_middle', 'groom_name_last'),
|
| 775 |
'groom_age': g('groom_age'),
|
| 776 |
'groom_residence': g('groom_residence'),
|