PackagesCanonicalsLogsProblems
    Packages
    fhir.outburn.co.il@0.5.2
    http://fhir.outburn.co.il/StructureDefinition/jcpm-related-person
description: Proposed constraints and extensions on the JCPMRelatedPerson Resource
package_name: fhir.outburn.co.il
derivation: constraint
name: JCPMRelatedPerson
type: RelatedPerson
elements:
  identifier:
    index: 0
    elements:
      system: {mustSupport: true, index: 1}
      value: {short: The value that is unique within the system., mustSupport: true, index: 2}
    required: [system, value]
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: 1
      slices:
        il-id:
          match: {system: 'http://fhir.health.gov.il/identifier/il-national-id'}
          schema:
            short: Israeli National Identifier
            mustSupport: true
            pattern:
              type: Identifier
              value: {system: 'http://fhir.health.gov.il/identifier/il-national-id'}
            type: Identifier
            index: 3
            elements:
              value:
                short: An Israeli ID number
                constraint:
                  il-id-chk:
                    human: Israeli ID must be 9-digits with a correct check-digit at the end.
                    source: http://fhir.outburn.co.il/StructureDefinition/jcpm-related-person
                    severity: error
                    expression: "\r\nmatches('[0-9]{9}') and\r\nsubstring(8,1).toInteger()=\r\n(10-((substring(0,1).toInteger() +\r\nsubstring(1,1).toInteger()*2 mod 10 +\r\nsubstring(1,1).toInteger()*2 div 10 +\r\nsubstring(2,1).toInteger() +\r\nsubstring(3,1).toInteger()*2 mod 10 +\r\nsubstring(3,1).toInteger()*2 div 10 +\r\nsubstring(4,1).toInteger() +\r\nsubstring(5,1).toInteger()*2 mod 10 +\r\nsubstring(5,1).toInteger()*2 div 10 +\r\nsubstring(6,1).toInteger() +\r\nsubstring(7,1).toInteger()*2 mod 10 +\r\nsubstring(7,1).toInteger()*2 div 10) mod 10)) mod 10\r\n"
                index: 4
        pna-id:
          match: {system: 'http://fhir.health.gov.il/identifier/pna-national-id'}
          schema:
            short: Palestinian National Identifier
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'http://fhir.health.gov.il/identifier/pna-national-id'}
            type: Identifier
            index: 5
            elements:
              value: {short: A Palestininan ID number, index: 6}
        ppn:
          match:
            type:
              coding:
              - {code: PPN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
          schema:
            short: Passport Number
            mustSupport: false
            array: true
            pattern:
              type: Identifier
              value:
                type:
                  coding:
                  - {code: PPN, system: 'http://terminology.hl7.org/CodeSystem/v2-0203'}
            type: Identifier
            index: 7
            elements:
              type: {index: 8}
              system:
                binding: {strength: required, valueSet: 'http://fhir.health.gov.il/ValueSet/passport-uri'}
                index: 9
              value: {short: Passport Number, index: 10}
            required: [type]
        enc:
          match: {system: 'http://fhir.health.gov.il/identifier/encrypted-id-primary-moh'}
          schema:
            short: Person's Identifier - MoH encrypted
            mustSupport: false
            array: true
            pattern:
              type: Identifier
              value: {system: 'http://fhir.health.gov.il/identifier/encrypted-id-primary-moh'}
            type: Identifier
            index: 11
            elements:
              value: {short: An encrypted identifier, index: 12}
        hadassah-temp:
          match: {system: 'http://fhir.hadassah.org.il/identifier/temporary-patient-id'}
          schema:
            short: Person's Identifier - hadassah temporary id
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'http://fhir.hadassah.org.il/identifier/temporary-patient-id'}
            type: Identifier
            index: 13
            elements:
              value: {short: A Hadassah temporary identifier, index: 14}
        meuhedet-temp:
          match: {system: 'http://fhir.meuhedet.org.il/identifier/temporary-patient-id'}
          schema:
            short: Person's Identifier - meuhedet temporary id
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'http://fhir.meuhedet.org.il/identifier/temporary-patient-id'}
            type: Identifier
            index: 15
            elements:
              value: {short: A Meuhedet temporary identifier, index: 16}
        szmc-temp:
          match: {system: 'http://fhir.szmc.org.il/identifier/temporary-patient-id'}
          schema:
            short: Person's Identifier - szmc temporary id
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'http://fhir.szmc.org.il/identifier/temporary-patient-id'}
            type: Identifier
            index: 17
            elements:
              value: {short: A SZMC temporary identifier, index: 18}
  patient:
    type: Reference
    refers: ['http://fhir.health.gov.il/StructureDefinition/il-core-patient']
    index: 19
  relationship:
    elements:
      coding:
        elements:
          system:
            pattern: {type: uri, value: 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'}
            type: uri
            index: 20
          code:
            pattern: {type: code, value: NMTH}
            type: code
            index: 21
package_version: 0.5.2
class: profile
kind: resource
url: http://fhir.outburn.co.il/StructureDefinition/jcpm-related-person
base: http://hl7.org/fhir/StructureDefinition/RelatedPerson
version: 0.1.0
required: [identifier]