Skip to content

Country pack

Switzerland PII detection: UID, AHV/AVS, IBAN

Updated 15 detectorsPack code ch

Short answer

Maskflare's Switzerland pack has 15 detectors. 6 validate a check digit or letter, 6 test layout or an embedded date, 3 match on pattern alone.

What the Switzerland pack covers

The Switzerland pack holds 15 detectors: AHV/AVS social security number, eMediplan medication plan (QR payload), Electronic patient record id (EPR-SPID), GLN of a health professional, Health insurance card number (Versichertenkarte), IBAN, Passport / identity card number, Licence plate, Patient age, Phone number, Place of residence or origin (gazetteer), Postal code, Residence permit / ZEMIS / N number, Company id (UID / MWST) and ZSR/RCC billing number. 6 of them recompute a check digit or letter, 6 test layout or an embedded date only, 3 are pattern-only, and 6 wait for a keyword before they match.

Examples are synthetic and were run through Maskflare's validators. Click a detector name for its own page where one exists.
DetectorCategoryValidationValid example
AHV/AVS social security numbersocial security numberChecksum756.9217.0769.85
eMediplan medication plan (QR payload)health ID numberPattern onlyNone
Electronic patient record id (EPR-SPID)health ID numberChecksum761337611234567897
GLN of a health professionalhealth ID numberChecksum7601000000019
Health insurance card number (Versichertenkarte)health ID numberLayout rules80756015620245213010
IBANbank account number (IBAN)ChecksumCH93 0076 2011 6238 5295 7
Passport / identity card numberID document numberPattern onlyX1234567
Licence platevehicle identifierLayout rulesZH 123456
Patient agepersonal dateLayout rules51 anni
Phone numberphone numberLayout rules+41 44 668 18 00
Place of residence or origin (gazetteer)locationLayout rulesAndermatt
Postal codepostal codePattern only8001
Residence permit / ZEMIS / N numberID document numberLayout rules12345678
Company id (UID / MWST)tax IDChecksumCHE-123.456.788
ZSR/RCC billing numberhealth ID numberChecksumD123456

Every Switzerland detector in detail

AHV/AVS social security number

A social security or social insurance number. Validation: the prefix 756 and an EAN-13 check digit. Valid example: 756.9217.0769.85; the same shape that fails is 756.9217.0769.80. Full guide: Swiss AHV number.

eMediplan medication plan (QR payload)

A health identifier. Validation: the pattern only, with no checksum or structural validator.

Electronic patient record id (EPR-SPID)

A health identifier. Validation: 18 digits starting 76133761 and a GS1 check digit. Valid example: 761337611234567897; the same shape that fails is 761337611234567890. Full guide: Swiss EPR-SPID.

GLN of a health professional

A health identifier. Validation: 13 digits starting 76 (not 7680) and a GS1 check digit. It needs one of 6 keywords within 48 characters before the value, such as ean nr, ean-nr, gln, global location number. Valid example: 7601000000019; the same shape that fails is 7601000000010. Full guide: Swiss GLN of a health professional.

Health insurance card number (Versichertenkarte)

A health identifier. Validation: 20 digits starting 80756, with a non-repeating serial; the insurers define any check on the serial, so none is applied. Valid example: 80756015620245213010.

IBAN

A bank account identifier. Validation: the registered length for the country and the ISO 13616 modulus 97 check. Valid example: CH93 0076 2011 6238 5295 7; the same shape that fails is CH93 0076 2011 6238 5295 0.

Passport / identity card number

An identity document number. Validation: the pattern only, with no checksum or structural validator. It needs one of 17 keywords within 48 characters before the value, such as ausweisnummer, carta d'identità, carte d'identité, document number. Valid example: X1234567.

Licence plate

A vehicle licence plate. Validation: 4 to 10 letters and digits with at least one of each, shaped by the country's plate formats. It needs one of 30 keywords within 48 characters before the value, such as amtliches kennzeichen, autokennzeichen, autonummer, immatriculation. Valid example: ZH 123456.

Patient age

A personal date or age. Validation: an age from 0 to 89 written next to an age word, as Swiss notes write it. Valid example: 51 anni.

Phone number

A telephone number in the national format. Validation: between 7 and 15 digits, the range an international number can have. Valid example: +41 44 668 18 00.

Place of residence or origin (gazetteer)

A place name. Validation: a match against a list of Swiss place names, with or without the postcode. Valid example: Andermatt; the same shape that fails is Andermata.

Postal code

A postal code, which identifies a place rather than a person on its own. Validation: the pattern only, with no checksum or structural validator. It needs one of 12 keywords within 48 characters before the value, such as cap, code postal, codice postale, npa. Valid example: 8001.

Residence permit / ZEMIS / N number

