Identifier detector
Swiss GLN of a health professional: format, validation and detection
Short answer
A Swiss health-professional GLN is a 13-digit GS1 Global Location Number that starts with 76 (not 7680) and ends in a GS1 check digit. Maskflare masks it only after a word such as GLN, MedReg or Refdata.
What it is
GLNs identify locations and parties in the GS1 system. In Swiss healthcare they also identify practitioners and institutions, for example in MedReg and Refdata listings. The Switzerland pack holds this detector and the Swiss nDSG health profile includes it.
In Maskflare this is the detector ch_gln, labelled "Switzerland - GLN of a health professional", category health id number, in the Switzerland pack.
Format and layout
- 13 digits, usually unspaced.
- The number must begin with 76.
- Numbers beginning 7680 are excluded: that prefix is used for Swiss medicine GTINs (product barcodes), not for people.
- The last digit is the GS1 check digit.
How the check works
GS1 modulus 10. Starting from the digit next to the check digit and moving left, multiply digits alternately by 3 and 1, add the products, and the check digit is the amount that brings the total up to the next multiple of 10.
Worked example
- The twelve digits before the check digit are 7 6 0 1 0 0 0 0 0 0 0 1.
- From the right they are weighted 3, 1, 3, 1 and so on, giving a total of 31.
- The next multiple of 10 is 40, so the check digit is 9, which matches.
Valid and invalid examples
| Example | Result | Why |
|---|---|---|
7601000000019 | Valid | Matches the layout and passes the validator. |
7601000000010 | Invalid | The invalid example changes one character, the last character: 9 becomes 0. |
In running text the valid example reads, for instance, GLN 7601000000019. The invalid one is left alone: a value that fails the validator is treated as an ordinary string.
Regex and validation caveats
- A context word is required. A bare 13-digit run is a very common shape (barcodes, EAN codes) and passes the check one time in ten, so the detector waits for one of its keywords before the number, such as GLN, MedReg, Refdata or EAN-Nr.
- Only GLNs that start 76 are considered, so GLNs issued under other prefixes are out of scope.
- Passing the check does not say whether the GLN belongs to a person or to a clinic.
Words that confirm it
The detector masks a match only when one of its keywords appears within 48 characters before the value. The catalogue lists 6: ean nr, ean-nr, gln, global location number, medreg, refdata.
How to detect it in LLM traffic
Swiss GLN of a health professional values appear in referral letters, lab reports, claims exports, appointment lists and clinical notes. When a clinician or administrator asks an assistant to summarise or rewrite such a document, the identifier goes with the text even though the task does not need it.
Maskflare scans the whole request, replaces each match with a token and, with response restoration on, puts the real value back into the answer for the person who is allowed to see it. Health identifiers sit in the Healthcare (PHI) pack, which is on in the default template without a country choice.
If you build the detection yourself
- Strip spaces, dots and hyphens before running any arithmetic, but remember where they were so the original text can be replaced exactly.
- Match the shape with a pattern anchored on word boundaries, so that a long digit string is not read as several shorter Swiss GLN of a health professional candidates.
- Run the check from the section above. A failing check is almost always a typo or a made-up value; a passing one removes most look-alikes.
- Require one of the words listed above shortly before the value. Maskflare looks back 48 characters.
- Replace the value before the text is sent anywhere, and keep a mapping if the answer has to be restored afterwards.
How Maskflare handles it
- 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.
The available actions are mask (reversible token), redact, partial, hash, format-preserving encryption, generalize, alert and block. Masked values are kept encrypted for 30 days so that answers can be restored, then they expire; prompts and responses are not logged. The full list of detectors is in the detector reference.
Compliance profiles that include it
One compliance profile includes the Switzerland pack, and applying it turns this detector on: Switzerland - nDSG health data. A profile is a floor: it never turns anything off or weakens a rule that is already stricter.
Frequently asked questions
Why does the GLN detector need a keyword?
Thirteen-digit numbers with a GS1 check digit are everywhere in retail data. Requiring a word like GLN or MedReg before the number keeps product barcodes from being masked.
Are medicine barcodes masked as GLNs?
No. Numbers starting 7680, the Swiss medicine GTIN prefix, are excluded by the validator.
Is the Swiss GLN of a health professional detector on by default?
It depends on the organisation's primary countries. It is part of the Switzerland pack, which the default Protect now template turns on with the action mask when Switzerland is a primary country.
Does a valid Swiss GLN of a health professional prove the person exists?
No. A check digit shows the value is well formed. Many valid-looking numbers have never been issued, and Maskflare masks them all the same.
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.