Detailed Description of Validate RC

Verifies input birth numbers and recognizes and completes missing information. Birth number is considered valid in the following cases:

The term "mod11 condition" denotes the following birth number validation method:

The input birth number is split into two parts - part A, which is formed by the first 9 digits of the birth number, and part n, which consists of the last digit of the birth number. Then a simple test which verifies the truth of the expression A modulo 11 = n is conducted. If A modulo 11 = 10 then 0 is considered to be the result of the modulo operation. The mod11 condition can be tested for 10 digit birth numbers only.

Example:

Input birth number: 8151010043, A = 815101004, n = 3, A modulo 11 = 3, which implies that the sample birth number meets the condition.

Input birth number: 8102060110, A = 810206011, n = 0, A modulo 11 = 10, i.e. result = 0, and the input birth number also meets the condition.

If a valid birth number may be obtained from the invalid birth number by a modification of the trailer then the modification is executed and the appropriate scoring flags are set. This step modifies trailers in the following situations:

The value of the output birth number is influenced by the following parameters:

If the input birthDate is present, the computed birth date is compared with the input birth date. If the input gender is present, the computed gender is compared with the input gender.

Caution: As opposed to other validation steps, the computed gender value and not validated (i.e., probably correct) value of gender is written to the output property genderOut. This behavior maintains backward compatibility with existing configurations. The value of the gender is written to the output whenever the date component of the birth date is valid (i.e., a valid value of the year, month and day and the month part is in the extended format only for dates after 1.4.2004). This behavior causes the computed gender to be written to the output even if the whole birth number is evaluated as invalid by problems which do not influence computation of the gender. As errors, which prevent the step from writing gender to the output, are considered, set the scoring flags FLAG_RC_MISSING, FLAG_RC_INVALID, FLAG_DATE_INVALID, FLAG_DATE_ARTIF These flags are exclusive - more then one scoring flags cannot be set at once.

If the computed and input gender values differ, then the computed gender value is written to the output and the flag FLAG_GNDR_MISMATCH is set.

The same functionality is provided by a more general step - RC Validator For an example of the RC Validator configuration sections (in order to work the same way as this step) see below.


Top of page

Example: Example
<step id='alg' className='cz.adastra.cif.tasks.v1.clean.ValidateRCAlgorithm'>
        <rc>bn</rc>
        <rcOut>clean_bn</rcOut>
        <birthDate>date</birthDate>
        <gender>gender_hint</gender>
        <properties>
                <canFix10digitBn>true</canFix10digitBn>
                <omitInvalidBn>true</omitInvalidBn>
                <maleDefinition>M</maleDefinition>
                <femaleDefinition>F</femaleDefinition>
                <dummyDate>1900-01-01</dummyDate>
                <birthNumberSince>1902-01-01</birthNumberSince>
                <allowArtificialTrailers>true</allowArtificialTrailers>
                <trailers>
                        <trailer>888</trailer>
                        <trailer>8888</trailer>
                </trailers>
                <scorer explanationColumn='expl'>
                        <scoringEntries>
                                <scoringEntry key="RC_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_ARTIF" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_MISMATCH" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_FIXED" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_ARTIF" score="1000" explain="true" />
                                <scoringEntry key="RC_9DIGITS" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_MISMATCH" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_FROM_HINT" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_HINT_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_HINT_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_HINT_MISSING" score="1000" explain="true" />
                        </scoringEntries>
                </scorer>
        </properties>
</step>
<step id='alg' className='cz.adastra.cif.tasks.clean.RCValidatorAlgorithm'>
        <rc>bn</rc>
        <rcOut>clean_bn</rcOut>
        <birthDate>date</birthDate>
        <gender>gender_hint</gender>
        <properties>
                <canFix10digitBn>true</canFix10digitBn>
                <dummyDate>1900-1-1</dummyDate>
                <birthNumberSince>1902-01-01</birthNumberSince>
                <allowArtificialTrailers>true</allowArtificialTrailers>
                <omitInvalidBn>false</omitInvalidBn>
                <trailers>
                        <trailer>123</trailer>
                        <trailer>8888</trailer>
                </trailers>
                <scorer explanationColumn='expl'>
                        <scoringEntries>
                                <scoringEntry key="RC_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_ARTIF" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_MISMATCH" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_FIXED" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_TRLR_ARTIF" score="1000" explain="true" />
                                <scoringEntry key="RC_9DIGITS" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_MISMATCH" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_FROM_HINT" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_HINT_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_GNDR_HINT_INVALID" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_HINT_MISSING" score="1000" explain="true" />
                                <scoringEntry key="RC_GENERATED" score="1000" explain="true" />
                                <scoringEntry key="RC_NOT_GENERATED" score="1000" explain="true" />
                                <scoringEntry key="RC_DATE_BEFORE_BN_SINCE" score="1000" explain="true" />
                        </scoringEntries>
                </scorer>
        </properties>
</step>

iWay Software