PackagesCanonicalsLogsProblems
    Packages
    rs/hl7.fhir.au.base@1.0.0
    http://hl7.org.au/fhir/StructureDefinition/au-healthcareservice
description: Base profile for Australian context Healthcare Service
package_name: rs/hl7.fhir.au.base
derivation: constraint
name: AUBaseHealthcareService
type: HealthcareService
elements:
  extension:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        eligibilityDetails:
          match: {url: null}
          schema: {type: Extension, short: Healthcare Service Eligibility Detail, url: h, index: 1}
        communication:
          match: {url: null}
          schema: {type: Extension, short: Healthcare Service Communication Languages, url: h, index: 2}
  identifier:
    short: Healthcare service identifiers
    index: 3
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      - {path: type, type: value}
      min: null
      slices:
        hpio:
          match: {system: 'http://ns.electronichealth.net.au/id/hi/hpio/1.0', type: null}
          schema:
            short: Healthcare Provider Identifier – Organisation (HPI-O)
            index: 4
            elements:
              type:
                short: Identifier type for HPI-O
                index: 5
                elements:
                  coding:
                    index: 6
                    elements:
                      system:
                        pattern: {type: uri, value: 'http://hl7.org.au/fhir/v2/0203'}
                        type: uri
                        index: 7
                      code:
                        pattern: {type: code, value: NOI}
                        type: code
                        index: 8
                    required: [code, system]
                  text:
                    pattern: {type: string, value: HPI-O}
                    type: string
                    index: 9
              system:
                short: Namespace for HPI-O
                pattern: {type: uri, value: 'http://ns.electronichealth.net.au/id/hi/hpio/1.0'}
                type: uri
                index: 10
              value:
                short: HPI-O number
                maxLength: 16
                constraint:
                  inv-hpio-0: {human: HPI-O shall be an exactly 16 digit number, severity: error, expression: 'matches(''^([0-9]{16})$'')'}
                  inv-hpio-1: {human: HPI-O prefix is 800362, severity: error, expression: startsWith('800362')}
                  inv-hpio-2: {human: HPI-O 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: 11
            required: [system, value]
  specialty:
    short: Healthcare service provided specialties
    index: 12
    slicing:
      rules: open
      discriminator:
      - {path: coding.system, type: value}
      min: null
      slices:
        snomedRole:
          match:
            coding: {system: null}
          schema: {short: Healthcare Service Specialty SNOMED CT, index: 13}
  serviceProvisionCode:
    short: Healthcare service provision conditions
    index: 14
    slicing:
      rules: open
      discriminator:
      - {path: coding.system, type: value}
      min: null
      slices:
        auServiceProvisionCode:
          match:
            coding: {system: null}
          schema: {short: Australian service provision conditions, index: 15}
  eligibility: {short: Primary eligibility criteria for service, index: 16}
package_version: 1.0.0
extensions:
  eligibilityDetails: {url: h, type: Extension, short: Healthcare Service Eligibility Detail, index: 1}
  communication: {url: h, type: Extension, short: Healthcare Service Communication Languages, index: 2}
class: profile
kind: resource
url: http://hl7.org.au/fhir/StructureDefinition/au-healthcareservice
base: http://hl7.org/fhir/StructureDefinition/HealthcareService
version: 1.0.0