This step extracts a persontm)s birth date and sex from a birth number. Acceptable birth number lengths are 6, 9, or 10 digits after removal of all non-digit characters. Processing of a birth number depends on its length as follows:
The birth number is assumed to be formed by the first six digits without trailer characters (characters next to the slash). If the year value is greater than 53 then 1900 is added; otherwise when the year value is less than or equal to 53 the value 2000 is added. If the result year value denotes a year in the future, 100 is subtracted from the value.
The birth number is assumed to be in the full format including the trailer. The year value is computed in the same way as for 6-digit birth numbers.
The birth number is assumed to be in the full format except for the last digit of the trailer (i.e., yyyyyyxxx). If the year value is greater than 53 then 1800 is added, if the year value is less than or equal to 53 then 1900 is added. If the birth date extracted from the birth number is earlier than the date specified by the birthNumberSince parameter, 100 is added to the year value. This modification is applied only if the trailer can be repaired to contain 4 digits by concatenating the 0 digit at the beginning or at the end of the trailer (this modified birth number must meet the mod11 condition). If the trailer cannot be repaired or corresponds to an artificial trailer, the value of 100 is not added and therefore the result date may be earlier than the date defined in birthNumberSince parameter. In this case, the input birth number is written to the output and the scoring flag BD_DATE_BEFORE_BN_SINCE is set.
If the property "birthDate" is assigned, the computed birth date is compared to the specified "birthDate" value. If those two dates are different then the scoring flag (BD_DATE_MISMATCH) is set. If the computed birth date is in the future (no matter what caused the situation) then 100 years are subtracted from the birth date.
Caution: If the property "birthDate" is present and is different from the computed birth date, then the value stored in the property "birthDate" is saved in the output property "birthDateOut", otherwise the computed birth date is saved in the output property.
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 the Get Birth Date From RC step) see below.
Demonstration of a RC Validator step configuration so that it provides behavior identical to the Get Birth Date From RC step.
Changes of the flag settings for the RC Validator step in comparison with the Get Birth Date From RC step:
In addition, other relevant flags connected to the birth number may be set (see the list of flags for the step RC Validator).
<step id='alg' className='cz.adastra.cif.tasks.clean.RCValidatorAlgorithm'> <rc>bn</rc> <rcOut>bn_out</rcOut> <birthDate>date</birthDate> <birthDateOut>date</birthDateOut> <genderOut>gender</genderOut> <properties> <birthNumberSince>1800-01-01</birthNumberSince> <maleDefinition>chlap</maleDefinition> <femaleDefinition>zenska</femaleDefinition> <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>
<step id='alg' className='cz.adastra.cif.tasks.v1.clean.GetBirthDateFromRCAlgorithm'> <birthDate>datum<birthDate/> <rc>text</rc> <birthDateOut>datum</birthDateOut> <genderOut>gender</genderOut> <properties femaleDefinition="Z"> <birthNumberSince>1900-01-01</birthNumberSince> <scorer explanationColumn='explanation'> <scoringEntries> <scoringEntry key='BD_DATE_MISMATCH' score='100' explain='true' /> <scoringEntry key='BD_INVALID_RC' score='200' explain='true' /> <scoringEntry key='BD_NO_BD_NOR_RC' score='400' explain='true' /> <scoringEntry key='BD_NO_RC' score='800' explain='true' /> </scoringEntries> </scorer> </properties> </step>
iWay Software |