description: Identifier holding a number for ZSR (Zahlstellenregister), RCC (Registre des codes-créanciers), RCC (Registro dei codici creditori) package_name: rs/ch.fhir.ig.ch derivation: constraint name: ZSRIdentifier type: Identifier elements: system: short: OID of the ZSR/RCC pattern: {type: uri, value: 'urn:oid:2.16.756.5.30.1.123.100.2.1.1'} type: uri index: 0 value: short: ZSR/RCC number constraint: zsr-length: {human: ZSR must be exactly one letter and 6 digits long, source: 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-zsr-identifier', severity: warning, expression: 'matches(''^[A-Z][0-9]{6}$'')'} zsr-check-digit: {human: 'ZSR must pass the modulus 26 check - https://confluence.sasis.ch/display/PublicZSR/ZSR+Webservice+FAQ', source: 'http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-zsr-identifier', severity: warning, expression: '((substring(1,1).toInteger()*6)+(substring(2,1).toInteger()*5)+(substring(3,1).toInteger()*4)+(substring(4,1).toInteger()*3)+(substring(5,1).toInteger()*2)+(substring(6,1).toInteger()))mod(26)=iif(substring(0,1)=''A'',1,iif(substring(0,1)=''B'',2,iif(substring(0,1)=''C'',3,iif(substring(0,1)=''D'',4,iif(substring(0,1)=''E'',5,iif(substring(0,1)=''F'',6,iif(substring(0,1)=''G'',7,iif(substring(0,1)=''H'',8,iif(substring(0,1)=''I'',9,iif(substring(0,1)=''J'',10,iif(substring(0,1)=''K'',11,iif(substring(0,1)=''L'',12,iif(substring(0,1)=''M'',13,iif(substring(0,1)=''N'',14,iif(substring(0,1)=''O'',15,iif(substring(0,1)=''P'',16,iif(substring(0,1)=''Q'',17,iif(substring(0,1)=''R'',18,iif(substring(0,1)=''S'',19,iif(substring(0,1)=''T'',20,iif(substring(0,1)=''U'',21,iif(substring(0,1)=''V'',22,iif(substring(0,1)=''W'',23,iif(substring(0,1)=''X'',24,iif(substring(0,1)=''Y'',25,iif(substring(0,1)=''Z'',26,-1))))))))))))))))))))))))))'} index: 1 package_version: core-6.0.0-ballot class: complex-type kind: complex-type url: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-zsr-identifier base: http://hl7.org/fhir/StructureDefinition/Identifier version: 6.0.0-ballot required: [system, value]