
I want to share my experience gained in the development and maintenance of an information system for the accounting of individuals in one organization. Scale - several tens of thousands of real people. Of course, the collection was made including passport data. As is often the case, an exhaustive TZ was not formulated and some things had to be completed in the process. I would like to tell you about the intricacies of recording individuals for programmers who first encounter such a task. The article will address only questions of full name, citizenship and identity documents. The material turned out to be somewhat chaotic due to the fact that it contains only personal experience without retelling well-known facts and quoting official documents.
First, about the last name, first name and patronymic. First, it is not always obvious to the simple Russian person that there
can be no middle name . And it may not be as foreigners (which is understandable), and the citizens of the Russian Federation (for various reasons). If this is not immediately taken into account and the field is made mandatory, operators will be forced to introduce any kind of garbage there like hyphens.
Farther. Experience shows that in the Russian spelling of the surname and name, in addition to Cyrillic letters,
spaces and hyphens can be found. Other characters in the identity documents have not been encountered.
UPD : in the comments suggested that sometimes there is still an apostrophe.
The third nuance: foreigners (especially from Asia) when reissuing a Russian visa can get a Russian name in a new transcription, this is the level of work of our Foreign Ministry. Therefore, it will be a good practice to create fields in the system for the
names and surnames of foreigners in
Latin .
')
Now that concerns
citizenship and
identity documents . With citizenship, everything is almost simple: with rare exceptions (we will consider them at the end), the citizenship of a person coincides with the country that issued him a passport (or other document). And with the documents - somewhat more complicated.
First, let us briefly list the main
documents proving the identity of citizens in Russia. Usually, people apply with the most usual
internal passport of the Russian Federation . For military personnel, a
military ID is also possible; in addition, representatives of certain professions may encounter such exotic things as
a seaman’s passport or a
service passport . While waiting for a new passport to be ready, for example, upon reaching 20 or 45 years, the document is a
temporary identity card in the form T-2 . It should be borne in mind that the T-2 form is not the certificate from the passport office, which is issued there when the old passport is handed over! Help is needed for her exchange for a new passport, and can also satisfy the curiosity of a faculty member or someone who is not too demanding of documents, but it is unlikely that you can get a loan at the bank, for this you need a full-fledged
temporary certificate with a photo . Its execution is voluntary and is carried out by contacting the FMS department directly.
Passport identifies the identity of only those citizens who have left for permanent residence abroad. Usually, their passports were received at foreign embassies and have special series - 51 or 53. In general, the series of these documents consists of two numbers, the number is seven, and the codes of issuing subdivisions are not at all similar to the codes of internal passports.
For most
foreigners, their identity is certified by
their country's foreign passport , but citizens of some countries may also be in Russia on their
internal passport (there are pages with duplication of basic information in Russian). These countries include Belarus, Kazakhstan, Kyrgyzstan, Tajikistan, Uzbekistan and Ukraine.
However, the most widespread category of documents faced by the average organization in Russia is the internal passports of the Russian Federation, so we will focus on them. There are some features that allow to some extent automate the control of the correctness of their details.
Passport series - as you know, 4 digits. The first two usually correspond to the OKATO / OKTMO code of the subject of the Russian Federation in which they were issued, but with a number of exceptions. One of them is the Crimea and Sevastopol. As far as one can understand from publications on the Internet, last year stocks of passport forms were brought in from all over Russia. The last two digits are approximately equal to the year of issuing a passport, but may differ by 1-2 units in any direction. In addition, the series has an intractable question: do we need a space between these groups of numbers? There is no consensus even among the federal agencies. The FMS, which manages the issuance and registration of passports, in the database on its website handles the series without spaces, and the FTS (tax) in the forms requires that the groups be separated by a space. In my opinion, it’s good practice to enter and store a series without a space, and when generating documents in which it is needed, add it on the fly.
Passport numbers are 6-digit, assigned sequentially within each series, and I don’t know any tricks related to them.
The date of issuance of a passport, according to the chapter “Calculating the Deadlines” of the Civil Code, should not occur on birthdays at 14, 20 and 45 years and following weekends and holidays, otherwise the document will be declared invalid in some particularly picky organizations.
The division that issued the passport and its
code are the longest fields in the list of passport details. Accordingly, they make the most mistakes. The division code consists of two groups of 3 digits separated by a hyphen. The first 2 digits are the region code, but for some reason, not according to OKATO / OKTMO, as in the series, but according to the directory approximately corresponding to KLADR or car codes. 3rd digit - type of division (FMS, ATS, etc.). The last 3 digits are the actual number of the unit. To optimize the input of these data, you can organize auto-completion in the
directory of departments and their codes .
It will also be useful to know that the FMS provides a
verification service on the list of invalid passports . Actually, their entire list is available for free download. The problem is that the file with this list takes up more than 1 GB and organizing its processing on an average server can be a daunting task. In such cases, you can use the
service for automated verification of passports .
Now about the cases when the citizenship of a person differs from the country in which the identity document is issued. First, we must bear in mind the category of stateless persons in general, whose identity can be certified by
a residence permit . Secondly, many residents of partially recognized Abkhazia and South Ossetia, as well as the unrecognized Transnistrian-Moldavian Republic, have Russian citizenship and foreign passports of Russia (since they constantly live outside the Russian Federation), which gives them all the rights and obligations of Russian citizens. Thirdly, these are some residents of the wonderful European country of Latvia, who are mainly of Russian origin. They are considered “non-citizens” and have documents that are called: “
non-citizen passport ”. Fourth, these are refugees.
Of course, this article covers far from all the issues related to programmatic registration of individuals and control of their documents, due to the fact that many of the potential situations the author has not encountered in practice. But despite this, I hope that even the information presented will help someone to prevent typical mistakes in the design of information systems for the processing of personal data and to improve the quality of the information collected through automatic control.