PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch-core@5.0.0-ballot
    http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-epr-spid-identifier
description: EPR-SPID Identifier (https://www.fedlex.admin.ch/eli/cc/2017/205/de)
package_name: ch.fhir.ig.ch-core
derivation: constraint
name: EPRSPIDIdentifier
type: Identifier
elements:
  system:
    pattern: {type: Uri, value: 'urn:oid:2.16.756.5.30.1.127.3.10.3'}
    index: 0
  value:
    constraint:
      epr-spid-length: {human: EPR-SPID must be exactly 18 characters long, source: 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-epr-spid-identifier', severity: warning, expression: 'matches(''^[0-9]{18}$'')'}
      epr-spid-startswith76133761: {human: EPR-SPID must start with 76133761, source: 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-epr-spid-identifier', severity: warning, expression: startsWith('76133761')}
      epr-spid-modulus-10: {human: 'EPR-SPID must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually', source: 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-epr-spid-identifier', severity: warning, expression: '(((10-((68+(substring(8,1).toInteger()*3)+(substring(9,1).toInteger()*1)+(substring(10,1).toInteger()*3)+(substring(11,1).toInteger()*1)+(substring(12,1).toInteger()*3)+(substring(13,1).toInteger()*1)+(substring(14,1).toInteger()*3)+(substring(15,1).toInteger()*1)+(substring(16,1).toInteger()*3))mod(10)))mod(10))=substring(17,1).toInteger())'}
    index: 1
package_version: 5.0.0-ballot
class: complex-type
kind: complex-type
url: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-epr-spid-identifier
base: http://hl7.org/fhir/StructureDefinition/Identifier
version: 5.0.0-ballot
required: [value, system]