Dear all,
The EP application number consists of 8 digits (yy######) with an optional period and check digit following this application number (yy######.#).
Frequently, (commercial) data sources include the EP application number without the check digit. We are frequently interested in the legal status of national entries including e.g. the Dutch national phase. It is possible to use the EP application or publication number as a search term in the Dutch register. But an easier option would be to have the computer convert the found EP data into a deeplink to the relevant page in the Dutch register. Problem here is that the relevant deeplink requires the EP application number including the checkdigit.
What is the algorithm to calculate the check digit starting from the 8 digit EP application number? So I can write a script to convert an 8 digit application number into a deeplink for the Dutch register and eventual others that require the checkdigit in a deeplink.
Regards,
Gerben
EP application number check digit algorithm

 Posts: 1173
 Joined: Thu Feb 22, 2007 5:32 pm
Re: EP application number check digit algorithm
Hi,
Here are rules that you can implement for EP application check digits (from 01.01.2002 onwards)
Calculation of the check digit:
1.) take the no and multiply each digit with 1,2, 1... like this, 9 x1, 9 x2, 4 x1, 0 x2, 3 x1, 1 x2, 2 x1, 2 x2 in the example as you see below:
9 9 4 0 3 1 2 2 .7
x x x x x x x x
1 2 1 2 1 2 1 2
= 9 18 4 0 3 2 2 4
2.) Sum each digits from that results as here:
9+1+8+4+0+3+2+2+4 = 33
3.) divide the total sum by 10
33 : 10 = 3 , remains 3
4.) then subtract that result from 10
10  3 = 7 is the check digit
I hope this helps
Vesna for OPS support
Here are rules that you can implement for EP application check digits (from 01.01.2002 onwards)
Calculation of the check digit:
1.) take the no and multiply each digit with 1,2, 1... like this, 9 x1, 9 x2, 4 x1, 0 x2, 3 x1, 1 x2, 2 x1, 2 x2 in the example as you see below:
9 9 4 0 3 1 2 2 .7
x x x x x x x x
1 2 1 2 1 2 1 2
= 9 18 4 0 3 2 2 4
2.) Sum each digits from that results as here:
9+1+8+4+0+3+2+2+4 = 33
3.) divide the total sum by 10
33 : 10 = 3 , remains 3
4.) then subtract that result from 10
10  3 = 7 is the check digit
I hope this helps
Vesna for OPS support
Re: EP application number check digit algorithm
Thanks Vesna,
Exactly what I needed
Exactly what I needed
Re: EP application number check digit algorithm
Actually,
One question, which of the two threes should I substract from the 10?
The 3 that is the integer result of the division or the 3 that is the remains?
(33 : 10 = 3 remains 3)
I suppose it is the remains value, that would make most sense. Just to be sure.
Gerben
One question, which of the two threes should I substract from the 10?
The 3 that is the integer result of the division or the 3 that is the remains?
(33 : 10 = 3 remains 3)
I suppose it is the remains value, that would make most sense. Just to be sure.
Gerben

 Posts: 1173
 Joined: Thu Feb 22, 2007 5:32 pm
Re: EP application number check digit algorithm
Two more examples that explain better. The example from yesterday was example I found but is probably less descriptive because it ends with only round number 3 , but that doesn't need to be the case and the two below are clearer, I would say:
07109822.2
xxxxxxxx
12121212
========
0141091624= 28
28:10=2,8
102.8=7,2
08251935.6
xxxxxxxx
12121212
================
0+1+6+2+1+0+1+1+8+3+1+0=24
24:10= 2,4
102,4=7,6
Regards, Vesna
07109822.2
xxxxxxxx
12121212
========
0141091624= 28
28:10=2,8
102.8=7,2
08251935.6
xxxxxxxx
12121212
================
0+1+6+2+1+0+1+1+8+3+1+0=24
24:10= 2,4
102,4=7,6
Regards, Vesna
Re: EP application number check digit algorithm
Vesna,
This is a different calculation and one that brings a (theoretical) interesting artefact.
Theortically the highest application number is 99999999
multiplied by alternating factors 1 and 2 followed by summarisation produces a theoretical max value of 108
In the first suggested method:
10  ([calc value] mod 10)
this would result in 10  8 = 2 as checkdigit
in the second method:
decimal part of {10  ([calc value] : 10)}
this would result in decimal part of 1010.8 = 0.8 => 8 as checkdigit
I trust that there are some limitations that will make sure the application number never reaches a combination that would lead to a result of the first multiplication and summarisation above 100. If it does not, we need to know which of the two procedures to follow in case the summarised multiplications go above 100.
Gerben
This is a different calculation and one that brings a (theoretical) interesting artefact.
Theortically the highest application number is 99999999
multiplied by alternating factors 1 and 2 followed by summarisation produces a theoretical max value of 108
In the first suggested method:
10  ([calc value] mod 10)
this would result in 10  8 = 2 as checkdigit
in the second method:
decimal part of {10  ([calc value] : 10)}
this would result in decimal part of 1010.8 = 0.8 => 8 as checkdigit
I trust that there are some limitations that will make sure the application number never reaches a combination that would lead to a result of the first multiplication and summarisation above 100. If it does not, we need to know which of the two procedures to follow in case the summarised multiplications go above 100.
Gerben

 Posts: 1173
 Joined: Thu Feb 22, 2007 5:32 pm
Re: EP application number check digit algorithm
I suggest first example, that is the one presented in a document that I have found  i would trust that more
But which ever no I try with the second, I always get correct result too
9 9 9 5 1 7 6 1.8
x x x x x x x x
1 2 1 2 1 2 1 2
==============
9 18 9 10 1 14 6
9+1+8+9+1+0+1+1+4+6=42
42:10=4.2
104,2=5,8
But which ever no I try with the second, I always get correct result too
9 9 9 5 1 7 6 1.8
x x x x x x x x
1 2 1 2 1 2 1 2
==============
9 18 9 10 1 14 6
9+1+8+9+1+0+1+1+4+6=42
42:10=4.2
104,2=5,8