PackagesCanonicalsLogsProblems
    Packages
    laniado.test.fhir.r4@0.1.18
    http://fhir.laniado.org.il/StructureDefinition/laniado-allergy-intolerance
description: Laniado Proposed AllergyIntolerance Profile
package_name: laniado.test.fhir.r4
derivation: constraint
name: LaniadoAllergyIntolerance
type: AllergyIntolerance
elements:
  identifier:
    index: 0
    elements:
      system: {index: 1}
      value: {short: The value that is unique within the system., index: 2}
    required: [value, system]
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: null
      slices:
        laniado:
          match: {system: 'http://fhir.laniado.org.il/Identifier/allergy'}
          schema:
            short: Allergy
            index: 3
            elements:
              system:
                pattern: {type: Uri, value: 'http://fhir.laniado.org.il/Identifier/allergy'}
                index: 4
              assigner:
                elements:
                  reference:
                    pattern: {type: String, value: Organization/01604}
                    index: 5
                  identifier:
                    index: 6
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://institutions.health.gov.il/Institutions'}
                        index: 7
                      value:
                        pattern: {type: String, value: '01604'}
                        index: 8
                  display:
                    pattern: {type: String, value: בית חולים לניאדו}
                    index: 9
                required: [identifier]
  code:
    constraint:
      allergy-drug: {human: 'Element.coding SHOULD contain a DrugGenericTrade code.coding:drug exists', source: 'http://fhir.laniado.org.il/StructureDefinition/laniado-allergy-intolerance', severity: error, expression: 'coding.where(system=''http://snomed.info/sct'' and code=448177004).exists() implies coding.where(system=''http://fhir.laniado.org.il/CodeSystem/generic-drug'' and code.exists()).exists()'}
      allergy-general: {human: 'text SHALL be present if coding:general exists', source: 'http://fhir.laniado.org.il/StructureDefinition/laniado-allergy-intolerance', severity: error, expression: 'coding.where(system=''http://snomed.info/sct'' and code=281647001).exists() implies text.exists()'}
    index: 10
    elements:
      coding:
        index: 11
        slicing:
          rules: open
          ordered: true
          discriminator:
          - {path: system, type: value}
          - {path: code, type: value}
          min: 1
          slices:
            drug:
              match: {system: null, code: null}
              schema:
                pattern:
                  type: Coding
                  value: {code: '448177004', system: 'http://snomed.info/sct', display: Adverse drug interaction}
                index: 12
              min: 0
              max: 1
            laniadoDrug:
              match: {system: 'http://fhir.laniado.org.il/CodeSystem/generic-drug', code: null}
              schema:
                binding: {strength: required, valueSet: 'http://fhir.laniado.org.il/ValueSet/generic-drug'}
                index: 13
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://fhir.laniado.org.il/CodeSystem/generic-drug'}
                    index: 14
            general:
              match: {system: null, code: null}
              schema:
                pattern:
                  type: Coding
                  value: {code: '281647001', system: 'http://snomed.info/sct', display: Adverse reaction}
                index: 15
              min: 0
              max: 1
    required: [coding]
  patient:
    type: Reference
    refers: ['http://fhir.laniado.org.il/StructureDefinition/laniado-patient']
    index: 16
  encounter:
    type: Reference
    refers: ['http://fhir.laniado.org.il/StructureDefinition/encounter-department']
    index: 17
  recorder:
    type: Reference
    refers: ['http://fhir.laniado.org.il/StructureDefinition/laniado-practitioner']
    index: 18
  reaction:
    elements:
      manifestation:
        elements:
          coding:
            index: 19
            elements:
              system: {index: 20}
              code: {index: 21}
            required: [system, code]
            slicing:
              rules: open
              discriminator:
              - {path: system, type: value}
              min: 1
              slices:
                reaction:
                  match: {system: null}
                  schema:
                    pattern:
                      type: Coding
                      value: {code: '419076005', system: 'http://snomed.info/sct', display: Allergic reaction}
                    index: 22
                  min: 0
                  max: 1
                laniado:
                  match: {system: 'http://fhir.laniado.org.il/CodeSystem/k-emr-teguva'}
                  schema:
                    binding: {strength: required, valueSet: 'http://fhir.laniado.org.il/ValueSet/k-emr-teguva'}
                    index: 23
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://fhir.laniado.org.il/CodeSystem/k-emr-teguva'}
                        index: 24
        required: [coding]
      severity:
        constraint:
          allergy-reaction-severity: {human: 'value SHALL be ''severe'' if extension:shock exists', source: 'http://fhir.laniado.org.il/StructureDefinition/laniado-allergy-intolerance', severity: error, expression: 'extension(''http://fhir.laniado.org.il/StructureDefinition/ext-allergy-reaction-severity-shock'').exists() implies $this = ''severe'''}
        index: 25
        extensions:
          shock: {url: 'http://fhir.laniado.org.il/StructureDefinition/ext-allergy-reaction-severity-shock', min: 0, max: 1, type: Extension, index: 26}
        elements:
          extension:
            type: Extension
            url: http://fhir.laniado.org.il/StructureDefinition/ext-allergy-reaction-severity-shock
            index: 26
            slicing:
              slices:
                shock:
                  match: {}
                  schema: {type: Extension, url: 'http://fhir.laniado.org.il/StructureDefinition/ext-allergy-reaction-severity-shock', index: 26}
                  min: 0
                  max: 1
package_version: 0.1.18
class: profile
kind: resource
url: http://fhir.laniado.org.il/StructureDefinition/laniado-allergy-intolerance
base: http://fhir.health.gov.il/StructureDefinition/il-core-allergy-intolerance
version: null