Detailed Description of Update Person Type By Ico Rc

Determines the person type according to the birth number (BN, input "rc") and company registration number (CRN, input "ico"). If only one of the properties "rc" or "ico" is specified, then a string corresponding to a natural person or legal person, respectively, is stored in the property "personType". If both properties "rc" and "ico" are present then the quality of the property values determines the resulting "personType" value:

If the "personType" property is specified, then the value is validated, (in case of a conflict between the computed and input person type the scoring flag "PT_CONFLICT" is set) but the "personType" property remains unchanged.

Note: Input quality is determined by membership in one of the following classes (listed from worst to best):

missing, bad format, bad CRC, valid.

Bad format means that both BN and CRN have an incorrect number of digits. Bad CRC means that the last digit is incorrect for a CRN or for a 10-digit BN.

Assume the configuration in which L denotes legal person type, N denotes natural person type, LN denotes that both BN and CRN are present and valid (therefore undecidable) and that the property "personType" is not present:

BN

CRN

Type

Code

7505060002

 

N

 
 

00000027

L

 

7505060001

 

N

PT_NOK_DECIDABLE

 

00000029

L

PT_NOK_DECIDABLE

   

PT_BOTH_NULL

7505060002

00000027

LN

PT_OK_UNDECIDABLE

7505060001

00000029

 

PT_NOK_UNDECIDABLE

7505060002

00000029

N

 

7505060001

00000027

L

 

7505060001

00000002

N

PT_NOK_DECIDABLE

75050600

00000029

L

PT_NOK_DECIDABLE

If the property "personType" is filled in then the step runs as following (in contrast to the first example, the input person type has been added as the third parameter):

BN

CRN

Type Input

Type Output

Code

7505060002

 

N

N

 

7505060001

 

L

L

PT_CONFLICT



Example: Example
<step id='alg' className='cz.adastra.cif.tasks.v1.clean.UpdatePersonTypeByIcoRcAlgorithm'>
        <properties>
                <rc>text</rc>
                <ico>text2</ico>
                <personType>dummy</personType>
                <personTypeWhenNatural>natural person</personTypeWhenNatural>
                <personTypeWhenLegal>legal person</personTypeWhenLegal>
                <personTypeWhenBoth>legal person</personTypeWhenBoth>
                <scorer explanationColumn='explanation'>
                        <scoringEntries>
                                <scoringEntry key='PT_OK_UNDECIDABLE' score='100' explain='true' />
                                <scoringEntry key='PT_NOK_UNDECIDABLE' score='200' explain='true' />
                                <scoringEntry key='PT_NOK_DECIDABLE' score='400' explain='true' />
                                <scoringEntry key='PT_BOTH_NULL' score='800' explain='true' />
                                <scoringEntry key='PT_CONFLICT' score='1600' explain='true' />
                        </scoringEntries>
                </scorer>
        </properties>
</step>

iWay Software