PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.au.base@0.9.3
    http://hl7.org.au/fhir/StructureDefinition/au-practitioner
description: Base profile for Australian context Practitioner
package_name: hl7.fhir.au.base
derivation: constraint
name: AUBasePractitioner
type: Practitioner
elements:
  identifier:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      - {path: type, type: value}
      min: null
      slices:
        hpii:
          match: {system: 'http://ns.electronichealth.net.au/id/hi/hpii/1.0', type: null}
          schema:
            short: HPI-I
            index: 1
            elements:
              type:
                short: HPI-I Identifier Type
                index: 2
                elements:
                  coding:
                    short: HPI-I Identifier Type Code
                    index: 3
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://hl7.org/fhir/v2/0203'}
                        index: 4
                      code:
                        pattern: {type: Code, value: NPI}
                        index: 5
                    required: [system, code]
                  text:
                    short: HPI-I Identifier Type Descriptive Text
                    pattern: {type: String, value: HPI-I}
                    index: 6
                required: [text]
              system:
                short: national namespace for hpi-i
                pattern: {type: Uri, value: 'http://ns.electronichealth.net.au/id/hi/hpii/1.0'}
                index: 7
              value:
                maxLength: 16
                constraint:
                  inv-hpii-0: {human: The HPI-I shall be an exactly 16 digit number, severity: error, expression: 'matches(''^([0-9]{16})$'')', requirements: The value shall be a 16 digit number.}
                  inv-hpii-1: {human: HPI-I prefix is 800361, severity: error, expression: startsWith('800361')}
                  inv-hpii-2: {human: The identifier shall pass the Luhn algorithm check, severity: error, expression: '(((select(substring(0,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(1,1).toInteger())+(select(substring(2,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(3,1).toInteger())+(select(substring(4,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(5,1).toInteger())+(select(substring(6,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(7,1).toInteger())+(select(substring(8,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(9,1).toInteger())+(select(substring(10,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(11,1).toInteger())+(select(substring(12,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(13,1).toInteger())+(select(substring(14,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(substring(15,1).toInteger()))mod 10=0)', requirements: The HPI-I shall pass the Luhn algorithm check}
                index: 8
            required: [value, type, system]
        prescriberNumber:
          match: {system: 'http://ns.electronichealth.net.au/id/medicare-prescriber-number', type: null}
          schema:
            short: Prescriber Number
            index: 9
            elements:
              type:
                short: Prescriber Number Type
                index: 10
                elements:
                  coding:
                    short: Prescriber Number Type Code
                    index: 11
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://hl7.org.au/fhir/v2/0203'}
                        index: 12
                      code:
                        pattern: {type: Code, value: PRES}
                        index: 13
                    required: [system, code]
                  text:
                    short: Prescriber Number Identifier Type Descriptive Text
                    pattern: {type: String, value: Prescriber Number}
                    index: 14
                required: [text]
              system:
                short: namespace for prescriber number
                pattern: {type: Uri, value: 'http://ns.electronichealth.net.au/id/medicare-prescriber-number'}
                index: 15
              value: {index: 16}
            required: [value, type, system]
  qualification:
    index: 17
    elements:
      issuer:
        type: Reference
        refers: ['http://hl7.org.au/fhir/StructureDefinition/au-organisation']
        index: 18
    slicing:
      rules: open
      discriminator:
      - {path: identifier.system, type: value}
      min: null
      slices:
        ahpraRegistration:
          match:
            identifier: {system: 'http://hl7.org.au/id/ahpra-registration-number'}
          schema:
            short: AHPRA Qualificiation Details
            index: 19
            elements:
              identifier:
                short: AHPRA Registration Number
                index: 20
                elements:
                  type:
                    index: 21
                    elements:
                      coding:
                        index: 22
                        elements:
                          system:
                            pattern: {type: Uri, value: 'http://hl7.org.au/fhir/v2/0203'}
                            index: 23
                          code:
                            pattern: {type: Code, value: AHPRA}
                            index: 24
                        required: [system, code]
                      text:
                        pattern: {type: String, value: AHPRA Registration Number}
                        index: 25
                    required: [text]
                  system:
                    pattern: {type: Uri, value: 'http://hl7.org.au/id/ahpra-registration-number'}
                    index: 26
                  value:
                    constraint:
                      inv-ahpra-qual-0: {human: 'The value shall start with 3 uppercase letters, followed by 10 digits.', severity: error, expression: 'matches(''^[A-Z]{3}[0-9]{10}$'')'}
                    index: 27
                required: [value, type, system]
              code:
                short: AHPRA role
                index: 28
                elements:
                  coding:
                    short: AHPRA role coding
                    index: 29
                    slicing:
                      rules: open
                      discriminator:
                      - {path: system, type: value}
                      min: null
                      slices:
                        anzscoCoding:
                          match: {system: null}
                          schema: {short: ANZSCO coded role, index: 30}
                  text: {index: 31}
                required: [text]
              issuer:
                type: Reference
                refers: ['http://hl7.org.au/fhir/StructureDefinition/au-organisation']
                index: 32
                elements:
                  display:
                    pattern: {type: String, value: AHPRA}
                    index: 33
                required: [display]
            required: [issuer, identifier]
  communication: {index: 34}
package_version: 0.9.3
class: profile
kind: resource
url: http://hl7.org.au/fhir/StructureDefinition/au-practitioner
base: http://hl7.org/fhir/StructureDefinition/Practitioner
version: '0.1'