PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.au.base@1.0.0
    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: Healthcare Provider Identifier – Individual (HPI-I)
            index: 1
            elements:
              type:
                short: Coded identifier type for HPI-I
                index: 2
                elements:
                  coding:
                    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:
                    pattern: {type: String, value: HPI-I}
                    index: 6
              system:
                short: Namespace for HPI-I
                pattern: {type: Uri, value: 'http://ns.electronichealth.net.au/id/hi/hpii/1.0'}
                index: 7
              value:
                short: HPI-I number
                maxLength: 16
                constraint:
                  inv-hpii-0: {human: 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: HPI-I shall pass the Luhn algorithm check}
                index: 8
            required: [value, system]
        prescriberNumber:
          match: {system: 'http://ns.electronichealth.net.au/id/medicare-prescriber-number', type: null}
          schema:
            short: Prescriber Number
            index: 9
            elements:
              type:
                short: Coded identifier type for prescriber number
                index: 10
                elements:
                  coding:
                    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:
                    pattern: {type: String, value: Prescriber Number}
                    index: 14
              system:
                short: Namespace for prescriber number
                pattern: {type: Uri, value: 'http://ns.electronichealth.net.au/id/medicare-prescriber-number'}
                index: 15
              value: {short: Prescriber number, index: 16}
            required: [value, system]
        careAgencyEmployeeIdentifier:
          match: {system: 'http://ns.electronichealth.net.au/id/pcehr/caei/1.0', type: null}
          schema:
            short: Care Agency Employee (CAE) Identifier
            index: 17
            elements:
              type:
                short: Identifier type for CAE identifier
                index: 18
                elements:
                  text:
                    pattern: {type: String, value: Care Agency Employee Identifier}
                    index: 19
              system:
                short: Namespace for CAE identifier
                pattern: {type: Uri, value: 'http://ns.electronichealth.net.au/id/pcehr/caei/1.0'}
                index: 20
              value:
                short: CAE identifier number
                constraint:
                  inv-caei-0: {human: CAE identifier shall be an exactly 16 digit number, severity: error, expression: 'matches(''^([0-9]{16})$'')', requirements: The value shall be a 16 digit number.}
                  inv-caei-1: {human: CAE identifier shall contain a prefix of 900360, severity: error, expression: startsWith('900360')}
                  inv-caei-2: {human: CAE 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)'}
                index: 21
            required: [value, type, system]
  qualification:
    index: 22
    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: Australian Health Practitioner Regulation Agency (AHPRA) Qualification Details
            index: 23
            elements:
              identifier:
                short: AHPRA registration number
                index: 24
                elements:
                  type:
                    short: Coded identifier type for AHPRA registration number
                    index: 25
                    elements:
                      coding:
                        index: 26
                        elements:
                          system:
                            pattern: {type: Uri, value: 'http://hl7.org.au/fhir/v2/0203'}
                            index: 27
                          code:
                            pattern: {type: Code, value: AHPRA}
                            index: 28
                        required: [system, code]
                      text:
                        pattern: {type: String, value: AHPRA registration number}
                        index: 29
                    required: [text]
                  system:
                    short: Namespace for AHPRA registration number
                    pattern: {type: Uri, value: 'http://hl7.org.au/id/ahpra-registration-number'}
                    index: 30
                  value:
                    short: AHPRA registration number
                    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: 31
                required: [value, type, system]
              code:
                short: AHPRA codings
                index: 32
                elements:
                  text: {short: AHPRA Registration Role, index: 33}
                required: [text]
              issuer:
                index: 34
                elements:
                  display:
                    pattern: {type: String, value: AHPRA}
                    index: 35
                required: [display]
            required: [issuer, identifier]
  communication: {index: 36}
package_version: 1.0.0
class: profile
kind: resource
url: http://hl7.org.au/fhir/StructureDefinition/au-practitioner
base: http://hl7.org/fhir/StructureDefinition/Practitioner
version: 1.0.0