The technical details of the Austrian social security number (SVNR)

Engineering

Nov 24, 2024

11/24/24

Have you ever wondered how the SVNR is composed, what information it contains, and how the content can also be validated? - In this article, you will learn more about it.

Have you ever wondered how the SVNR is composed, what information it contains, and how the content can also be validated? - In this article, you will learn more about it.

e-card social insurance Austria
e-card social insurance Austria
e-card social insurance Austria

The Austrian social security number is a central identification feature in the Austrian social security system. It often accompanies people throughout their lives and is needed in many areas. But how is this number structured? Why is it so important, and how can its validity be checked? In this story, you will learn the technical details surrounding the SVNR.

What is the SVNR and why is it needed?

The SVNR is a unique identification number assigned by the Austrian social insurance to each insured person. It ensures that all relevant data of a person in the health system, unemployment insurance, and pension system can be uniquely assigned. The SVNR is used, for example:

  • for doctor visits to identify patients,

  • for billing in health care,

  • for pension insurance,

  • for registrations for social insurance by the employer, and

  • for the payment of sick pay or other social benefits.

Through the SVNR, each insured person can be registered safely and distinctly in the system, which facilitates the processing of services and applications and reduces administrative costs. The SVNR is also stored on the e-card.

The Structure of the SVNR

The SVNR consists of ten digits. Its structure follows a fixed pattern:

  1. The first three digits form a serial number (first digit not equal to zero)

  2. The fourth digit is a check digit

  3. The last four digits are, in most cases, the date of birth of the insured person

The exact structure looks like this:

The SVNR does not include spaces. These are provided here only for better readability.

  • LLL stands for the individual, continuous number,

  • P is a check digit to detect input errors and validate the number,

  • GGGGGG indicates the date of birth.

Deviations of the Date of Birth

Overflow

It can happen that more people are born on a day than the 3-digit serial number can accommodate. This overflow problem is solved with fictitious month entries in the date of birth. Therefore, there may be SVNRs that include month 13, 14, or 15 in the date of birth. For persons with an unknown date of birth, a fictitious month is sometimes assigned.

People over 100

Take, for example, a person born in 1920. This person would be 104 years old today. Since the year of birth in the SVNR is only given in two digits, it cannot be automatically determined whether the person was born in 1920 or 2020.

Conclusion: The date of birth in the SVNR cannot be relied upon. Therefore, it should be avoided to use the date of birth for automatic data processing. I recommend creating two separate fields for input forms, one for specifying the SVNR and one for stating the date of birth.

Validation of the SVNR

The SVNR has a check digit based on mathematical rules. With its help, the validity of a number can be easily determined. The check digit is calculated using the following algorithm:

  1. Write down all 10 digits of the SVNR.

  2. Multiply each digit by the respective weight from the table below.

  3. Add the results of these multiplications.

  4. Calculate the remainder using the Modulo-11 method, by dividing the sum by the prime number 11.

  5. The remainder should correspond to the fourth digit (check digit) of the SVNR.

L

L

L

P

G

G

G

G

G

G

3

7

9

0

5

8

4

2

1

6

Why is Validation Important?

Checking the SVNR ensures that input errors are detected and prevented early. This is especially relevant when the number is entered manually, e.g., during doctor visits or in administrative forms. A software solution we have developed for laboratory requests also uses validation when transferring patient master data to ensure that no incorrect data is transmitted.

Validation with Kotlin

package at.agsolutions.util
 
object SvnrValidator {
 
    private val WEIGHTS = arrayOf(3, 7, 9, 0, 5, 8, 4, 2, 1, 6)
    private val REGEX = Regex("^[0-9]+\$")
 
    fun validate(svnr: String): Boolean {
        if (svnr.length != 10 || !REGEX.matches(svnr) || svnr.first() == '0') {
            return false
        }
 
        return calculateChecksum(svnr) == svnr[3].digitToInt()
    }
 
    private fun calculateChecksum(svnr: String): Int = svnr
        .toCharArray()
        .map { it.digitToInt() }
        .foldIndexed(initial = 0) { index, sum, digit ->
            sum + WEIGHTS[index] * digit
        }
        .mod(11

package at.agsolutions.util
 
object SvnrValidator {
 
    private val WEIGHTS = arrayOf(3, 7, 9, 0, 5, 8, 4, 2, 1, 6)
    private val REGEX = Regex("^[0-9]+\$")
 
    fun validate(svnr: String): Boolean {
        if (svnr.length != 10 || !REGEX.matches(svnr) || svnr.first() == '0') {
            return false
        }
 
        return calculateChecksum(svnr) == svnr[3].digitToInt()
    }
 
    private fun calculateChecksum(svnr: String): Int = svnr
        .toCharArray()
        .map { it.digitToInt() }
        .foldIndexed(initial = 0) { index, sum, digit ->
            sum + WEIGHTS[index] * digit
        }
        .mod(11

package at.agsolutions.util
 
object SvnrValidator {
 
    private val WEIGHTS = arrayOf(3, 7, 9, 0, 5, 8, 4, 2, 1, 6)
    private val REGEX = Regex("^[0-9]+\$")
 
    fun validate(svnr: String): Boolean {
        if (svnr.length != 10 || !REGEX.matches(svnr) || svnr.first() == '0') {
            return false
        }
 
        return calculateChecksum(svnr) == svnr[3].digitToInt()
    }
 
    private fun calculateChecksum(svnr: String): Int = svnr
        .toCharArray()
        .map { it.digitToInt() }
        .foldIndexed(initial = 0) { index, sum, digit ->
            sum + WEIGHTS[index] * digit
        }
        .mod(11

Validation with TypeScript

const calculateChecksum = (svnr: string): number => {
  const weights = [3, 7, 9, 0, 5, 8, 4, 2, 1, 6];
  let sum = 0;
 
  for (let i = 0; i < weights.length; i++) {
    sum += weights[i] * parseInt(svnr[i]);
  }
  sum %= 11;
 
  return sum;
};
 
export const isValidSvnr = (svnr: string): boolean => {
  if (svnr.length !== 10 || !/^[0-9]+$/.test(svnr) || svnr.charAt(0) === '0') {
    return false;
  }
 
  return calculateChecksum(svnr) === parseInt(svnr.charAt(3));
};
const calculateChecksum = (svnr: string): number => {
  const weights = [3, 7, 9, 0, 5, 8, 4, 2, 1, 6];
  let sum = 0;
 
  for (let i = 0; i < weights.length; i++) {
    sum += weights[i] * parseInt(svnr[i]);
  }
  sum %= 11;
 
  return sum;
};
 
export const isValidSvnr = (svnr: string): boolean => {
  if (svnr.length !== 10 || !/^[0-9]+$/.test(svnr) || svnr.charAt(0) === '0') {
    return false;
  }
 
  return calculateChecksum(svnr) === parseInt(svnr.charAt(3));
};
const calculateChecksum = (svnr: string): number => {
  const weights = [3, 7, 9, 0, 5, 8, 4, 2, 1, 6];
  let sum = 0;
 
  for (let i = 0; i < weights.length; i++) {
    sum += weights[i] * parseInt(svnr[i]);
  }
  sum %= 11;
 
  return sum;
};
 
export const isValidSvnr = (svnr: string): boolean => {
  if (svnr.length !== 10 || !/^[0-9]+$/.test(svnr) || svnr.charAt(0) === '0') {
    return false;
  }
 
  return calculateChecksum(svnr) === parseInt(svnr.charAt(3));
};

More Information and Details