PackagesCanonicalsLogsProblems
    Packages
    healthhub.fhir@2.0.5
    https://healthhub.dk/fhir/StructureDefinition/healthhub-condition
description: null
package_name: healthhub.fhir
derivation: constraint
name: HealthHubCondition
type: Condition
elements:
  onset:
    choices: [onsetDateTime]
    index: 95
  category:
    index: 35
    elements:
      id: {index: 36}
      coding:
        index: 37
        elements:
          id: {index: 38}
          system:
            pattern: {type: uri, value: 'http://terminology.hl7.org/CodeSystem/condition-category'}
            type: uri
            index: 39
          version: {index: 40}
          code: {index: 41}
          display: {index: 42}
          userSelected: {index: 43}
        required: [code, display, system]
      text: {index: 44}
    required: [coding]
  clinicalStatus: {short: active | recurrence | relapse | inactive | remission | resolved | unknown, index: 33}
  meta:
    index: 0
    elements:
      profile: {index: 1}
    required: [profile]
  stage: {index: 128}
  encounter: {index: 93}
  evidence: {index: 129}
  abatement:
    choices: []
    index: 98
  asserter:
    type: Reference
    refers: ['http://hl7.org/fhir/StructureDefinition/Practitioner']
    index: 114
    elements:
      id: {index: 115}
      extension: {index: 116}
      reference: {index: 117}
      type: {index: 118}
      identifier:
        index: 119
        elements:
          id: {index: 120}
          extension: {index: 121}
          use: {index: 122}
          type: {index: 123}
          system:
            binding: {strength: required, valueSet: 'https://healthhub.dk/fhir/ValueSet/employee-identifier-system'}
            index: 124
          value: {index: 125}
          period: {index: 126}
          assigner: {index: 127}
        extensions: {}
        required: [system, value]
    extensions: {}
    required: [identifier, reference]
  note:
    index: 130
    elements:
      id: {index: 131}
      author:
        choices: [authorReference, authorString]
        index: 133
      authorReference:
        type: Reference
        choiceOf: author
        refers: ['http://hl7.org/fhir/StructureDefinition/Practitioner']
        index: 134
      authorString: {type: string, choiceOf: author, index: 135}
      time: {index: 136}
  extension:
    array: true
    min: 1
    max: 3
    index: 2
    slicing:
      slices:
        diagnosisCategory:
          match: {}
          schema:
            isModifier: false
            short: Diagnosis category
            type: Extension
            url: https://healthhub.dk/fhir/StructureDefinition/diagnosis-category
            index: 3
            elements:
              id: {index: 4}
              value:
                choices: []
                index: 6
            required: [value]
        notFollowedAnymore:
          match: {}
          schema:
            type: Extension
            short: End date of the diagnosis.
            isModifier: false
            url: http://hl7.dk/fhir/core/StructureDefinition/NotFollowedAnymore
            index: 7
            elements:
              id: {index: 8}
        diagnosisCard:
          match: {}
          schema: {type: Extension, isModifier: false, url: 'https://healthhub.dk/fhir/StructureDefinition/diagnosis-card', index: 9}
          max: 1
  recordedDate: {index: 99}
  recorder:
    type: Reference
    constraint:
      ref-1: {human: SHALL have a contained resource if a local reference is provided, severity: error, expression: reference.exists().not() or (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')))}
    refers: ['http://hl7.org/fhir/StructureDefinition/Practitioner']
    index: 100
    elements:
      id: {index: 101}
      extension: {index: 102}
      reference: {index: 103}
      type: {short: Type the reference refers to (e.g. "Practitioner"), index: 104}
      identifier:
        index: 105
        elements:
          id: {index: 106}
          extension: {index: 107}
          use: {index: 108}
          type: {index: 109}
          system:
            binding: {strength: required, valueSet: 'https://healthhub.dk/fhir/ValueSet/employee-identifier-system'}
            index: 110
          value: {index: 111}
          period: {index: 112}
          assigner: {index: 113}
        extensions: {}
        required: [system, value]
    extensions: {}
    required: [identifier, reference]
  severity: {index: 45}
  code:
    short: Identification of the diagnosis
    index: 46
    elements:
      id: {index: 47}
      coding:
        short: Code defined by a terminology system ICPC, SKS and ICD
        array: true
        min: 1
        max: 3
        index: 48
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: 1
          max: 3
          slices:
            ICPC2:
              match: {system: 'urn:oid:1.2.208.176.2.31'}
              schema:
                index: 49
                elements:
                  id: {index: 50}
                  system:
                    pattern: {type: uri, value: 'urn:oid:1.2.208.176.2.31'}
                    type: uri
                    index: 51
                  version: {short: Version of the ICPC system, index: 52}
                  code: {short: ICPC2 Code, index: 53}
                  display: {short: ICPC2 Name, index: 54}
                  userSelected: {index: 55}
                required: [code, display, system]
            SKS-D:
              match: {system: 'urn:oid:1.2.208.176.2.4.12'}
              schema:
                index: 56
                elements:
                  id: {index: 57}
                  system:
                    pattern: {type: uri, value: 'urn:oid:1.2.208.176.2.4.12'}
                    type: uri
                    index: 58
                  version: {short: SKS Version, index: 59}
                  code: {short: SKS Code, index: 60}
                  display: {short: SKS Name, index: 61}
                  userSelected: {index: 62}
                required: [code, display, system]
            ICD10:
              match: {system: 'urn:oid:2.16.840.1.113883.6.3'}
              schema:
                index: 63
                elements:
                  id: {index: 64}
                  system:
                    pattern: {type: uri, value: 'urn:oid:2.16.840.1.113883.6.3'}
                    type: uri
                    index: 65
                  code: {index: 66}
                  display: {index: 67}
                  userSelected: {index: 68}
                required: [code, display, system]
      text: {index: 69}
    required: [coding]
  identifier:
    index: 10
    extensions: {}
    elements:
      extension: {index: 11}
      type:
        index: 12
        elements:
          coding: {index: 13}
          text: {index: 14}
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: null
      max: 1
      slices:
        ProviderNumber:
          match: {system: 'urn:oid:1.2.208.176.1.4'}
          schema:
            index: 15
            elements:
              id: {index: 16}
              extension: {index: 17}
              use: {index: 18}
              type: {index: 19}
              system:
                pattern: {type: uri, value: 'urn:oid:1.2.208.176.1.4'}
                type: uri
                index: 20
              value:
                constraint:
                  digits-providernumber: {human: ProviderNumber Identifiers are at minimum and maximum 6 digits long, severity: error, expression: 'matches(''^([0-9]){6}$'')', requirements: ProviderNumber Identifiers are at minimum and maximum 6 digits long}
                index: 21
              period: {index: 22}
              assigner: {index: 23}
            extensions: {}
            required: [system, value]
        SOR-ID:
          match: {system: 'urn:oid:1.2.208.176.1.1'}
          schema:
            index: 24
            elements:
              id: {index: 25}
              extension: {index: 26}
              use: {index: 27}
              type: {index: 28}
              system:
                pattern: {type: uri, value: 'urn:oid:1.2.208.176.1.1'}
                type: uri
                index: 29
              value:
                constraint:
                  min-digits-sor: {human: 'SOR Identifiers are at minimum 11 digits long. See https://sundhedsdatastyrelsen.dk/-/media/sds/filer/rammer-og-retningslinjer/organisationsregistrering/adgang-til-sor/info-om-opbygningen-af-sor-ider.pdf', severity: error, expression: 'matches(''^([0-9]){11,}$'')', requirements: SOR Identifiers are at minimum 11 digits long}
                index: 30
              period: {index: 31}
              assigner: {index: 32}
            extensions: {}
            required: [system, value]
  onsetDateTime: {type: dateTime, choiceOf: onset, index: 96}
  bodySite:
    index: 70
    elements:
      id: {index: 71}
      coding:
        index: 72
        elements:
          display: {short: Højre eller venstre, index: 73}
          userSelected: {index: 74}
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: null
          slices:
            Laterality:
              match: {system: 'http://snomed.info/sct'}
              schema:
                array: true
                max: 2
                index: 75
                elements:
                  id: {index: 76}
                  system:
                    pattern: {type: uri, value: 'http://snomed.info/sct'}
                    type: uri
                    index: 77
                  version: {index: 78}
                  code:
                    binding: {strength: required, valueSet: 'https://healthhub.dk/fhir/ValueSet/laterality'}
                    index: 79
                  userSelected: {index: 80}
                required: [code, system]
            Hokus:
              match: {system: 'https://healthhub.dk/fhir/hokus'}
              schema:
                index: 81
                elements:
                  id: {index: 82}
                  system:
                    pattern: {type: uri, value: 'https://healthhub.dk/fhir/hokus'}
                    type: uri
                    index: 83
                  version: {index: 84}
                  code: {short: Hokus, index: 85}
                  userSelected: {index: 86}
                required: [code, system]
      text: {index: 87}
  verificationStatus: {index: 34}
  subject:
    type: Reference
    refers: ['http://hl7.org/fhir/StructureDefinition/Patient']
    index: 88
    elements:
      id: {index: 89}
      reference: {index: 90}
      identifier: {index: 91}
      display: {index: 92}
    required: [reference]
package_version: 2.0.5
extensions:
  diagnosisCategory:
    url: https://healthhub.dk/fhir/StructureDefinition/diagnosis-category
    isModifier: false
    short: Diagnosis category
    type: Extension
    index: 3
    elements:
      id: {index: 4}
      value:
        choices: []
        index: 6
    required: [value]
  notFollowedAnymore:
    url: http://hl7.dk/fhir/core/StructureDefinition/NotFollowedAnymore
    type: Extension
    short: End date of the diagnosis.
    isModifier: false
    index: 7
    elements:
      id: {index: 8}
  diagnosisCard: {url: 'https://healthhub.dk/fhir/StructureDefinition/diagnosis-card', max: 1, type: Extension, isModifier: false, index: 9}
class: profile
kind: resource
url: https://healthhub.dk/fhir/StructureDefinition/healthhub-condition
base: http://hl7.org/fhir/StructureDefinition/Condition
version: null
required: [code, extension, meta, recordedDate]