An identity document number. Validation: a record or permit number written after its keyword, with at least four digits after a letter prefix or six otherwise, never a date, a bare year or one repeated digit. It needs one of 13 keywords within 48 characters before the value, such as aufenthaltsbewilligung, ausländerausweis, n-nummer, niederlassungsbewilligung. Valid example: 12345678.

Company id (UID / MWST)

A tax identifier. Validation: a weighted modulus 11 check digit. Valid example: CHE-123.456.788; the same shape that fails is CHE-123.456.780. Full guide: Swiss UID (CHE number).

ZSR/RCC billing number

A health identifier. Validation: a letter that must equal the weighted digit sum modulo 26. It needs one of 12 keywords within 48 characters before the value, such as k-nummer, no rcc, numero rcc, numéro rcc. Valid example: D123456; the same shape that fails is D123450. Full guide: Swiss ZSR/RCC billing number.

Local-language context words for Switzerland

These are the words in the catalogue that confirm a value as belonging to this country's detector. Shared English words such as ID number or tax id are left out here because many packs use them; a word below points at this pack even when other packs are on.

  • GLN of a health professional: ean nr, ean-nr, gln, global location number, medreg, refdata
  • Passport / identity card number: ausweisnummer, carta d'identità, carte d'identité, document number, id-nr, identitätskarte, numero di passaporto, numéro de passeport, pass-nr, passaporto, passeport, passnummer and 1 more
  • Licence plate: amtliches kennzeichen, autokennzeichen, autonummer, immatriculation, immatrikulation, kennzeichen, kfz-kennzeichen, kontrollschild, licence plate, licence plate number, license plate, license plate number and 18 more
  • Postal code: cap, code postal, codice postale, npa, plz, postleitzahl
  • Residence permit / ZEMIS / N number: aufenthaltsbewilligung, ausländerausweis, n-nummer, niederlassungsbewilligung, numero simic, n° symic, permesso di dimora, permesso di domicilio, permis d'établissement, permis de séjour, symic, zemis and 1 more
  • ZSR/RCC billing number: k-nummer, no rcc, numero rcc, numéro rcc, n° rcc, rcc, zahlstellennummer, zahlstellenregister, zsr, zsr nr, zsr nummer, zsr-nr

How Maskflare masks Switzerland identifiers

Detections are replaced with a token such as mf_mask_d7e0 before the request goes to the AI provider, and with response restoration turned on the real value is put back in the answer. The other actions are redact, partial, hash, format-preserving encryption, generalize, alert and block.

  • Protect now, Finance - Protect now, Healthcare and Developer: mask (a reversible token) when Switzerland is a primary country.
  • Monitor first: alert (counted, forwarded unchanged) when Switzerland is a primary country.

Compliance profiles that include the Switzerland pack: Switzerland - nDSG health data.

Limits worth knowing

  • A passing checksum shows that a value is well formed, not that it was issued to a real person. The examples on this page pass for that reason and are not real.
  • 3 of the 15 detectors here match on pattern alone (eMediplan medication plan (QR payload), Passport / identity card number and Postal code), so they can match text that merely has the same shape.
  • Detectors read the text of the request. A value inside an image is found only after OCR, and a value split across lines is not one match.
  • Names, addresses and free-text details are handled by other packs. This page is limited to the Switzerland identifiers.

Frequently asked questions

What does Maskflare detect for Switzerland?

15 detectors: AHV/AVS social security number, eMediplan medication plan (QR payload), Electronic patient record id (EPR-SPID), GLN of a health professional, Health insurance card number (Versichertenkarte), IBAN, Passport / identity card number, Licence plate, Patient age, Phone number, Place of residence or origin (gazetteer), Postal code, Residence permit / ZEMIS / N number, Company id (UID / MWST) and ZSR/RCC billing number.

Are Switzerland identifiers masked by default?

They are masked when Switzerland is chosen as a primary country (the default Protect now template uses the action mask), or when the pack is turned on directly. A country pack is not on for organisations that did not choose the country.

Which Switzerland identifiers have a checksum?

AHV/AVS social security number, Electronic patient record id (EPR-SPID), GLN of a health professional, IBAN, Company id (UID / MWST) and ZSR/RCC billing number.

Do the Switzerland detectors need keywords?

6 of them do: GLN of a health professional, Passport / identity card number, Licence plate, Postal code, Residence permit / ZEMIS / N number and ZSR/RCC billing number.

Rules on this page describe what Maskflare's detectors and validators check. They are read from the detection catalogue and are not the specification of the body that issues the identifier. Examples are synthetic.

Related pages

See it on your own data

Try Maskflare free.
Bring your hardest prompts.

28-day free trial or 10,000 requests, whichever comes first. Point one app at the gateway or enroll a few laptops,
and watch what gets masked. Or talk to us first.