📜 ⬆️ ⬇️

Description of the block name

I am developing personal data entry forms. For the convenience of users and increasing the speed of data entry (and the same reduction of expenses on the verification of the entered data) a method was developed for processing the full name block.

image

The block consists of the following fields (depending on the specifics of the fields it may be less): last name, first name, patronymic, date of birth, gender, marital status. Go through the fields consistent.
')
The logic of the personal data block
After entering the last name, the gender is determined at the end of the last name:
Male : 'OB', 'EV', 'IN', 'YN', 'OY', 'TSKI', 'SKY', 'TSKY', 'SKY', 'TSKI'.
Female : 'OVA', 'EVA', 'INA', 'AYA', 'YAYAH', 'EKAYA', 'TSKAYA'.

The full name must be entered in the nominative case!
1. If it was possible to determine the gender by last name, then in the next field “Name” only male names are loaded — a directory of male names (if the gender is determined), female names (similarly) —the female last name. If the last name is asexual (Kravchuk), then both the male and female reference books are loaded.
2. In the “Name” field, depending on the loaded directory of the first letters, the substitution of the full name takes place; when you press “Enter”, the transition to the next field “middle name” occurs. There are also reference books of patronymic names, the values ​​in the field are substituted similarly to the previous item. In the case when a non-reference name is entered (or a name that is not contained in the directory), i.e. it is not possible to determine the gender, again the surname is checked, and the values ​​are loaded into the “middle name” field, and in the case when it is impossible to determine the gender by a name other than a surname, both directories are loaded. If the name is not a reference, it is highlighted in red, and a label indicating an incorrect value is indicated in the database, indicating that the record needs to be re-checked for correctness.
3. Patronymic. After input, it is also checked for reference value and is marked the same way as the name.
4. The form automatically fills the floor as you enter information, if you are sure of it. Those.:
4.1. The surname is male or female, with the name and patronymic from the directory of male or female - the form puts the floor. You need to note that the floor is correct.
4.2. Last name asexual, first name and middle name, if the first name and middle name correspond to the same sex, the form puts the floor.
4.3. Last name + first name if the middle name is empty or it is impossible to determine the gender.
4.4. Last name + middle name, if the name is empty or it is impossible to determine the gender.
5. The form does not automatically put the floor in the presence of only one last name (first and middle names - initials):
5.1. Ivanova I.I. - the form will NOT put down the floor, because there may be an error - the genitive case, in this case the form leaves the floor empty, and you must manually insert it from the questionnaire.

After filling in the remaining fields, the block is exited and the final check:

6. The form asks about the compliance of the name and gender once, when leaving the block, when re-accessing the block, messages will not be displayed for this questionnaire. At the same time combinations are analyzed:
6.1. The end of the family name and gender (Ivanova is male; the form will ask “are you sure?”).
6.2. Invalid matches Surname + Name / Surname + Name + Patronymic (Aleksey Ivanova, Aleksey Ivanovna Ivanov, etc. - the form will ask).
6.3. Invalid matches of name - gender (if there is a full name), similarly to paragraph (6.1) - Ivanova Alexey is female - the form will ask.
7. In case the floor is not affixed - the form will ask the floor when leaving the unit, can you affix the floor?

I wanted to place in the section "These user interfaces", but I have not enough karma.

Source: https://habr.com/ru/post/47623/


All Articles